-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Command "about" returned error "Error: proc_open(): posix_spawn() failed: No such file or directory" if composer.phar is present #51820
Comments
I think the problem is related to the following change in symfony/process: symfony/symfony#52409 The command is now given to proc_open as an array. If I create a string from the array using |
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
The error you're encountering seems to be related to the interaction between composer.phar and the symfony/process component in the newer version. This issue might be related to how proc_open is handled in the newer versions of symfony/process. Here are a few steps you can try to troubleshoot and potentially resolve the issue: Check for Open Issues: Verify if this issue has been reported in the Laravel or Symfony repositories. It might be a known issue with a patch or workaround. Upgrade/Downgrade Symfony/Process: You've already identified that version 7.0.x works without issues. You might want to stick with this version temporarily until a fix is released. To do this, you can explicitly require this version in your composer.json:
|
Glad this has been filed before with temp fix. We have noticed by using v11.07, no issues. |
Introduced in symfony/symfony#52409 we no longer should use `Illuminate\Support\ProcessUtils::escapeArgument()` unless calling `Process` via `Process::fromShellCommandline()` fixes #51820 Signed-off-by: Mior Muhammad Zaki <[email protected]>
Laravel Version
11.10.0
PHP Version
8.3.8
Database Driver & Version
No response
Description
If the file "composer.phar" is located in the root directory of the project, the error "Error: proc_open(): posix_spawn() failed: No such file or directory" is displayed when the command "php artisan about" is executed.
However, this error is only displayed if symfony/process version >7.1 is installed. If version 7.0.x is installed, there are no problems.
If I delete the "composer.phar", everything works properly again.
Steps To Reproduce
I have created a repo on github with a new Laravel and a composer.phar: https://github.com/poldixd/laravel-composer-phar-issue/actions/runs/9548444149/job/26315645555
The text was updated successfully, but these errors were encountered: