Page MenuHomePhabricator

Flow\Tests\Import\TalkpageImportOperationTest::testImportDoesntCompletelyFail fails on PHP 7.2
Closed, ResolvedPublic

Description

1) Flow\Tests\Import\TalkpageImportOperationTest::testImportDoesntCompletelyFail
Failed asserting that 0 matches expected 1.

/var/www/wiki/mediawiki/extensions/Flow/tests/phpunit/Import/TalkpageImportOperationTest.php:171
/var/www/wiki/mediawiki/core/tests/phpunit/MediaWikiTestCase.php:416
/var/www/wiki/mediawiki/core/maintenance/doMaintenance.php:94

https://integration.wikimedia.org/ci/job/wmf-quibble-core-vendor-mysql-php72-docker/4/console

Details

Related Gerrit Patches:
mediawiki/extensions/Flow : masterCheck if result is an array before calling count()

Event Timeline

Reedy created this task.Oct 9 2018, 11:16 PM
Restricted Application added a project: Growth-Team. · View Herald TranscriptOct 9 2018, 11:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Are you seeing this locally or in CI?

Legoktm renamed this task from Flow\Tests\Import\TalkpageImportOperationTest::testImportDoesntCompletelyFail fails to Flow\Tests\Import\TalkpageImportOperationTest::testImportDoesntCompletelyFail fails on PHP 7.2.Oct 13 2018, 5:03 PM
Legoktm added a project: PHP 7.2 support.
Legoktm updated the task description. (Show Details)
Legoktm added a subscriber: Legoktm.

Are you seeing this locally or in CI?

I can also reproduce this failure on PHP 7.2 in CI. I'm guessing that's what Reedy also has locally.

Change 470469 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/Flow@master] Check if result is an array before calling count()

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

It would be nice to use PHP 7.3's is_countable() instead of is_array() but I assume we can't do that because we want to support 7.0/7.1/7.2 as well?

kostajh moved this task from Inbox to Current Sprint on the Growth-Team board.Oct 29 2018, 8:47 PM
kostajh edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
kostajh moved this task from Incoming to Code Review on the Growth-Team (Current Sprint) board.

It would be nice to use PHP 7.3's is_countable() instead of is_array() but I assume we can't do that because we want to support 7.0/7.1/7.2 as well?

We have historically polyfilled PHP functions (e.g. b9e1d5f5c066a26f115eac69e268a98e6591d121) in GlobalFunctions.php if we had a good case to use them. I'm not sure is_countable rises to that need since is_array is close enough for most cases.

Legoktm assigned this task to kostajh.Oct 29 2018, 10:28 PM

Change 470469 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Check if result is an array before calling count()

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

Etonkovidova closed this task as Resolved.Nov 5 2018, 5:21 PM