You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADE-6.0.md
+2
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,8 @@ FrameworkBundle
86
86
* Removed the `lock.RESOURCE_NAME` and `lock.RESOURCE_NAME.store` services and the `lock`, `LockInterface`, `lock.store` and `PersistingStoreInterface` aliases, use `lock.RESOURCE_NAME.factory`, `lock.factory` or `LockFactory` instead.
87
87
* Remove the `KernelTestCase::$container` property, use `KernelTestCase::getContainer()` instead
88
88
* Registered workflow services are now private
89
+
* Remove option `--xliff-version` of the `translation:update` command, use e.g. `--output-format=xlf20` instead
90
+
* Remove option `--output-format` of the `translation:update` command, use e.g. `--output-format=xlf20` instead
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
+31-26
Original file line number
Diff line number
Diff line change
@@ -77,12 +77,13 @@ protected function configure()
77
77
newInputArgument('locale', InputArgument::REQUIRED, 'The locale'),
78
78
newInputArgument('bundle', InputArgument::OPTIONAL, 'The bundle name or directory where to load the messages'),
79
79
newInputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'),
80
-
newInputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'xlf'),
80
+
newInputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format (deprecated)'),
81
+
newInputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'xlf12'),
81
82
newInputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'),
82
83
newInputOption('force', null, InputOption::VALUE_NONE, 'Should the update be done'),
83
84
newInputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
84
85
newInputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to update'),
85
-
newInputOption('xliff-version', null, InputOption::VALUE_OPTIONAL, 'Override the default xliff version', '1.2'),
86
+
newInputOption('xliff-version', null, InputOption::VALUE_OPTIONAL, 'Override the default xliff version (deprecated)'),
86
87
newInputOption('sort', null, InputOption::VALUE_OPTIONAL, 'Return list of messages sorted alphabetically', 'asc'),
87
88
newInputOption('as-tree', null, InputOption::VALUE_OPTIONAL, 'Dump the messages as a tree-like structure: The given value defines the level where to switch to inline YAML'),
88
89
])
@@ -112,8 +113,8 @@ protected function configure()
112
113
113
114
You can dump a tree-like structure using the yaml format with <comment>--as-tree</> flag:
114
115
115
-
<info>php %command.full_name% --force --output-format=yaml --as-tree=3 en AcmeBundle</info>
trigger_deprecation('symfony/framework-bundle', '5.3', 'The "--xliff-version" option is deprecated, use "--format=xlf%d" instead.', 10 * $xliffVersion);
144
+
}
145
+
146
+
if ($input->getOption('output-format')) {
147
+
trigger_deprecation('symfony/framework-bundle', '5.3', 'The "--output-format" option is deprecated, use "--format=xlf%d" instead.', 10 * $xliffVersion);
148
+
}
149
+
150
+
switch ($format) {
151
+
case'xlf20': $xliffVersion = '2.0';
152
+
// no break
153
+
case'xlf12': $format = 'xlf';
154
+
}
155
+
138
156
// check format
139
157
$supportedFormats = $this->writer->getFormats();
140
-
if (!\in_array($input->getOption('output-format'), $supportedFormats, true)) {
if (!$config['enabled_locales'] && !$provider['locales']) {
1376
+
thrownewLogicException(sprintf('You must specify one of "framework.translator.enabled_locales" or "framework.translator.providers.%s.locales" in order to use translation providers.', $name));
0 commit comments