Composer v1.1.0 generates a optimized loader file at composer/autoload_static.php for use by PHP versions >=5.6 that includes syntax which is invalid under PHP <5.6 (expressions in static initialization). I originally filed this as a defect upstream with Composer (https://github.com/composer/composer/issues/5324), but on further inspection it turns out that their code is fine. They conditionally require the autoload_static.php file only when PHP_VERSION_ID indicates it is safe to do so.
The problem for MediaWiki/Wikimedia is that:
- This file will not pass lint checks by
PHP 5.3 orPHP 5.5 on our CI infrastructure. - If we exclude the file from mediawiki/vendor.git using a .gitignore entry then mediawiki/vendor.git will become unusable for PHP >= 5.6.
Downgrading Composer to prepare patch
composer self-update 1.0.3 will install the last Composer 1.0.x release. composer self-update --rollback can be used after preparing a mediawiki/vendor.git patch to return to a more modern version of Composer on your local host.
See also summary below by @hashar T135161#3053247