From dc45de127c2e7a013f12d737c2677d943f516265 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 7 Jan 2014 01:27:04 +0400 Subject: [PATCH] Added --prefer-dist to all docs 1. It results in much smaller download and takes less disk space (25MB instead of 180MB for yii-basic + dependencies). 2. It requires less utilities to be installed (no VCS binaries required). 3. It takes less time to install dependencies. --- apps/advanced/README.md | 2 +- apps/basic/README.md | 2 +- apps/benchmark/README.md | 2 +- docs/guide/apps-advanced.md | 4 ++-- docs/guide/apps-basic.md | 4 ++-- docs/guide/composer.md | 4 ++-- docs/guide/gii.md | 2 +- docs/guide/template.md | 2 +- docs/guide/view.md | 2 +- docs/internals/getting-started.md | 3 ++- extensions/yii/apidoc/README.md | 2 +- extensions/yii/authclient/README.md | 2 +- extensions/yii/bootstrap/README.md | 2 +- extensions/yii/codeception/README.md | 2 +- extensions/yii/debug/README.md | 2 +- extensions/yii/elasticsearch/README.md | 2 +- extensions/yii/faker/README.md | 2 +- extensions/yii/gii/README.md | 2 +- extensions/yii/imagine/README.md | 2 +- extensions/yii/jui/README.md | 2 +- extensions/yii/mongodb/README.md | 2 +- extensions/yii/redis/README.md | 2 +- extensions/yii/smarty/README.md | 2 +- extensions/yii/sphinx/README.md | 2 +- extensions/yii/swiftmailer/README.md | 2 +- extensions/yii/twig/README.md | 2 +- framework/README.md | 2 +- 27 files changed, 31 insertions(+), 30 deletions(-) diff --git a/apps/advanced/README.md b/apps/advanced/README.md index a512e17..735820a 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 d1a17e2..b233770 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 7eddae8..27f598a 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 3bdf754..d5e8ea2 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 0125070..873125c 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 c2ab172..5c7cd64 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 0c40562..4d6ad9f 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 d1b12f5..c55d206 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 bde7706..a0335f4 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 07b95bc..e8f2430 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 0ae1ec3..55b1e99 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 0c97d85..3484028 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 e199f64..bffc715 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 62af9f0..d065961 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 e02c76b..aaac00d 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 ecbf633..1cf5a7c 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 38d640f..9b40c54 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 60f374b..9611960 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 9c56290..4979f0a 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 f197c8c..f35db1c 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 28e110d..b6f64b3 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 af85678..21d14a2 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 06617f0..3aaf449 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 5f02204..36e8afd 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 1830374..e21998d 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 bc04d92..e7afabe 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 7ea09fa..2e39742 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