Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Project composer autoload should not be loaded when running from Phar #61

Closed
jrfnl opened this issue Jun 8, 2021 · 0 comments · Fixed by #63
Closed

Bug: Project composer autoload should not be loaded when running from Phar #61

jrfnl opened this issue Jun 8, 2021 · 0 comments · Fixed by #63
Milestone

Comments

@jrfnl
Copy link
Collaborator

jrfnl commented Jun 8, 2021

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:

  1. Make sure the system default PHP version / PHP version used by Composer is a high PHP version, like PHP 7.4 or 8.0.
  2. Run:
mkdir testthis
cd testthis
composer create-project yoast/phpunit-polyfills
cd phpunit-polyfills
  1. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant