For Yii 3 the number of packages increased significantly in order to achieve more reusability and independent releases. In order to ease development of the framework itself we have created a special tool available from yiisoft/yii-dev.
$ ./yii-dev _ _ _ _
| | | |(_)(_)
| |_| || || | Development Tool
\__, ||_||_|
|___/ for Yii 3.0
This tool helps with setting up a development environment for Yii 3 packages.
Usage: ./yii-dev <command>
Available Commands:
install Install all packages listed in packages.php or package specified
install <package> Install a single package. <package> refers to the array key in packages.php
update Update all packages listed in packages.php or package specified
update <package> Update a single package. <package> refers to the array key in packages.php
status Show git status for all packages
replicate Copy files specified in replicate.php into each package or package specified
commit Add and commit changes into each repository
push Push changes into each repository
lint Check packages for common mistakes
There are multiple commands available. The most important ones are install
and update
. What it does is:
- Install/update all packages listed in
packages.php
or individual package from that list if specified. - For every packages installed check
vendor
directory for packages listed inpackages.php
. If there are any, replace package directory with a symlink to another package source.
As a result you will have multiple packages using each other so there is no need to git push
and composer install
/ composer update
during development.
Note: In case you are using PhpStorm you have to mark
vendor/yiisoft
directory of each package as excluded. Else it would go into infinite indexing cycle.