Skip to content

Commit 2e0c0d3

Browse files
Merge branch '7.2' into 7.3
* 7.2: - - CS fixes
2 parents 6871e73 + fcb8989 commit 2e0c0d3

File tree

59 files changed

+186
-165
lines changed

Some content is hidden

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

59 files changed

+186
-165
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ f4118e110a46de3ffb799e7d79bf15128d1646ea
44
ae0a783425b80b78376488619bf9106e69193fa4
55
9c1e36257c4df0929179462d6b2bdd00453ac8aa
66
6ae74d38e3d20d0ffcc66c7c3d28767fab76bdfb
7-
# Prefix all sprintf() calls
87
6ce530c5e90397d88e3a76a56db266c74d651584
8+
77bd236b8da064c90b19b84a35becfb3e43348db
9+
d0bc10e7432901098fe50bcccad53f487978c33d

.github/expected-missing-return-types.diff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/
4848
diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
4949
--- a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
5050
+++ b/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
51-
@@ -94,5 +94,5 @@ abstract class NodeDefinition implements NodeParentInterface
51+
@@ -115,5 +115,5 @@ abstract class NodeDefinition implements NodeParentInterface
5252
* @return NodeParentInterface|NodeBuilder|self|ArrayNodeDefinition|VariableNodeDefinition
5353
*/
5454
- public function end(): NodeParentInterface
@@ -58,21 +58,21 @@ diff --git a/src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php
5858
diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php
5959
--- a/src/Symfony/Component/Console/Command/Command.php
6060
+++ b/src/Symfony/Component/Console/Command/Command.php
61-
@@ -163,5 +163,5 @@ class Command
61+
@@ -201,5 +201,5 @@ class Command implements SignalableCommandInterface
6262
* @return void
6363
*/
6464
- protected function configure()
6565
+ protected function configure(): void
6666
{
6767
}
68-
@@ -195,5 +195,5 @@ class Command
68+
@@ -233,5 +233,5 @@ class Command implements SignalableCommandInterface
6969
* @return void
7070
*/
7171
- protected function interact(InputInterface $input, OutputInterface $output)
7272
+ protected function interact(InputInterface $input, OutputInterface $output): void
7373
{
7474
}
75-
@@ -211,5 +211,5 @@ class Command
75+
@@ -249,5 +249,5 @@ class Command implements SignalableCommandInterface
7676
* @return void
7777
*/
7878
- protected function initialize(InputInterface $input, OutputInterface $output)
@@ -474,14 +474,14 @@ diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/
474474
diff --git a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
475475
--- a/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
476476
+++ b/src/Symfony/Component/Routing/Loader/AttributeClassLoader.php
477-
@@ -253,5 +253,5 @@ abstract class AttributeClassLoader implements LoaderInterface
477+
@@ -277,5 +277,5 @@ abstract class AttributeClassLoader implements LoaderInterface
478478
* @return string
479479
*/
480480
- protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
481481
+ protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method): string
482482
{
483483
$name = str_replace('\\', '_', $class->name).'_'.$method->name;
484-
@@ -355,5 +355,5 @@ abstract class AttributeClassLoader implements LoaderInterface
484+
@@ -379,5 +379,5 @@ abstract class AttributeClassLoader implements LoaderInterface
485485
* @return void
486486
*/
487487
- abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, object $attr);
@@ -578,7 +578,7 @@ diff --git a/src/Symfony/Component/Translation/Extractor/ExtractorInterface.php
578578
diff --git a/src/Symfony/Component/TypeInfo/Tests/Fixtures/DummyWithPhpDoc.php b/src/Symfony/Component/TypeInfo/Tests/Fixtures/DummyWithPhpDoc.php
579579
--- a/src/Symfony/Component/TypeInfo/Tests/Fixtures/DummyWithPhpDoc.php
580580
+++ b/src/Symfony/Component/TypeInfo/Tests/Fixtures/DummyWithPhpDoc.php
581-
@@ -15,5 +15,5 @@ final class DummyWithPhpDoc
581+
@@ -50,5 +50,5 @@ final class DummyWithPhpDoc
582582
* @return Dummy
583583
*/
584584
- public function getNextDummy(mixed $dummy): mixed

.github/patch-types.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@
5353
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/'):
5454
case false !== strpos($file, '/src/Symfony/Component/PropertyInfo/Tests/Fixtures/Php81Dummy.php'):
5555
case false !== strpos($file, '/src/Symfony/Component/Runtime/Internal/ComposerPlugin.php'):
56+
case false !== strpos($file, '/src/Symfony/Component/Security/Http/Tests/Fixtures/IsGrantedAttributeMethodsWithClosureController.php'):
57+
case false !== strpos($file, '/src/Symfony/Component/Security/Http/Tests/Fixtures/IsGrantedAttributeWithClosureController.php'):
5658
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Fixtures/'):
5759
case false !== strpos($file, '/src/Symfony/Component/Serializer/Tests/Normalizer/Features/ObjectOuter.php'):
60+
case false !== strpos($file, '/src/Symfony/Component/Validator/Tests/Constraints/Fixtures/WhenTestWithClosure.php'):
5861
case false !== strpos($file, '/src/Symfony/Component/Validator/Tests/Fixtures/NestedAttribute/Entity.php'):
5962
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/NotLoadableClass.php'):
6063
case false !== strpos($file, '/src/Symfony/Component/VarDumper/Tests/Fixtures/ReflectionIntersectionTypeFixture.php'):

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
'(?P<EXTRA>.*)??',
4545
preg_quote($fileHeaderParts[1], '/'),
4646
'/s',
47-
])
47+
]),
4848
],
4949
])
5050
->setRiskyAllowed(true)

