Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
09c297fd
Commit
09c297fd
authored
Jul 16, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4324: removed old way of developing Yii from the docs since app/link is…
Fixes #4324: removed old way of developing Yii from the docs since app/link is much better/simpler workflow
parent
7ef0d760
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
37 deletions
+2
-37
getting-started.md
docs/internals/getting-started.md
+2
-37
No files found.
docs/internals/getting-started.md
View file @
09c297fd
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:
1.
`git clone https://github.com/yiisoft/yii2-app-basic`
.
2.
Remove
`.git`
directory from cloned directory.
3.
Change
`composer.json`
. Instead of all stable requirements add just one
`"yiisoft/yii2-dev": "*"`
.
4.
Execute
`composer create-project`
. Do not add
`--prefer-dist`
to the command since it will not download git repository
then.
5.
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:
1.
Fork
`https://github.com/yiisoft/yii2`
and get your own repository address such as
`git://github.com/username/yii2.git`
.
2.
Edit
`vendor/yiisoft/yii2-dev/.git/config`
. Change remote
`origin`
url to your own:
```
[remote "origin"]
url = git://github.com/username/yii2.git
```
> Hint: The workflow of forking a package and pushing changes back into your fork and then sending a pull-request to the
maintainer is the same for all extensions you require via composer.
Please refer to
[
Git workflow for Yii 2 contributors
](
git-workflow.md
)
for details about creating pull requests.
An Alternative way
------------------
1.
Clone your fork of yii2
`git clone git@github.com:<yourname>/yii2`
.
2.
Change into the repo folder
`cd yii2`
.
3.
run
`./build/build app/link basic`
to install composer dependecies for the basic app.
...
...
@@ -53,6 +16,8 @@ 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
](
git-workflow.md
)
for details about creating pull requests.
### Unit tests
To run the unit tests you have to install composer packages for the dev-repo.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment