yii-dev-tool
yii-dev-tool copied to clipboard
Checkout only installed packages
When you want to reset all packages to master
branch you get an errors
Package requirements repository is not cloned.
To fix, run the command:
./yii-dev install requirements
You can also disable the package in packages.local.php
See packages.local.php.example for configuration examples.
and the same for other not installed packages.
I expect when I do git/checkout master
that will be checkout only installed packages.
This is not actually a bug. This is a feature! =)
The tool tries to be as smart as possible, but there are several possible cases here:
- You want to checkout, but did not install the package.
- You want to checkout, but forgot to install the package before checkout.
These are different cases.
When I was creating the tool, I used the following logic:
- If you want to work with a specific package, you must explicitly specify it in the parameter list.
- If you want to work without specifying packages, you must either explicitly configure your package list using a local configuration file or your must install all packages at once.
And this logic is applied consistently across all yii-dev-tool commands.
Therefore, the existing behavior is correct. It kind of tells you: «Dude, there is something wrong with your configuration! Either disable this package in your local config, or install it.» :-)
But, by the way, I see that now there are much more packages. More than one hundred ...
It may be more convenient if the base configuration won't offer all packages in a row for installation.