Sessions: configurable "use_strict_mode" option for NativeSessionStorage
https://github.com/symfony/symfony/pull/22352#issuecomment-302113533
This commit is contained in:
parent
436d5e4e94
commit
90e192e824
@ -348,6 +348,7 @@ class Configuration implements ConfigurationInterface
|
|||||||
->scalarNode('gc_divisor')->end()
|
->scalarNode('gc_divisor')->end()
|
||||||
->scalarNode('gc_probability')->defaultValue(1)->end()
|
->scalarNode('gc_probability')->defaultValue(1)->end()
|
||||||
->scalarNode('gc_maxlifetime')->end()
|
->scalarNode('gc_maxlifetime')->end()
|
||||||
|
->booleanNode('use_strict_mode')->end()
|
||||||
->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end()
|
->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end()
|
||||||
->integerNode('metadata_update_threshold')
|
->integerNode('metadata_update_threshold')
|
||||||
->defaultValue('0')
|
->defaultValue('0')
|
||||||
|
@ -402,7 +402,7 @@ class FrameworkExtension extends Extension
|
|||||||
// session storage
|
// session storage
|
||||||
$container->setAlias('session.storage', $config['storage_id']);
|
$container->setAlias('session.storage', $config['storage_id']);
|
||||||
$options = array();
|
$options = array();
|
||||||
foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'gc_maxlifetime', 'gc_probability', 'gc_divisor') as $key) {
|
foreach (array('name', 'cookie_lifetime', 'cookie_path', 'cookie_domain', 'cookie_secure', 'cookie_httponly', 'gc_maxlifetime', 'gc_probability', 'gc_divisor', 'use_strict_mode') as $key) {
|
||||||
if (isset($config[$key])) {
|
if (isset($config[$key])) {
|
||||||
$options[$key] = $config[$key];
|
$options[$key] = $config[$key];
|
||||||
}
|
}
|
||||||
|
@ -111,6 +111,7 @@
|
|||||||
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
|
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
|
||||||
<xsd:attribute name="gc-divisor" type="xsd:string" />
|
<xsd:attribute name="gc-divisor" type="xsd:string" />
|
||||||
<xsd:attribute name="gc-probability" type="xsd:string" />
|
<xsd:attribute name="gc-probability" type="xsd:string" />
|
||||||
|
<xsd:attribute name="use-strict-mode" type="xsd:boolean" />
|
||||||
<xsd:attribute name="save-path" type="xsd:string" />
|
<xsd:attribute name="save-path" type="xsd:string" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user