Page MenuHomePhabricator

Replace deprecated RevisionStore::newMutableRevisionFromArray in CreatedPagesList
Closed, ResolvedPublic

Description

The CreatedPagesList extension tests fails on:

14:24:11 There was 1 error:
14:24:11 
14:24:11 1) CreatedPagesListRecalculateTest::testInitialize
14:24:11 Use of MediaWiki\Revision\RevisionStore::newMutableRevisionFromArray was deprecated in MediaWiki 1.31. [Called from CreatedPagesListRecalculateTest::testInitialize in /workspace/src/extensions/CreatedPagesList/tests/phpunit/CreatedPagesListRecalculateTest.php at line 66]
14:24:11 
14:24:11 /workspace/src/includes/debug/MWDebug.php:376
14:24:11 /workspace/src/includes/debug/MWDebug.php:350
14:24:11 /workspace/src/includes/debug/MWDebug.php:230
14:24:11 /workspace/src/includes/GlobalFunctions.php:1036
14:24:11 /workspace/src/includes/Revision/RevisionStore.php:2248
14:24:11 /workspace/src/extensions/CreatedPagesList/tests/phpunit/CreatedPagesListRecalculateTest.php:66
14:24:11 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:448
14:24:11 === Logs generated by test case
14:24:11 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
14:24:11 [localisation] [debug] LocalisationCache using store LCStoreNull []
14:24:11 [objectcache] [debug] fetchOrRegenerate(wikidb-unittest_:page-restrictions:v1:2:0): miss, new value computed []
14:24:11 [wfDebug] [debug] Title::getRestrictionTypes: applicable restrictions to [[Page 1]] are {edit,move} {"private":false}
14:24:11 ===

Event Timeline

Zabe added a project: User-Zabe.
Zabe added a subscriber: Zabe.

Change 691581 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CreatedPagesList@master] Replace use of newMutableRevisionFromArray

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

My patch fixes the error, but now there is another one. It seems to be unrelated as it also occurs if I just hide the deprecation warning (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CreatedPagesList/+/691318).

16:23:46 There was 1 error:
16:23:46 
16:23:46 1) CreatedPagesListRecalculateTest::testInitialize
16:23:46 Wikimedia\Rdbms\DBQueryError: Error 1055: 'wikidb.actor_rev_user.actor_user' isn't in GROUP BY (localhost:/workspace/db/quibble-mysql-86rhi6cd/socket)
16:23:46 Function: CreatedPagesList::recalculateSqlTable
16:23:46 Query: SELECT  actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor`,page_namespace AS namespace,page_title AS title,rev_timestamp AS timestamp  FROM `unittest_page`,`unittest_revision` JOIN `unittest_revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `unittest_actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor))   WHERE page_is_redirect = 0 AND page_namespace = 0 AND (rev_page=page_id) AND rev_parent_id = 0  GROUP BY rev_page 
16:23:46

Change 691581 merged by jenkins-bot:

[mediawiki/extensions/CreatedPagesList@master] Fix a CI error and a deprecation warning

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