Browse Source

merged branch hhamon/fix_commands_doc (PR #1844)

Commits
-------

f2e4d35 [Console] harmonized commands documentation by changing ./app/console to php app/console.
41fe826 [SwiftmailerBundle] harmonized commands documentation by changing ./app/console to php app/console.
08072e4 [FrameworkBundle] harmonized commands documentation by changing ./app/console to php app/console.
ec9c0aa [DoctrineBundle] harmonized commands documentation by changing ./app/console to php app/console.
1c082b8 [FrameworkBundle] added short description for the assets:install command.
e16ccaa [SecurityBundle] added short description and help for the init:acl command.
e90efdc [DoctrineBundle] removed extra point at the end of the commands' short descriptions.

Discussion
----------

Fix commands doc
Fabien Potencier 14 years ago
parent
commit
ddfb78ad72
21 changed files with 68 additions and 55 deletions
  1. 2 2
      src/Symfony/Bundle/DoctrineBundle/Command/CreateDatabaseDoctrineCommand.php
  2. 2 2
      src/Symfony/Bundle/DoctrineBundle/Command/DropDatabaseDoctrineCommand.php
  3. 6 6
      src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php
  4. 4 4
      src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php
  5. 2 2
      src/Symfony/Bundle/DoctrineBundle/Command/InfoDoctrineCommand.php
  6. 2 2
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ClearMetadataCacheDoctrineCommand.php
  7. 2 2
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ClearQueryCacheDoctrineCommand.php
  8. 5 5
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ClearResultCacheDoctrineCommand.php
  9. 1 1
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ConvertMappingDoctrineCommand.php
  10. 4 4
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/CreateSchemaDoctrineCommand.php
  11. 4 4
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/DropSchemaDoctrineCommand.php
  12. 2 2
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php
  13. 3 3
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/RunDqlDoctrineCommand.php
  14. 1 1
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/RunSqlDoctrineCommand.php
  15. 4 4
      src/Symfony/Bundle/DoctrineBundle/Command/Proxy/UpdateSchemaDoctrineCommand.php
  16. 2 1
      src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
  17. 2 2
      src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
  18. 13 1
      src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php
  19. 2 2
      src/Symfony/Bundle/SwiftmailerBundle/Command/SendEmailCommand.php
  20. 2 2
      src/Symfony/Component/Console/Command/HelpCommand.php
  21. 3 3
      src/Symfony/Component/Console/Command/ListCommand.php

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/CreateDatabaseDoctrineCommand.php

@@ -34,12 +34,12 @@ class CreateDatabaseDoctrineCommand extends DoctrineCommand
 The <info>doctrine:database:create</info> command creates the default
 connections database:
 
-<info>./app/console doctrine:database:create</info>
+<info>php app/console doctrine:database:create</info>
 
 You can also optionally specify the name of a connection to create the
 database for:
 
-<info>./app/console doctrine:database:create --connection=default</info>
+<info>php app/console doctrine:database:create --connection=default</info>
 EOT
         );
     }

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/DropDatabaseDoctrineCommand.php

@@ -34,14 +34,14 @@ class DropDatabaseDoctrineCommand extends DoctrineCommand
 The <info>doctrine:database:drop</info> command drops the default connections
 database:
 
-<info>./app/console doctrine:database:drop</info>
+<info>php app/console doctrine:database:drop</info>
 
 The --force parameter has to be used to actually drop the database.
 
 You can also optionally specify the name of a connection to drop the database
 for:
 
-<info>./app/console doctrine:database:drop --connection=default</info>
+<info>php app/console doctrine:database:drop --connection=default</info>
 
 <error>Be careful: All data in a given database will be lost when executing
 this command.</error>

+ 6 - 6
src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php

@@ -43,27 +43,27 @@ You have to limit generation of entities:
 
 * To a bundle:
 
-  <info>./app/console doctrine:generate:entities MyCustomBundle</info>
+  <info>php app/console doctrine:generate:entities MyCustomBundle</info>
 
 * To a single entity:
 
-  <info>./app/console doctrine:generate:entities MyCustomBundle:User</info>
-  <info>./app/console doctrine:generate:entities MyCustomBundle/Entity/User</info>
+  <info>php app/console doctrine:generate:entities MyCustomBundle:User</info>
+  <info>php app/console doctrine:generate:entities MyCustomBundle/Entity/User</info>
 
 * To a namespace
 
-  <info>./app/console doctrine:generate:entities MyCustomBundle/Entity</info>
+  <info>php app/console doctrine:generate:entities MyCustomBundle/Entity</info>
 
 If the entities are not stored in a bundle, and if the classes do not exist,
 the command has no way to guess where they should be generated. In this case,
 you must provide the <comment>--path</comment> option:
 
-  <info>./app/console doctrine:generate:entities Blog/Entity --path=src/</info>
+  <info>php app/console doctrine:generate:entities Blog/Entity --path=src/</info>
 
 You should provide the <comment>--no-backup</comment> option if you don't mind to back up files
 before to generate entities:
 
-  <info>./app/console doctrine:generate:entities Blog/Entity --no-backup</info>
+  <info>php app/console doctrine:generate:entities Blog/Entity --no-backup</info>
 
 <error>Important:</error> Even if you specified Inheritance options in your
 XML or YAML Mapping files the generator cannot generate the base and

+ 4 - 4
src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php

@@ -42,22 +42,22 @@ class ImportMappingDoctrineCommand extends DoctrineCommand
 The <info>doctrine:mapping:import</info> command imports mapping information
 from an existing database:
 
-<info>./app/console doctrine:mapping:import "MyCustomBundle" xml</info>
+<info>php app/console doctrine:mapping:import "MyCustomBundle" xml</info>
 
 You can also optionally specify which entity manager to import from with the
 <info>--em</info> option:
 
-<info>./app/console doctrine:mapping:import "MyCustomBundle" xml --em=default</info>
+<info>php app/console doctrine:mapping:import "MyCustomBundle" xml --em=default</info>
 
 If you don't want to map every entity that can be found in the database, use the
 <info>--filter</info> option. It will try to match the targeted mapped entity with the
 provided pattern string.
 
-<info>./app/console doctrine:mapping:import "MyCustomBundle" xml --filter=MyMatchedEntity</info>
+<info>php app/console doctrine:mapping:import "MyCustomBundle" xml --filter=MyMatchedEntity</info>
 
 Use the <info>--force</info> option, if you want to override existing mapping files:
 
-<info>./app/console doctrine:mapping:import "MyCustomBundle" xml --force</info>
+<info>php app/console doctrine:mapping:import "MyCustomBundle" xml --force</info>
 EOT
         );
     }

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/InfoDoctrineCommand.php

@@ -34,12 +34,12 @@ The <info>doctrine:mapping:info</info> shows basic information about which
 entities exist and possibly if their mapping information contains errors or
 not.
 
-<info>./app/console doctrine:mapping:info</info>
+<info>php app/console doctrine:mapping:info</info>
 
 If you are using multiple entity managers you can pick your choice with the
 <info>--em</info> option:
 
-<info>./app/console doctrine:mapping:info --em=default</info>
+<info>php app/console doctrine:mapping:info --em=default</info>
 EOT
         );
     }

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ClearMetadataCacheDoctrineCommand.php

@@ -36,12 +36,12 @@ class ClearMetadataCacheDoctrineCommand extends MetadataCommand
 The <info>doctrine:cache:clear-metadata</info> command clears all metadata
 cache for the default entity manager:
 
-<info>./app/console doctrine:cache:clear-metadata</info>
+<info>php app/console doctrine:cache:clear-metadata</info>
 
 You can also optionally specify the <comment>--em</comment> option to specify
 which entity manager to clear the cache for:
 
-<info>./app/console doctrine:cache:clear-metadata --em=default</info>
+<info>php app/console doctrine:cache:clear-metadata --em=default</info>
 EOT
         );
     }

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ClearQueryCacheDoctrineCommand.php

