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
60fe84c8
Commit
60fe84c8
authored
Oct 01, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guide: consistent usage of composer command
parent
0a3769ce
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
20 deletions
+19
-20
start-installation.md
docs/guide/start-installation.md
+1
-1
structure-extensions.md
docs/guide/structure-extensions.md
+2
-2
tool-gii.md
docs/guide/tool-gii.md
+1
-1
tutorial-advanced-app.md
docs/guide/tutorial-advanced-app.md
+10
-11
tutorial-start-from-scratch.md
docs/guide/tutorial-start-from-scratch.md
+2
-2
tutorial-yii-integration.md
docs/guide/tutorial-yii-integration.md
+3
-3
No files found.
docs/guide/start-installation.md
View file @
60fe84c8
...
...
@@ -31,7 +31,7 @@ With Composer installed, you can install Yii by running the following commands u
The first command installs the
[
composer asset plugin
](
https://github.com/francoispluchino/composer-asset-plugin/
)
which allows managing bower and npm package dependencies through Composer. You only need to run this command
once for all. The second command installs Yii in a directory named
`basic`
.
once for all. The second command installs Yii in a directory named
`basic`
.
You can choose a different directory name if you want.
> Note: During the installation it may happen that Composer asks for login credentials for your Github account because it hits the
> Github API rate-limit. This is normal because Composer needs to retrieve a lot of information for all the packages from Github.
...
...
docs/guide/structure-extensions.md
View file @
60fe84c8
...
...
@@ -17,7 +17,7 @@ To use an extension, you need to install it first. Most extensions are distribut
packages which can be installed by taking the following two simple steps:
1.
modify the
`composer.json`
file of your application and specify which extensions (Composer packages) you want to install.
2.
run
`
php composer.pha
r install`
to install the specified extensions.
2.
run
`
compose
r install`
to install the specified extensions.
Note that you may need to install
[
Composer
](
https://getcomposer.org/
)
if you do not have it.
...
...
@@ -172,7 +172,7 @@ We recommend you prefix `yii2-` to the project name for packages representing Yi
It is important that you specify the package type of your extension as
`yii2-extension`
so that the package can
be recognized as a Yii extension when being installed.
When a user runs
`
php composer.pha
r install`
to install an extension, the file
`vendor/yiisoft/extensions.php`
When a user runs
`
compose
r install`
to install an extension, the file
`vendor/yiisoft/extensions.php`
will be automatically updated to include the information about the new extension. From this file, Yii applications
can know which extensions are installed (the information can be accessed via
[
[yii\base\Application::extensions
]
].
...
...
docs/guide/tool-gii.md
View file @
60fe84c8
...
...
@@ -19,7 +19,7 @@ Gii is an official Yii extension. The preferred way to install this extension is
You can either run this command:
```
php composer.phar require --prefer-dist yiisoft/yii2-gii "
*"
composer require "yiisoft/yii2-gii:
*"
```
Or you can add this code to the require section of your
`composer.json`
file:
...
...
docs/guide/tutorial-advanced-app.md
View file @
60fe84c8
...
...
@@ -12,19 +12,18 @@ Installation
### Install via Composer
If you do not have
[
Composer
](
http://getcomposer.org/
)
,
you may download it from
[
http://getcomposer.org/
](
http://getcomposer.org/
)
or run the following command on Linux/Unix/MacOS:
If you do not have
[
Composer
](
http://getcomposer.org/
)
,
follow the instructions in the
[
Installing Yii
](
start-installation.md#installing-via-composer
)
section to install it.
~~~
curl -sS http://getcomposer.org/installer | php
~~~
With Composer installed, you can then install the application using the following commands:
You can then install the application using the following command:
composer global require "fxp/composer-asset-plugin:1.0.0-beta2"
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced yii-application
~~~
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta2"
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced /path/to/yii-application
~~~
The first command installs the
[
composer asset plugin
](
https://github.com/francoispluchino/composer-asset-plugin/
)
which allows managing bower and npm package dependencies through Composer. You only need to run this command
once for all. The second command installs the advanced application in a directory named
`yii-application`
.
You can choose a different directory name if you want.
Getting started
---------------
...
...
@@ -204,7 +203,7 @@ your project.
Now the interesting part. You can add more packages your application needs to the
`require`
section.
All these packages are coming from
[
packagist.org
](
https://packagist.org/
)
so feel free to browse the website for useful code.
After your
`composer.json`
is changed you can run
`
php composer.pha
r update --prefer-dist`
, wait till packages are downloaded and
After your
`composer.json`
is changed you can run
`
compose
r update --prefer-dist`
, wait till packages are downloaded and
installed and then just use them. Autoloading of classes will be handled automatically.
Creating links from backend to frontend
...
...
docs/guide/tutorial-start-from-scratch.md
View file @
60fe84c8
...
...
@@ -48,6 +48,6 @@ Use the Template
That's all that's required to create a new Yii application template. Now you can create projects using your template:
```
php composer.pha
r global require "fxp/composer-asset-plugin:1.0.0-beta2"
php composer.pha
r create-project --prefer-dist --stability=dev mysoft/yii2-app-coolone new-project
compose
r global require "fxp/composer-asset-plugin:1.0.0-beta2"
compose
r create-project --prefer-dist --stability=dev mysoft/yii2-app-coolone new-project
```
docs/guide/tutorial-yii-integration.md
View file @
60fe84c8
...
...
@@ -17,7 +17,7 @@ Many third-party libraries are released in terms of [Composer](https://getcompos
You can install such libraries by taking the following two simple steps:
1.
modify the
`composer.json`
file of your application and specify which Composer packages you want to install.
2.
run
`
php composer.pha
r install`
to install the specified packages.
2.
run
`
compose
r install`
to install the specified packages.
The classes in the installed Composer packages can be autoloaded using the Composer autoloader. Make sure
the
[
entry script
](
structure-entry-scripts.md
)
of your application contains the following lines to install
...
...
@@ -83,8 +83,8 @@ If the third-party system uses Composer to manage its dependencies, you can simp
to install Yii:
```
php composer.phar require yiisoft/yii2-framework:*
php composer.pha
r install
composer require "yiisoft/yii2:*"
compose
r install
```
Otherwise, you can
[
download
](
http://www.yiiframework.com/download/
)
the Yii release file and unpack it in
...
...
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