Page MenuHomePhabricator

MediaWiki core was not passing phpcs
Closed, ResolvedPublic

Description

Autofixes from composer for phpcs errors

Also flagging that phpcs on master has errors locally but seems to have passed on CI

Event Timeline

mepps created this task.Aug 9 2017, 6:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 9 2017, 6:50 PM

Change 370866 had a related patch set uploaded (by Mepps; owner: Mepps):
[mediawiki/core@master] Composer fix changes

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

mepps updated the task description. (Show Details)Aug 9 2017, 6:59 PM

Change 370866 merged by jenkins-bot:
[mediawiki/core@master] Composer fix changes

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

Jdforrester-WMF renamed this task from phpcs does not pass locally to MediaWiki core was not passing phpcs.Aug 9 2017, 8:06 PM
Jdforrester-WMF triaged this task as Normal priority.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Now fixed?

I would say the bypassed failures are fixed, but not the problem that there could bypass.

https://gerrit.wikimedia.org/r/#/c/362326/ shows the problem:

03:33:31 + vendor/bin/phpcs -p -s --report-full --report-checkstyle=/home/jenkins/workspace/mediawiki-core-phpcs-jessie/log/checkstyle.xml
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000001] [] 
03:33:32 Notice: Undefined variable: values in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 70
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000002] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000003] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000004] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000005] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000006] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000007] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000008] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000009] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000010] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000011] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000012] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000013] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000014] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000015] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000016] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000017] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000018] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000019] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000020] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000021] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000022] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000023] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000024] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000025] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000026] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000027] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000028] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000029] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000030] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000031] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 [Wed Aug  2 03:33:31 2017] [hphp] [1415:7f5e11784200:0:000032] [] 
03:33:32 Warning: in_array() expects parameter 2 to be an array or collection in /home/jenkins/workspace/mediawiki-core-phpcs-jessie/src/vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php on line 69
03:33:32 No files to process. Skipping run

See https://gerrit.wikimedia.org/r/#/c/358554/ and https://gerrit.wikimedia.org/r/#/c/363476/ for the bootstrap

Change 371468 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Remove broken bootstrap from phpcs.xml

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

Change 371475 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/tools/codesniffer@master] Change bootstrap-ci.php to match PHP CodeSniffer 3.0.0

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

Change 371485 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Make phpcs pass

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

Change 371485 merged by jenkins-bot:
[mediawiki/core@master] Make phpcs pass

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

Aw crap :( thanks for figuring this out...

Change 371468 merged by jenkins-bot:
[mediawiki/core@master] Do not use broken bootstrap in phpcs.xml

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

Umherirrender closed this task as Resolved.Aug 12 2017, 2:49 PM

With the remove of the bootstrap phpcs will now run for all files, so it should be save now/for the moment

Change 371475 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Change bootstrap-ci.php to match PHP CodeSniffer 3.0.0

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