8000 Update the tests to reflect that session & CRSF are automatically ena… · symfony/symfony@b271567 · GitHub
[go: up one dir, main page]

Skip to content

Commit b271567

Browse files
committed
Update the tests to reflect that session & CRSF are automatically enabled when interfaces exists
1 parent 226a2cc commit b271567

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
</xsd:complexType>
104104

105105
<xsd:complexType name="session">
106+
<xsd:attribute name="enabled" type="xsd:boolean" />
106107
<xsd:attribute name="storage-id" type="xsd:string" />
107108
<xsd:attribute name="handler-id" type="xsd:string" />
108109
<xsd:attribute name="name" type="xsd:string" />

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ protected static function getBundleDefaultConfig()
225225
'ide' => null,
226226
'default_locale' => 'en',
227227
'csrf_protection' => array(
228-
'enabled' => false,
228+
'enabled' => !class_exists(FullStack::class),
229229
),
230230
'form' => array(
231231
'enabled' => !class_exists(FullStack::class),
@@ -294,7 +294,7 @@ protected static function getBundleDefaultConfig()
294294
'strict_requirements' => true,
295295
),
296296
'session' => array(
297-
'enabled' => false,
297+
'enabled' => !class_exists(FullStack::class),
298298
'storage_id' => 'session.storage.native',
299299
'handler_id' => 'session.handler.native_file',
300300
'cookie_httponly' => true,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

33
$container->loadFromExtension('framework', array(
4+
'session' => array(
5+
'enabled' => false,
6+
),
47
'csrf_protection' => array(
58
'enabled' => true,
69
),

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
88

99
<framework:config>
10+
<framework:session enabled="false" />
1011
<framework:csrf-protection />
1112
</framework:config>
1213
</container>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
framework:
2+
session: false
23
csrf_protection: ~

0 commit comments

Comments
 (0)
0