Skip to content

Commit 84bc7ab

Browse files
committed
Merge branch '4.2' into 4.3
* 4.2: fixed CS fixed CS [HttpKernel] Remove TestEventDispatcher.
2 parents dab7a55 + 37fa45b commit 84bc7ab

File tree

63 files changed

+118
-154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+118
-154
lines changed

.php_cs.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ return PhpCsFixer\Config::create()
1515
'ordered_imports' => true,
1616
'protected_to_private' => false,
1717
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
18-
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
18+
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced', 'strict' => true],
1919
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
2020
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
2121
])

src/Symfony/Bridge/Doctrine/Test/DoctrineTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function createTestConfiguration()
6161
$config = new Configuration();
6262
$config->setEntityNamespaces(['SymfonyTestsDoctrine' => 'Symfony\Bridge\Doctrine\Tests\Fixtures']);
6363
$config->setAutoGenerateProxyClasses(true);
64-
$config->setProxyDir(\sys_get_temp_dir());
64+
$config->setProxyDir(sys_get_temp_dir());
6565
$config->setProxyNamespace('SymfonyTests\Doctrine');
6666
$config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
6767
$config->setQueryCacheImpl(new ArrayCache());

src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private function formatWithIdentifiers(ObjectManager $em, ClassMetadata $class,
186186
return $this->formatValue($value, self::PRETTY_DATE);
187187
}
188188

189-
if (\method_exists($value, '__toString')) {
189+
if (method_exists($value, '__toString')) {
190190
return (string) $value;
191191
}
192192

src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function getLogs(/* Request $request = null */)
6767
@trigger_error(sprintf('The "%s()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
6868
}
6969

70-
if (1 <= \func_num_args() && null !== $request = \func_get_arg(0)) {
70+
if (1 <= \func_num_args() && null !== $request = func_get_arg(0)) {
7171
return $this->records[spl_object_hash($request)] ?? [];
7272
}
7373

@@ -89,7 +89,7 @@ public function countErrors(/* Request $request = null */)
8989
@trigger_error(sprintf('The "%s()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
9090
}
9191

92-
if (1 <= \func_num_args() && null !== $request = \func_get_arg(0)) {
92+
if (1 <= \func_num_args() && null !== $request = func_get_arg(0)) {
9393
return $this->errorCount[spl_object_hash($request)] ?? 0;
9494
}
9595

src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(array $mockedNamespaces = array())
5353
Blacklist::$blacklistedClassNames['\Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerTrait'] = 2;
5454
}
5555

56-
$enableDebugClassLoader = \class_exists('Symfony\Component\Debug\DebugClassLoader');
56+
$enableDebugClassLoader = class_exists('Symfony\Component\Debug\DebugClassLoader');
5757

5858
foreach ($mockedNamespaces as $type => $namespaces) {
5959
if (!\is_array($namespaces)) {

src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getProxyCode(Definition $definition)
9999

100100
private static function getProxyManagerVersion(): string
101101
{
102-
if (!\class_exists(Version::class)) {
102+
if (!class_exists(Version::class)) {
103103
return '0.0.1';
104104
}
105105

src/Symfony/Bridge/Twig/Tests/Command/DebugCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public function testWithGlobals()
295295
$tester = $this->createCommandTester([], [], null, null, false, ['message' => $message]);
296296
$tester->execute([], ['decorated' => true]);
297297
$display = $tester->getDisplay();
298-
$this->assertContains(\json_encode($message), $display);
298+
$this->assertContains(json_encode($message), $display);
299299
}
300300

301301
public function testWithGlobalsJson()
@@ -304,7 +304,7 @@ public function testWithGlobalsJson()
304304
$tester = $this->createCommandTester([], [], null, null, false, $globals);
305305
$tester->execute(['--format' => 'json'], ['decorated' => true]);
306306
$display = $tester->getDisplay();
307-
$display = \json_decode($display, true);
307+
$display = json_decode($display, true);
308308
$this->assertSame($globals, $display['globals']);
309309
}
310310

@@ -313,10 +313,10 @@ public function testWithFilter()
313313
$tester = $this->createCommandTester();
314314
$tester->execute(['--format' => 'json'], ['decorated' => false]);
315315
$display = $tester->getDisplay();
316-
$display1 = \json_decode($display, true);
316+
$display1 = json_decode($display, true);
317317
$tester->execute(['--filter' => 'date', '--format' => 'json'], ['decorated' => false]);
318318
$display = $tester->getDisplay();
319-
$display2 = \json_decode($display, true);
319+
$display2 = json_decode($display, true);
320320
$this->assertNotSame($display1, $display2);
321321
}
322322

src/Symfony/Bridge/Twig/UndefinedCallableHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function onUndefinedFunction($name)
8585

8686
private static function onUndefined($name, $type, $component)
8787
{
88-
if (\class_exists(FullStack::class) && isset(self::$fullStackEnable[$component])) {
88+
if (class_exists(FullStack::class) && isset(self::$fullStackEnable[$component])) {
8989
throw new SyntaxError(sprintf('Did you forget to %s? Unknown %s "%s".', self::$fullStackEnable[$component], $type, $name));
9090
}
9191

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/AnnotationsCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(Reader $annotationReader, string $phpArrayFile, $exc
4040
if ($excludeRegexp instanceof CacheItemPoolInterface) {
4141
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
4242
$excludeRegexp = $debug;
43-
$debug = 4 < \func_num_args() && \func_get_arg(4);
43+
$debug = 4 < \func_num_args() && func_get_arg(4);
4444
}
4545
parent::__construct($phpArrayFile);
4646
$this->annotationReader = $annotationReader;

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SerializerCacheWarmer extends AbstractPhpFileCacheWarmer
3636
*/
3737
public function __construct(array $loaders, string $phpArrayFile)
3838
{
39-
if (2 < \func_num_args() && \func_get_arg(2) instanceof CacheItemPoolInterface) {
39+
if (2 < \func_num_args() && func_get_arg(2) instanceof CacheItemPoolInterface) {
4040
@trigger_error(sprintf('The CacheItemPoolInterface $fallbackPool argument of "%s()" is deprecated since Symfony 4.2, you should not pass it anymore.', __METHOD__), E_USER_DEPRECATED);
4141
}
4242
parent::__construct($phpArrayFile);

0 commit comments

Comments
 (0)