From 27530cbb1e0121e1dd250971fd7aea8b2f2672f9 Mon Sep 17 00:00:00 2001 From: Drak Date: Thu, 9 Feb 2012 05:00:47 +0545 Subject: [PATCH] [HttpFoundation] Moved session related classes to own sub-namespace. --- CHANGELOG-2.1.md | 2 ++ UPGRADE-2.1.md | 10 +++--- .../HttpFoundation/DbalSessionStorage.php | 4 +-- .../FrameworkExtension.php | 2 +- .../Resources/config/session.xml | 22 ++++++------- .../Templating/GlobalVariables.php | 2 +- .../Templating/Helper/SessionHelper.php | 2 +- .../EventListener/TestSessionListenerTest.php | 2 +- .../Templating/Helper/SessionHelperTest.php | 8 ++--- .../Tests/Templating/PhpEngineTest.php | 4 +-- .../TwigBundle/Tests/TwigEngineTest.php | 4 +-- .../EventListener/WebDebugToolbarListener.php | 2 +- .../WebDebugToolbarListenerTest.php | 2 +- .../Csrf/CsrfProvider/SessionCsrfProvider.php | 2 +- .../Component/HttpFoundation/Request.php | 4 +-- .../Attribute}/AttributeBag.php | 2 +- .../Attribute}/AttributeBagInterface.php | 4 +-- .../Attribute}/NamespacedAttributeBag.php | 2 +- .../Flash}/AutoExpireFlashBag.php | 2 +- .../Flash}/FlashBag.php | 2 +- .../Flash}/FlashBagInterface.php | 4 +-- .../HttpFoundation/{ => Session}/Session.php | 14 ++++---- .../{ => Session}/SessionBagInterface.php | 2 +- .../{ => Session}/SessionInterface.php | 6 ++-- .../Storage}/AbstractSessionStorage.php | 12 +++---- .../Storage}/MemcacheSessionStorage.php | 2 +- .../Storage}/MemcachedSessionStorage.php | 2 +- .../Storage}/MockArraySessionStorage.php | 2 +- .../Storage}/MockFileSessionStorage.php | 2 +- .../Storage}/NativeFileSessionStorage.php | 2 +- .../Storage}/NativeMemcacheSessionStorage.php | 2 +- .../NativeMemcachedSessionStorage.php | 2 +- .../Storage}/NativeSqliteSessionStorage.php | 2 +- .../Storage}/NullSessionStorage.php | 2 +- .../Storage}/PdoSessionStorage.php | 2 +- .../Storage}/SessionSaveHandlerInterface.php | 2 +- .../Storage}/SessionStorageInterface.php | 6 ++-- .../SessionStorage/ArraySessionStorage.php | 32 ------------------- .../CsrfProvider/SessionCsrfProviderTest.php | 2 +- .../Component/HttpFoundation/RequestTest.php | 4 +-- .../Attribute}/AttributeBagTest.php | 4 +-- .../Attribute}/NamespacedAttributeBagTest.php | 2 +- .../Flash}/AutoExpireFlashBagTest.php | 8 ++--- .../Flash}/FlashBagTest.php | 6 ++-- .../{ => Session}/SessionTest.php | 18 +++++------ .../Storage}/AbstractSessionStorageTest.php | 10 +++--- .../Storage}/MockArraySessionStorageTest.php | 8 ++--- .../Storage}/MockFileSessionStorageTest.php | 8 ++--- .../Storage}/NativeFileSessionStorageTest.php | 8 ++--- .../NativeMemcacheSessionStorageTest.php | 8 ++--- .../NativeMemcachedSessionStorageTest.php | 8 ++--- .../NativeSqliteSessionStorageTest.php | 8 ++--- .../Storage}/NullSessionStorageTest.php | 6 ++-- .../EventListener/LocaleListenerTest.php | 4 +-- .../Http/Firewall/ContextListenerTest.php | 4 +-- .../Http/Logout/SessionLogoutHandlerTest.php | 2 +- 56 files changed, 135 insertions(+), 165 deletions(-) rename src/Symfony/Component/HttpFoundation/{SessionAttribute => Session/Attribute}/AttributeBag.php (97%) rename src/Symfony/Component/HttpFoundation/{SessionAttribute => Session/Attribute}/AttributeBagInterface.php (91%) rename src/Symfony/Component/HttpFoundation/{SessionAttribute => Session/Attribute}/NamespacedAttributeBag.php (98%) rename src/Symfony/Component/HttpFoundation/{SessionFlash => Session/Flash}/AutoExpireFlashBag.php (98%) rename src/Symfony/Component/HttpFoundation/{SessionFlash => Session/Flash}/FlashBag.php (97%) rename src/Symfony/Component/HttpFoundation/{SessionFlash => Session/Flash}/FlashBagInterface.php (92%) rename src/Symfony/Component/HttpFoundation/{ => Session}/Session.php (91%) rename src/Symfony/Component/HttpFoundation/{ => Session}/SessionBagInterface.php (93%) rename src/Symfony/Component/HttpFoundation/{ => Session}/SessionInterface.php (92%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/AbstractSessionStorage.php (96%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/MemcacheSessionStorage.php (98%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/MemcachedSessionStorage.php (98%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/MockArraySessionStorage.php (97%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/MockFileSessionStorage.php (97%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeFileSessionStorage.php (95%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeMemcacheSessionStorage.php (97%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeMemcachedSessionStorage.php (97%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeSqliteSessionStorage.php (95%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/NullSessionStorage.php (95%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/PdoSessionStorage.php (99%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/SessionSaveHandlerInterface.php (98%) rename src/Symfony/Component/HttpFoundation/{SessionStorage => Session/Storage}/SessionStorageInterface.php (93%) delete mode 100644 src/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php rename tests/Symfony/Tests/Component/HttpFoundation/{SessionAttribute => Session/Attribute}/AttributeBagTest.php (96%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionAttribute => Session/Attribute}/NamespacedAttributeBagTest.php (98%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionFlash => Session/Flash}/AutoExpireFlashBagTest.php (92%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionFlash => Session/Flash}/FlashBagTest.php (94%) rename tests/Symfony/Tests/Component/HttpFoundation/{ => Session}/SessionTest.php (88%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/AbstractSessionStorageTest.php (89%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/MockArraySessionStorageTest.php (89%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/MockFileSessionStorageTest.php (91%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeFileSessionStorageTest.php (67%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeMemcacheSessionStorageTest.php (73%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeMemcachedSessionStorageTest.php (75%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/NativeSqliteSessionStorageTest.php (72%) rename tests/Symfony/Tests/Component/HttpFoundation/{SessionStorage => Session/Storage}/NullSessionStorageTest.php (84%) diff --git a/CHANGELOG-2.1.md b/CHANGELOG-2.1.md index 6ae768c51f..53fa9ac088 100644 --- a/CHANGELOG-2.1.md +++ b/CHANGELOG-2.1.md @@ -229,6 +229,8 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c * removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3 * added ResponseHeaderBag::makeDisposition() (implements RFC 6266) * made mimetype to extension conversion configurable + * [BC BREAK] Moved all session related classes and interfaces into own namespace, as + `Symfony\Component\HttpFoudation\Session`. * Flashes are now stored as a bucket of messages per `$type` so there can be multiple messages per type. There are four interface constants for type, `FlashBagInterface::INFO`, `FlashBagInterface::NOTICE`, `FlashBagInterface::WARNING` and `FlashBagInterface::ERROR`. diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index fea123a526..78169aacdf 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -270,8 +270,8 @@ UPGRADE FROM 2.0 to 2.1 .. note:: The Flash Message API provides constants which you can optionally use. For example - `Symfony\Component\HttpFoundation\SessionFlash\FlashBag::NOTICE`, which can also be abbreviated to - `FlashBag::NOTICE` providing you declare `` + `Symfony\Component\HttpFoundation\Session\Flash\FlashBag::NOTICE`, which can also be abbreviated to + `FlashBag::NOTICE` providing you declare `` at the beginning of the PHP template. Before (Twig): @@ -301,7 +301,7 @@ UPGRADE FROM 2.0 to 2.1 .. note:: You can optionally use constants in Twig templates using `constant()` e.g. - `constant('Symfony\Component\HttpFoundation\SessionFlash\FlashBag::NOTICE')`. + `constant('Symfony\Component\HttpFoundation\Session\Flash\FlashBag::NOTICE')`. * Session object @@ -313,12 +313,12 @@ UPGRADE FROM 2.0 to 2.1 * Session storage drivers Session storage drivers should inherit from - `Symfony\Component\HttpFoundation\SessionStorage\AbstractSessionStorage` + `Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage` and no longer should implement `read()`, `write()`, `remove()` which were removed from the `SessionStorageInterface`. Any session storage driver that wants to use custom save handlers should - implement `Symfony\Component\HttpFoundation\SessionStorage\SessionSaveHandlerInterface` + implement `Symfony\Component\HttpFoundation\Session\Storage\SessionSaveHandlerInterface` ### [FrameworkBundle] diff --git a/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php b/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php index 8552a09f30..cda9dd2a0a 100644 --- a/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php +++ b/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php @@ -3,8 +3,8 @@ namespace Symfony\Bridge\Doctrine\HttpFoundation; use Doctrine\DBAL\Platforms\MySqlPlatform; -use Symfony\Component\HttpFoundation\SessionStorage\AbstractSessionStorage; -use Symfony\Component\HttpFoundation\SessionStorage\SessionSaveHandlerInterface; +use Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage; +use Symfony\Component\HttpFoundation\Session\Storage\SessionSaveHandlerInterface; use Doctrine\DBAL\Driver\Connection; /** diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 2e80aea918..426e78cf5e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -301,7 +301,7 @@ class FrameworkExtension extends Extension $this->addClassesToCompile(array( 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener', - 'Symfony\\Component\\HttpFoundation\\SessionStorage\\SessionStorageInterface', + 'Symfony\\Component\\HttpFoundation\\Session\Storage\\SessionStorageInterface', $container->getDefinition('session')->getClass(), )); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml index dd1a2b6d3b..7e651594ec 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml @@ -5,17 +5,17 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - Symfony\Component\HttpFoundation\Session - Symfony\Component\HttpFoundation\SessionFlash\FlashBag - Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag - Symfony\Component\HttpFoundation\SessionStorage\NativeFileSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\NullSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\NativeMemcacheSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\NativeMemcachedSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\NativeSqliteSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\MemcacheSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\MemcachedSessionStorage - Symfony\Component\HttpFoundation\SessionStorage\MockFileSessionStorage + Symfony\Component\HttpFoundation\Session\Session + Symfony\Component\HttpFoundation\Session\Flash\FlashBag + Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag + Symfony\Component\HttpFoundation\Session\Storage\NativeFileSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\NullSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\NativeMemcacheSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\NativeMemcachedSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\NativeSqliteSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\MemcacheSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\MemcachedSessionStorage + Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage Memcache Memcached diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php index 08d32c86cf..f77ca12436 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -79,7 +79,7 @@ class GlobalVariables /** * Returns the current session. * - * @return Symfony\Component\HttpFoundation\Session|void The session + * @return Symfony\Component\HttpFoundation\Session\Session|void The session */ public function getSession() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php index 983c3cfece..684e5d92f5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php @@ -13,7 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Templating\Helper; use Symfony\Component\Templating\Helper\Helper; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; /** * SessionHelper provides read-only access to the session attributes. diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php index 7c656ba7e0..fe551ba360 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php @@ -94,7 +94,7 @@ class TestSessionListenerTest extends \PHPUnit_Framework_TestCase private function getSession() { - return $this->getMockBuilder('Symfony\Component\HttpFoundation\Session') + return $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Session') ->disableOriginalConstructor() ->getMock(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php index bd7c3a962b..b9f6e41670 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php @@ -12,11 +12,11 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\SessionStorage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBag; -use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; class SessionHelperTest extends \PHPUnit_Framework_TestCase { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php index 463df19ffc..476b398e61 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php @@ -14,8 +14,8 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Templating; use Symfony\Bundle\FrameworkBundle\Templating\PhpEngine; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\SessionStorage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\Templating\TemplateNameParser; use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; use Symfony\Bundle\FrameworkBundle\Tests\TestCase; diff --git a/src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php b/src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php index 4bde094136..f15ef3f945 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php @@ -14,8 +14,8 @@ namespace Symfony\Bundle\TwigBundle\Tests; use Symfony\Bundle\TwigBundle\TwigEngine; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\SessionStorage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\Templating\TemplateNameParser; use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables; diff --git a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php index d12cee0cb3..5d172a1cad 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php +++ b/src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php @@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Bundle\TwigBundle\TwigEngine; -use Symfony\Component\HttpFoundation\SessionFlash\AutoExpireFlashBag; +use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag; /** * WebDebugToolbarListener injects the Web Debug Toolbar. diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php index b6986176e8..ce75b593dc 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php @@ -177,7 +177,7 @@ class WebDebugToolbarListenerTest extends \PHPUnit_Framework_TestCase protected function getRequestMock($isXmlHttpRequest = false, $requestFormat = 'html') { - $session = $this->getMock('Symfony\Component\HttpFoundation\Session', array(), array(), '', false); + $session = $this->getMock('Symfony\Component\HttpFoundation\Session\Session', array(), array(), '', false); $request = $this->getMock( 'Symfony\Component\HttpFoundation\Request', array('getSession', 'isXmlHttpRequest', 'getRequestFormat'), diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php index d52fcac4b3..5174412a97 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; -use Symfony\Component\HttpFoundation\Session; +use Symfony\Component\HttpFoundation\Session\Session; /** * This provider uses a Symfony2 Session object to retrieve the user's diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index bd6bf43629..beab652a42 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpFoundation; -use Symfony\Component\HttpFoundation\SessionInterface; +use Symfony\Component\HttpFoundation\Session\SessionInterface; /** * Request represents an HTTP request. @@ -124,7 +124,7 @@ class Request protected $format; /** - * @var \Symfony\Component\HttpFoundation\SessionInterface + * @var \Symfony\Component\HttpFoundation\Session\SessionInterface */ protected $session; diff --git a/src/Symfony/Component/HttpFoundation/SessionAttribute/AttributeBag.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php similarity index 97% rename from src/Symfony/Component/HttpFoundation/SessionAttribute/AttributeBag.php rename to src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php index 301f2e6628..2915b03297 100644 --- a/src/Symfony/Component/HttpFoundation/SessionAttribute/AttributeBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionAttribute; +namespace Symfony\Component\HttpFoundation\Session\Attribute; /** * This class relates to session attribute storage diff --git a/src/Symfony/Component/HttpFoundation/SessionAttribute/AttributeBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php similarity index 91% rename from src/Symfony/Component/HttpFoundation/SessionAttribute/AttributeBagInterface.php rename to src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php index e24603ac7e..af16d642ef 100644 --- a/src/Symfony/Component/HttpFoundation/SessionAttribute/AttributeBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionAttribute; +namespace Symfony\Component\HttpFoundation\Session\Attribute; -use Symfony\Component\HttpFoundation\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; /** * Attributes store. diff --git a/src/Symfony/Component/HttpFoundation/SessionAttribute/NamespacedAttributeBag.php b/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php similarity index 98% rename from src/Symfony/Component/HttpFoundation/SessionAttribute/NamespacedAttributeBag.php rename to src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php index 74e432fe47..7a32405096 100644 --- a/src/Symfony/Component/HttpFoundation/SessionAttribute/NamespacedAttributeBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionAttribute; +namespace Symfony\Component\HttpFoundation\Session\Attribute; /** * This class provides structured storage of session attributes using diff --git a/src/Symfony/Component/HttpFoundation/SessionFlash/AutoExpireFlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php similarity index 98% rename from src/Symfony/Component/HttpFoundation/SessionFlash/AutoExpireFlashBag.php rename to src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php index 906ac302ae..e69992568d 100644 --- a/src/Symfony/Component/HttpFoundation/SessionFlash/AutoExpireFlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionFlash; +namespace Symfony\Component\HttpFoundation\Session\Flash; /** * AutoExpireFlashBag flash message container. diff --git a/src/Symfony/Component/HttpFoundation/SessionFlash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php similarity index 97% rename from src/Symfony/Component/HttpFoundation/SessionFlash/FlashBag.php rename to src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index 9dcb731a02..99508f760f 100644 --- a/src/Symfony/Component/HttpFoundation/SessionFlash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionFlash; +namespace Symfony\Component\HttpFoundation\Session\Flash; /** * FlashBag flash message container. diff --git a/src/Symfony/Component/HttpFoundation/SessionFlash/FlashBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php similarity index 92% rename from src/Symfony/Component/HttpFoundation/SessionFlash/FlashBagInterface.php rename to src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php index 41e8dde577..262f624e80 100644 --- a/src/Symfony/Component/HttpFoundation/SessionFlash/FlashBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionFlash; +namespace Symfony\Component\HttpFoundation\Session\Flash; -use Symfony\Component\HttpFoundation\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; /** * FlashBagInterface. diff --git a/src/Symfony/Component/HttpFoundation/Session.php b/src/Symfony/Component/HttpFoundation/Session/Session.php similarity index 91% rename from src/Symfony/Component/HttpFoundation/Session.php rename to src/Symfony/Component/HttpFoundation/Session/Session.php index 6d40b880a7..51cd368931 100644 --- a/src/Symfony/Component/HttpFoundation/Session.php +++ b/src/Symfony/Component/HttpFoundation/Session/Session.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation; +namespace Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\SessionStorage\SessionStorageInterface; -use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag; -use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBagInterface; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBag; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface; -use Symfony\Component\HttpFoundation\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; /** * Session. diff --git a/src/Symfony/Component/HttpFoundation/SessionBagInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php similarity index 93% rename from src/Symfony/Component/HttpFoundation/SessionBagInterface.php rename to src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php index a26596369b..50c2d4bd0c 100644 --- a/src/Symfony/Component/HttpFoundation/SessionBagInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation; +namespace Symfony\Component\HttpFoundation\Session; /** * Session Bag store. diff --git a/src/Symfony/Component/HttpFoundation/SessionInterface.php b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php similarity index 92% rename from src/Symfony/Component/HttpFoundation/SessionInterface.php rename to src/Symfony/Component/HttpFoundation/Session/SessionInterface.php index dc15518341..8bb013514b 100644 --- a/src/Symfony/Component/HttpFoundation/SessionInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/SessionInterface.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation; +namespace Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\SessionStorage\AttributeInterface; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface; +use Symfony\Component\HttpFoundation\Session\Storage\AttributeInterface; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; /** * Interface for the session. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/AbstractSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/AbstractSessionStorage.php similarity index 96% rename from src/Symfony/Component/HttpFoundation/SessionStorage/AbstractSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/AbstractSessionStorage.php index 8382d3a3ff..d50462eb87 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/AbstractSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/AbstractSessionStorage.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBag; -use Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface; -use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag; -use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBagInterface; -use Symfony\Component\HttpFoundation\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; /** * This provides a base class for session attribute storage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/MemcacheSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MemcacheSessionStorage.php similarity index 98% rename from src/Symfony/Component/HttpFoundation/SessionStorage/MemcacheSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/MemcacheSessionStorage.php index 6836247ad3..f5d5910d86 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/MemcacheSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MemcacheSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * MemcacheSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/MemcachedSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MemcachedSessionStorage.php similarity index 98% rename from src/Symfony/Component/HttpFoundation/SessionStorage/MemcachedSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/MemcachedSessionStorage.php index 7a9c6ecb9a..f7041811a3 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/MemcachedSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MemcachedSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * MemcachedSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/MockArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php similarity index 97% rename from src/Symfony/Component/HttpFoundation/SessionStorage/MockArraySessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php index 96206f5847..2fd1a94c26 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/MockArraySessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * MockArraySessionStorage mocks the session for unit tests. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/MockFileSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php similarity index 97% rename from src/Symfony/Component/HttpFoundation/SessionStorage/MockFileSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php index 366002fee7..094c4d6005 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/MockFileSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * MockFileSessionStorage is used to mock sessions for diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeFileSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeFileSessionStorage.php similarity index 95% rename from src/Symfony/Component/HttpFoundation/SessionStorage/NativeFileSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/NativeFileSessionStorage.php index 25c36ad7fc..09350e8d21 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeFileSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeFileSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * NativeFileSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeMemcacheSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeMemcacheSessionStorage.php similarity index 97% rename from src/Symfony/Component/HttpFoundation/SessionStorage/NativeMemcacheSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/NativeMemcacheSessionStorage.php index 338f4c2011..5572c47812 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeMemcacheSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeMemcacheSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * NativeMemcacheSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeMemcachedSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeMemcachedSessionStorage.php similarity index 97% rename from src/Symfony/Component/HttpFoundation/SessionStorage/NativeMemcachedSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/NativeMemcachedSessionStorage.php index 446e5c197a..50d8d060fd 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeMemcachedSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeMemcachedSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * NativeMemcachedSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeSqliteSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSqliteSessionStorage.php similarity index 95% rename from src/Symfony/Component/HttpFoundation/SessionStorage/NativeSqliteSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/NativeSqliteSessionStorage.php index 3acf2e7056..1dac36ac2f 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/NativeSqliteSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSqliteSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * NativeSqliteSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/NullSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NullSessionStorage.php similarity index 95% rename from src/Symfony/Component/HttpFoundation/SessionStorage/NullSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/NullSessionStorage.php index 4539cb72ad..b81fa8ae3a 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/NullSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NullSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * NullSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/PdoSessionStorage.php similarity index 99% rename from src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/PdoSessionStorage.php index 3b36a1fcef..2015396b2f 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/PdoSessionStorage.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * PdoSessionStorage. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/SessionSaveHandlerInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionSaveHandlerInterface.php similarity index 98% rename from src/Symfony/Component/HttpFoundation/SessionStorage/SessionSaveHandlerInterface.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/SessionSaveHandlerInterface.php index 6c6929fb37..ec4530a150 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/SessionSaveHandlerInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionSaveHandlerInterface.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; /** * Session Savehandler Interface. diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php similarity index 93% rename from src/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php rename to src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php index bb76d15f74..a5afda9672 100644 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/SessionStorageInterface.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\HttpFoundation\SessionStorage; +namespace Symfony\Component\HttpFoundation\Session\Storage; -use Symfony\Component\HttpFoundation\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; /** - * SessionStorageInterface. + * StorageInterface. * * @author Fabien Potencier * @author Drak diff --git a/src/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php b/src/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php deleted file mode 100644 index affea24142..0000000000 --- a/src/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\SessionStorage; - -/** - * ArraySessionStorage mocks the session for unit tests. - * - * BC Class for MockArraySessionStorage - * - * @deprecated since 2.1.0 - * @see MockArraySessionStorage - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle. - * - * When doing functional testing, you should use FileMockSessionStorage instead. - * - * @author Fabien Potencier - * @author Bulat Shakirzyanov - */ -class ArraySessionStorage extends MockArraySessionStorage -{ -} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php b/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php index 958a328295..3358ffcb21 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php @@ -21,7 +21,7 @@ class SessionCsrfProviderTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->session = $this->getMock( - 'Symfony\Component\HttpFoundation\Session', + 'Symfony\Component\HttpFoundation\Session\Session', array(), array(), '', diff --git a/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php b/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php index 0023817aef..c147070fdf 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php @@ -12,8 +12,8 @@ namespace Symfony\Tests\Component\HttpFoundation; -use Symfony\Component\HttpFoundation\SessionStorage\MockArraySessionStorage; -use Symfony\Component\HttpFoundation\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Request; class RequestTest extends \PHPUnit_Framework_TestCase diff --git a/tests/Symfony/Tests/Component/HttpFoundation/SessionAttribute/AttributeBagTest.php b/tests/Symfony/Tests/Component/HttpFoundation/Session/Attribute/AttributeBagTest.php similarity index 96% rename from tests/Symfony/Tests/Component/HttpFoundation/SessionAttribute/AttributeBagTest.php rename to tests/Symfony/Tests/Component/HttpFoundation/Session/Attribute/AttributeBagTest.php index 4d35f35602..a5c921254c 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/SessionAttribute/AttributeBagTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/Session/Attribute/AttributeBagTest.php @@ -1,7 +1,7 @@ cookies->set('foo', 'value'); - $session = $this->getMock('Symfony\Component\HttpFoundation\Session', array('get'), array(), '', false); + $session = $this->getMock('Symfony\Component\HttpFoundation\Session\Session', array('get'), array(), '', false); $session->expects($this->once())->method('get')->will($this->returnValue('es')); $request->setSession($session); @@ -55,7 +55,7 @@ class LocaleListenerTest extends \PHPUnit_Framework_TestCase $event = $this->getEvent($request); // also updates the session _locale value - $session = $this->getMock('Symfony\Component\HttpFoundation\Session', array('set', 'get'), array(), '', false); + $session = $this->getMock('Symfony\Component\HttpFoundation\Session\Session', array('set', 'get'), array(), '', false); $session->expects($this->once())->method('set')->with('_locale', 'es'); $session->expects($this->once())->method('get')->with('_locale')->will($this->returnValue('es')); $request->setSession($session); diff --git a/tests/Symfony/Tests/Component/Security/Http/Firewall/ContextListenerTest.php b/tests/Symfony/Tests/Component/Security/Http/Firewall/ContextListenerTest.php index e839e8fd16..5c810062ef 100644 --- a/tests/Symfony/Tests/Component/Security/Http/Firewall/ContextListenerTest.php +++ b/tests/Symfony/Tests/Component/Security/Http/Firewall/ContextListenerTest.php @@ -4,8 +4,8 @@ namespace Symfony\Test\Component\Security\Http\Firewall; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\SessionStorage\MockArraySessionStorage; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; diff --git a/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php b/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php index 05df6cf8f5..9f38e4c9c1 100644 --- a/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php +++ b/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php @@ -22,7 +22,7 @@ class SessionLogoutHandlerTest extends \PHPUnit_Framework_TestCase $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); $response = new Response(); - $session = $this->getMock('Symfony\Component\HttpFoundation\Session', array(), array(), '', false); + $session = $this->getMock('Symfony\Component\HttpFoundation\Session\Session', array(), array(), '', false); $request ->expects($this->once())