Skip to content

Commit 9664a54

Browse files
committed
default framework config
1 parent 665fa13 commit 9664a54

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

Tests/Functional/app/BasicAuth/framework.php

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,17 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
13-
use Symfony\Component\HttpKernel\Kernel;
12+
$frameworkConfig = [
13+
'serializer' => [
14+
'enabled' => true,
15+
],
16+
'router' => [
17+
'resource' => '%kernel.project_dir%/BasicAuth/routing.yml',
18+
],
19+
];
1420

15-
return static function (ContainerConfigurator $container) {
16-
$config = [
17-
'serializer' => [
18-
'enabled' => true,
19-
],
20-
'router' => [
21-
'resource' => '%kernel.project_dir%/BasicAuth/routing.yml',
22-
],
23-
];
21+
if (\Symfony\Component\HttpKernel\Kernel::VERSION_ID >= 60100) {
22+
$frameworkConfig['http_method_override'] = true;
23+
}
2424

25-
if (Kernel::VERSION_ID >= 60100) {
26-
$config['http_method_override'] = true;
27-
}
28-
29-
$container->extension('framework', $config);
30-
};
25+
$container->loadFromExtension('framework', $frameworkConfig);

Tests/Functional/app/config/framework.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
];
2121
}
2222

23-
$container->loadFromExtension('framework', [
23+
$frameworkConfig = [
2424
'annotations' => [
2525
'enabled' => true,
2626
],
@@ -35,4 +35,10 @@
3535
'form' => null,
3636
'session' => $sessionConfig,
3737
'default_locale' => 'en',
38-
]);
38+
];
39+
40+
if (\Symfony\Component\HttpKernel\Kernel::VERSION_ID >= 60100) {
41+
$frameworkConfig['http_method_override'] = true;
42+
}
43+
44+
$container->loadFromExtension('framework', $frameworkConfig);

0 commit comments

Comments
 (0)