Page MenuHomePhabricator

CirrusSearch is not compatible with PHP7.4
Closed, ResolvedPublic

Description

3) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "basic term uses no special syntax" ('foo', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

4) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using AND marks the query_string syntax" ('foo AND bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

5) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using - at start marks the query_string syntax" ('-foo', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

6) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "escaping - uses no syntax" ('\-foo', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

7) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "token starting with ! is query_string syntax" ('!foo bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

8) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "escaped token starting with ! is not query_string syntax" ('\!foo bar', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

9) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using - in middle marks the query_string syntax" ('foo -bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

10) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "escaping - in middle uses no syntax" ('foo \-bar', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

11) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using - inside a word uses no syntax" ('foo-bar', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

12) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using + marks the query_string syntax" ('+foo', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

13) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "escaping + uses no syntax" ('\+foo', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

14) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using a quote is query_string syntax" ('foo "bar"', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:103
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:502
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:114
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

15) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "a fully quoted string is query_string syntax" ('"foo bar"', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:103
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:502
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:114
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

16) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "having AND not on its own uses no syntax" ('fooAND bar', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

17) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "having AND in the middle of a word uses no syntax" ('AMANDA', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

18) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "NOT at the begining of a query is query_string syntax" ('NOT foo bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

19) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "using OR marks the query_string syntax" ('foo OR bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

20) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "an escaped ? inside a string is query_string syntax" ('catapu\?t', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

21) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "an unescaped ? inside a string has no syntax used" ('catapu?t', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

22) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "marking a fuzzy query at end of string is query_string syntax" ('foo~', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

23) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "marking a fuzzy query in middle of string is query_string syntax" ('foo~ bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

24) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "marking a fuzzy query with number at end of string is query_string syntax" ('foo~0', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

25) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "marking a fuzzy query with number in middle of string is query_string syntax" ('foo~0 bar', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

26) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "fuzzy after a space isnt query_string syntax" ('catapult ~/', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

27) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "weird edge case shouldnt be seen as using query_string syntax" ('catapult ||---', array())
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

28) CirrusSearch\Query\FullTextQueryStringQueryBuilderTest::testSyntaxUsed with data set "imbalanced quotes get balanced and are considered query_string syntax" ('test "imbalanced quotes phrase', array('query_string'))
Trying to access array offset on value of type null

/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:416
/workspace/src/extensions/CirrusSearch/includes/Query/FullTextQueryStringQueryBuilder.php:197
/workspace/src/extensions/CirrusSearch/tests/phpunit/unit/Query/FullTextQueryStringQueryBuilderTest.php:139
/workspace/src/tests/phpunit/MediaWikiUnitTestCase.php:103
/workspace/src/maintenance/doMaintenance.php:99

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 3 2019, 9:31 PM
Restricted Application added a project: Discovery-Search. · View Herald TranscriptDec 3 2019, 9:32 PM
Daimona added a subscriber: Daimona.Dec 7 2019, 2:01 PM

This is referring to a config setting, which is correctly documented and initialised as array. I suspect this is a test-only issue, where a test is creating a fake config with 'CirrusSearchWeights' missing.

Change 555676 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/CirrusSearch@master] Fix for PHP 7.4 compat

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

Daimona claimed this task.Dec 7 2019, 2:04 PM

Change 555676 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Fix for PHP 7.4 compat

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

Jdforrester-WMF closed this task as Resolved.Dec 7 2019, 9:59 PM

Thank you!