src/Symfony/Bridge/Doctrine/ArgumentResolver/EntityValueResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): array
7373
return [];
7474
}
7575

76-
throw new NearMissValueResolverException(sprintf('Cannot find mapping for "%s": declare one using either the #[MapEntity] attribute or mapped route parameters.', $options->class));
76+
throw new NearMissValueResolverException(\sprintf('Cannot find mapping for "%s": declare one using either the #[MapEntity] attribute or mapped route parameters.', $options->class));
7777
}
7878
try {
7979
$object = $manager->getRepository($options->class)->findOneBy($criteria);

src/Symfony/Bridge/Doctrine/Types/DatePointType.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ final class DatePointType extends DateTimeImmutableType
2020
public const NAME = 'date_point';
2121

2222
/**
23-
* @param T $value
24-
*
25-
* @return (T is null ? null : DatePoint)
26-
*
27-
* @template T
28-
*/
23+
* @param T $value
24+
*
25+
* @return (T is null ? null : DatePoint)
26+
*
27+
* @template T
28+
*/
2929
public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?DatePoint
3030
{
3131
if (null === $value || $value instanceof DatePoint) {

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
11591159
$workflow['definition_validators'][] = match ($workflow['type']) {
11601160
'state_machine' => Workflow\Validator\StateMachineValidator::class,
11611161
'workflow' => Workflow\Validator\WorkflowValidator::class,
1162-
default => throw new \LogicException(\sprintf('Invalid workflow type "%s".', $workflow['type'])),
1162+
default => throw new \LogicException(\sprintf('Invalid workflow type "%s".', $workflow['type'])),
11631163
};
11641164

11651165
// Create Workflow
@@ -3320,13 +3320,13 @@ private function registerRateLimiterConfiguration(array $config, ContainerBuilde
33203320
throw new LogicException(\sprintf('Compound rate limiter "%s" requires at least one sub-limiter.', $name));
33213321
}
33223322

3323-
if (\array_diff($limiterConfig['limiters'], $limiters)) {
3323+
if (array_diff($limiterConfig['limiters'], $limiters)) {
33243324
throw new LogicException(\sprintf('Compound rate limiter "%s" requires at least one sub-limiter to be configured.', $name));
33253325
}
33263326

33273327
$container->register($limiterId = 'limiter.'.$name, CompoundRateLimiterFactory::class)
33283328
->addTag('rate_limiter', ['name' => $name])
3329-
->addArgument(new IteratorArgument(\array_map(
3329+
->addArgument(new IteratorArgument(array_map(
33303330
static fn (string $name) => new Reference('limiter.'.$name),
33313331
$limiterConfig['limiters']
33323332
)))

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,10 @@ public function testValidatorEmailValidationMode(string $mode)
440440

441441
$this->createContainerFromClosure(function (ContainerBuilder $container) use ($mode) {
442442
$container->loadFromExtension('framework', [
443-
'annotations' => false,
444-
'http_method_override' => false,
445-
'handle_all_throwables' => true,
446-
'php_errors' => ['log' => true],
443+
'annotations' => false,
444+
'http_method_override' => false,
445+
'handle_all_throwables' => true,
446+
'php_errors' => ['log' => true],
447447
'validation' => [
448448
'email_validation_mode' => $mode,
449449
],

src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Psr\Log\NullLogger;
1616
use Symfony\Bundle\FrameworkBundle\Console\Application;
17-
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
1817
use Symfony\Component\Console\Attribute\AsCommand;
1918
use Symfony\Component\Console\Input\ArrayInput;
2019
use Symfony\Component\Console\Output\BufferedOutput;
@@ -186,27 +185,3 @@ public function testDefaultKernel()
186185
$this->assertSame('OK', $response->getContent());
187186
}
188187
}
189-
190-
abstract class MinimalKernel extends Kernel
191-
{
192-
use MicroKernelTrait;
193-
194-
private string $cacheDir;
195-
196-
public function __construct(string $cacheDir)
197-
{
198-
parent::__construct('test', false);
199-
200-
$this->cacheDir = sys_get_temp_dir().'/'.$cacheDir;
201-
}
202-
203-
public function getCacheDir(): string
204-
{
205-
return $this->cacheDir;
206-
}
207-
208-
public function getLogDir(): string
209-
{
210-
return $this->cacheDir;
211-
}
212-
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bundle\FrameworkBundle\Tests\Kernel;
13+
14+
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
15+
use Symfony\Component\HttpKernel\Kernel;
16+
17+
abstract class MinimalKernel extends Kernel
18+
{
19+
use MicroKernelTrait;
20+
21+
private string $cacheDir;
22+
23+
public function __construct(string $cacheDir)
24+
{
25+
parent::__construct('test', false);
26+
27+
$this->cacheDir = sys_get_temp_dir().'/'.$cacheDir;
28+
}
29+
30+
public function getCacheDir(): string
31+
{
32+
return $this->cacheDir;
33+
}
34+
35+
public function getLogDir(): string
36+
{
37+
return $this->cacheDir;
38+
}
39+
}

0 commit comments

Comments
 (0)