Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cbefd8

Browse filesBrowse files
committed
Cleaning translation commands
1 parent 8d277ce commit 3cbefd8
Copy full SHA for 3cbefd8

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
165165
if (is_dir($dir = sprintf('%s/Resources/%s/translations', $rootDir, $bundle->getName()))) {
166166
$transPaths[] = $dir;
167167
$notice = sprintf('Storing translations files for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $dir, $bundle->getName());
168-
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : sprintf('configure and use "framework.translator.default_path" instead.', $bundle->getName())), E_USER_DEPRECATED);
168+
@trigger_error($notice.($this->defaultTransPath ? sprintf('use the "%s" directory instead.', $this->defaultTransPath) : 'configure and use "framework.translator.default_path" instead.'), E_USER_DEPRECATED);
169169
}
170170
$viewsPaths = array($bundle->getPath().'/Resources/views');
171171
if ($this->defaultViewsPath) {
@@ -174,7 +174,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
174174
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
175175
$viewsPaths[] = $dir;
176176
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $dir);
177-
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : sprintf('configure and use "twig.default_path" instead.', $bundle->getName())), E_USER_DEPRECATED);
177+
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
178178
}
179179
} catch (\InvalidArgumentException $e) {
180180
// such a bundle does not exist, so treat the argument as path
@@ -212,7 +212,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
212212
if (is_dir($deprecatedPath = sprintf('%s/Resources/%s/views', $rootDir, $bundle->getName()))) {
213213
$viewsPaths[] = $deprecatedPath;
214214
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $bundle->getName(), $deprecatedPath);
215-
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : sprintf('configure and use "twig.default_path" instead.', $bundle->getName())), E_USER_DEPRECATED);
215+
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
216216
}
217217
}
218218
}

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
111111

112112
// check format
113113
$supportedFormats = $this->writer->getFormats();
114-
if (!\in_array($input->getOption('output-format'), $supportedFormats)) {
114+
if (!\in_array($input->getOption('output-format'), $supportedFormats, true)) {
115115
$errorIo->error(array('Wrong output format', 'Supported formats are: '.implode(', ', $supportedFormats).'.'));
116116

117117
return 1;
@@ -165,7 +165,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
165165
if (is_dir($dir = sprintf('%s/Resources/%s/views', $rootDir, $foundBundle->getName()))) {
166166
$viewsPaths[] = $dir;
167167
$notice = sprintf('Storing templates for "%s" in the "%s" directory is deprecated since Symfony 4.2, ', $foundBundle->getName(), $dir);
168-
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : sprintf('configure and use "twig.default_path" instead.', $foundBundle->getName())), E_USER_DEPRECATED);
168+
@trigger_error($notice.($this->defaultViewsPath ? sprintf('use the "%s" directory instead.', $this->defaultViewsPath) : 'configure and use "twig.default_path" instead.'), E_USER_DEPRECATED);
169169
}
170170
$currentName = $foundBundle->getName();
171171
} catch (\InvalidArgumentException $e) {
@@ -261,7 +261,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
261261
$extractedMessagesCount += $domainMessagesCount;
262262
}
263263

264-
if ('xlf' == $input->getOption('output-format')) {
264+
if ('xlf' === $input->getOption('output-format')) {
265265
$errorIo->comment('Xliff output version is <info>1.2</info>');
266266
}
267267

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.