Development

Changeset 8287

You must first sign up to be able to contribute.

Changeset 8287

Show
Ignore:
Timestamp:
04/04/08 15:35:58 (3 months ago)
Author:
francois
Message:

[doc 1.1] Removed mention of pake, changed task names in cookbook

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.1/book/17-Extending-Symfony.txt

    r8283 r8287  
    642642          *.yml            // Fixtures files 
    643643        tasks/ 
    644           *.php            // Pake tasks 
     644          *.php            // CLI tasks 
    645645      lib/ 
    646646        *.php              // Classes 
  • doc/branches/1.1/cookbook/cli.txt

    r3526 r8287  
    4040When an exception occurs, you might want to get the stack trace and detailed explanation. Add the `-t` option before the task name to get the trace. 
    4141 
    42 >**Note**: For the records, symfony uses a dedicated tool called [Pake][1] to manage common tasks. Pake is a php tool similar to the [Rake][2] command, a Ruby translation of the `make` command. Pake was built by the symfony team. It automates some administration tasks according to a specific configuration file called `pakefile.php`. But since you use the `pake` tool just by typing `symfony` in a command line, you don't even need to learn what pake does and how it works.. 
    43  
    4442 
    4543CLI tasks 
     
    4846### Structure generation 
    4947 
    50     $ php symfony init-project <PROJECT_NAME> 
     48    $ php symfony generate:project <PROJECT_NAME> 
    5149     
    5250Initializes a new symfony project (shortcut: `new`). 
    5351           
    54     $ php symfony init-app <APPLICATION_NAME> 
     52    $ php symfony generate:app <APPLICATION_NAME> 
    5553     
    5654Initializes a new symfony application (shortcut: `app`).     
    5755 
    58     $ php symfony init-module <APPLICATION_NAME> <MODULE_NAME> 
    59      
    60 Initializes a new symfony module (shortcut: `module`). 
    61  
    62     $ php symfony init-batch <SKELETON_NAME> [...] 
    63  
    64 Initializes a new batch file (shortcut: `batch`). You must select a batch skeleton to init, and then follow the prompts. 
    65  
    66     $ php symfony init-controller <APPLICATION_NAME> <ENVIRONMENT_NAME> [<SCRIPT_NAME>] [true|false] 
    67  
    68 Initializes a new controller (shortcut: `controller`). The default script name follows the symfony convention. 
    69  
     56    $ php symfony generate:module <APPLICATION_NAME> <MODULE_NAME> 
     57     
    7058Find more about these commands in [Chapter 16](http://www.symfony-project.com/book/trunk/16-Application-Management-Tools). 
    7159 
    7260### Model generation 
    7361 
    74     $ php symfony propel-build-model 
     62    $ php symfony propel:build-model 
    7563 
    7664Generates the Propel classes for the current model, based on the schema files (YAML or XML) of your `config/` directory. 
     
    7866The connection settings used by the following commands are taken from the `config/propel.ini` configuration.   
    7967     
    80     $ php symfony propel-build-sql 
     68    $ php symfony propel:build-sql 
    8169     
    8270Generates the SQL code to create the tables described in the `schema.yml`, in a `data/schema.sql` file. 
    8371 
    84     $ php symfony propel-build-db 
    85      
    86 Creates an empty database based on the connection settings.     
    87  
    88     $ php symfony propel-insert-sql 
     72    $ php symfony propel:build-db 
     73     
     74Creates an empty database based on the connection settings. 
     75 
     76    $ php symfony propel:insert-sql 
    8977     
    9078Inserts the SQL code from `data/schema.sql` into the database.     
    9179     
    92     $ php symfony propel-build-all 
    93  
    94 Executes `propel-build-model`, `propel-build-sql` and then `propel-insert-sql` all in one command. 
     80    $ php symfony propel:build-all 
     81 
     82Executes `propel:build-model`, `propel:build-sql` and then `propel:insert-sql` all in one command. 
    9583 
    9684Find more about these commands in [Chapter 8](http://www.symfony-project.com/book/trunk/08-Inside-the-Model-Layer). 
     
    9886### Schema management 
    9987 
    100     $ php symfony propel-build-schema [xml] 
     88    $ php symfony propel:build-schema [xml] 
    10189     
    10290Creates a `schema.yml` from an existing database. If the `xml` parameter is added, the tasks creates a `schema.xml` instead of the YAML version. 
    10391 
    104     $ php symfony propel-convert-xml-schema 
     92    $ php symfony propel:schema-to-yml 
    10593     
    10694Creates YAML versions of the XML schemas found. 
    10795   
    108     $ php symfony propel-convert-yml-schema 
     96    $ php symfony propel:schema-to-xml 
    10997     
    11098Creates XML versions of the YAML schemas found. 
     
    112100### Data management 
    113101 
    114     $ php symfony propel-load-data  <APPLICATION_NAME> [<ENVIRONMENT_NAME>] [<FIXTURES_DIR_OR_FILE>] 
     102    $ php symfony propel:data-load  <APPLICATION_NAME> [<ENVIRONMENT_NAME>] [<FIXTURES_DIR_OR_FILE>] 
    115103     
    116104Loads all data from default `data/fixtures/` directory unless otherwise specified. Environment is default to `dev`. The fixtures directory must be specified relative to the project's data dir, for example `fixtures` (default) or `testdata` or specify a single file `fixtures/file.yml`.     
    117105 
    118     $ php symfony propel-build-all-load  <APPLICATION_NAME> [<ENVIRONMENT_NAME>] [<FIXTURES_DIR_OR_FILE>] 
    119  
    120 Executes `propel-build-all` then `propel-load-data`. Accepts same arguments as `propel-load-data`. 
    121  
    122     $ php symfony propel-dump-data  <APPLICATION_NAME> <FIXTURES_DIR_OR_FILE> [<ENVIRONMENT_NAME>] 
     106    $ php symfony propel:build-all-load  <APPLICATION_NAME> [<ENVIRONMENT_NAME>] [<FIXTURES_DIR_OR_FILE>] 
     107 
     108Executes `propel:build-all` then `propel:data-load`. Accepts same arguments as `propel:data-load`. 
     109 
     110    $ php symfony propel:data-dump  <APPLICATION_NAME> <FIXTURES_DIR_OR_FILE> [<ENVIRONMENT_NAME>] 
    123111     
    124112Dumps database data to a file in the fixtures directory in YAML format. 
     
    126114### Development tools 
    127115 
    128     $ php symfony clear-cache [<APPLICATION_NAME>] [template|config] 
     116    $ php symfony cache:cmear [<APPLICATION_NAME>] [template|config] 
    129117 
    130118Clears the cached information (shortcut: `cc`) (find more in [Chapter 12](http://www.symfony-project.com/book/trunk/12-Caching)). 
    131119 
    132     $ php symfony clear-controllers 
     120    $ php symfony project:clear-controllers 
    133121     
    134122Clears the web directory of all controllers other than ones running in a production environment. Very useful before deployment to the production server. 
    135123 
    136     $ php symfony fix-perm
     124    $ php symfony project:permission
    137125     
    138126Fixes directories permissions, to change to `777` the directories that need to be writable. The permission can be broken if you use a checkout from a SVN repository. 
    139127 
    140     $ php symfony freeze 
    141     $ php symfony unfreeze 
    142  
    143 Copies all the necessary symfony libraries into the `data/`, `lib/` and `web/sf/` directories of your project. Your project then becomes a kind of sandbox, i.e. a standalone application with no dependence and ready to be transferred to production via FTP. Works fine with PEAR installations as well as symbolic links. Unfreeze your project with the `unfreeze` task. 
    144  
    145     $ php symfony sync <ENVIRONMENT_NAME> [go] 
     128    $ php symfony project:freeze 
     129    $ php symfony project:unfreeze 
     130 
     131Copies all the necessary symfony libraries into the `data/`, `lib/` and `web/sf/` directories of your project. Your project then becomes a kind of sandbox, i.e. a standalone application with no dependence and ready to be transferred to production via FTP. Works fine with PEAR installations as well as symbolic links. Unfreeze your project with the `project:unfreeze` task. 
     132 
     133    $ php symfony project:deploy <ENVIRONMENT_NAME> [go] 
    146134     
    147135Synchronises the current project with another machine (find more in [Chapter 16](http://www.symfony-project.com/book/trunk/16-Application-Management-Tools#Deploying%20Applications)).    
     
    149137### Tests 
    150138 
    151     $ php symfony test-unit <UNIT_TEST> 
     139    $ php symfony test:unit <UNIT_TEST> 
    152140     
    153141Launches a unit test located in the `test/unit/` directory. The parameter can be the name of a single unit test file (omitting the `Test.php` suffix), a group of unit test files, or a file path with wildcards. If no test name is given, all unit tests are run. 
    154142 
    155     $ php symfony test-unit 
     143    $ php symfony test:unit 
    156144     
    157145Launches all unit tests in harness mode. 
    158146 
    159     $ php symfony test-functional <APPLICATION_NAME> <TEST> 
     147    $ php symfony test:functional <APPLICATION_NAME> <TEST> 
    160148 
    161149Launches a functional test for a given application. The `TEST` parameter can be the name of a single functional test file (omitting the `Test.php` suffix), a group of unit test files, or a file path with wildcards.  
    162150 
    163     $ php symfony test-functional <APPLICATION_NAME> 
     151    $ php symfony test:functional <APPLICATION_NAME> 
    164152     
    165153Launches all functional tests of an application in harness mode. 
    166154 
    167     $ php symfony test-all  
     155    $ php symfony test:all  
    168156     
    169157Launches all unit and functional tests in harness mode. 
     
    173161### Project administration 
    174162 
    175     $ php symfony disable <APPLICATION_NAME> <ENVIRONMENT_NAME> 
     163    $ php symfony project:disable <APPLICATION_NAME> <ENVIRONMENT_NAME> 
    176164 
    177165Forwards the user to the unavailable module and action in your `settings.yml` file and acts in the same way as if you had set the unavaiable setting in your `settings.yml` file. The advantage over the setting is that you can disable a single application for a single environment, and not only the whole project. 
    178166 
    179     $ php symfony enable <APPLICATION_NAME> <ENVIRONMENT_NAME> 
     167    $ php symfony project:enable <APPLICATION_NAME> <ENVIRONMENT_NAME> 
    180168 
    181169Enables the application and clears the cache.  
    182170 
    183     $ php symfony purge-logs 
     171    $ php symfony log:clear 
    184172 
    185173Clears the logs files in the log directory in applications and environments where the `logging.yml` specifies `purge: on` (which is the default value). 
    186174 
    187     $ php symfony rotate-log <APPLICATION_NAME> <ENVIRONMENT_NAME> 
     175    $ php symfony log:rotate <APPLICATION_NAME> <ENVIRONMENT_NAME> 
    188176     
    189177Forces a rotation of a log file if `rotate` is enabled for the log file in `logging.yml`. The rotation parameters are the `period` (the number of days a single log file lasts) and the `history` (the number of backup log files kept). Here is an example of `logging.yml` withrotation configutation: 
     
    196184### Scaffolding and admin generation 
    197185 
    198     $ php symfony propel-generate-crud <APPLICATION_NAME> <MODULE_NAME> <CLASS_NAME> 
    199     $ php symfony propel-init-crud <APPLICATION_NAME> <MODULE_NAME> <CLASS_NAME> 
    200      
    201 Generates a new Propel CRUD module based on a class from the model. The `generate` version copies the code from the framework to a new module, the `init` verson creates an empty module that inherits from the one in the framework. In this case, the generated code is visible only in the `cache/` folder (the generated actions and templates inherit from the framework). 
    202  
    203     $ php symfony propel-init-admin <APPLICATION_NAME> <MODULE_NAME> <CLASS_NAME> 
     186    $ php symfony propel:generate-crud <APPLICATION_NAME> <MODULE_NAME> <CLASS_NAME> 
     187     
     188Generates a new Propel CRUD module based on a class from the model. The normal version copies the code from the framework to a new module; if you add the `--generate-in-cache` option, the task creates an empty module that inherits from the one in the framework. In this case, the generated code is visible only in the `cache/` folder (the generated actions and templates inherit from the framework). 
     189 
     190    $ php symfony propel:init-admin <APPLICATION_NAME> <MODULE_NAME> <CLASS_NAME> 
    204191     
    205192Initializes a new Propel admin module based on a class from the model 
     
    209196### Plugin management 
    210197 
    211     $ php symfony plugin-install <CHANNEL_NAME>/<PLUGIN_NAME> 
     198    $ php symfony plugin:install <CHANNEL_NAME>/<PLUGIN_NAME> 
    212199     
    213200Installs a new plugin. To install a new plugin from the symfony wiki, use `http://plugins.symfony-project.com` as a channel name. 
    214201     
    215     $ php symfony plugin-upgrade <CHANNEL_NAME>/<PLUGIN_NAME> 
     202    $ php symfony plugin:upgrade <CHANNEL_NAME>/<PLUGIN_NAME> 
    216203 
    217204Upgrades a plugin. 
    218205 
    219     $ php symfony plugin-upgrade-all 
     206    $ php symfony plugin:upgrade-all 
    220207 
    221208Upgrades all the plugins previously installed in local 
    222209 
    223     $ php symfony plugin-uninstall <CHANNEL_NAME>/<PLUGIN_NAME> 
     210    $ php symfony plugin:uninstall <CHANNEL_NAME>/<PLUGIN_NAME> 
    224211     
    225212Uninstalls a plugin.     
     
    233220 
    234221* [Bash completion](http://www.symfony-project.com/trac/wiki/BashCompletion) 
    235 * [Zsh completion](http://www.symfony-project.com/trac/wiki/ZshCompletion)  
    236  
    237 [1]: http://www.pake-project.org/    "Pake" 
    238 [2]: http://rake.rubyforge.org/      "Rake" 
     222* [Zsh completion](http://www.symfony-project.com/trac/wiki/ZshCompletion)