-
Notifications
You must be signed in to change notification settings - Fork 36
/
config_hacks.php
41 lines (35 loc) · 1.12 KB
/
config_hacks.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
use Symfony\Component\HttpKernel\Kernel;
/**
* @var $container \Symfony\Component\DependencyInjection\ContainerBuilder
*/
// TODO remove as soon as Symfony >= 6 is required
if (Kernel::VERSION_ID >= 40300 && Kernel::VERSION_ID < 60000) {
$container->loadFromExtension('framework', [
'router' => [
'utf8' => true,
],
]);
}
// TODO put back into config.yml as soon as Symfony >= 5.3 is required, see https://github.com/symfony/symfony/blob/5.x/UPGRADE-5.3.md#frameworkbundle
$container->loadFromExtension('framework', [
'session' => Kernel::VERSION_ID >= 50300 ? [
'storage_factory_id' => 'session.storage.factory.mock_file',
] : [
'storage_id' => 'session.storage.mock_file',
],
]);
// TODO remove as soon as Symfony >= 6 is required
if (Kernel::VERSION_ID >= 50200 && Kernel::VERSION_ID < 60000) {
$container->loadFromExtension('framework', [
'form' => [
'legacy_error_messages' => false,
],
]);
}
// TODO remove as soon as Symfony >= 7 is required
if (Kernel::VERSION_ID < 70000) {
$container->loadFromExtension('framework', [
'http_method_override' => false,
]);
}