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
Consider removing package-command from the bundle #5925
Comments
Thanks for opening this issue and taking the time to look for similar ones & linking to them! Right now #5920 is probably the best place to consolidate the discussion and share ideas like this.
In a Composer project you would usually only install the individual the commands that you need for the project, not the whole bundle.
That's possible & probably what you should do in your scenario :-)
The |
Fair enough, so in order to have the «most common commands», instead of In this case what's the point of the bundle?
Sorry, I'm having a hard time understanding the reasoning behind all this. |
When you install/use WP-CLI via the Phar for example. |
🤷🏻 |
Anyway, disregarding whether it is desirable or not for wp-cli to reinvent the wheel of package management in the phar release, If the purpose of |
I'm open to the idea of only including I added this to the 3.0.0 milestone for consideration. |
Given a wodpress project using composer to manage dependencies.
Running
composer require wp-cli/wp-cli-bundle
results in the following dependency tree:composer show --tree wp-cli/wp-cli-bundle
That's 64 packages, 30 of which are
wp-cli/*
packages.Of the remaining 34, 20 are only required by the
wp-cli/package-command
whose sole dependency outside ofwp-cli/wp-cli
is...composer/composer
🤨From its documentation, the purpose of
wp-cli/package-command
is to manage globally installedwp-cli
commands.Why would someone installing
wp-cli-bundle
inside a project need/want a command to manage global wp-cli packages? Moreover, since said packages are just composer packages, why can't they just be installed with composer?IMO, running
composer require some/package
should not end up installing composer inside the project's vendor directory.It seems to me that the package command should be moved in the
suggests
section of the bundle'scomposer.json
, and only included by default in the phar release.And even then I highly doubt the usefulness of this command, so maybe it should just be deprecated then removed like the package index.
As a side note, removing this command would remove the largest source of dependency conflicts (see #5920, #5916, wp-cli/wp-cli-bundle#606, wp-cli/wp-cli-bundle#558, wp-cli/wp-cli-bundle#348, etc).
The text was updated successfully, but these errors were encountered: