Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[FrameworkBundle] removed deprecated cookie options

  • Loading branch information...
commit 0bb5d01f320b8f6af93f61b3351ba18addbc75d0 1 parent b3081e8
@fabpot fabpot authored
View
5 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
@@ -222,11 +222,6 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
->scalarNode('gc_probability')->end()
->scalarNode('gc_maxlifetime')->end()
->scalarNode('save_path')->defaultValue('%kernel.cache_dir%/sessions')->end()
- ->scalarNode('lifetime')->info('DEPRECATED! Please use: cookie_lifetime')->end()
- ->scalarNode('path')->info('DEPRECATED! Please use: cookie_path')->end()
- ->scalarNode('domain')->info('DEPRECATED! Please use: cookie_domain')->end()
- ->booleanNode('secure')->info('DEPRECATED! Please use: cookie_secure')->end()
- ->booleanNode('httponly')->info('DEPRECATED! Please use: cookie_httponly')->end()
->end()
->end()
->end()
View
7 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -308,13 +308,6 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
}
}
- //we deprecated session options without cookie_ prefix, but we are still supporting them,
- //Let's merge the ones that were supplied without prefix
- foreach (array('lifetime', 'path', 'domain', 'secure', 'httponly') as $key) {
- if (!isset($options['cookie_'.$key]) && isset($config[$key])) {
- $options['cookie_'.$key] = $config[$key];
- }
- }
$container->setParameter('session.storage.options', $options);
// session handler (the internal callback registered with PHP session management)
View
5 src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd
@@ -88,11 +88,6 @@
<xsd:attribute name="cookie-secure" type="xsd:boolean" />
<xsd:attribute name="cookie-httponly" type="xsd:boolean" />
<!-- deprecated attributes -->
- <xsd:attribute name="lifetime" type="xsd:string" />
- <xsd:attribute name="path" type="xsd:string" />
- <xsd:attribute name="domain" type="xsd:string" />
- <xsd:attribute name="secure" type="xsd:boolean" />
- <xsd:attribute name="httponly" type="xsd:boolean" />
<xsd:attribute name="auto-start" type="xsd:boolean" />
<!-- end of deprecated attributes -->
<xsd:attribute name="cache-limiter" type="xsd:string" />
View
20 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_full.php
@@ -1,20 +0,0 @@
-<?php
-
-$container->loadFromExtension('framework', array(
- 'secret' => 's3cr3t',
- 'session' => array(
- 'storage_id' => 'session.storage.native',
- 'handler_id' => 'session.handler.native_file',
- 'name' => '_SYMFONY',
- 'lifetime' => 2012,
- 'path' => '/sf2',
- 'domain' => 'sf2.example.com',
- 'secure' => false,
- 'httponly' => false,
- 'cookie_lifetime' => 86400,
- 'cookie_path' => '/',
- 'cookie_domain' => 'example.com',
- 'cookie_secure' => true,
- 'cookie_httponly' => true,
- ),
-));
View
17 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/deprecated_merge_partial.php
@@ -1,17 +0,0 @@
-<?php
-
-$container->loadFromExtension('framework', array(
- 'secret' => 's3cr3t',
- 'session' => array(
- 'storage_id' => 'session.storage.native',
- 'handler_id' => 'session.handler.native_file',
- 'name' => '_SYMFONY',
- 'lifetime' => 2012,
- 'path' => '/sf2',
- 'domain' => 'sf2.example.com',
- 'secure' => false,
- 'cookie_lifetime' => 86400,
- 'cookie_path' => '/',
- 'cookie_httponly' => true,
- ),
-));
View
24 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php
@@ -22,18 +22,18 @@
'type' => 'xml',
),
'session' => array(
- 'storage_id' => 'session.storage.native',
- 'handler_id' => 'session.handler.native_file',
- 'name' => '_SYMFONY',
- 'lifetime' => 86400,
- 'path' => '/',
- 'domain' => 'example.com',
- 'secure' => true,
- 'httponly' => true,
- 'gc_maxlifetime' => 90000,
- 'gc_divisor' => 108,
- 'gc_probability' => 1,
- 'save_path' => '/path/to/sessions',
+ 'storage_id' => 'session.storage.native',
+ 'handler_id' => 'session.handler.native_file',
+ 'name' => '_SYMFONY',
+ 'cookie_lifetime' => 86400,
+ 'cookie_path' => '/',
+ 'cookie_domain' => 'example.com',
+ 'cookie_secure' => true,
+ 'cookie_httponly' => true,
+ 'gc_maxlifetime' => 90000,
+ 'gc_divisor' => 108,
+ 'gc_probability' => 1,
+ 'save_path' => '/path/to/sessions',
),
'templating' => array(
'assets_version' => 'SomeVersionScheme',
View
12 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/deprecated_merge_full.xml
@@ -1,12 +0,0 @@
-<?xml version="1.0" ?>
-
-<container xmlns="http://symfony.com/schema/dic/services"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:framework="http://symfony.com/schema/dic/symfony"
- xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
- http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
-
- <framework:config secret="s3cr3t">
- <framework:session storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" lifetime="2012" path="/sf2" domain="sf2.example.com" secure="false" httponly="false" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="true" />
- </framework:config>
-</container>
View
12 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/deprecated_merge_partial.xml
@@ -1,12 +0,0 @@
-<?xml version="1.0" ?>
-
-<container xmlns="http://symfony.com/schema/dic/services"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:framework="http://symfony.com/schema/dic/symfony"
- xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
- http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
-
- <framework:config secret="s3cr3t">
- <framework:session storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" lifetime="2012" path="/sf2" domain="sf2.example.com" secure="false" httponly="false" cookie-lifetime="86400" cookie-path="/" cookie-httponly="true" />
- </framework:config>
-</container>
View
16 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/deprecated_merge_full.yml
@@ -1,16 +0,0 @@
-framework:
- secret: s3cr3t
- session:
- storage_id: session.storage.native
- handler_id: session.handler.native_file
- name: _SYMFONY
- lifetime: 2012
- path: /sf2
- domain: sf2.example.com
- secure: false
- httponly: false
- cookie_lifetime: 86400
- cookie_path: /
- cookie_domain: example.com
- cookie_secure: true
- cookie_httponly: true
View
14 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/deprecated_merge_partial.yml
@@ -1,14 +0,0 @@
-framework:
- secret: s3cr3t
- session:
- storage_id: session.storage.native
- handler_id: session.handler.native_file
- name: _SYMFONY
- lifetime: 2012
- path: /sf2
- domain: sf2.example.com
- secure: false
- httponly: false
- cookie_lifetime: 86400
- cookie_path: /
- cookie_httponly: true
View
24 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml
@@ -16,18 +16,18 @@ framework:
resource: %kernel.root_dir%/config/routing.xml
type: xml
session:
- storage_id: session.storage.native
- handler_id: session.handler.native_file
- name: _SYMFONY
- lifetime: 86400
- path: /
- domain: example.com
- secure: true
- httponly: true
- gc_probability: 1
- gc_divisor: 108
- gc_maxlifetime: 90000
- save_path: /path/to/sessions
+ storage_id: session.storage.native
+ handler_id: session.handler.native_file
+ name: _SYMFONY
+ cookie_lifetime: 86400
+ cookie_path: /
+ cookie_domain: example.com
+ cookie_secure: true
+ cookie_httponly: true
+ gc_probability: 1
+ gc_divisor: 108
+ gc_maxlifetime: 90000
+ save_path: /path/to/sessions
templating:
assets_version: SomeVersionScheme
assets_base_urls: http://cdn.example.com
View
30 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -111,36 +111,6 @@ public function testSession()
$this->assertEquals('/path/to/sessions', $container->getParameter('session.save_path'));
}
- public function testSessionDeprecatedMergeFull()
- {
- $container = $this->createContainerFromFile('deprecated_merge_full');
-
- $this->assertTrue($container->hasDefinition('session'), '->registerSessionConfiguration() loads session.xml');
-
- $options = $container->getParameter('session.storage.options');
- $this->assertEquals('_SYMFONY', $options['name']);
- $this->assertEquals(86400, $options['cookie_lifetime']);
- $this->assertEquals('/', $options['cookie_path']);
- $this->assertEquals('example.com', $options['cookie_domain']);
- $this->assertTrue($options['cookie_secure']);
- $this->assertTrue($options['cookie_httponly']);
- }
-
- public function testSessionDeprecatedMergePartial()
- {
- $container = $this->createContainerFromFile('deprecated_merge_partial');
-
- $this->assertTrue($container->hasDefinition('session'), '->registerSessionConfiguration() loads session.xml');
-
- $options = $container->getParameter('session.storage.options');
- $this->assertEquals('_SYMFONY', $options['name']);
- $this->assertEquals(86400, $options['cookie_lifetime']);
- $this->assertEquals('/', $options['cookie_path']);
- $this->assertEquals('sf2.example.com', $options['cookie_domain']);
- $this->assertFalse($options['cookie_secure']);
- $this->assertTrue($options['cookie_httponly']);
- }
-
public function testTemplating()
{
$container = $this->createContainerFromFile('full');
Please sign in to comment.
Something went wrong with that request. Please try again.