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
If multiple namespaces contain a custom Composer script in their composer.json which have the same name, the following warning is triggered while executing composer bin all install: A script named <script name> would override a Composer command and has been skipped
Steps to reproduce:
Add two tools in different namespaces:
composer bin phpcs require squizlabs/php_codesniffer
composer bin phpunit require phpunit/phpunit
Take this script
"scripts": {
"foo": ""
}
and append it to both composer.json:
vi vendor-bin/phpcs/composer.json
vi vendor-bin/phpunit/composer.json
Finally run the command to install the dependencies of all namespaces:
composer bin all install
Output:
root@a59f18950fef:/app# composer bin all install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
A script named foo would override a Composer command and has been skipped
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
26 packages you are using are looking for funding.
Use the composer fund command to find out more!
The text was updated successfully, but these errors were encountered:
That is correct. The only way to "fix" this is to specify an order in which the bin directories should be installed but even so I'm not sure it would 100% work. For example if you have:
namespace1
codesniffer <- the main you want
phpstan <- because it's a dep, not because you are interested in
namespace2
phpstan <- the one you want
in this case even if namespace1 is guaranteed to be installed first (because you would have an option to), the symlink for phpstan would not be the one you want.
This is why I highly recommend to disable symlinks. The path to pick is a bit less convenient but it completely avoids this sort of problem.
If multiple namespaces contain a custom Composer script in their composer.json which have the same name, the following warning is triggered while executing
composer bin all install
: A script named <script name> would override a Composer command and has been skippedSteps to reproduce:
Add two tools in different namespaces:
Take this script
and append it to both composer.json:
Finally run the command to install the dependencies of all namespaces:
Output:
The text was updated successfully, but these errors were encountered: