Page MenuHomePhabricator

Use statement with non-compound name 'InvalidArgumentException'
Closed, ResolvedPublic

Description

Steps to reproduce:
Run phpunit test script.

Error message:

PHP Warning: The use statement with non-compound name 'InvalidArgumentException' has no effect in mediawiki-core/tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php on line 3

Error line

use InvalidArgumentException;

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 9 2018, 2:17 PM

Which version of php you are using?

My test wiki work on master branch, pulling updates from the remote every day. So, I was affected by the patch that you provided.

RazeSoldier updated the task description. (Show Details)Mar 9 2018, 5:01 PM
Anomie added a comment.Mar 9 2018, 7:11 PM

I note the warning is right, since that file isn't in a namespace. It seems to happen on multiple versions of PHP.

Change 418023 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Remove useless use

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

Anomie closed this task as Resolved.Mar 9 2018, 7:31 PM
Anomie claimed this task.

T189323: UnusedUsed sniff did not catch use from global namespace covers the fact that CI didn't catch this before the original patch was merged.

Change 418023 merged by jenkins-bot:
[mediawiki/core@master] Remove useless use

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

Which version of php you are using?

My test wiki work on master branch, pulling updates from the remote every day. So, I was affected by the patch that you provided.

Oh, you ask me php version, I thought it was the version of mediawiki. I use PHP 7.2.2.