-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Feature request: include composer to complement built-in php #470
Comments
If you are using the docker image, you can just do |
Hi appreciate the fast reply, should have included it before, not using docker. Using standalone binary. Any suggestion for this? Sorry for noob questions. If difficult then maybe I should use docker instead, but that would be another dependency for me to manage on the server. |
If you are using the standalone binary, why not have #!/bin/bash
exec ./frankenphp-linux-x86_64 php-cli ./composer.phar $@ Then you just call |
I was just trying the same with a custom alias, but this is very neat. Thank you. Loving how Franky is headed. |
This could be nice to add these tricks to the docs. |
Definitely would be helpful. One time I was curious which PHP packages were included in Franky's PHP & couldn't find in docs. Some fellow pointed a hint towards the build process of Franky and I got it from there. So maybe include the hint for packages and pointing to: Line 21 in d4c313f
Plus, for a noob like myself, If would be wondering how would php.ini in this case would work, as we don't have access to the internals? This |
Passing flags such as |
@dunglas running a shell script like you suggested here: #470 (comment) fails with Laravel post install script Specifically, when running the package auto-discover. Here is the relevant output: Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In Application.php line 430:
Invalid working directory specified, allow_url_fopen=1 does not exist.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 Steps to reproduce:
|
@rodrigopedra I was actually the author of that comment... Anyway, there isn't an "Application.php" in Laravel as far as I can tell, so I have no way to know what is going on in your code. If you could point to it, that would be fantastic. For what it's worth:
|
Ok, just ran a test and got this error.
Inside new Ran Tried to google, but all suggestions were for an existing project the above is new laravel install. |
It would be great if you could share the actual code causing the error instead of entire frameworks so that we can reproduce with a minimal example. In that error message, it looks like the project needs to be configured. For laravel help, I recommend going to the laravel repo or forums. |
@withinboredom Hi, there was no code & no project. I just ran I'm trying to use frankenphp php-cli to run composer commands. composer
composer.phar
frankenphp v1.0.3
Commands
Laravel installer runs fine untill it reaches pro-install script and error outs
This also happens on an existing project. I'm not very technical in this stuff, but using the franky and the tips, I found this problem and wanted to test & share as someone above had issue with the same approach. I don't have any urgent usage for this, but just sharing for the info if this is a bug? P.S. didn't want to create a new issue in the repo, as there was already realted discussion in the comments here. |
I'd recommend creating a new issue to investigate it properly and it would get more eyes on it. We would need to dig into composer/laravel and figure out what it is doing and whether it is due to them doing something weird/unexpected or FrankenPHP not setting something up properly. This issue seems more about using composer and less about setting up a laravel project. |
@withinboredom I'll keep the discussion on the new issue, but as I couldn't reply to you before, I just wanted to give you feedback. I tested on a fresh Laravel app, created using Thank I followed the suggestion on creating a local shell script and using a local Laravel doesn't have a class named But composer does: |
laravel/octane#764 (comment)
As FrankenPHP has its own PHP, We can discard system level PHP install.
And start the app using
./frankenphp php-cli artisan octane:start
which will use Franky's built-in PHP to run the app.But doing
composer install
requires PHP binary, so you still need a globally accessible PHP binary.How about including composer to complement built-in php so doing
./frankenphp php-cli composer install
would work seamlessly?The text was updated successfully, but these errors were encountered: