From 5a81959d4aa6671890249e7e957af0c250c549b5 Mon Sep 17 00:00:00 2001 From: Rinat Silnov Date: Fri, 17 May 2013 02:33:41 +0400 Subject: [PATCH] Rename yiic to yii. Fixes #113 --- apps/bootstrap/protected/yii.bat | 6 ++---- build/build | 2 +- build/build.xml | 2 +- composer.json | 2 +- docs/guide/bootstrap.md | 9 ++++----- docs/guide/migration.md | 28 ++++++++++++++-------------- docs/guide/upgrade-from-v1.md | 4 ++-- yii/yii.bat | 6 ++---- 8 files changed, 27 insertions(+), 32 deletions(-) diff --git a/apps/bootstrap/protected/yii.bat b/apps/bootstrap/protected/yii.bat index 18bb296..5e21e2e 100644 --- a/apps/bootstrap/protected/yii.bat +++ b/apps/bootstrap/protected/yii.bat @@ -1,9 +1,7 @@ @echo off rem ------------------------------------------------------------- -rem Yii command line script for Windows. -rem -rem This is the bootstrap script for running yiic on Windows. +rem Yii command line bootstrap script for Windows. rem rem @author Qiang Xue rem @link http://www.yiiframework.com/ @@ -19,4 +17,4 @@ if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe "%PHP_COMMAND%" "%YII_PATH%yii" %* -@endlocal \ No newline at end of file +@endlocal diff --git a/build/build b/build/build index f8b21a6..d371dec 100755 --- a/build/build +++ b/build/build @@ -13,7 +13,7 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); require(__DIR__ . '/../yii/Yii.php'); -$id = 'yiic-build'; +$id = 'yii-build'; $basePath = __DIR__; $application = new yii\console\Application(array('id' => $id, 'basePath' => $basePath)); diff --git a/build/build.xml b/build/build.xml index 18a420d..9c18af0 100644 --- a/build/build.xml +++ b/build/build.xml @@ -94,7 +94,7 @@ - + diff --git a/composer.json b/composer.json index 1e8ae83..b25140f 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "vendor-dir": "yii/vendor" }, "bin": [ - "yii/yiic" + "yii/yii" ], "repositories": [ { diff --git a/docs/guide/bootstrap.md b/docs/guide/bootstrap.md index 1bc3fe6..47e3b8f 100644 --- a/docs/guide/bootstrap.md +++ b/docs/guide/bootstrap.md @@ -28,10 +28,9 @@ app/ img/ containing image files themes/ containing application themes protected/ containing protected application files - yiic yiic command line script for Unix/Linux - yiic.bat yiic command line script for Windows - yiic.php yiic command line PHP script - commands/ containing customized 'yiic' commands + yii yii command line script for Unix/Linux + yii.bat yii command line script for Windows + commands/ containing customized yii console commands components/ containing reusable user components config/ containing configuration files console.php the console application configuration @@ -60,4 +59,4 @@ app/ ~~~ -TBD \ No newline at end of file +TBD diff --git a/docs/guide/migration.md b/docs/guide/migration.md index bafd293..a86482c 100644 --- a/docs/guide/migration.md +++ b/docs/guide/migration.md @@ -19,7 +19,7 @@ The following steps show how we can use database migration during development: 4. Doug applies the migration to his local development database -Yii supports database migration via the `yiic migrate` command line tool. This +Yii supports database migration via the `yii migrate` command line tool. This tool supports creating new migrations, applying/reverting/redoing migrations, and showing migration history and new migrations. @@ -29,7 +29,7 @@ Creating Migrations To create a new migration (e.g. create a news table), we run the following command: ~~~ -yiic migrate/create +yii migrate/create ~~~ The required `name` parameter specifies a very brief description of the migration @@ -38,7 +38,7 @@ is used as part of a PHP class name. Therefore, it should only contain letters, digits and/or underscore characters. ~~~ -yiic migrate/create create_news_table +yii migrate/create create_news_table ~~~ The above command will create under the `protected/migrations` directory a new @@ -153,7 +153,7 @@ To apply all available new migrations (i.e., make the local database up-to-date) run the following command: ~~~ -yiic migrate +yii migrate ~~~ The command will show the list of all new migrations. If you confirm to apply @@ -170,7 +170,7 @@ Sometimes, we may only want to apply one or a few new migrations. We can use the following command: ~~~ -yiic migrate/up 3 +yii migrate/up 3 ~~~ This command will apply the 3 new migrations. Changing the value 3 will allow @@ -179,7 +179,7 @@ us to change the number of migrations to be applied. We can also migrate the database to a specific version with the following command: ~~~ -yiic migrate/to 101129_185401 +yii migrate/to 101129_185401 ~~~ That is, we use the timestamp part of a migration name to specify the version @@ -196,7 +196,7 @@ To revert the last one or several applied migrations, we can use the following command: ~~~ -yiic migrate/down [step] +yii migrate/down [step] ~~~ where the optional `step` parameter specifies how many migrations to be reverted @@ -213,7 +213,7 @@ Redoing migrations means first reverting and then applying the specified migrati This can be done with the following command: ~~~ -yiic migrate/redo [step] +yii migrate/redo [step] ~~~ where the optional `step` parameter specifies how many migrations to be redone. @@ -227,8 +227,8 @@ Besides applying and reverting migrations, the migration tool can also display the migration history and the new migrations to be applied. ~~~ -yiic migrate/history [limit] -yiic migrate/new [limit] +yii migrate/history [limit] +yii migrate/new [limit] ~~~ where the optional parameter `limit` specifies the number of migrations to be @@ -247,10 +247,10 @@ often happens when developing a new migration. We can use the following command to achieve this goal. ~~~ -yiic migrate/mark 101129_185401 +yii migrate/mark 101129_185401 ~~~ -This command is very similar to `yiic migrate/to` command, except that it only +This command is very similar to `yii migrate/to` command, except that it only modifies the migration history table to the specified version without applying or reverting the migrations. @@ -291,7 +291,7 @@ line: To specify these options, execute the migrate command using the following format ~~~ -yiic migrate/up --option1=value1 --option2=value2 ... +yii migrate/up --option1=value1 --option2=value2 ... ~~~ For example, if we want to migrate for a `forum` module whose migration files @@ -299,7 +299,7 @@ are located within the module's `migrations` directory, we can use the following command: ~~~ -yiic migrate/up --migrationPath=ext.forum.migrations +yii migrate/up --migrationPath=ext.forum.migrations ~~~ diff --git a/docs/guide/upgrade-from-v1.md b/docs/guide/upgrade-from-v1.md index 50e6977..cc0de73 100644 --- a/docs/guide/upgrade-from-v1.md +++ b/docs/guide/upgrade-from-v1.md @@ -152,7 +152,7 @@ with significant improvements. For more details, please see the "assets" subsect While Yii 2.0 continues to use PHP as its main template language, it comes with built-in support for two popular template engines: Smarty and Twig. The Prado template engine is no longer supported. To use these template engines, you just need to use `tpl` as the file -extension for your Smarty views, or `twig` for Twig views. You may also configure the +extension for your Smarty views, or `twig` for Twig views. You may also configure the `View::renderers` property to use other template engines. @@ -252,7 +252,7 @@ Console applications are now composed by controllers, too, like Web applications console controllers and Web controllers share the same base controller class. Each console controller is like `CConsoleCommand` in 1.1. It consists of one or several -actions. You use the `yiic ` command to execute a console command, where `` +actions. You use the `yii ` command to execute a console command, where `` stands for a controller route (e.g. `sitemap/index`). Additional anonymous arguments are passed as the parameters to the corresponding controller action method, and named arguments are treated as global options declared in `globalOptions()`. diff --git a/yii/yii.bat b/yii/yii.bat index 18bb296..5e21e2e 100644 --- a/yii/yii.bat +++ b/yii/yii.bat @@ -1,9 +1,7 @@ @echo off rem ------------------------------------------------------------- -rem Yii command line script for Windows. -rem -rem This is the bootstrap script for running yiic on Windows. +rem Yii command line bootstrap script for Windows. rem rem @author Qiang Xue rem @link http://www.yiiframework.com/ @@ -19,4 +17,4 @@ if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe "%PHP_COMMAND%" "%YII_PATH%yii" %* -@endlocal \ No newline at end of file +@endlocal