Closed gisostallenberg closed 3 months ago
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?
Closing for now, feel free to reopen if I misunderstood.
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.
Good idea for the warning!
What happened?
When using (at least) the docker images for
latest
andlatest-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 incomposer.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 https://github.com/dunglas/frankenphp/pull/810
Build Type
Docker (Debian Bookworm)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
No response