Merge branch '3.4' into 4.1

* 3.4:
  [FWBundle] Uniformize errors when a component is missing
  Fixes 28816 Translation commands should not talk about the old app/ directory since 3.4
This commit is contained in:
Fabien Potencier 2018-10-16 03:10:55 +02:00
commit 01808ca3bc
3 changed files with 17 additions and 17 deletions

View File

@ -69,7 +69,7 @@ class TranslationDebugCommand extends Command
$this
->setDefinition(array(
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'),
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'),
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'The messages domain'),
new InputOption('only-missing', null, InputOption::VALUE_NONE, 'Displays only missing messages'),
new InputOption('only-unused', null, InputOption::VALUE_NONE, 'Displays only unused messages'),
@ -79,7 +79,7 @@ class TranslationDebugCommand extends Command
->setHelp(<<<'EOF'
The <info>%command.name%</info> command helps finding unused or missing translation
messages and comparing them with the fallback ones by inspecting the
templates and translation files of a given bundle or the app folder.
templates and translation files of a given bundle or the default translations directory.
You can display information about bundle translations in a specific locale:
@ -97,7 +97,7 @@ You can only display unused messages:
<info>php %command.full_name% --only-unused en AcmeDemoBundle</info>
You can display information about app translations in a specific locale:
You can display information about application translations in a specific locale:
<info>php %command.full_name% en</info>

View File

@ -65,7 +65,7 @@ class TranslationUpdateCommand extends Command
$this
->setDefinition(array(
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages, defaults to app/Resources folder'),
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory 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'),
@ -77,7 +77,7 @@ class TranslationUpdateCommand extends Command
->setDescription('Updates the translation file')
->setHelp(<<<'EOF'
The <info>%command.name%</info> command extracts translation strings from templates
of a given bundle or the app folder. It can display them or merge the new ones into the translation files.
of a given bundle or the default translations directory. It can display them or merge the new ones into the translation files.
When new translation strings are found it can automatically add a prefix to the translation
message.
@ -86,7 +86,7 @@ Example running against a Bundle (AcmeBundle)
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
Example running against app messages (app/Resources folder)
Example running against default messages directory
<info>php %command.full_name% --dump-messages en</info>
<info>php %command.full_name% --force --prefix="new_" fr</info>
EOF
@ -128,7 +128,7 @@ EOF
if ($this->defaultViewsPath) {
$viewsPaths[] = $this->defaultViewsPath;
}
$currentName = 'app folder';
$currentName = 'default directory';
// Override with provided Bundle info
if (null !== $input->getArgument('bundle')) {

View File

@ -155,7 +155,7 @@ class FrameworkExtension extends Extension
// translator will be used and everything will still work as expected.
if ($this->isConfigEnabled($container, $config['translator']) || $this->isConfigEnabled($container, $config['form']) || $this->isConfigEnabled($container, $config['validation'])) {
if (!class_exists('Symfony\Component\Translation\Translator') && $this->isConfigEnabled($container, $config['translator'])) {
throw new LogicException('Translation support cannot be enabled as the Translation component is not installed.');
throw new LogicException('Translation support cannot be enabled as the Translation component is not installed. Try running "composer require symfony/translation".');
}
if (class_exists(Translator::class)) {
@ -208,7 +208,7 @@ class FrameworkExtension extends Extension
if ($this->isConfigEnabled($container, $config['form'])) {
if (!class_exists('Symfony\Component\Form\Form')) {
throw new LogicException('Form support cannot be enabled as the Form component is not installed.');
throw new LogicException('Form support cannot be enabled as the Form component is not installed. Try running "composer require symfony/form".');
}
$this->formConfigEnabled = true;
@ -228,7 +228,7 @@ class FrameworkExtension extends Extension
if ($this->isConfigEnabled($container, $config['assets'])) {
if (!class_exists('Symfony\Component\Asset\Package')) {
throw new LogicException('Asset support cannot be enabled as the Asset component is not installed.');
throw new LogicException('Asset support cannot be enabled as the Asset component is not installed. Try running "composer require symfony/asset".');
}
$this->registerAssetsConfiguration($config['assets'], $container, $loader);
@ -236,7 +236,7 @@ class FrameworkExtension extends Extension
if ($this->isConfigEnabled($container, $config['templating'])) {
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
throw new LogicException('Templating support cannot be enabled as the Templating component is not installed.');
throw new LogicException('Templating support cannot be enabled as the Templating component is not installed. Try running "composer require symfony/templating".');
}
$this->registerTemplatingConfiguration($config['templating'], $container, $loader);
@ -264,7 +264,7 @@ class FrameworkExtension extends Extension
if ($this->isConfigEnabled($container, $config['serializer'])) {
if (!class_exists('Symfony\Component\Serializer\Serializer')) {
throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed.');
throw new LogicException('Serializer support cannot be enabled as the Serializer component is not installed. Try running "composer require symfony/serializer-pack".');
}
$this->registerSerializerConfiguration($config['serializer'], $container, $loader);
@ -280,7 +280,7 @@ class FrameworkExtension extends Extension
if ($this->isConfigEnabled($container, $config['web_link'])) {
if (!class_exists(HttpHeaderSerializer::class)) {
throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed.');
throw new LogicException('WebLink support cannot be enabled as the WebLink component is not installed. Try running "composer require symfony/weblink".');
}
$loader->load('web_link.xml');
@ -476,7 +476,7 @@ class FrameworkExtension extends Extension
}
if (!class_exists(Workflow\Workflow::class)) {
throw new LogicException('Workflow support cannot be enabled as the Workflow component is not installed.');
throw new LogicException('Workflow support cannot be enabled as the Workflow component is not installed. Try running "composer require symfony/workflow".');
}
$loader->load('workflow.xml');
@ -607,11 +607,11 @@ class FrameworkExtension extends Extension
}
if (!class_exists(ExpressionLanguage::class)) {
throw new LogicException('Cannot guard workflows as the ExpressionLanguage component is not installed.');
throw new LogicException('Cannot guard workflows as the ExpressionLanguage component is not installed. Try running "composer require symfony/expression-language".');
}
if (!class_exists(Security::class)) {
throw new LogicException('Cannot guard workflows as the Security component is not installed.');
throw new LogicException('Cannot guard workflows as the Security component is not installed. Try running "composer require symfony/security".');
}
$eventName = sprintf('workflow.%s.guard.%s', $name, $transitionName);
@ -1043,7 +1043,7 @@ class FrameworkExtension extends Extension
}
if (!class_exists('Symfony\Component\Validator\Validation')) {
throw new LogicException('Validation support cannot be enabled as the Validator component is not installed.');
throw new LogicException('Validation support cannot be enabled as the Validator component is not installed. Try running "composer require symfony/validator".');
}
if (!isset($config['email_validation_mode'])) {