@@ -36,12 +36,12 @@ class ClearQueryCacheDoctrineCommand extends QueryCommand
 The <info>doctrine:cache:clear-query</info> command clears all query cache for
 the default entity manager:
 
-<info>./app/console doctrine:cache:clear-query</info>
+<info>php app/console doctrine:cache:clear-query</info>
 
 You can also optionally specify the <comment>--em</comment> option to specify
 which entity manager to clear the cache for:
 
-<info>./app/console doctrine:cache:clear-query --em=default</info>
+<info>php app/console doctrine:cache:clear-query --em=default</info>
 EOT
         );
     }

+ 5 - 5
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ClearResultCacheDoctrineCommand.php

@@ -36,27 +36,27 @@ class ClearResultCacheDoctrineCommand extends ResultCommand
 The <info>doctrine:cache:clear-result</info> command clears all result cache
 for the default entity manager:
 
-<info>./app/console doctrine:cache:clear-result</info>
+<info>php app/console doctrine:cache:clear-result</info>
 
 You can also optionally specify the <comment>--em</comment> option to specify
 which entity manager to clear the cache for:
 
-<info>./app/console doctrine:cache:clear-result --em=default</info>
+<info>php app/console doctrine:cache:clear-result --em=default</info>
 
 If you don't want to clear all result cache you can specify some additional
 options to control what cache is deleted:
 
-<info>./app/console doctrine:cache:clear-result --id=cache_key</info>
+<info>php app/console doctrine:cache:clear-result --id=cache_key</info>
 
 Or you can specify a <comment>--regex</comment> to delete cache entries that
 match it:
 
-<info>./app/console doctrine:cache:clear-result --regex="user_(.*)"</info>
+<info>php app/console doctrine:cache:clear-result --regex="user_(.*)"</info>
 
 You can also specify a <comment>--prefix</comment> or
 <comment>--suffix</comment> to delete cache entries for:
 
-<info>./app/console doctrine:cache:clear-result --prefix="user_" --suffix="_frontend"</info>
+<info>php app/console doctrine:cache:clear-result --prefix="user_" --suffix="_frontend"</info>
 EOT
         );
     }

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/ConvertMappingDoctrineCommand.php

@@ -39,7 +39,7 @@ class ConvertMappingDoctrineCommand extends ConvertMappingCommand
 The <info>doctrine:mapping:convert</info> command converts mapping information
 between supported formats:
 
-<info>./app/console doctrine:mapping:convert xml /path/to/output</info>
+<info>php app/console doctrine:mapping:convert xml /path/to/output</info>
 EOT
         );
     }

+ 4 - 4
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/CreateSchemaDoctrineCommand.php

@@ -33,21 +33,21 @@ class CreateSchemaDoctrineCommand extends CreateCommand
 
         $this
             ->setName('doctrine:schema:create')
-            ->setDescription('Executes (or dumps) the SQL needed to generate the database schema.')
+            ->setDescription('Executes (or dumps) the SQL needed to generate the database schema')
             ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command')
             ->setHelp(<<<EOT
 The <info>doctrine:schema:create</info> command executes the SQL needed to
 generate the database schema for the default entity manager:
 
-<info>./app/console doctrine:schema:create</info>
+<info>php app/console doctrine:schema:create</info>
 
 You can also generate the database schema for a specific entity manager:
 
-<info>./app/console doctrine:schema:create --em=default</info>
+<info>php app/console doctrine:schema:create --em=default</info>
 
 Finally, instead of executing the SQL, you can output the SQL:
 
-<info>./app/console doctrine:schema:create --dump-sql</info>
+<info>php app/console doctrine:schema:create --dump-sql</info>
 EOT
         );
     }

+ 4 - 4
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/DropSchemaDoctrineCommand.php

@@ -32,22 +32,22 @@ class DropSchemaDoctrineCommand extends DropCommand
 
         $this
             ->setName('doctrine:schema:drop')
