Skip to content

Commit 0ae53b5

Browse files
Merge branch '3.4'
* 3.4: [Console] Add protected static $defaultName to set the default name of a Command removed sf2 references [Console] Allow commands to provide a default name for compile time registration [DI] Case sensitive parameter names
2 parents d598cae + bfa0d12 commit 0ae53b5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Command/XliffLintCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
class XliffLintCommand extends Command
2828
{
29+
protected static $defaultName = 'lint:xliff';
30+
2931
private $format;
3032
private $displayCorrectFiles;
3133
private $directoryIteratorProvider;
@@ -45,7 +47,6 @@ public function __construct($name = null, $directoryIteratorProvider = null, $is
4547
protected function configure()
4648
{
4749
$this
48-
->setName('lint:xliff')
4950
->setDescription('Lints a XLIFF file and outputs encountered errors')
5051
->addArgument('filename', null, 'A file or a directory or STDIN')
5152
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt')

Loader/XliffFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private function fixXmlLocation($schemaSource, $xmlUri)
222222
$newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
223223
$parts = explode('/', $newPath);
224224
if (0 === stripos($newPath, 'phar://')) {
225-
$tmpfile = tempnam(sys_get_temp_dir(), 'sf2');
225+
$tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
226226
if ($tmpfile) {
227227
copy($newPath, $tmpfile);
228228
$parts = explode('/', str_replace('\\', '/', $tmpfile));

0 commit comments

Comments
 (0)