PHPCSStandards / composer-installer

Composer installer for PHP_CodeSniffer coding standards
https://packagist.org/packages/dealerdirect/phpcodesniffer-composer-installer
MIT License
549 stars 36 forks source link

TestCase::executeCliCommand(): retry Composer commands on a particular exception #164

Closed jrfnl closed 2 years ago

jrfnl commented 2 years ago

Proposed Changes

Retry Composer commands on a particular exception as otherwise a complete build may fail, while the failure is not related to an actual test failure,

I've seen this particular issue a couple of times in test runs (most typically with the problematic Composer v1 / PHP 5.5 / Windows combination).

Adding a one-time only retry of a command run and only for that particular issue should prevent having to re-run a complete build for this.