-            ->setDescription('Executes (or dumps) the SQL needed to drop the current database schema.')
+            ->setDescription('Executes (or dumps) the SQL needed to drop the current database schema')
             ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command')
             ->setHelp(<<<EOT
 The <info>doctrine:schema:drop</info> command generates the SQL needed to
 drop the database schema of the default entity manager:
 
-<info>./app/console doctrine:schema:drop --dump-sql</info>
+<info>php app/console doctrine:schema:drop --dump-sql</info>
 
 Alternatively, you can execute the generated queries:
 
-<info>./app/console doctrine:schema:drop --force</info>
+<info>php app/console doctrine:schema:drop --force</info>
 
 You can also optionally specify the name of a entity manager to drop the
 schema for:
 
-<info>./app/console doctrine:schema:drop --em=default</info>
+<info>php app/console doctrine:schema:drop --em=default</info>
 EOT
         );
     }

+ 2 - 2
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/EnsureProductionSettingsDoctrineCommand.php

@@ -37,12 +37,12 @@ class EnsureProductionSettingsDoctrineCommand extends EnsureProductionSettingsCo
 The <info>doctrine:ensure-production-settings</info> command ensures that
 Doctrine is properly configured for a production environment.:
 
-<info>./app/console doctrine:ensure-production-settings</info>
+<info>php app/console doctrine:ensure-production-settings</info>
 
 You can also optionally specify the <comment>--em</comment> option to specify
 which entity manager to use:
 
-<info>./app/console doctrine:ensure-production-settings --em=default</info>
+<info>php app/console doctrine:ensure-production-settings --em=default</info>
 EOT
         );
     }

+ 3 - 3
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/RunDqlDoctrineCommand.php

@@ -37,17 +37,17 @@ class RunDqlDoctrineCommand extends RunDqlCommand
 The <info>doctrine:query:dql</info> command executes the given DQL query and
 outputs the results:
 
-<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u"</info>
+<info>php app/console doctrine:query:dql "SELECT u FROM UserBundle:User u"</info>
 
 You can also optional specify some additional options like what type of
 hydration to use when executing the query:
 
-<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --hydrate=array</info>
+<info>php app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --hydrate=array</info>
 
 Additionally you can specify the first result and maximum amount of results to
 show:
 
-<info>./app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30</info>
+<info>php app/console doctrine:query:dql "SELECT u FROM UserBundle:User u" --first-result=0 --max-result=30</info>
 EOT
         );
     }

+ 1 - 1
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/RunSqlDoctrineCommand.php

@@ -37,7 +37,7 @@ class RunSqlDoctrineCommand extends RunSqlCommand
 The <info>doctrine:query:sql</info> command executes the given DQL query and
 outputs the results:
 
-<info>./app/console doctrine:query:sql "SELECT * from user"</info>
+<info>php app/console doctrine:query:sql "SELECT * from user"</info>
 EOT
         );
     }

+ 4 - 4
src/Symfony/Bundle/DoctrineBundle/Command/Proxy/UpdateSchemaDoctrineCommand.php

@@ -33,7 +33,7 @@ class UpdateSchemaDoctrineCommand extends UpdateCommand
 
         $this
             ->setName('doctrine:schema:update')
-            ->setDescription('Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata.')
+            ->setDescription('Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata')
             ->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command')
             ->setHelp(<<<EOT
 The <info>doctrine:schema:update</info> command generates the SQL needed to
@@ -43,15 +43,15 @@ default entity manager.
 For example, if you add metadata for a new column to an entity, this command
 would generate and output the SQL needed to add the new column to the database:
 
-<info>./app/console doctrine:schema:update --dump-sql</info>
+<info>php app/console doctrine:schema:update --dump-sql</info>
 
 Alternatively, you can execute the generated queries:
 
-<info>./app/console doctrine:schema:update --force</info>
+<info>php app/console doctrine:schema:update --force</info>
 
 You can also update the database schema for a specific entity manager:
 
-<info>./app/console doctrine:schema:update --em=default</info>
+<info>php app/console doctrine:schema:update --em=default</info>
 EOT
         );
     }

