Page MenuHomePhabricator

symfony-polyfill54 is breaking CI on wikimedia/fundraising/crm/vendor
Closed, ResolvedPublic

Description

This patch:
https://gerrit.wikimedia.org/r/#/c/306039/
is causing CI failures in php55lint:
https://integration.wikimedia.org/ci/job/php55lint/21916/console

The deal is that a PHP < 5.4 polyfill library is normally behind a php version conditional, so the file isn't included but php lint is running on every file, unconditionally.

Event Timeline

awight triaged this task as High priority.Aug 22 2016, 7:45 PM

Change 306050 had a related patch set uploaded (by Awight):
Workaround broken php55lint

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

Change 307033 had a related patch set uploaded (by Paladox):
Create wikimedia-fundraising-crm-vendor-php55lint test

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

DStrine lowered the priority of this task from High to Medium.Aug 30 2016, 8:20 PM
DStrine moved this task from Triage to Blocked or not fr-tech on the Fundraising-Backlog board.

The php55lint job in Jenkins is very lame and does not support any exclusion list. If that is needed, we should move to use the 'composer test' entry point and jakub-onderka/php-parallel-lint which has support for exclusions.

Change 307033 abandoned by Paladox:
Create wikimedia-fundraising-crm-vendor-php55lint test

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

@awight or @Ejegg hi, could we use composer to do the phplint please?

It woud look strange but it will allow us to continue linting the repo.

Change 306050 abandoned by Awight:
Workaround broken php55lint

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

Looks like php55lint still fails on recent commits, https://gerrit.wikimedia.org/r/344552.

@Krinkle
Thanks for pointing out that the workaround no longer works :-) Looks like the php5lint job should be disabled for that repo.

hashar renamed this task from symfony-polyfill54 is breaking CI to symfony-polyfill54 is breaking CI on wikimedia/fundraising/crm/vendor.Mar 29 2017, 9:21 PM

That looks like the same problem we had on mediawiki/vendor . composer 1.1 generates a file meant for Zend php 5.6 and thus php55lint failed. T135161

The fix is to add in require-dev the package jakub-onderka/php-parallel-lint which supports excluding files eg:

	"scripts": {
		"test": "parallel-lint --exclude composer/autoload_static.php --exclude jakub-onderka/php-parallel-lint/tests ."
	}

https://gerrit.wikimedia.org/r/#/c/340238/6/composer.json

Later on to update the vendor repository, one would use composer update --no-dev (doc).

Then in CI we can drop php55lint and replace it with composer-test and you will have linting.

hashar claimed this task.

The repo wikimedia/fundraising/crm/vendor runs CI with PHP5.6 (on Jessie).