Skip to content

Commit a5e079c

Browse files
committed
check PHP config fixes deprecation
1 parent 1677260 commit a5e079c

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

Tests/Functional/app/BasicAuth/config.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
imports:
22
- { resource: ../config/default.yml }
33
- { resource: security.php }
4-
5-
framework:
6-
serializer:
7-
enabled: true
8-
router: { resource: "%kernel.project_dir%/BasicAuth/routing.yml" }
4+
- { resource: framework.php }
95

106
fos_rest:
117
zone:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the FOSRestBundle package.
5+
*
6+
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
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+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
13+
use Symfony\Component\HttpKernel\Kernel;
14+
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+
];
24+
25+
if (Kernel::VERSION_ID >= 60100) {
26+
$config['http_method_override'] = true;
27+
}
28+
29+
$container->loadFromExtension('framework', $config);
30+
};

0 commit comments

Comments
 (0)