+ 2 - 1
src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

@@ -34,11 +34,12 @@ class AssetsInstallCommand extends ContainerAwareCommand
                 new InputArgument('target', InputArgument::REQUIRED, 'The target directory (usually "web")'),
             ))
             ->addOption('symlink', null, InputOption::VALUE_NONE, 'Symlinks the assets instead of copying it')
+            ->setDescription('Install bundles web assets under a public web directory')
             ->setHelp(<<<EOT
 The <info>assets:install</info> command installs bundle assets into a given
 directory (e.g. the web directory).
 
-<info>./app/console assets:install web [--symlink]</info>
+<info>php app/console assets:install web [--symlink]</info>
 
 A "bundles" directory will be created inside the target directory, and the
 "Resources/public" directory of each bundle will be copied into it.

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

@@ -42,8 +42,8 @@ class CacheClearCommand extends ContainerAwareCommand
 The <info>cache:clear</info> command clears the application cache for a given environment
 and debug mode:
 
-<info>./app/console cache:clear --env=dev</info>
-<info>./app/console cache:clear --env=prod --no-debug</info>
+<info>php app/console cache:clear --env=dev</info>
+<info>php app/console cache:clear --env=prod --no-debug</info>
 EOF
             )
         ;

+ 13 - 1
src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php

@@ -31,7 +31,19 @@ class InitAclCommand extends ContainerAwareCommand
     {
         $this
             ->setName('init:acl')
-        ;
+            ->setDescription('Mounts ACL tables in the database')
+            ->setHelp(<<<EOT
+The <info>init:acl</info> command mounts ACL tables in the database.
+
+<info>php app/console ini:acl</info>
+
+The name of the DBAL connection must be configured in your <info>app/config/security.yml</info> configuration file in the <info>security.acl.connection</info> variable.
+
+<info>security:
+    acl:
+        connection: default</info>
+EOT
+            );
     }
 
     /**

+ 2 - 2
src/Symfony/Bundle/SwiftmailerBundle/Command/SendEmailCommand.php

@@ -35,9 +35,9 @@ class SendEmailCommand extends ContainerAwareCommand
             ->addOption('message-limit', 0, InputOption::VALUE_OPTIONAL, 'The maximum number of messages to send.')
             ->addOption('time-limit', 0, InputOption::VALUE_OPTIONAL, 'The time limit for sending messages (in seconds).')
             ->setHelp(<<<EOF
-The <info>swiftmailer:spool:send</info> command send all emails from the spool.
+The <info>swiftmailer:spool:send</info> command sends all emails from the spool.
 
-<info>./app/console swiftmailer:spool:send --message-limit=10 --time-limit=10</info>
+<info>php app/console swiftmailer:spool:send --message-limit=10 --time-limit=10</info>
 
 EOF
             )

+ 2 - 2
src/Symfony/Component/Console/Command/HelpCommand.php

@@ -44,11 +44,11 @@ class HelpCommand extends Command
             ->setHelp(<<<EOF
 The <info>help</info> command displays help for a given command:
 
-  <info>./app/console help list</info>
+  <info>php app/console help list</info>
 
 You can also output the help as XML by using the <comment>--xml</comment> option:
 
-  <info>./app/console help --xml list</info>
+  <info>php app/console help --xml list</info>
 EOF
             );
     }

+ 3 - 3
src/Symfony/Component/Console/Command/ListCommand.php

@@ -40,15 +40,15 @@ class ListCommand extends Command
             ->setHelp(<<<EOF
 The <info>list</info> command lists all commands:
 
-  <info>./app/console list</info>
+  <info>php app/console list</info>
 
 You can also display the commands for a specific namespace:
 
-  <info>./app/console list test</info>
+  <info>php app/console list test</info>
 
 You can also output the information as XML by using the <comment>--xml</comment> option:
 
-  <info>./app/console list --xml</info>
+  <info>php app/console list --xml</info>
 EOF
             );
     }