Skip to content

Commit c49dd1a

Browse files
committed
Merge branch '3.4' into 4.0
* 3.4: [HttpKernel] Better handling of legacy cache modify definitions only if the do exist [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist [FrameworkBundle] Make MicroKernelTraitTest green don't override existing verbosity env var [HttpKernel] Read $_ENV when checking SHELL_VERBOSITY Remove unreachable code Automatically enable the CSRF protection if CSRF manager exists bumped Symfony version to 3.4.0 adding checks for the expression language updated VERSION for 3.4.0-RC2 updated CHANGELOG for 3.4.0-RC2
2 parents cd22792 + a510355 commit c49dd1a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

DependencyInjection/Configuration.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Symfony\Component\Form\Form;
2222
use Symfony\Component\Lock\Lock;
2323
use Symfony\Component\Lock\Store\SemaphoreStore;
24+
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
2425
use Symfony\Component\Serializer\Serializer;
2526
use Symfony\Component\Translation\Translator;
2627
use Symfony\Component\Validator\Validation;
@@ -109,7 +110,7 @@ private function addCsrfSection(ArrayNodeDefinition $rootNode)
109110
$rootNode
110111
->children()
111112
->arrayNode('csrf_protection')
112-
->canBeEnabled()
113+
->{!class_exists(FullStack::class) && class_exists(CsrfTokenManagerInterface::class) ? 'canBeDisabled' : 'canBeEnabled'}()
113114
->end()
114115
->end()
115116
;

Tests/Kernel/MicroKernelTraitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MicroKernelTraitTest extends TestCase
1818
{
1919
public function test()
2020
{
21-
$kernel = new ConcreteMicroKernel('test', true);
21+
$kernel = new ConcreteMicroKernel('test', false);
2222
$kernel->boot();
2323

2424
$request = Request::create('/');
@@ -31,7 +31,7 @@ public function test()
3131

3232
public function testAsEventSubscriber()
3333
{
34-
$kernel = new ConcreteMicroKernel('test', true);
34+
$kernel = new ConcreteMicroKernel('test', false);
3535
$kernel->boot();
3636

3737
$request = Request::create('/danger');

0 commit comments

Comments
 (0)