Page MenuHomePhabricator

failing parser tests for PHP 8.1
Closed, ResolvedPublicBUG REPORT

Description

on master with the following extensions enabled and on their respective master branches:

  • BetaFeatures
  • CirrusSearch
  • CodeEditor
  • Echo
  • Elastica
  • Graph
  • PageViewInfo
  • ProofreadPage
  • Scribunto
  • SiteMatrix
  • TemplateData
  • VisualEditor
  • WikiEditor

Running tests:

$ php  tests/phpunit/phpunit.php -c tests/phpunit/suite.xml --testsuite parsertests --colors never
Using PHP 8.1.8
PHPUnit 8.5.27 #StandWithUkraine

...

Time: 12.56 seconds, Memory: 220.50 MB

There were 2 errors:

1) ParserIntegrationTest::testParse with data set "parserTests.txt: PAGESINCATEGORY invalid title fatal (r33546 fix)" ('legacy')
strlen(): Passing null to parameter #1 ($string) of type string is deprecated

.../includes/language/Language.php:2749
.../includes/language/Language.php:2740
.../includes/MagicWordArray.php:291
.../includes/parser/CoreParserFunctions.php:832
.../includes/parser/Parser.php:3453
.../includes/parser/Parser.php:3136
.../includes/parser/PPFrame_Hash.php:276
.../includes/parser/Parser.php:2971
.../includes/parser/Parser.php:1607
.../includes/parser/Parser.php:723
.../tests/parser/ParserTestRunner.php:1285
.../tests/parser/ParserTestRunner.php:1208
.../tests/phpunit/suites/ParserIntegrationTest.php:63
.../tests/phpunit/suites/SuiteEventsTrait.php:69
.../tests/phpunit/suites/SuiteEventsTrait.php:69
=== Logs generated by test case
[wfDebug] [debug] ParserTestRunner::runLegacyTest: running PAGESINCATEGORY invalid title fatal (r33546 fix) {"private":false}
[wfDebug] [debug] ParserFactory: using default preprocessor {"private":false}
===

2) ParserIntegrationTest::testParse with data set "parserTests.txt: <graph> - error handling" ('legacy')
trim(): Passing null to parameter #1 ($string) of type string is deprecated

.../extensions/Graph/includes/ParserTag.php:182
.../extensions/Graph/includes/ParserTag.php:59
.../includes/parser/Parser.php:4022
.../includes/parser/PPFrame_Hash.php:353
.../includes/parser/Parser.php:2971
.../includes/parser/Parser.php:1607
.../includes/parser/Parser.php:723
.../tests/parser/ParserTestRunner.php:1285
.../tests/parser/ParserTestRunner.php:1208
.../tests/phpunit/suites/ParserIntegrationTest.php:63
.../tests/phpunit/suites/SuiteEventsTrait.php:69
.../tests/phpunit/suites/SuiteEventsTrait.php:69
=== Logs generated by test case
[wfDebug] [debug] ParserTestRunner::runLegacyTest: running <graph> - error handling {"private":false}
[wfDebug] [debug] ParserFactory: using default preprocessor {"private":false}
===

ERRORS!
Tests: 2307, Assertions: 2305, Errors: 2.


You should really speed up these slow tests (>50ms)...
 1. 78ms to run ParserIntegrationTest::testParse with data set "luaParserTests.txt: Scribunto: expandTemplate with headers"
 2. 76ms to run ParserIntegrationTest::testParse with data set "parserTests.txt: Conversion rules from [numeric-only string] to [something else] (T48634)"
 3. 75ms to run ParserIntegrationTest::testParse with data set "parserTests.txt: Template with explicit namespace in language variants"
 4. 52ms to run ParserIntegrationTest::testParse with data set "parserTests.txt: T2529: Uncovered bullet in a deeply nested list"

Event Timeline

Change 816256 had a related patch set uploaded (by MarkAHershberger; author: MarkAHershberger):

[mediawiki/core@master] Placate 8.1: Cast $str to string before treating it as a string

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

Change 816258 had a related patch set uploaded (by MarkAHershberger; author: MarkAHershberger):

[mediawiki/extensions/Graph@master] Placate 8.1: Cast $str to string before treating it as a string

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

Change 818192 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/core@master] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818192 merged by jenkins-bot:

[mediawiki/core@master] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818422 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/core@REL1_38] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818423 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/core@REL1_37] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818424 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/core@REL1_35] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818424 merged by jenkins-bot:

[mediawiki/core@REL1_35] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818423 merged by jenkins-bot:

[mediawiki/core@REL1_37] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 818422 merged by jenkins-bot:

[mediawiki/core@REL1_38] Make default value for optional args {{PAGESINCAT:..}} be '' not null

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

Change 845778 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/extensions/Graph@master] Cast graph tag input to string

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

Change 845778 merged by jenkins-bot:

[mediawiki/extensions/Graph@master] Cast graph tag input to string

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

Change 845752 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/extensions/Graph@REL1_39] Cast graph tag input to string

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

Bawolff claimed this task.

Change 845752 merged by jenkins-bot:

[mediawiki/extensions/Graph@REL1_39] Cast graph tag input to string

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