Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 54eef22

Browse filesBrowse files
committed
Update the tests to reflect that session & CRSF are automatically enabled when interfaces exists
1 parent 226a2cc commit 54eef22
Copy full SHA for 54eef22

File tree

6 files changed

+10
-2
lines changed
Filter options

6 files changed

+10
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd
+1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+2-2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php
+3Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml
+1Lines 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>
+1Lines 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: ~

‎src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/ConcreteMicroKernel.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
8181
$c->register('logger', NullLogger::class);
8282
$c->loadFromExtension('framework', array(
8383
'secret' => '$ecret',
84+
'session' => false,
85+
'csrf_protection' => false,
8486
));
8587

8688
$c->setParameter('halloween', 'Have a great day!');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.