Getting started with Yii2 development
- Clone your fork of yii2
git clone email@example.com:<yourname>/yii2.git.
- Change into the repo folder
./build/build app/link basicto install composer dependecies for the basic app. This command will install foreign composer packages as normal but will link the yii2 repo to the currently checked out repo, so you have one instance of all the code installed.
- Do the same for the advanced app if needed:
./build/build app/link advancedThis command will also be used to update dependecies, it runs
- Now you have a working playground for hacking on Yii 2.
You may also add the yii2 upstream repo to pull the latest changes:
git remote add upstream https://github.com/yiisoft/yii2.git
Please refer to Git workflow for Yii 2 contributors for details about creating pull requests.
To run the unit tests you have to install composer packages for the dev-repo.
composer update in the repo root directory to get the latest packages.
You can now execute unit tests by running
You may limit the tests to a group of tests you are working on e.g. to run only tests for the validators and redis
To work on extensions you have to install them in the application you want to try them in.
Just add them to the
composer.json as you would normally do e.g. add
"yiisoft/yii2-redis": "*" to the
require section of the basic app.
./build/build app/link basic will install the extension and its dependecies and create
a symlink to
extensions/redis so you are not working the composer vendor dir but the yii2 repo directly.
Functional and acceptance tests for applications
apps/basic/tests/README.md to learn about how to run Codeception tests.