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

Console command build:project starts subprocess with system-default PHP instead of the runtime PHP #915

Open
kanevbg opened this issue Jan 12, 2024 · 1 comment

Comments

@kanevbg
Copy link

kanevbg commented Jan 12, 2024

Running the console command build:project with non-default PHP is not working as expected because the command runs sub-process vendor/bin/codecept build without specifying the PHP binary to run with, that in results makes the composer auto-loader utilize the default PHP binary from the system, which is not expected as we may have executed the build:project command with non system default PHP, eg:

php81 vendor/bin/mftf build:project

Preconditions

No preconditions really, it's logical issues, but to see a practical problem you may use PHP 7.4 (or older) as default system PHP and install the MFTF with PHP 8.1 binary not aliased as php in the bash environment.

Expected result

Successful build.

Actual result

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.29. in vendor/composer/platform_check.php on line 24

In BuildProjectCommand.php line 106:
                                                                                                 
  The codecept build command failed unexpectedly. Please see the above output for more details.                                                                                                
Copy link

m2-assistant bot commented Jan 12, 2024

Hi @kanevbg. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant