Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[HttpFoundation] Moved session related classes to own sub-namespace.

  • Loading branch information...
commit 27530cbb1e0121e1dd250971fd7aea8b2f2672f9 1 parent 4683915
Drak authored
Showing with 136 additions and 166 deletions.
  1. +2 −0  CHANGELOG-2.1.md
  2. +5 −5 UPGRADE-2.1.md
  3. +2 −2 src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php
  4. +1 −1  src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
  5. +11 −11 src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml
  6. +1 −1  src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php
  7. +1 −1  src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php
  8. +1 −1  src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php
  9. +4 −4 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php
  10. +2 −2 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php
  11. +2 −2 src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php
  12. +1 −1  src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
  13. +1 −1  src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php
  14. +1 −1  src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php
  15. +2 −2 src/Symfony/Component/HttpFoundation/Request.php
  16. +1 −1  src/Symfony/Component/HttpFoundation/{SessionAttribute → Session/Attribute}/AttributeBag.php
  17. +2 −2 src/Symfony/Component/HttpFoundation/{SessionAttribute → Session/Attribute}/AttributeBagInterface.php
  18. +1 −1  src/Symfony/Component/HttpFoundation/{SessionAttribute → Session/Attribute}/NamespacedAttributeBag.php
  19. +1 −1  src/Symfony/Component/HttpFoundation/{SessionFlash → Session/Flash}/AutoExpireFlashBag.php
  20. +1 −1  src/Symfony/Component/HttpFoundation/{SessionFlash → Session/Flash}/FlashBag.php
  21. +2 −2 src/Symfony/Component/HttpFoundation/{SessionFlash → Session/Flash}/FlashBagInterface.php
  22. +8 −8 src/Symfony/Component/HttpFoundation/{ → Session}/Session.php
  23. +1 −1  src/Symfony/Component/HttpFoundation/{ → Session}/SessionBagInterface.php
  24. +3 −3 src/Symfony/Component/HttpFoundation/{ → Session}/SessionInterface.php
  25. +6 −6 src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/AbstractSessionStorage.php
  26. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/MemcacheSessionStorage.php
  27. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/MemcachedSessionStorage.php
  28. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/MockArraySessionStorage.php
  29. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/MockFileSessionStorage.php
  30. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeFileSessionStorage.php
  31. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeMemcacheSessionStorage.php
  32. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeMemcachedSessionStorage.php
  33. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeSqliteSessionStorage.php
  34. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/NullSessionStorage.php
  35. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/PdoSessionStorage.php
  36. +1 −1  src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/SessionSaveHandlerInterface.php
  37. +3 −3 src/Symfony/Component/HttpFoundation/{SessionStorage → Session/Storage}/SessionStorageInterface.php
  38. +0 −32 src/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php
  39. +1 −1  tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php
  40. +2 −2 tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php
  41. +2 −2 tests/Symfony/Tests/Component/HttpFoundation/{SessionAttribute → Session/Attribute}/AttributeBagTest.php
  42. +1 −1  ...y/Tests/Component/HttpFoundation/{SessionAttribute → Session/Attribute}/NamespacedAttributeBagTest.php
  43. +4 −4 tests/Symfony/Tests/Component/HttpFoundation/{SessionFlash → Session/Flash}/AutoExpireFlashBagTest.php
  44. +3 −3 tests/Symfony/Tests/Component/HttpFoundation/{SessionFlash → Session/Flash}/FlashBagTest.php
  45. +9 −9 tests/Symfony/Tests/Component/HttpFoundation/{ → Session}/SessionTest.php
  46. +5 −5 ...mfony/Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/AbstractSessionStorageTest.php
  47. +4 −4 ...fony/Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/MockArraySessionStorageTest.php
  48. +4 −4 ...mfony/Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/MockFileSessionStorageTest.php
  49. +4 −4 ...ony/Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeFileSessionStorageTest.php
  50. +4 −4 ...Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeMemcacheSessionStorageTest.php
  51. +4 −4 ...ests/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeMemcachedSessionStorageTest.php
  52. +4 −4 ...y/Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/NativeSqliteSessionStorageTest.php
  53. +3 −3 ...s/Symfony/Tests/Component/HttpFoundation/{SessionStorage → Session/Storage}/NullSessionStorageTest.php
  54. +2 −2 tests/Symfony/Tests/Component/HttpKernel/EventListener/LocaleListenerTest.php
  55. +2 −2 tests/Symfony/Tests/Component/Security/Http/Firewall/ContextListenerTest.php
  56. +1 −1  tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php
2  CHANGELOG-2.1.md
View
@@ -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`.
10 UPGRADE-2.1.md
View
@@ -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 `<?php use Symfony\Component\HttpFoundation\SessionFlash\FlashBag; ?>`
+ `Symfony\Component\HttpFoundation\Session\Flash\FlashBag::NOTICE`, which can also be abbreviated to
+ `FlashBag::NOTICE` providing you declare `<?php use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; ?>`
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]
4 src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php
View
@@ -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;
/**
2  src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
View
@@ -301,7 +301,7 @@ private function registerSessionConfiguration(array $config, ContainerBuilder $c
$this->addClassesToCompile(array(
'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener',
- 'Symfony\\Component\\HttpFoundation\\SessionStorage\\SessionStorageInterface',
+ 'Symfony\\Component\\HttpFoundation\\Session\Storage\\SessionStorageInterface',
$container->getDefinition('session')->getClass(),
));
22 src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml
View
@@ -5,17 +5,17 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
- <parameter key="session.class">Symfony\Component\HttpFoundation\Session</parameter>
- <parameter key="session.flashbag.class">Symfony\Component\HttpFoundation\SessionFlash\FlashBag</parameter>
- <parameter key="session.attribute_bag.class">Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag</parameter>
- <parameter key="session.storage.native_file.class">Symfony\Component\HttpFoundation\SessionStorage\NativeFileSessionStorage</parameter>
- <parameter key="session.storage.null.class">Symfony\Component\HttpFoundation\SessionStorage\NullSessionStorage</parameter>
- <parameter key="session.storage.native_memcache.class">Symfony\Component\HttpFoundation\SessionStorage\NativeMemcacheSessionStorage</parameter>
- <parameter key="session.storage.native_memcached.class">Symfony\Component\HttpFoundation\SessionStorage\NativeMemcachedSessionStorage</parameter>
- <parameter key="session.storage.native_sqlite.class">Symfony\Component\HttpFoundation\SessionStorage\NativeSqliteSessionStorage</parameter>
- <parameter key="session.storage.memcache.class">Symfony\Component\HttpFoundation\SessionStorage\MemcacheSessionStorage</parameter>
- <parameter key="session.storage.memcached.class">Symfony\Component\HttpFoundation\SessionStorage\MemcachedSessionStorage</parameter>
- <parameter key="session.storage.mock_file.class">Symfony\Component\HttpFoundation\SessionStorage\MockFileSessionStorage</parameter>
+ <parameter key="session.class">Symfony\Component\HttpFoundation\Session\Session</parameter>
+ <parameter key="session.flashbag.class">Symfony\Component\HttpFoundation\Session\Flash\FlashBag</parameter>
+ <parameter key="session.attribute_bag.class">Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag</parameter>
+ <parameter key="session.storage.native_file.class">Symfony\Component\HttpFoundation\Session\Storage\NativeFileSessionStorage</parameter>
+ <parameter key="session.storage.null.class">Symfony\Component\HttpFoundation\Session\Storage\NullSessionStorage</parameter>
+ <parameter key="session.storage.native_memcache.class">Symfony\Component\HttpFoundation\Session\Storage\NativeMemcacheSessionStorage</parameter>
+ <parameter key="session.storage.native_memcached.class">Symfony\Component\HttpFoundation\Session\Storage\NativeMemcachedSessionStorage</parameter>
+ <parameter key="session.storage.native_sqlite.class">Symfony\Component\HttpFoundation\Session\Storage\NativeSqliteSessionStorage</parameter>
+ <parameter key="session.storage.memcache.class">Symfony\Component\HttpFoundation\Session\Storage\MemcacheSessionStorage</parameter>
+ <parameter key="session.storage.memcached.class">Symfony\Component\HttpFoundation\Session\Storage\MemcachedSessionStorage</parameter>
+ <parameter key="session.storage.mock_file.class">Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage</parameter>
<parameter key="session.memcache.class">Memcache</parameter>
<parameter key="session.memcached.class">Memcached</parameter>
2  src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php
View
@@ -79,7 +79,7 @@ public function getRequest()
/**
* Returns the current session.
*
- * @return Symfony\Component\HttpFoundation\Session|void The session
+ * @return Symfony\Component\HttpFoundation\Session\Session|void The session
*/
public function getSession()
{
2  src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php
View
@@ -13,7 +13,7 @@
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.
2  src/Symfony/Bundle/FrameworkBundle/Tests/EventListener/TestSessionListenerTest.php
View
@@ -94,7 +94,7 @@ private function sessionMustBeSaved()
private function getSession()
{
- return $this->getMockBuilder('Symfony\Component\HttpFoundation\Session')
+ return $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Session')
->disableOriginalConstructor()
->getMock();
}
8 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/SessionHelperTest.php
View
@@ -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
{
4 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/PhpEngineTest.php
View
@@ -14,8 +14,8 @@
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;
4 src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php
View
@@ -14,8 +14,8 @@
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;
2  src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php
View
@@ -15,7 +15,7 @@
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.
2  src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php
View
@@ -177,7 +177,7 @@ public function testToolbarIsNotInjectedOnNonHtmlRequests()
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'),
2  src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php
View
@@ -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
4 src/Symfony/Component/HttpFoundation/Request.php
View
@@ -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;
2  .../HttpFoundation/SessionAttribute/AttributeBag.php → ...HttpFoundation/Session/Attribute/AttributeBag.php
View
@@ -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
4 ...dation/SessionAttribute/AttributeBagInterface.php → ...ation/Session/Attribute/AttributeBagInterface.php
View
@@ -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.
2  ...ation/SessionAttribute/NamespacedAttributeBag.php → ...tion/Session/Attribute/NamespacedAttributeBag.php
View
@@ -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
2  ...ttpFoundation/SessionFlash/AutoExpireFlashBag.php → ...tpFoundation/Session/Flash/AutoExpireFlashBag.php
View
@@ -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.
2  ...omponent/HttpFoundation/SessionFlash/FlashBag.php → ...mponent/HttpFoundation/Session/Flash/FlashBag.php
View
@@ -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.
4 ...HttpFoundation/SessionFlash/FlashBagInterface.php → ...ttpFoundation/Session/Flash/FlashBagInterface.php
View
@@ -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.
16 src/Symfony/Component/HttpFoundation/Session.php → ...fony/Component/HttpFoundation/Session/Session.php
View
@@ -9,14 +9,14 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation;
-
-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;
+namespace Symfony\Component\HttpFoundation\Session;
+
+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.
2  .../Component/HttpFoundation/SessionBagInterface.php → ...nt/HttpFoundation/Session/SessionBagInterface.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation;
+namespace Symfony\Component\HttpFoundation\Session;
/**
* Session Bag store.
6 ...ony/Component/HttpFoundation/SessionInterface.php → ...onent/HttpFoundation/Session/SessionInterface.php
View
@@ -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.
12 ...ndation/SessionStorage/AbstractSessionStorage.php → ...dation/Session/Storage/AbstractSessionStorage.php
View
@@ -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.
2  ...ndation/SessionStorage/MemcacheSessionStorage.php → ...dation/Session/Storage/MemcacheSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* MemcacheSessionStorage.
2  ...dation/SessionStorage/MemcachedSessionStorage.php → ...ation/Session/Storage/MemcachedSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* MemcachedSessionStorage.
2  ...dation/SessionStorage/MockArraySessionStorage.php → ...ation/Session/Storage/MockArraySessionStorage.php
View
@@ -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.
2  ...ndation/SessionStorage/MockFileSessionStorage.php → ...dation/Session/Storage/MockFileSessionStorage.php
View
@@ -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
2  ...ation/SessionStorage/NativeFileSessionStorage.php → ...tion/Session/Storage/NativeFileSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* NativeFileSessionStorage.
2  ...n/SessionStorage/NativeMemcacheSessionStorage.php → .../Session/Storage/NativeMemcacheSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* NativeMemcacheSessionStorage.
2  .../SessionStorage/NativeMemcachedSessionStorage.php → ...Session/Storage/NativeMemcachedSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* NativeMemcachedSessionStorage.
2  ...ion/SessionStorage/NativeSqliteSessionStorage.php → ...on/Session/Storage/NativeSqliteSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* NativeSqliteSessionStorage.
2  ...pFoundation/SessionStorage/NullSessionStorage.php → ...Foundation/Session/Storage/NullSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* NullSessionStorage.
2  ...tpFoundation/SessionStorage/PdoSessionStorage.php → ...pFoundation/Session/Storage/PdoSessionStorage.php
View
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Component\HttpFoundation\Session\Storage;
/**
* PdoSessionStorage.
2  ...on/SessionStorage/SessionSaveHandlerInterface.php → ...n/Session/Storage/SessionSaveHandlerInterface.php
View
@@ -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.
6 ...dation/SessionStorage/SessionStorageInterface.php → ...ation/Session/Storage/SessionStorageInterface.php
View
@@ -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 <fabien@symfony.com>
* @author Drak <drak@zikula.org>
32 src/Symfony/Component/HttpFoundation/SessionStorage/ArraySessionStorage.php
View
@@ -1,32 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * 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 <fabien@symfony.com>
- * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
- */
-class ArraySessionStorage extends MockArraySessionStorage
-{
-}
2  tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php
View
@@ -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(),
'',
4 tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php
View
@@ -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
4 ...pFoundation/SessionAttribute/AttributeBagTest.php → ...Foundation/Session/Attribute/AttributeBagTest.php
View
@@ -1,7 +1,7 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Attribute;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
/**
2  ...n/SessionAttribute/NamespacedAttributeBagTest.php → .../Session/Attribute/NamespacedAttributeBagTest.php
View
@@ -2,7 +2,7 @@
namespace Symfony\Tests\Component\HttpFoundation;
-use Symfony\Component\HttpFoundation\SessionAttribute\NamespacedAttributeBag;
+use Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag;
/**
* Tests NamespacedAttributeBag
8 ...oundation/SessionFlash/AutoExpireFlashBagTest.php → ...undation/Session/Flash/AutoExpireFlashBagTest.php
View
@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Tests\Component\HttpFoundation;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Flash;
-use Symfony\Component\HttpFoundation\SessionFlash\AutoExpireFlashBag as FlashBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface;
+use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag as FlashBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
/**
* AutoExpireFlashBagTest
@@ -22,7 +22,7 @@
class AutoExpireFlashBagTest extends \PHPUnit_Framework_TestCase
{
/**
- * @var \Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface
+ * @var \Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface
*/
private $bag;
6 ...nent/HttpFoundation/SessionFlash/FlashBagTest.php → ...ent/HttpFoundation/Session/Flash/FlashBagTest.php
View
@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Tests\Component\HttpFoundation;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Flash;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBagInterface;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
/**
* FlashBagTest
18 ...ny/Tests/Component/HttpFoundation/SessionTest.php → .../Component/HttpFoundation/Session/SessionTest.php
View
@@ -9,14 +9,14 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Tests\Component\HttpFoundation;
+namespace Symfony\Tests\Component\HttpFoundation\Session;
-use Symfony\Component\HttpFoundation\Session;
-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\SessionStorage\MockArraySessionStorage;
+use Symfony\Component\HttpFoundation\Session\Session;
+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\Storage\MockArraySessionStorage;
/**
* SessionTest
@@ -28,12 +28,12 @@
class SessionTest extends \PHPUnit_Framework_TestCase
{
/**
- * @var \Symfony\Component\HttpFoundation\SessionStorage\SessionStorageInterface
+ * @var \Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface
*/
protected $storage;
/**
- * @var \Symfony\Component\HttpFoundation\SessionInterface
+ * @var \Symfony\Component\HttpFoundation\Session\SessionInterface
*/
protected $session;
10 ...ion/SessionStorage/AbstractSessionStorageTest.php → ...on/Session/Storage/AbstractSessionStorageTest.php
View
@@ -1,11 +1,11 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\AbstractSessionStorage;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
-use Symfony\Component\HttpFoundation\SessionStorage\SessionSaveHandlerInterface;
+use Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Storage\SessionSaveHandlerInterface;
/**
* Turn AbstractSessionStorage into something concrete because
8 ...on/SessionStorage/MockArraySessionStorageTest.php → ...n/Session/Storage/MockArraySessionStorageTest.php
View
@@ -1,10 +1,10 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\MockArraySessionStorage;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
/**
8 ...ion/SessionStorage/MockFileSessionStorageTest.php → ...on/Session/Storage/MockFileSessionStorageTest.php
View
@@ -1,10 +1,10 @@
<?php
-namespace Symfony\Test\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Test\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\MockFileSessionStorage;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
/**
* Test class for MockFileSessionStorage.
8 ...n/SessionStorage/NativeFileSessionStorageTest.php → .../Session/Storage/NativeFileSessionStorageTest.php
View
@@ -1,10 +1,10 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\NativeFileSessionStorage;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Storage\NativeFileSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
/**
* Test class for NativeFileSessionStorage.
8 ...ssionStorage/NativeMemcacheSessionStorageTest.php → ...sion/Storage/NativeMemcacheSessionStorageTest.php
View
@@ -1,10 +1,10 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\NativeMemcacheSessionStorage;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Storage\NativeMemcacheSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
/**
* Test class for NativeMemcacheSessionStorage.
8 ...sionStorage/NativeMemcachedSessionStorageTest.php → ...ion/Storage/NativeMemcachedSessionStorageTest.php
View
@@ -1,10 +1,10 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\NativeMemcachedSessionStorage;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Storage\NativeMemcachedSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
/**
* Test class for NativeMemcachedSessionStorage.
8 ...SessionStorage/NativeSqliteSessionStorageTest.php → ...ession/Storage/NativeSqliteSessionStorageTest.php
View
@@ -1,10 +1,10 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
-use Symfony\Component\HttpFoundation\SessionStorage\NativeSqliteSessionStorage;
-use Symfony\Component\HttpFoundation\SessionAttribute\AttributeBag;
-use Symfony\Component\HttpFoundation\SessionFlash\FlashBag;
+use Symfony\Component\HttpFoundation\Session\Storage\NativeSqliteSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
+use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
/**
* Test class for NativeSqliteSessionStorage.
6 ...ndation/SessionStorage/NullSessionStorageTest.php → ...dation/Session/Storage/NullSessionStorageTest.php
View
@@ -1,8 +1,8 @@
<?php
-namespace Symfony\Tests\Component\HttpFoundation\SessionStorage;
-use Symfony\Component\HttpFoundation\SessionStorage\NullSessionStorage;
-use Symfony\Component\HttpFoundation\Session;
+namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
+use Symfony\Component\HttpFoundation\Session\Storage\NullSessionStorage;
+use Symfony\Component\HttpFoundation\Session\Session;
/**
* Test class for NullSessionStorage.
4 tests/Symfony/Tests/Component/HttpKernel/EventListener/LocaleListenerTest.php
View
@@ -33,7 +33,7 @@ public function testDefaultLocaleWithSession()
session_name('foo');
$request->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 @@ public function testLocaleFromRequestAttribute()
$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);
4 tests/Symfony/Tests/Component/Security/Http/Firewall/ContextListenerTest.php
View
@@ -4,8 +4,8 @@
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;
2  tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php
View
@@ -22,7 +22,7 @@ public function testLogout()
$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())
Please sign in to comment.
Something went wrong with that request. Please try again.