Skip to content

Commit 13d2e06

Browse files
Merge branch '3.4' into 4.0
* 3.4: Enable native_constant_invocation CS fixer
2 parents f262579 + 17902d1 commit 13d2e06

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

Command/AssetsInstallCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
153153
}
154154

155155
if ($method === $expectedMethod) {
156-
$rows[] = array(sprintf('<fg=green;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method);
156+
$rows[] = array(sprintf('<fg=green;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method);
157157
} else {
158-
$rows[] = array(sprintf('<fg=yellow;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method);
158+
$rows[] = array(sprintf('<fg=yellow;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method);
159159
}
160160
} catch (\Exception $e) {
161161
$exitCode = 1;
162-
$rows[] = array(sprintf('<fg=red;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage());
162+
$rows[] = array(sprintf('<fg=red;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage());
163163
}
164164
}
165165
// remove the assets of the bundles that no longer exist

Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function setUp()
5050

5151
$this->templateLocator = new TemplateLocator($this->fileLocator);
5252

53-
$this->tmpDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('cache_template_paths_', true);
53+
$this->tmpDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('cache_template_paths_', true);
5454

5555
$this->filesystem = new Filesystem();
5656
$this->filesystem->mkdir($this->tmpDir);

Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp()
3333
{
3434
$this->fs = new Filesystem();
3535
$this->kernel = new TestAppKernel('test', true);
36-
$this->rootDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true);
36+
$this->rootDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true);
3737
$this->kernel->setRootDir($this->rootDir);
3838
$this->fs->mkdir($this->rootDir);
3939
}
@@ -83,7 +83,7 @@ public function testCacheIsFreshAfterCacheClearedWithWarmup()
8383
$this->assertTrue($found, 'Kernel file should present as resource');
8484

8585
$containerRef = new \ReflectionClass(require $containerFile);
86-
$containerFile = str_replace('tes_'.DIRECTORY_SEPARATOR, 'test'.DIRECTORY_SEPARATOR, $containerRef->getFileName());
86+
$containerFile = str_replace('tes_'.\DIRECTORY_SEPARATOR, 'test'.\DIRECTORY_SEPARATOR, $containerRef->getFileName());
8787
$this->assertRegExp(sprintf('/\'kernel.container_class\'\s*=>\s*\'%s\'/', $containerClass), file_get_contents($containerFile), 'kernel.container_class is properly set on the dumped container');
8888
}
8989
}

Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function setRootDir($rootDir)
3333

3434
public function registerContainerConfiguration(LoaderInterface $loader)
3535
{
36-
$loader->load(__DIR__.DIRECTORY_SEPARATOR.'config.yml');
36+
$loader->load(__DIR__.\DIRECTORY_SEPARATOR.'config.yml');
3737
}
3838

3939
protected function build(ContainerBuilder $container)

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -494,29 +494,29 @@ public function testTranslator()
494494
$files = array_map('realpath', $options['resource_files']['en']);
495495
$ref = new \ReflectionClass('Symfony\Component\Validator\Validation');
496496
$this->assertContains(
497-
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
497+
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', \DIRECTORY_SEPARATOR),
498498
$files,
499499
'->registerTranslatorConfiguration() finds Validator translation resources'
500500
);
501501
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
502502
$this->assertContains(
503-
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
503+
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', \DIRECTORY_SEPARATOR),
504504
$files,
505505
'->registerTranslatorConfiguration() finds Form translation resources'
506506
);
507507
$ref = new \ReflectionClass('Symfony\Component\Security\Core\Security');
508508
$this->assertContains(
509-
strtr(\dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', DIRECTORY_SEPARATOR),
509+
strtr(\dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', \DIRECTORY_SEPARATOR),
510510
$files,
511511
'->registerTranslatorConfiguration() finds Security translation resources'
512512
);
513513
$this->assertContains(
514-
strtr(__DIR__.'/Fixtures/translations/test_paths.en.yml', '/', DIRECTORY_SEPARATOR),
514+
strtr(__DIR__.'/Fixtures/translations/test_paths.en.yml', '/', \DIRECTORY_SEPARATOR),
515515
$files,
516516
'->registerTranslatorConfiguration() finds translation resources in custom paths'
517517
);
518518
$this->assertContains(
519-
strtr(__DIR__.'/translations/test_default.en.xlf', '/', DIRECTORY_SEPARATOR),
519+
strtr(__DIR__.'/translations/test_default.en.xlf', '/', \DIRECTORY_SEPARATOR),
520520
$files,
521521
'->registerTranslatorConfiguration() finds translation resources in default path'
522522
);
@@ -565,7 +565,7 @@ public function testValidation()
565565
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
566566
$xmlMappings = array(
567567
\dirname($ref->getFileName()).'/Resources/config/validation.xml',
568-
strtr($projectDir.'/config/validator/foo.xml', '/', DIRECTORY_SEPARATOR),
568+
strtr($projectDir.'/config/validator/foo.xml', '/', \DIRECTORY_SEPARATOR),
569569
);
570570

571571
$calls = $container->getDefinition('validator.builder')->getMethodCalls();
@@ -659,10 +659,10 @@ public function testValidationPaths()
659659
$this->assertCount(3, $xmlMappings);
660660
try {
661661
// Testing symfony/symfony
662-
$this->assertStringEndsWith('Component'.DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
662+
$this->assertStringEndsWith('Component'.\DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
663663
} catch (\Exception $e) {
664664
// Testing symfony/framework-bundle with deps=high
665-
$this->assertStringEndsWith('symfony'.DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
665+
$this->assertStringEndsWith('symfony'.\DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
666666
}
667667
$this->assertStringEndsWith('TestBundle/Resources/config/validation.xml', $xmlMappings[1]);
668668

@@ -686,10 +686,10 @@ public function testValidationPathsUsingCustomBundlePath()
686686

687687
try {
688688
// Testing symfony/symfony
689-
$this->assertStringEndsWith('Component'.DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
689+
$this->assertStringEndsWith('Component'.\DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
690690
} catch (\Exception $e) {
691691
// Testing symfony/framework-bundle with deps=high
692-
$this->assertStringEndsWith('symfony'.DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
692+
$this->assertStringEndsWith('symfony'.\DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
693693
}
694694
$this->assertStringEndsWith('CustomPathBundle/Resources/config/validation.xml', $xmlMappings[1]);
695695

@@ -899,15 +899,15 @@ public function testSerializerMapping()
899899

900900
foreach ($expectedLoaders as $definition) {
901901
if (is_file($arg = $definition->getArgument(0))) {
902-
$definition->replaceArgument(0, strtr($arg, '/', DIRECTORY_SEPARATOR));
902+
$definition->replaceArgument(0, strtr($arg, '/', \DIRECTORY_SEPARATOR));
903903
}
904904
$definition->setPublic(false);
905905
}
906906

907907
$loaders = $container->getDefinition('serializer.mapping.chain_loader')->getArgument(0);
908908
foreach ($loaders as $loader) {
909909
if (is_file($arg = $loader->getArgument(0))) {
910-
$loader->replaceArgument(0, strtr($arg, '/', DIRECTORY_SEPARATOR));
910+
$loader->replaceArgument(0, strtr($arg, '/', \DIRECTORY_SEPARATOR));
911911
}
912912
}
913913
$this->assertEquals($expectedLoaders, $loaders);

0 commit comments

Comments
 (0)