Skip to content

Commit de48766

Browse files
Merge branch '7.2' into 7.3
* 7.2: - - CS fixes
2 parents 8db23e8 + 991d6f0 commit de48766

File tree

4 files changed

+46
-32
lines changed

4 files changed

+46
-32
lines changed

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
)))

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
],

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-
}

Tests/Kernel/MinimalKernel.php

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)