Reported to me via email...
https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.10.patch.gz applies fine ontop of the 1.31.9 git tag...
But if you try and apply https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.10.patch.gz ontop of https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.9.patch.gz it gets rejected (ontop of 1.31.8 git tag)
It looks, offhand something weird to do with whitespace of $this->invalidateCache();
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/tools/release/make-release$ diff mediawiki-1.31.9/includes/user/User.php mediawiki-1.31.10/includes/user/User.php 2531c2531 < if ( !$this->mActorId && $dbw ) { --- > if ( $this->mActorId === null || !$this->mActorId && $dbw ) { 2532a2533,2536 > if ( !$dbw ) { > // Read from a database, flags are used for wfGetDB() > $dbw = $this->queryFlagsUsed; > } 2535c2539,2541 < $this->invalidateCache(); --- > if ( $dbw instanceof IDatabase ) { > $this->invalidateCache(); > } reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/tools/release/make-release$ grep User\.php ~/mediawiki-1.31.10.patch -A 20 diff -Nruw mediawiki-1.31.9/includes/user/User.php mediawiki-1.31.10/includes/user/User.php --- mediawiki-1.31.9/includes/user/User.php 2020-09-24 15:09:03.345337400 +0100 +++ mediawiki-1.31.10/includes/user/User.php 2020-09-25 17:46:24.920534800 +0100 @@ -2528,11 +2528,17 @@ $this->load(); } - if ( !$this->mActorId && $dbw ) { + if ( $this->mActorId === null || !$this->mActorId && $dbw ) { $migration = MediaWikiServices::getInstance()->getActorMigration(); + if ( !$dbw ) { + // Read from a database, flags are used for wfGetDB() + $dbw = $this->queryFlagsUsed; + } $this->mActorId = $migration->getNewActorId( $dbw, $this ); + if ( $dbw instanceof IDatabase ) { $this->invalidateCache(); + } $this->setItemLoaded( 'actor' ); }
Applying the patch...
reedy@ubuntu64-web-esxi:~/git/mediawiki/core$ patch -p1 -i mediawiki-1.31.10.patch patching file includes/ActorMigration.php patching file includes/Defines.php patching file includes/user/User.php Hunk #1 FAILED at 2528. 1 out of 1 hunk FAILED -- saving rejects to file includes/user/User.php.rej patching file RELEASE-NOTES-1.31 patching file tests/phpunit/includes/ActorMigrationTest.php
And such
reedy@ubuntu64-web-esxi:~/git/mediawiki/core$ cat includes/user/User.php.rej --- includes/user/User.php 2020-09-24 15:09:03.345337400 +0100 +++ includes/user/User.php 2020-09-25 17:46:24.920534800 +0100 @@ -2528,11 +2528,17 @@ $this->load(); } - if ( !$this->mActorId && $dbw ) { + if ( $this->mActorId === null || !$this->mActorId && $dbw ) { $migration = MediaWikiServices::getInstance()->getActorMigration(); + if ( !$dbw ) { + // Read from a database, flags are used for wfGetDB() + $dbw = $this->queryFlagsUsed; + } $this->mActorId = $migration->getNewActorId( $dbw, $this ); + if ( $dbw instanceof IDatabase ) { $this->invalidateCache(); + } $this->setItemLoaded( 'actor' ); }