Steps to replicate the issue
Trying to login on a self-hosted MediaWiki site, after the login process, the site become unreachable.
What happens?
The debug log shows the following details:
[PluggableAuth] Getting PluggableAuth instance
[PluggableAuth] Plugin name: WSOAuth
[exception] [0658d403eb67ddafb7ac738b] /dt/index.php/Special:Version PHP Fatal Error from line 68 of /var/www/html/dt/extensions/WSOAuth/src/AuthenticationProvider/MediaWikiAuth.php: Declaration of WSOAuth\AuthenticationProvider\MediaWikiAuth::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with WSOAuth\AuthenticationProvider\AuthProvider::setLogger(Psr\Log\LoggerInterface $logger): void
#0 [internal function]: MWExceptionHandler::handleFatalError()
#1 {main}What should have happened instead?
Login process should finish properly
Software version
| Product | Version |
|---|---|
| MediaWiki | 1.43.1 |
| PHP | 8.3.6 (apache2handler) |
| ICU | 74.2 |
| MariaDB | 10.11.13-MariaDB-0ubuntu0.24.04.1 |
| PluggableAuth | 7.5.0 (825c652) |
| WSOAuth | 9.0.0 (4820686) |
Conclusions
As far as I understand, the problem is in the definition of the function:
/** * @inheritDoc */ public function setLogger( LoggerInterface $logger ) { parent::setLogger( $logger ); $this->client->setLogger( $logger ); }
the definition should be:
public function setLogger( LoggerInterface $logger ): void {
instead.
I tried to manually apply this modification to my installation and it started working.