You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use composer via composer.phar (see installation instructions) you get an error during composer update due to a "wrong" post-update-cmd in composer.json because you didn't install composer as a globally available binary/script.
Steps to reproduce
$ php composer.phar create-project codeigniter4/appstarter -s beta --no-dev
Installing codeigniter4/appstarter (v4.0.0-beta.2)
[...]
$ cd appstarter
$ php ../composer.phar update --no-dev
Loading composer repositories with package information
Updating dependencies
Generating autoload files
> composer dump-autoload
sh: 1: composer: not found
Script composer dump-autoload handling the post-update-cmd event returned with error code 127
Changing this line to php ../composer.phar dump-autoload leads to a successful update in my use-case (composer.phar above project root).
I don't know how to resolve this. Maybe composer has information on how it was started? Or there is a more generic way to call composer in composer.json.
While writing this issue, I found a solution: I found this. Replacing composer with @composer works in my test case. Has to be tested with a regular, global composer installation.
The text was updated successfully, but these errors were encountered:
Your description does not sound like globally installed composer, which would then be accessible as "composer" or "php composer.phar" anywhere. It sounds more like you have a local install in the folder you first run it from.
Having said that, the "@composer" modification you refer to does sound like a better approach, and we can fix that
jim-parry
added a commit
to jim-parry/CodeIgniter4
that referenced
this issue
Apr 10, 2019
When you use composer via
composer.phar
(see installation instructions) you get an error duringcomposer update
due to a "wrong"post-update-cmd
incomposer.json
because you didn't installcomposer
as a globally available binary/script.Steps to reproduce
The line producing the error in
composer.json
is:Changing this line to
php ../composer.phar dump-autoload
leads to a successful update in my use-case (composer.phar
above project root).I don't know how to resolve this. Maybe composer has information on how it was started? Or there is a more generic way to call
composer
in composer.json.While writing this issue, I found a solution: I found this. Replacing
composer
with@composer
works in my test case. Has to be tested with a regular, global composer installation.The text was updated successfully, but these errors were encountered: