8000 Sessions: configurable "use_strict_mode" option for NativeSessionStorage · symfony/symfony@90e192e · GitHub
[go: up one dir, main page]

Skip to content

Commit 90e192e

Browse files
committed
Sessions: configurable "use_strict_mode" option for NativeSessionStorage
#22352 (comment)
1 parent 436d5e4 commit 90e192e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
348348
->scalarNode('gc_divisor')->end()
349349
->scalarNode('gc_probability')->defaultValue(1)->end()
350350
->scalarNode('gc_maxlifetime')->end()
351+
->booleanNode('use_strict_mode')->end()
351352
->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end()
352353
->integerNode('metadata_update_threshold')
353354
->defaultValue('0')

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
402402
// session storage
403403
$container->setAlias('session.storage', $config['storage_id']);
404404
$options = array();
405-
foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'gc_maxlifetime', 'gc_probability', 'gc_divisor') as $key) {
405+
foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'gc_maxlifetime', 'gc_probability', 'gc_divisor', 'use_strict_mode') as $key) {
406406
if (isset($config[$key])) {
407407
$options[$key] = $config[$key];
408408
}

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
@@ -111,6 +111,7 @@
111111
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
112112
<xsd:attribute name="gc-divisor" type="xsd:string" />
113113
<xsd:attribute name="gc-probability" type="xsd:string" />
114+
<xsd:attribute name="use-strict-mode" type="xsd:boolean" />
114115
<xsd:attribute name="save-path" type="xsd:string" />
115116
</xsd:complexType>
116117

0 commit comments

Comments
 (0)
0