Closed
Description
Problem
The PHAR file does not run independently of the project dependencies of the project being scanned.
Cause
The autoloading in the parallel-lint
file does not properly take running from a self-contained Phar into account.
Reproduction scenario:
- Make sure the system default PHP version / PHP version used by Composer is a high PHP version, like PHP 7.4 or 8.0.
- Run:
mkdir testthis
cd testthis
composer create-project yoast/phpunit-polyfills
cd phpunit-polyfills
- Now run the Parallel Lint phar with a low(er) PHP version
path/php-7.0/php.exe "parallel-lint.phar" . --exclude vendor
... and see the following fatal error displayed:
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.0.33. in path/to/testthis/phpunit-polyfills/vendor/composer\platform_check.php on line 24