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

The docs explain a solution for @php in composer, which will result in issues #812

Closed
gisostallenberg opened this issue May 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@gisostallenberg
Copy link

What happened?

When using (at least) the docker images for latest and latest-php8.2, the docs at https://frankenphp.dev/docs/known-issues/#composer-scripts-referencing-php suggest adding a script at /usr/local/bin/php, but the actual php binary is already located there. It will result in issues when running PHPStan or Rector, which try to run that PHP binary.
Not adding the solution proposed will actually work just fine (also for @php sections in composer.json, so maybe the known issues section is outdated or only targeted at other docker images.

At least a notice about this is justified in the docs, see #810

Build Type

Docker (Debian Bookworm)

Worker Mode

No

Operating System

GNU/Linux

CPU Architecture

x86_64

PHP configuration

N/A

Relevant log output

No response

@gisostallenberg gisostallenberg added the bug Something isn't working label May 23, 2024
@dunglas
Copy link
Owner

dunglas commented May 23, 2024

I'm not sure to get the problem. This workaround is relevant only if you use the built-in frankenphp php-cli sub-command. It isn't necessary if you use the classic PHP CLI.

Maybe it's not clear enough in docs?

@dunglas
Copy link
Owner

dunglas commented May 31, 2024

Closing for now, feel free to reopen if I misunderstood.

@dunglas dunglas closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
@gisostallenberg
Copy link
Author

Well... I misunderstood that this is not always needed, so I added a script and put it in /usr/local/bin/php, but when having an actual php binary there, this (off course) results in errors.
So I thought to save others from doing the same stupid thing, add a warning that this is only needed in certain situations. For me that was not clear. I understood that "if there is @php in your composer.json" this should always be fixed using the script proposed.

@dunglas
Copy link
Owner

dunglas commented Jun 4, 2024

Good idea for the warning!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants