Page MenuHomePhabricator

Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string)
Closed, InvalidPublic

Description

PHP Fatal Error: Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string): int

MediaWiki 1.43 and php 8.2.

https://github.com/wikimedia/mediawiki/commit/5a6838829c4c63215d4e622164ce29e15c7024d0 upgraded psr/http-message to 1.1 which did https://github.com/php-fig/http-message/commit/cb6ce4845ce34a8ad9e68117c10ee90a29919eba.

Event Timeline

Change #1128036 had a related patch set uploaded (by Paladox; author: Paladox):

[mediawiki/core@master] MWCallbackStream: Fix "Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write"

https://gerrit.wikimedia.org/r/1128036

I fixed it locally. An extension had a newer http-message version. We use a tool to deploy mw. So the version I was looking at was different to the one on another server. I eventually found the cause. And re-deployed the extension with the correct version.

The linked change can still be merged.

Change #1128036 abandoned by Paladox:

[mediawiki/core@master] MWCallbackStream: Fix "Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string)"

https://gerrit.wikimedia.org/r/1128036