Skip to content

Commit 0f958aa

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: fixed CS [HttpKernel] Remove TestEventDispatcher.
2 parents b856ab5 + a0b6d3d commit 0f958aa

25 files changed

+33
-69
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
@@ -58,7 +58,7 @@ public static function createTestConfiguration()
5858
$config = new Configuration();
5959
$config->setEntityNamespaces(['SymfonyTestsDoctrine' => 'Symfony\Bridge\Doctrine\Tests\Fixtures']);
6060
$config->setAutoGenerateProxyClasses(true);
61-
$config->setProxyDir(\sys_get_temp_dir());
61+
$config->setProxyDir(sys_get_temp_dir());
6262
$config->setProxyNamespace('SymfonyTests\Doctrine');
6363
$config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
6464
$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/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/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ private function doAdvisoryLock(string $sessionId)
681681
switch ($this->driver) {
682682
case 'mysql':
683683
// MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced.
684-
$lockId = \substr($sessionId, 0, 64);
684+
$lockId = substr($sessionId, 0, 64);
685685
// should we handle the return value? 0 on timeout, null on error
686686
// we use a timeout of 50 seconds which is also the default for innodb_lock_wait_timeout
687687
$stmt = $this->pdo->prepare('SELECT GET_LOCK(:key, 50)');

src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function collect(Request $request, Response $response, \Exception $except
4747
'token' => $response->headers->get('X-Debug-Token'),
4848
'start_time' => $startTime * 1000,
4949
'events' => [],
50-
'stopwatch_installed' => \class_exists(Stopwatch::class, false),
50+
'stopwatch_installed' => class_exists(Stopwatch::class, false),
5151
];
5252
}
5353

src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,20 @@ public function update(Response $response)
132132
$maxAge = null;
133133
$sMaxage = null;
134134

135-
if (\is_numeric($this->ageDirectives['max-age'])) {
135+
if (is_numeric($this->ageDirectives['max-age'])) {
136136
$maxAge = $this->ageDirectives['max-age'] + $this->age;
137137
$response->headers->addCacheControlDirective('max-age', $maxAge);
138138
}
139139

140-
if (\is_numeric($this->ageDirectives['s-maxage'])) {
140+
if (is_numeric($this->ageDirectives['s-maxage'])) {
141141
$sMaxage = $this->ageDirectives['s-maxage'] + $this->age;
142142

143143
if ($maxAge !== $sMaxage) {
144144
$response->headers->addCacheControlDirective('s-maxage', $sMaxage);
145145
}
146146
}
147147

148-
if (\is_numeric($this->ageDirectives['expires'])) {
148+
if (is_numeric($this->ageDirectives['expires'])) {
149149
$date = clone $response->getDate();
150150
$date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds');
151151
$response->setExpires($date);

src/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public function testCollect()
5252

5353
$c->collect($request, new Response());
5454
$this->assertEquals(123456000, $c->getStartTime());
55-
$this->assertSame(\class_exists(Stopwatch::class, false), $c->isStopwatchInstalled());
55+
$this->assertSame(class_exists(Stopwatch::class, false), $c->isStopwatchInstalled());
5656
}
5757
}

src/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function serialize()
138138
{
139139
$serialized = [$this->user, $this->authenticated, $this->roles, $this->attributes];
140140

141-
return $this->doSerialize($serialized, \func_num_args() ? \func_get_arg(0) : null);
141+
return $this->doSerialize($serialized, \func_num_args() ? func_get_arg(0) : null);
142142
}
143143

144144
/**

0 commit comments

Comments
 (0)