Page MenuHomePhabricator

UploadBaseTest fails on PHP 7.2
Closed, ResolvedPublic

Description

5 errors (6 Apr 2018)
13) UploadBaseTest::testTitleValidation with data set #5 ('A', null, 8, 'upload title without extension')
fopen(): Filename cannot be empty
/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:647
/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:618
/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:961
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:585
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:35
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:420
/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94
14) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #0 ('<?xml version="1.0" encoding=...</svg>', true)
iconv(): Detected an incomplete multibyte character in input string
/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:1429
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:565
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:420
/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94
15) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #1 ('<?xml version="1.0" encoding=...</svg>', false)
iconv(): Detected an incomplete multibyte character in input string
/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:1429
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:565
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:420
/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94
16) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #2 ('<?xml version="1.0" encoding=...</svg>', false)
iconv(): Detected an incomplete multibyte character in input string
/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:1429
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:565
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:420
/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94
17) UploadStashTest::testBug29408
getimagesize(): Read error!
/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:837
/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:618
/home/travis/build/wikimedia/mediawiki/includes/utils/MWFileProps.php:73
/home/travis/build/wikimedia/mediawiki/includes/upload/UploadStash.php:221
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadStashTest.php:51
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:420
5 errors (8 Dec 2017)
26) UploadBaseTest::testTitleValidation with data set #5 ('A', null, 8, 'upload title without extension')

fopen(): Filename cannot be empty


/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:647

/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:618

/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:961

/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:580

/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:35

/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:416

/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94


27) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #0 ('<?xml version="1.0" encoding=...</svg>', true)

iconv(): Detected an incomplete multibyte character in input string


/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:1429

/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:560

/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:416

/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94


28) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #1 ('<?xml version="1.0" encoding=...</svg>', false)

iconv(): Detected an incomplete multibyte character in input string


/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:1429

/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:560

/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:416

/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94


29) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #2 ('<?xml version="1.0" encoding=...</svg>', false)

iconv(): Detected an incomplete multibyte character in input string


/home/travis/build/wikimedia/mediawiki/includes/upload/UploadBase.php:1429

/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:560

/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:416

/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94


30) UploadStashTest::testBug29408

getimagesize(): Read error!


/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:837

/home/travis/build/wikimedia/mediawiki/includes/libs/mime/MimeAnalyzer.php:618

/home/travis/build/wikimedia/mediawiki/includes/utils/MWFileProps.php:73

/home/travis/build/wikimedia/mediawiki/includes/upload/UploadStash.php:221

/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadStashTest.php:51

/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:416

/home/travis/build/wikimedia/mediawiki/maintenance/doMaintenance.php:94

Event Timeline

Reedy created this task.Dec 8 2017, 2:52 AM
Restricted Application added projects: Commons, Multimedia. · View Herald TranscriptDec 8 2017, 2:52 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Reedy moved this task from Unsorted to PHP 7.2 on the [DO NOT USE] NewPHP board.Dec 8 2017, 2:56 AM
Paladox added a subscriber: Paladox.Jan 5 2018, 5:18 PM

mediawiki with php 7.2 failed for me when i tryed on my host.

Krinkle renamed this task from Upload test failures in PHP 7.2 to UploadBaseTest fails in PHP 7.2.Apr 4 2018, 5:40 PM
Krinkle updated the task description. (Show Details)Apr 4 2018, 5:45 PM
Krinkle added a subscriber: Krinkle.

Only 2 failures left:

There were 2 failures:

1) SamplingStatsdClientTest::testSampling with data set #2 (Liuggio\StatsdClient\Entity\StatsdData Object (...), 1, 4, true)
Expectation failed for method name is equal to <string:write> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.

2) UploadBaseTest::testCheckXMLEncodingMissmatch with data set #0 ('<?xml version="1.0" encoding=...</svg>', true)
Failed asserting that true matches expected false.
/home/travis/build/wikimedia/mediawiki/tests/phpunit/includes/upload/UploadBaseTest.php:565
/home/travis/build/wikimedia/mediawiki/tests/phpunit/MediaWikiTestCase.php:420
Tgr added a subscriber: Tgr.Apr 5 2018, 9:47 AM

The sampling test relies on mt_rand giving specific values for specific seeds. Apparently that changed in PHP 7.1: https://3v4l.org/As5rk

Change 424252 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Fix SamplingStatsdClient for PHP 7.1+

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

Change 424252 merged by jenkins-bot:
[mediawiki/core@master] Fix SamplingStatsdClient for PHP 7.1+

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

Krinkle renamed this task from UploadBaseTest fails in PHP 7.2 to UploadBaseTest fails in PHP 7.1.Apr 6 2018, 2:19 AM
Krinkle updated the task description. (Show Details)
Krinkle moved this task from Inbox to PHPUnit on the MediaWiki-Core-Testing board.

(Oops, my bad) – Separate:

Krinkle renamed this task from UploadBaseTest fails in PHP 7.1 to UploadBaseTest fails on PHP 7.2.Apr 6 2018, 2:26 AM
Krinkle removed a project: PHP 7.1 support.
Krinkle updated the task description. (Show Details)
Legoktm closed this task as Resolved.Oct 13 2018, 6:50 AM
Legoktm added a subscriber: Legoktm.

No longer failing on travis-ci (https://travis-ci.org/wikimedia/mediawiki/jobs/440924522) nor jenkins.