You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.3 KiB
1.3 KiB
Getting started with Yii2 development
The best way to have a locally runnable webapp that uses codebase cloned from main repository is to use yii2-dev
Composer package. Here's how to do it:
git clone git@github.com:yiisoft/yii2-app-basic.git
.- Remove
.git
directory from cloned directory. - Change
composer.json
. Instead of all stable requirements add just one"yiisoft/yii2-dev": "*"
. - Execute
composer install
. - Now you have working playground that uses latest code.
Note that requirements of extensions that come with yii2-dev
are not loaded automatically.
If you want to use an extension, check if there are dependencies suggested for it and add them
to your composer.json
. You can see suggested packages by running composer show yiisoft/yii2-dev
.
If you're core developer there's no extra step needed. You can change framework code under
vendor/yiisoft/yii2-dev
and push it to main repository.
If you're not core developer or want to use your own fork for pull requests:
- Fork
https://github.com/yiisoft/yii2
and get your own repository address such asgit://github.com/username/yii2.git
. - Edit
vendor/yiisoft/yii2-dev/.git/config
. Change remoteorigin
url to your own:
[remote "origin"]
url = git://github.com/username/yii2.git