From a450d66babc48448dbc3316b1b2d9cfaacd47e09 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 4 Jan 2015 10:52:37 +0100 Subject: [PATCH 1/6] Made help information consistent --- .../FrameworkBundle/Command/ConfigDebugCommand.php | 3 +-- .../Command/ConfigDumpReferenceCommand.php | 2 +- .../FrameworkBundle/Command/RouterDebugCommand.php | 2 +- .../FrameworkBundle/Command/RouterMatchCommand.php | 4 +++- .../Command/TranslationDebugCommand.php | 8 ++++---- .../Bundle/FrameworkBundle/Command/YamlLintCommand.php | 10 +++++----- src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php | 6 +++--- src/Symfony/Bundle/TwigBundle/Command/LintCommand.php | 4 ++-- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php index 777628623f..01f6d0430f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php @@ -32,11 +32,10 @@ class ConfigDebugCommand extends AbstractConfigCommand $this ->setName('config:debug') ->setDefinition(array( - new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'), + new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'), )) ->setDescription('Dumps the current configuration for an extension') ->setHelp(<<%command.name% command dumps the current configuration for an extension/bundle. diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index 4a92fd63a8..98dc9109cc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -48,7 +48,7 @@ Either the extension alias or bundle name can be used: php %command.full_name% framework php %command.full_name% FrameworkBundle -With the format option specifies the format of the configuration, +With the --format option specifies the format of the configuration, this is either yaml or xml. When the option is not provided, yaml is used. diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 4a3717dc7d..d5a9fdbe29 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -61,7 +61,7 @@ class RouterDebugCommand extends ContainerAwareCommand The %command.name% displays the configured routes: php %command.full_name% - + EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index 72b322bca3..c00edff926 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -60,7 +60,9 @@ class RouterMatchCommand extends ContainerAwareCommand The %command.name% shows which routes match a given request and which don't and for what reason: php %command.full_name% /foo - or + +or + php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose EOF diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php index eff9dc1947..f531237f70 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php @@ -54,19 +54,19 @@ templates and translation files of a given bundle. You can display information about bundle translations in a specific locale: -php %command.full_name% en AcmeDemoBundle + php %command.full_name% en AcmeDemoBundle You can also specify a translation domain for the search: -php %command.full_name% --domain=messages en AcmeDemoBundle + php %command.full_name% --domain=messages en AcmeDemoBundle You can only display missing messages: -php %command.full_name% --only-missing en AcmeDemoBundle + php %command.full_name% --only-missing en AcmeDemoBundle You can only display unused messages: -php %command.full_name% --only-unused en AcmeDemoBundle + php %command.full_name% --only-unused en AcmeDemoBundle EOF ) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php index 967c3b18a3..6565ef85bc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php @@ -43,20 +43,20 @@ the first encountered syntax error. You can validate the syntax of a file: -php %command.full_name% filename + php %command.full_name% filename Or of a whole directory: -php %command.full_name% dirname -php %command.full_name% dirname --format=json + php %command.full_name% dirname + php %command.full_name% dirname --format=json Or all YAML files in a bundle: -php %command.full_name% @AcmeDemoBundle + php %command.full_name% @AcmeDemoBundle You can also pass the YAML contents from STDIN: -cat filename | php %command.full_name% + cat filename | php %command.full_name% EOF ) diff --git a/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php b/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php index c659592ede..db89c6a0be 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php @@ -37,15 +37,15 @@ class DebugCommand extends ContainerAwareCommand The %command.name% command outputs a list of twig functions, filters, globals and tests. Output can be filtered with an optional argument. -php %command.full_name% + php %command.full_name% The command lists all functions, filters, etc. -php %command.full_name% date + php %command.full_name% date The command lists everything that contains the word date. -php %command.full_name% --format=json + php %command.full_name% --format=json The command lists everything in a machine readable json format. EOF diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index 95c892cb04..a5759d8c71 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -56,10 +56,10 @@ class LintCommand extends BaseLintCommand implements ContainerAwareInterface ->setHelp( $this->getHelp().<<php %command.full_name% @AcmeDemoBundle + php %command.full_name% @AcmeDemoBundle + EOF ) ; From 57b08e4393e7616b53e8de2532cef6cc8567c015 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 4 Jan 2015 11:02:10 +0100 Subject: [PATCH 2/6] Made CLI help consistent --- .../FrameworkBundle/Command/ServerStartCommand.php | 12 ++++++------ .../FrameworkBundle/Command/ServerStopCommand.php | 4 ++-- .../Bundle/SecurityBundle/Command/SetAclCommand.php | 10 ++++++---- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php index f5fe6b6921..977de6ef88 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php @@ -41,23 +41,23 @@ class ServerStartCommand extends ServerCommand ->setHelp(<<%command.name% runs PHP's built-in web server: - %command.full_name% + php %command.full_name% To change the default bind address and the default port use the address argument: - %command.full_name% 127.0.0.1:8080 + php %command.full_name% 127.0.0.1:8080 To change the default document root directory use the --docroot option: - %command.full_name% --docroot=htdocs/ + php %command.full_name% --docroot=htdocs/ If you have a custom document root directory layout, you can specify your own router script using the --router option: - %command.full_name% --router=app/config/router.php + php %command.full_name% --router=app/config/router.php -Specifying a router script is required when the used environment is not "dev" or -"prod". +Specifying a router script is required when the used environment is not "dev" or +"prod". See also: http://www.php.net/manual/en/features.commandline.webserver.php diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php index cba9f7a8c4..9b0656c220 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php @@ -36,11 +36,11 @@ class ServerStopCommand extends ServerCommand ->setHelp(<<%command.name% stops PHP's built-in web server: - %command.full_name% + php %command.full_name% To change the default bind address and the default port use the address argument: - %command.full_name% 127.0.0.1:8080 + php %command.full_name% 127.0.0.1:8080 EOF ) diff --git a/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php index de01dc6b33..01f5ddb11b 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php @@ -59,20 +59,22 @@ class SetAclCommand extends ContainerAwareCommand The %command.name% command sets ACL. The ACL system must have been initialized with the init:acl command. -To set VIEW and EDIT permissions for the user kevin on the instance of Acme\MyClass having the identifier 42: +To set VIEW and EDIT permissions for the user kevin on the instance of +Acme\MyClass having the identifier 42: -php %command.full_name% --user=Symfony/Component/Security/Core/User/User:kevin VIEW EDIT Acme/MyClass:42 + php %command.full_name% --user=Symfony/Component/Security/Core/User/User:kevin VIEW EDIT Acme/MyClass:42 Note that you can use / instead of \\ for the namespace delimiter to avoid any problem. To set permissions for a role, use the --role option: -php %command.full_name% --role=ROLE_USER VIEW Acme/MyClass:1936 + php %command.full_name% --role=ROLE_USER VIEW Acme/MyClass:1936 To set permissions at the class scope, use the --class-scope option: -php %command.full_name% --class-scope --user=Symfony/Component/Security/Core/User/User:anne OWNER Acme/MyClass:42 + php %command.full_name% --class-scope --user=Symfony/Component/Security/Core/User/User:anne OWNER Acme/MyClass:42 + EOF ) ->addArgument('arguments', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'A list of permissions and object identities (class name and ID separated by a column)') From 6776ab36e3ca51c3d4759cc5a12a7f57dad5d2e9 Mon Sep 17 00:00:00 2001 From: Saro0h Date: Mon, 5 Jan 2015 22:39:05 +0100 Subject: [PATCH 3/6] [2.6] Added internal annotation on Descriptor classes --- .../Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php | 2 ++ .../FrameworkBundle/Console/Descriptor/JsonDescriptor.php | 2 ++ .../FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php | 2 ++ .../FrameworkBundle/Console/Descriptor/TextDescriptor.php | 2 ++ .../Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php | 2 ++ .../Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php | 2 ++ .../Component/Console/Descriptor/ApplicationDescription.php | 2 ++ src/Symfony/Component/Console/Descriptor/Descriptor.php | 2 ++ src/Symfony/Component/Console/Descriptor/JsonDescriptor.php | 2 ++ src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php | 2 ++ src/Symfony/Component/Console/Descriptor/TextDescriptor.php | 2 ++ src/Symfony/Component/Console/Descriptor/XmlDescriptor.php | 2 ++ 12 files changed, 24 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index 7a345938bd..ae530e9370 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -24,6 +24,8 @@ use Symfony\Component\Routing\RouteCollection; /** * @author Jean-François Simon + * + * @internal */ abstract class Descriptor implements DescriptorInterface { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index 5dd2d405ee..795c74726e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -25,6 +25,8 @@ use Symfony\Component\Routing\RouteCollection; /** * @author Jean-François Simon + * + * @internal */ class JsonDescriptor extends Descriptor { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 173b5038e9..b586194da8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -21,6 +21,8 @@ use Symfony\Component\Routing\RouteCollection; /** * @author Jean-François Simon + * + * @internal */ class MarkdownDescriptor extends Descriptor { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 4a391b4333..e68d376dd6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -22,6 +22,8 @@ use Symfony\Component\Routing\RouteCollection; /** * @author Jean-François Simon + * + * @internal */ class TextDescriptor extends Descriptor { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php index 146ea2979d..7853dd5af1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php @@ -21,6 +21,8 @@ use Symfony\Component\Routing\RouteCollection; /** * @author Jean-François Simon + * + * @internal */ class XmlDescriptor extends Descriptor { diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php b/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php index acb2a517ab..8d46ae1624 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php @@ -19,6 +19,8 @@ use Symfony\Component\Console\Helper\DescriptorHelper as BaseDescriptorHelper; /** * @author Jean-François Simon + * + * @internal */ class DescriptorHelper extends BaseDescriptorHelper { diff --git a/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php b/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php index cdf1493c40..a0a5df295f 100644 --- a/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php +++ b/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php @@ -16,6 +16,8 @@ use Symfony\Component\Console\Command\Command; /** * @author Jean-François Simon + * + * @internal */ class ApplicationDescription { diff --git a/src/Symfony/Component/Console/Descriptor/Descriptor.php b/src/Symfony/Component/Console/Descriptor/Descriptor.php index 952341579a..49e21939f9 100644 --- a/src/Symfony/Component/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Component/Console/Descriptor/Descriptor.php @@ -20,6 +20,8 @@ use Symfony\Component\Console\Output\OutputInterface; /** * @author Jean-François Simon + * + * @internal */ abstract class Descriptor implements DescriptorInterface { diff --git a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php index 186da508d5..13785a40fe 100644 --- a/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/JsonDescriptor.php @@ -21,6 +21,8 @@ use Symfony\Component\Console\Input\InputOption; * JSON descriptor. * * @author Jean-François Simon + * + * @internal */ class JsonDescriptor extends Descriptor { diff --git a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index 3699f08753..db8f7df00a 100644 --- a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -21,6 +21,8 @@ use Symfony\Component\Console\Input\InputOption; * Markdown descriptor. * * @author Jean-François Simon + * + * @internal */ class MarkdownDescriptor extends Descriptor { diff --git a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php index fcefcd83f6..04e7264d89 100644 --- a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php @@ -21,6 +21,8 @@ use Symfony\Component\Console\Input\InputOption; * Text descriptor. * * @author Jean-François Simon + * + * @internal */ class TextDescriptor extends Descriptor { diff --git a/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php index ac1e25e3af..5054686697 100644 --- a/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/XmlDescriptor.php @@ -21,6 +21,8 @@ use Symfony\Component\Console\Input\InputOption; * XML descriptor. * * @author Jean-François Simon + * + * @internal */ class XmlDescriptor extends Descriptor { From c71fe0c37be2f302326831d15e3e05d5a16ade3a Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sun, 4 Jan 2015 18:59:57 +0100 Subject: [PATCH 4/6] Deprecate the translator implementation in the Validator component The Translation component already provides an implementation which only deals with replacing parameters in the message without translating it. Duplicating the logic in the Validator component is not needed (and it is the wrong place for it). --- UPGRADE-3.0.md | 16 ++++++++++++++++ src/Symfony/Component/Validator/CHANGELOG.md | 5 +++++ .../Component/Validator/DefaultTranslator.php | 4 ++++ .../Validator/LegacyValidator2Dot5ApiTest.php | 7 +++++-- .../Validator/LegacyValidatorLegacyApiTest.php | 7 +++++-- .../Validator/RecursiveValidator2Dot5ApiTest.php | 7 +++++-- .../Component/Validator/Tests/ValidatorTest.php | 7 +++++-- .../Component/Validator/ValidatorBuilder.php | 12 +++++++++++- src/Symfony/Component/Validator/composer.json | 2 +- 9 files changed, 57 insertions(+), 10 deletions(-) diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index 14520c1c6f..fcfd9f91c6 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -977,6 +977,22 @@ UPGRADE FROM 2.x to 3.0 $plural = $violation->getPlural(); ``` + * The class `Symfony\Component\Validator\DefaultTranslator` was removed. You + should use `Symfony\Component\Translation\IdentityTranslator` instead. + + Before: + + ```php + $translator = new \Symfony\Component\Validator\DefaultTranslator(); + ``` + + After: + + ```php + $translator = new \Symfony\Component\Translation\IdentityTranslator(); + $translator->setLocale('en'); + ``` + ### Yaml * The ability to pass file names to `Yaml::parse()` has been removed. diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index 88153faf17..dc925b75bd 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +2.7.0 +----- + + * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator` + 2.6.0 ----- diff --git a/src/Symfony/Component/Validator/DefaultTranslator.php b/src/Symfony/Component/Validator/DefaultTranslator.php index 06967de922..e15942f80d 100644 --- a/src/Symfony/Component/Validator/DefaultTranslator.php +++ b/src/Symfony/Component/Validator/DefaultTranslator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator; +trigger_error('The class '.__NAMESPACE__.'\DefaultTranslator is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead.', E_USER_DEPRECATED); + use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Exception\BadMethodCallException; use Symfony\Component\Validator\Exception\InvalidArgumentException; @@ -43,6 +45,8 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; * {@link \Symfony\Component\Translation\Translator} and can be used in places * where translation is not required by default but should be optional. * + * @deprecated since version 2.7, to be removed in 3.0. Use Symfony\Component\Translation\IdentityTranslator instead. + * * @author Bernhard Schussek */ class DefaultTranslator implements TranslatorInterface diff --git a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php index 3e1e442f75..ce4b1ad88e 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Validator\Tests\Validator; +use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\Context\LegacyExecutionContextFactory; -use Symfony\Component\Validator\DefaultTranslator; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\LegacyValidator; @@ -30,7 +30,10 @@ class LegacyValidator2Dot5ApiTest extends Abstract2Dot5ApiTest protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { - $contextFactory = new LegacyExecutionContextFactory($metadataFactory, new DefaultTranslator()); + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator); $validatorFactory = new ConstraintValidatorFactory(); return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); diff --git a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php index 3f02a5af71..0c0ce3546d 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Validator\Tests\Validator; +use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\Context\LegacyExecutionContextFactory; -use Symfony\Component\Validator\DefaultTranslator; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\LegacyValidator; @@ -30,7 +30,10 @@ class LegacyValidatorLegacyApiTest extends AbstractLegacyApiTest protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { - $contextFactory = new LegacyExecutionContextFactory($metadataFactory, new DefaultTranslator()); + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new LegacyExecutionContextFactory($metadataFactory, $translator); $validatorFactory = new ConstraintValidatorFactory(); return new LegacyValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); diff --git a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php index 6235fda902..05961269a5 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/RecursiveValidator2Dot5ApiTest.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Validator\Tests\Validator; +use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\Context\ExecutionContextFactory; -use Symfony\Component\Validator\DefaultTranslator; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\RecursiveValidator; @@ -21,7 +21,10 @@ class RecursiveValidator2Dot5ApiTest extends Abstract2Dot5ApiTest { protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { - $contextFactory = new ExecutionContextFactory(new DefaultTranslator()); + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + $contextFactory = new ExecutionContextFactory($translator); $validatorFactory = new ConstraintValidatorFactory(); return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $objectInitializers); diff --git a/src/Symfony/Component/Validator/Tests/ValidatorTest.php b/src/Symfony/Component/Validator/Tests/ValidatorTest.php index 3cc36f5e23..ebeeb3af0f 100644 --- a/src/Symfony/Component/Validator/Tests/ValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/ValidatorTest.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Validator\Tests; +use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\ConstraintValidatorFactory; -use Symfony\Component\Validator\DefaultTranslator; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Tests\Fixtures\Entity; use Symfony\Component\Validator\Tests\Validator\AbstractLegacyApiTest; @@ -23,7 +23,10 @@ class ValidatorTest extends AbstractLegacyApiTest { protected function createValidator(MetadataFactoryInterface $metadataFactory, array $objectInitializers = array()) { - return new LegacyValidator($metadataFactory, new ConstraintValidatorFactory(), new DefaultTranslator(), 'validators', $objectInitializers); + $translator = new IdentityTranslator(); + $translator->setLocale('en'); + + return new LegacyValidator($metadataFactory, new ConstraintValidatorFactory(), $translator, 'validators', $objectInitializers); } /** diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index f80435a4da..c9eece4474 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -16,6 +16,7 @@ use Doctrine\Common\Annotations\CachedReader; use Doctrine\Common\Annotations\Reader; use Doctrine\Common\Cache\ArrayCache; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; +use Symfony\Component\Translation\IdentityTranslator; use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Context\ExecutionContextFactory; use Symfony\Component\Validator\Context\LegacyExecutionContextFactory; @@ -398,7 +399,16 @@ class ValidatorBuilder implements ValidatorBuilderInterface } $validatorFactory = $this->validatorFactory ?: new ConstraintValidatorFactory($this->propertyAccessor); - $translator = $this->translator ?: new DefaultTranslator(); + $translator = $this->translator; + + if (null === $translator) { + $translator = new IdentityTranslator(); + // Force the locale to be 'en' when no translator is provided rather than relying on the Intl default locale + // This avoids depending on Intl or the stub implementation being available. It also ensures that Symfony + // validation messages are pluralized properly even when the default locale gets changed because they are in + // English. + $translator->setLocale('en'); + } if (Validation::API_VERSION_2_4 === $apiVersion) { return new ValidatorV24($metadataFactory, $validatorFactory, $translator, $this->translationDomain, $this->initializers); diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json index 8a9c0b5b77..878fa36aaf 100644 --- a/src/Symfony/Component/Validator/composer.json +++ b/src/Symfony/Component/Validator/composer.json @@ -17,7 +17,7 @@ ], "require": { "php": ">=5.3.3", - "symfony/translation": "~2.0,>=2.0.5|~3.0.0" + "symfony/translation": "~2.4|~3.0.0" }, "require-dev": { "symfony/http-foundation": "~2.1|~3.0.0", From 0c503018336965ff23b74ae0c3d76d07dd441c61 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 6 Jan 2015 12:15:55 +0100 Subject: [PATCH 5/6] [HttpKernel] deprecated ContainerAwareHttpKernel --- .../DependencyInjection/ContainerAwareHttpKernel.php | 4 ++-- src/Symfony/Component/HttpKernel/HttpKernel.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php b/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php index 69e7937d18..4d249f69ef 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php @@ -25,6 +25,8 @@ use Symfony\Component\DependencyInjection\Scope; * * @author Fabien Potencier * @author Johannes M. Schmitt + * + * @deprecated since version 2.7, to be removed in 3.0. */ class ContainerAwareHttpKernel extends HttpKernel { @@ -55,8 +57,6 @@ class ContainerAwareHttpKernel extends HttpKernel */ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { - $request->headers->set('X-Php-Ob-Level', ob_get_level()); - $this->container->enterScope('request'); $this->container->set('request', $request, 'request'); diff --git a/src/Symfony/Component/HttpKernel/HttpKernel.php b/src/Symfony/Component/HttpKernel/HttpKernel.php index 966cf6c324..ca79f62b97 100644 --- a/src/Symfony/Component/HttpKernel/HttpKernel.php +++ b/src/Symfony/Component/HttpKernel/HttpKernel.php @@ -62,6 +62,8 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface */ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { + $request->headers->set('X-Php-Ob-Level', ob_get_level()); + try { return $this->handleRaw($request, $type); } catch (\Exception $e) { From 602d687a461bf25ac75f0b174fc16f2583b305da Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sun, 4 Jan 2015 10:47:47 +0100 Subject: [PATCH 6/6] [WIP] Made help information of commands more consistent --- .../Command/AssetsInstallCommand.php | 10 ++--- .../Command/CacheClearCommand.php | 4 +- .../Command/ContainerDebugCommand.php | 8 ++-- .../Command/RouterApacheDumperCommand.php | 2 +- .../Command/TranslationUpdateCommand.php | 29 ++++--------- .../SecurityBundle/Command/InitAclCommand.php | 8 ++-- .../Bundle/TwigBundle/Command/LintCommand.php | 8 ++-- .../Command/ExportCommand.php | 2 +- .../Command/ImportCommand.php | 4 +- src/Symfony/Component/Console/Application.php | 14 +++---- .../Console/Tests/Fixtures/application_1.json | 2 +- .../Console/Tests/Fixtures/application_1.md | 14 +++---- .../Console/Tests/Fixtures/application_1.txt | 14 +++---- .../Console/Tests/Fixtures/application_1.xml | 14 +++---- .../Console/Tests/Fixtures/application_2.json | 2 +- .../Console/Tests/Fixtures/application_2.md | 42 +++++++++---------- .../Console/Tests/Fixtures/application_2.txt | 14 +++---- .../Console/Tests/Fixtures/application_2.xml | 42 +++++++++---------- .../Tests/Fixtures/application_astext1.txt | 16 +++---- .../Tests/Fixtures/application_astext2.txt | 16 +++---- .../Tests/Fixtures/application_asxml1.txt | 28 ++++++------- .../Tests/Fixtures/application_asxml2.txt | 14 +++---- .../Tests/Fixtures/application_run1.txt | 14 +++---- .../Tests/Fixtures/application_run2.txt | 14 +++---- 24 files changed, 160 insertions(+), 175 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index f60867d771..31f58e85f8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -39,21 +39,21 @@ class AssetsInstallCommand extends ContainerAwareCommand ->setDescription('Installs bundles web assets under a public web directory') ->setHelp(<<%command.name% command installs bundle assets into a given -directory (e.g. the web directory). +directory (e.g. the web directory). -php %command.full_name% web + php %command.full_name% web -A "bundles" directory will be created inside the target directory, and the +A "bundles" directory will be created inside the target directory and the "Resources/public" directory of each bundle will be copied into it. To create a symlink to each bundle instead of copying its assets, use the --symlink option: -php %command.full_name% web --symlink + php %command.full_name% web --symlink To make symlink relative, add the --relative option: -php %command.full_name% web --symlink --relative + php %command.full_name% web --symlink --relative EOT ) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index 200f4a5b45..5deafaf0fb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -41,8 +41,8 @@ class CacheClearCommand extends ContainerAwareCommand The %command.name% command clears the application cache for a given environment and debug mode: -php %command.full_name% --env=dev -php %command.full_name% --env=prod --no-debug + php %command.full_name% --env=dev + php %command.full_name% --env=prod --no-debug EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index 9331a51c80..d4c8738844 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -59,7 +59,7 @@ To get specific information about a service, specify its name: php %command.full_name% validator By default, private services are hidden. You can display all services by -using the --show-private flag: +using the --show-private flag: php %command.full_name% --show-private @@ -67,15 +67,15 @@ Use the --tags option to display tagged public services group php %command.full_name% --tags -Find all services with a specific tag by specifying the tag name with the --tag option: +Find all services with a specific tag by specifying the tag name with the --tag option: php %command.full_name% --tag=form.type -Use the --parameters option to display all parameters: +Use the --parameters option to display all parameters: php %command.full_name% --parameters -Display a specific parameter by specifying his name with the --parameter option: +Display a specific parameter by specifying his name with the --parameter option: php %command.full_name% --parameter=kernel.debug EOF diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php index c8a17e8904..904a08d253 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -49,7 +49,7 @@ class RouterApacheDumperCommand extends ContainerAwareCommand $this ->setName('router:dump-apache') ->setDefinition(array( - new InputArgument('script_name', InputArgument::OPTIONAL, 'The script name of the application\'s front controller.'), + new InputArgument('script_name', InputArgument::OPTIONAL, 'The script name of the application\'s front controller'), new InputOption('base-uri', null, InputOption::VALUE_REQUIRED, 'The base URI'), )) ->setDescription('Dumps all routes as Apache rewrite rules') diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index 1597c22022..8477b120a4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -36,26 +36,11 @@ class TranslationUpdateCommand extends ContainerAwareCommand ->setDefinition(array( new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), new InputArgument('bundle', InputArgument::REQUIRED, 'The bundle where to load the messages'), - new InputOption( - 'prefix', null, InputOption::VALUE_OPTIONAL, - 'Override the default prefix', '__' - ), - new InputOption( - 'output-format', null, InputOption::VALUE_OPTIONAL, - 'Override the default output format', 'yml' - ), - new InputOption( - 'dump-messages', null, InputOption::VALUE_NONE, - 'Should the messages be dumped in the console' - ), - new InputOption( - 'force', null, InputOption::VALUE_NONE, - 'Should the update be done' - ), - new InputOption( - 'clean', null, InputOption::VALUE_NONE, - 'Should clean not found messages' - ), + new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'), + new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'yml'), + new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'), + new InputOption('force', null, InputOption::VALUE_NONE, 'Should the update be done'), + new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'), )) ->setDescription('Updates the translation file') ->setHelp(<<php %command.full_name% --dump-messages en AcmeBundle -php %command.full_name% --force --prefix="new_" fr AcmeBundle + php %command.full_name% --dump-messages en AcmeBundle + php %command.full_name% --force --prefix="new_" fr AcmeBundle EOF ) ; diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index 74889454b2..fff5b1e929 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -34,13 +34,13 @@ class InitAclCommand extends ContainerAwareCommand ->setHelp(<<%command.name% command mounts ACL tables in the database. -php %command.full_name% + php %command.full_name% The name of the DBAL connection must be configured in your app/config/security.yml configuration file in the security.acl.connection variable. -security: - acl: - connection: default + security: + acl: + connection: default EOF ) ; diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index f18ce09d60..01e81aef56 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -33,21 +33,21 @@ class LintCommand extends ContainerAwareCommand The %command.name% command lints a template and outputs to stdout the first encountered syntax error. -php %command.full_name% filename + php %command.full_name% filename The command gets the contents of filename and validates its syntax. -php %command.full_name% dirname + php %command.full_name% dirname The command finds all twig templates in dirname and validates the syntax of each Twig template. -php %command.full_name% @AcmeMyBundle + php %command.full_name% @AcmeMyBundle The command finds all twig templates in the AcmeMyBundle bundle and validates the syntax of each Twig template. -cat filename | php %command.full_name% + cat filename | php %command.full_name% The command gets the template contents from stdin and validates its syntax. EOF diff --git a/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php b/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php index b140e302b1..cf405530e2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php @@ -56,7 +56,7 @@ class ExportCommand extends Command ->setHelp(<<%command.name% command exports a profile to the standard output: -php %command.full_name% profile_token + php %command.full_name% profile_token EOF ) ; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php b/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php index 70fecd45ea..4862e9c27a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php @@ -56,11 +56,11 @@ class ImportCommand extends Command ->setHelp(<<%command.name% command imports a profile: -php %command.full_name% profile_filepath + php %command.full_name% profile_filepath You can also pipe the profile via STDIN: -cat profile_file | php %command.full_name% + cat profile_file | php %command.full_name% EOF ) ; diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 7277716f5d..359ac69280 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -936,13 +936,13 @@ class Application return new InputDefinition(array( new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), - new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'), - new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'), - new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.'), - new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version.'), - new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'), - new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.'), - new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question.'), + new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), + new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), + new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), + new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), + new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), + new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), + new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), )); } diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.json b/src/Symfony/Component/Console/Tests/Fixtures/application_1.json index fdd4595c9d..6e45d0c879 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.json +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.json @@ -1 +1 @@ -{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message.","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message.","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version.","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output.","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output.","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question.","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":null}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]} +{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":null}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]} diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md index d8443c532d..7cf22ecbd4 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.md @@ -70,7 +70,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this help message. +* Description: Display this help message * Default: `false` **quiet:** @@ -80,7 +80,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not output any message. +* Description: Do not output any message * Default: `false` **verbose:** @@ -90,7 +90,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug * Default: `false` **version:** @@ -100,7 +100,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this application version. +* Description: Display this application version * Default: `false` **ansi:** @@ -110,7 +110,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Force ANSI output. +* Description: Force ANSI output * Default: `false` **no-ansi:** @@ -120,7 +120,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Disable ANSI output. +* Description: Disable ANSI output * Default: `false` **no-interaction:** @@ -130,7 +130,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not ask any interactive question. +* Description: Do not ask any interactive question * Default: `false` list diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt index f971c430ab..0aa2bbec2f 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.txt @@ -4,13 +4,13 @@ [options] command [arguments] Options: - --help -h Display this help message. - --quiet -q Do not output any message. - --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. - --version -V Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction -n Do not ask any interactive question. + --help -h Display this help message + --quiet -q Do not output any message + --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + --version -V Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + --no-interaction -n Do not ask any interactive question Available commands: help Displays help for a command diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml b/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml index 7ad1047dc0..b400ad60b9 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_1.xml @@ -34,25 +34,25 @@ To output raw command help diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.json b/src/Symfony/Component/Console/Tests/Fixtures/application_2.json index ebc1fc07b1..9d1d4fe266 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.json +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.json @@ -1 +1 @@ -{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message.","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message.","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version.","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output.","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output.","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question.","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":null}}}},{"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":{"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message.","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message.","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version.","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output.","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output.","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question.","default":false}}}},{"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message.","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message.","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version.","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output.","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output.","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question.","default":false}}}}],"namespaces":[{"id":"_global","commands":["alias1","alias2","help","list"]},{"id":"descriptor","commands":["descriptor:command1","descriptor:command2"]}]} +{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The help<\/info> command displays help for a given command:\n\n php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the --format<\/comment> option:\n\n php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":null},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The list<\/info> command lists all commands:\n\n php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the --format<\/comment> option:\n\n php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":null}}}},{"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":{"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message.","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}}],"namespaces":[{"id":"_global","commands":["alias1","alias2","help","list"]},{"id":"descriptor","commands":["descriptor:command1","descriptor:command2"]}]} diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md index 6a09cd207a..3c30ca5999 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.md +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.md @@ -77,7 +77,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this help message. +* Description: Display this help message * Default: `false` **quiet:** @@ -87,7 +87,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not output any message. +* Description: Do not output any message * Default: `false` **verbose:** @@ -97,7 +97,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug * Default: `false` **version:** @@ -107,7 +107,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this application version. +* Description: Display this application version * Default: `false` **ansi:** @@ -117,7 +117,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Force ANSI output. +* Description: Force ANSI output * Default: `false` **no-ansi:** @@ -127,7 +127,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Disable ANSI output. +* Description: Disable ANSI output * Default: `false` **no-interaction:** @@ -137,7 +137,7 @@ To display the list of available commands, please use the list comm * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not ask any interactive question. +* Description: Do not ask any interactive question * Default: `false` list @@ -223,7 +223,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this help message. +* Description: Display this help message * Default: `false` **quiet:** @@ -233,7 +233,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not output any message. +* Description: Do not output any message * Default: `false` **verbose:** @@ -243,7 +243,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug * Default: `false` **version:** @@ -253,7 +253,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this application version. +* Description: Display this application version * Default: `false` **ansi:** @@ -263,7 +263,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Force ANSI output. +* Description: Force ANSI output * Default: `false` **no-ansi:** @@ -273,7 +273,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Disable ANSI output. +* Description: Disable ANSI output * Default: `false` **no-interaction:** @@ -283,7 +283,7 @@ command 1 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not ask any interactive question. +* Description: Do not ask any interactive question * Default: `false` descriptor:command2 @@ -324,7 +324,7 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this help message. +* Description: Display this help message * Default: `false` **quiet:** @@ -334,7 +334,7 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not output any message. +* Description: Do not output any message * Default: `false` **verbose:** @@ -344,7 +344,7 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. +* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug * Default: `false` **version:** @@ -354,7 +354,7 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Display this application version. +* Description: Display this application version * Default: `false` **ansi:** @@ -364,7 +364,7 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Force ANSI output. +* Description: Force ANSI output * Default: `false` **no-ansi:** @@ -374,7 +374,7 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Disable ANSI output. +* Description: Disable ANSI output * Default: `false` **no-interaction:** @@ -384,5 +384,5 @@ command 2 help * Accept value: no * Is value required: no * Is multiple: no -* Description: Do not ask any interactive question. +* Description: Do not ask any interactive question * Default: `false` diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt index a4e46321a9..4aa3a4beb7 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.txt @@ -4,13 +4,13 @@ [options] command [arguments] Options: - --help -h Display this help message. - --quiet -q Do not output any message. - --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. - --version -V Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction -n Do not ask any interactive question. + --help -h Display this help message + --quiet -q Do not output any message + --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + --version -V Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + --no-interaction -n Do not ask any interactive question Available commands: alias1 command 1 description diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml b/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml index 040ef2dc56..4679497235 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_2.xml @@ -34,25 +34,25 @@ To output raw command help @@ -105,25 +105,25 @@ @@ -143,25 +143,25 @@ diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt index c112d6a9c9..3147b5d95e 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt @@ -4,17 +4,17 @@ [options] command [arguments] Options: - --help -h Display this help message. - --quiet -q Do not output any message. - --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. - --version -V Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction -n Do not ask any interactive question. + --help -h Display this help message + --quiet -q Do not output any message + --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + --version -V Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + --no-interaction -n Do not ask any interactive question Available commands: afoobar The foo:bar command help Displays help for a command list Lists commands foo - foo:bar The foo:bar command \ No newline at end of file + foo:bar The foo:bar command diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt index 940ba72be9..3366c94b95 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt @@ -4,13 +4,13 @@ [options] command [arguments] Options: - --help -h Display this help message. - --quiet -q Do not output any message. - --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. - --version -V Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction -n Do not ask any interactive question. + --help -h Display this help message + --quiet -q Do not output any message + --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + --version -V Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + --no-interaction -n Do not ask any interactive question Available commands for the "foo" namespace: - foo:bar The foo:bar command \ No newline at end of file + foo:bar The foo:bar command diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt index c54a7d32ca..71d2fcba35 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt @@ -34,25 +34,25 @@ To output raw command help @@ -104,25 +104,25 @@ diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt index 0d0ab95e98..0b30b201f2 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt @@ -11,25 +11,25 @@ diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt index 31a85d05c0..f860d52fee 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt @@ -4,13 +4,13 @@ Usage: [options] command [arguments] Options: - --help -h Display this help message. - --quiet -q Do not output any message. - --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. - --version -V Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction -n Do not ask any interactive question. + --help -h Display this help message + --quiet -q Do not output any message + --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + --version -V Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + --no-interaction -n Do not ask any interactive question Available commands: help Displays help for a command diff --git a/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt b/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt index 49406e03ac..c888b74245 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt +++ b/src/Symfony/Component/Console/Tests/Fixtures/application_run2.txt @@ -9,13 +9,13 @@ Options: --xml To output help as XML --format To output help in other formats --raw To output raw command help - --help (-h) Display this help message. - --quiet (-q) Do not output any message. - --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. + --help (-h) Display this help message + --quiet (-q) Do not output any message + --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + --version (-V) Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + --no-interaction (-n) Do not ask any interactive question Help: The help command displays help for a given command: