diff --git a/apps/advanced/README.md b/apps/advanced/README.md index a512e17334..735820a793 100644 --- a/apps/advanced/README.md +++ b/apps/advanced/README.md @@ -70,7 +70,7 @@ at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix). You can then install the application using the following command: ~~~ -php composer.phar create-project --stability=dev yiisoft/yii2-app-advanced advanced +php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced advanced ~~~ diff --git a/apps/basic/README.md b/apps/basic/README.md index d1a17e22b8..b233770fcd 100644 --- a/apps/basic/README.md +++ b/apps/basic/README.md @@ -52,7 +52,7 @@ at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix). You can then install this application template using the following command: ~~~ -php composer.phar create-project --stability=dev yiisoft/yii2-app-basic basic +php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic ~~~ Now you should be able to access the application through the following URL, assuming `basic` is the directory diff --git a/apps/benchmark/README.md b/apps/benchmark/README.md index 7eddae8aa4..27f598ad7d 100644 --- a/apps/benchmark/README.md +++ b/apps/benchmark/README.md @@ -43,7 +43,7 @@ curl -s http://getcomposer.org/installer | php You can then install the Bootstrap Application using the following command: ~~~ -php composer.phar create-project --stability=dev yiisoft/yii2-app-benchmark yii-benchmark +php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-benchmark yii-benchmark ~~~ Now you should be able to access the benchmark page using the URL diff --git a/docs/guide/apps-advanced.md b/docs/guide/apps-advanced.md index 3bdf754b19..d5e8ea2c34 100644 --- a/docs/guide/apps-advanced.md +++ b/docs/guide/apps-advanced.md @@ -20,7 +20,7 @@ curl -s http://getcomposer.org/installer | php You can then install the application using the following command: ~~~ -php composer.phar create-project --stability=dev yiisoft/yii2-app-advanced /path/to/yii-application +php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced /path/to/yii-application ~~~ Getting started @@ -171,5 +171,5 @@ your project. Now the interesting part. You can add more packages your application needs to `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.phar update`, wait till packages are downloaded and +After your `composer.json` is changed you can run `php composer.phar update --prefer-dist`, wait till packages are downloaded and installed and then just use them. Autoloading of classes will be handled automatically. diff --git a/docs/guide/apps-basic.md b/docs/guide/apps-basic.md index 012507057c..873125c8f5 100644 --- a/docs/guide/apps-basic.md +++ b/docs/guide/apps-basic.md @@ -20,7 +20,7 @@ curl -s http://getcomposer.org/installer | php You can then install the Bootstrap Application using the following command: ~~~ -php composer.phar create-project --stability=dev yiisoft/yii2-app-basic /path/to/yii-application +php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic /path/to/yii-application ~~~ Now set document root directory of your Web server to /path/to/yii-application/web and you should be able to access the application using the URL `http://localhost/`. @@ -159,5 +159,5 @@ your project. Now the interesting part. You can add more packages your application needs to `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.phar update`, wait till packages are downloaded and +After your `composer.json` is changed you can run `php composer.phar update --prefer-dist`, wait till packages are downloaded and installed and then just use them. Autoloading of classes will be handled automatically. diff --git a/docs/guide/composer.md b/docs/guide/composer.md index c2ab172157..5c7cd649a9 100644 --- a/docs/guide/composer.md +++ b/docs/guide/composer.md @@ -44,7 +44,7 @@ Once you have edited the `composer.json`, you can invoke Composer to install the For the first installation of the dependencies, use this command: ``` -php composer.phar install +php composer.phar install --prefer-dist ``` This must be executed within your Yii project's directory, where the `composer.json` file can be found. @@ -54,7 +54,7 @@ to the `composer.phar` script. For an existing installation, you can have Composer update the dependencies using: ``` -php composer.phar update +php composer.phar update --prefer-dist ``` Again, you may need to provide specific path references. diff --git a/docs/guide/gii.md b/docs/guide/gii.md index 0c40562e41..4d6ad9fbf1 100644 --- a/docs/guide/gii.md +++ b/docs/guide/gii.md @@ -14,7 +14,7 @@ Gii comes as an offical extension and the preferred way to install this extensio Either run ``` -php composer.phar require yiisoft/yii2-gii "*" +php composer.phar require --prefer-dist yiisoft/yii2-gii "*" ``` or add diff --git a/docs/guide/template.md b/docs/guide/template.md index d1b12f5d74..c55d206232 100644 --- a/docs/guide/template.md +++ b/docs/guide/template.md @@ -38,7 +38,7 @@ your `composer.json` to include "yiisoft/yii2-twig": "*", ``` -in `require` section and then run `composer update`. +in `require` section and then run `composer update --preder-dist`. Twig ---- diff --git a/docs/guide/view.md b/docs/guide/view.md index bde7706f91..a0335f4d3c 100644 --- a/docs/guide/view.md +++ b/docs/guide/view.md @@ -93,7 +93,7 @@ adding the following to `require`: "ezyang/htmlpurifier": "v4.6.0" ``` -After it's done run `php composer.phar install` and wait till package is downloaded. Now everything is prepared to use +After it's done run `php composer.phar install --prefer-dist` and wait till package is downloaded. Now everything is prepared to use Yii's HtmlPurifier helper: ```php diff --git a/docs/internals/getting-started.md b/docs/internals/getting-started.md index 07b95bc44a..e8f2430625 100644 --- a/docs/internals/getting-started.md +++ b/docs/internals/getting-started.md @@ -7,7 +7,8 @@ Composer package. Here's how to do it: 1. `git clone git@github.com:yiisoft/yii2-app-basic.git`. 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`. +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. diff --git a/extensions/yii/apidoc/README.md b/extensions/yii/apidoc/README.md index 0ae1ec31a5..55b1e99050 100644 --- a/extensions/yii/apidoc/README.md +++ b/extensions/yii/apidoc/README.md @@ -11,7 +11,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-apidoc "*" +php composer.phar require --prefer-dist yiisoft/yii2-apidoc "*" ``` or add diff --git a/extensions/yii/authclient/README.md b/extensions/yii/authclient/README.md index 0c97d85f59..348402814a 100644 --- a/extensions/yii/authclient/README.md +++ b/extensions/yii/authclient/README.md @@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-authclient "*" +php composer.phar require --prefer-dist yiisoft/yii2-authclient "*" ``` or add diff --git a/extensions/yii/bootstrap/README.md b/extensions/yii/bootstrap/README.md index e199f6411b..bffc715682 100644 --- a/extensions/yii/bootstrap/README.md +++ b/extensions/yii/bootstrap/README.md @@ -19,7 +19,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-bootstrap "*" +php composer.phar require --prefer-dist yiisoft/yii2-bootstrap "*" ``` or add diff --git a/extensions/yii/codeception/README.md b/extensions/yii/codeception/README.md index 62af9f0149..d065961409 100644 --- a/extensions/yii/codeception/README.md +++ b/extensions/yii/codeception/README.md @@ -17,7 +17,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-codeception "*" +php composer.phar require --prefer-dist yiisoft/yii2-codeception "*" ``` or add diff --git a/extensions/yii/debug/README.md b/extensions/yii/debug/README.md index e02c76b13e..aaac00dbd9 100644 --- a/extensions/yii/debug/README.md +++ b/extensions/yii/debug/README.md @@ -14,7 +14,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-debug "*" +php composer.phar require --prefer-dist yiisoft/yii2-debug "*" ``` or add diff --git a/extensions/yii/elasticsearch/README.md b/extensions/yii/elasticsearch/README.md index ecbf6331c2..1cf5a7c779 100644 --- a/extensions/yii/elasticsearch/README.md +++ b/extensions/yii/elasticsearch/README.md @@ -31,7 +31,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-elasticsearch "*" +php composer.phar require --prefer-dist yiisoft/yii2-elasticsearch "*" ``` or add diff --git a/extensions/yii/faker/README.md b/extensions/yii/faker/README.md index 38d640f578..9b40c542a9 100644 --- a/extensions/yii/faker/README.md +++ b/extensions/yii/faker/README.md @@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-faker "*" +php composer.phar require --prefer-dist yiisoft/yii2-faker "*" ``` or add diff --git a/extensions/yii/gii/README.md b/extensions/yii/gii/README.md index 60f374b27c..9611960293 100644 --- a/extensions/yii/gii/README.md +++ b/extensions/yii/gii/README.md @@ -13,7 +13,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-gii "*" +php composer.phar require --prefer-dist yiisoft/yii2-gii "*" ``` or add diff --git a/extensions/yii/imagine/README.md b/extensions/yii/imagine/README.md index 9c56290f15..4979f0a182 100644 --- a/extensions/yii/imagine/README.md +++ b/extensions/yii/imagine/README.md @@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-imagine "*" +php composer.phar require --prefer-dist yiisoft/yii2-imagine "*" ``` or add diff --git a/extensions/yii/jui/README.md b/extensions/yii/jui/README.md index f197c8c841..f35db1cae5 100644 --- a/extensions/yii/jui/README.md +++ b/extensions/yii/jui/README.md @@ -28,7 +28,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-jui "*" +php composer.phar require --prefer-dist yiisoft/yii2-jui "*" ``` or add diff --git a/extensions/yii/mongodb/README.md b/extensions/yii/mongodb/README.md index 28e110dc27..b6f64b3f6b 100644 --- a/extensions/yii/mongodb/README.md +++ b/extensions/yii/mongodb/README.md @@ -14,7 +14,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-mongodb "*" +php composer.phar require --prefer-dist yiisoft/yii2-mongodb "*" ``` or add diff --git a/extensions/yii/redis/README.md b/extensions/yii/redis/README.md index af856788a3..21d14a2f51 100644 --- a/extensions/yii/redis/README.md +++ b/extensions/yii/redis/README.md @@ -29,7 +29,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-redis "*" +php composer.phar require --prefer-dist yiisoft/yii2-redis "*" ``` or add diff --git a/extensions/yii/smarty/README.md b/extensions/yii/smarty/README.md index 06617f09bb..3aaf4499a3 100644 --- a/extensions/yii/smarty/README.md +++ b/extensions/yii/smarty/README.md @@ -29,7 +29,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-smarty "*" +php composer.phar require --prefer-dist yiisoft/yii2-smarty "*" ``` or add diff --git a/extensions/yii/sphinx/README.md b/extensions/yii/sphinx/README.md index 5f02204928..36e8afd2fd 100644 --- a/extensions/yii/sphinx/README.md +++ b/extensions/yii/sphinx/README.md @@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-sphinx "*" +php composer.phar require --prefer-dist yiisoft/yii2-sphinx "*" ``` or add diff --git a/extensions/yii/swiftmailer/README.md b/extensions/yii/swiftmailer/README.md index 1830374770..e21998de5d 100644 --- a/extensions/yii/swiftmailer/README.md +++ b/extensions/yii/swiftmailer/README.md @@ -37,7 +37,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-swiftmailer "*" +php composer.phar require --prefer-dist yiisoft/yii2-swiftmailer "*" ``` or add diff --git a/extensions/yii/twig/README.md b/extensions/yii/twig/README.md index bc04d92c7a..e7afabee03 100644 --- a/extensions/yii/twig/README.md +++ b/extensions/yii/twig/README.md @@ -32,7 +32,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require yiisoft/yii2-twig "*" +php composer.phar require --prefer-dist yiisoft/yii2-twig "*" ``` or add diff --git a/framework/README.md b/framework/README.md index 7ea09faacb..2e397421c7 100644 --- a/framework/README.md +++ b/framework/README.md @@ -12,7 +12,7 @@ The preferred way to install this extension is through [composer](http://getcomp Either run ``` -php composer.phar require "yiisoft/yii2 *" +php composer.phar require --prefer-dist "yiisoft/yii2 *" ``` or add