frankenphp
frankenphp copied to clipboard
Creating a Laravel project fails, probably because FrankenPHP doesn't support -r flag
What happened?
When I try to create a new Laravel project with
./composer create-project laravel/laravel laraveltest
it fails with
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
Warning: Unknown: Failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Failed opening required '-r' (include_path='.:') in Unknown on line 0
Script @php -r "file_exists('.env') || copy('.env.example', '.env');" handling the post-root-package-install event returned with error code 255
The helper script composer
is in the same directory and looks like this
#!/bin/bash
exec ./frankenphp-linux-x86_64 php-cli ./composer.phar $@
It looks like (at least) one step in creating the project tries to use php -r
to execute PHP code without a file. As far as I can tell, FrankenPHP doesn't support the -r
flag yet. Some experiments underpin that
php -r "echo 'Hello';" # on a "regular" PHP installation, correctly prints 'Hello'
# compared with
./frankenphp-linux-x86_64 php-cli -r "echo 'Hello';"
Warning: Unknown: Failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Failed opening required '-r' (include_path='.:') in Unknown on line 0
Build Type
Standalone binary
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Not applicable, we don't get that far ;)
Relevant log output
No response