UploadedFile::isValid
now returns false if the file was not uploaded via HTTP (in a non-test mode)\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases
to verify that Exceptions are properly thrown when the PDO queries fail.Symfony\Component\HttpFoundation\Session
and renamed classes accordingly.
Session handlers are located in the subnamespace Symfony\Component\HttpFoundation\Session\Handler
.\SessionHandlerInterface
or extend from the
Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler
base class.\SessionHandler
class.NativeSessionStorage
and replaced with NativeFileSessionHandler
.SessionStorageInterface
methods removed: write()
, read()
and
remove()
. Added getBag()
, registerBag()
. The NativeSessionStorage
class
is a mediator for the session storage internals including the session handlers
which do the real work of participating in the internal PHP session workflow.SessionStorage
to enable unit
and functional testing without starting real PHP sessions. Removed
ArraySessionStorage
, and replaced with MockArraySessionStorage
for unit
tests; removed FilesystemSessionStorage
, and replaced withMockFileSessionStorage
for functional tests. These do not interact with global session ini
configuration values, session functions or $_SESSION
superglobal. This means
they can be configured directly allowing multiple instances to work without
conflicting in the same PHP process.close()
method from the Session
class, as this is
now redundant.setFlash()
, setFlashes()
getFlash()
, hasFlash()
, and removeFlash()
. Use getFlashBag()
instead
which returns a FlashBagInterface
.Session->clear()
now only clears session attributes as before it cleared
flash messages and attributes. Session->getFlashBag()->all()
clears flashes now.SessionBagInterface
to better encapsulate
session data.SessionBagInterface
implementations.FlashBag
. Flashes expire when retrieved by get()
or all()
. This
implementation is ESI compatible.AutoExpireFlashBag
(default) to replicate Symfony 2.0.x auto expire
behaviour of messages auto expiring after one page page load. Messages must
be retrieved by get()
or all()
.Symfony\Component\HttpFoundation\Attribute\AttributeBag
to replicate
attributes storage behaviour from 2.0.x (default).Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag
for
namespace session attributes.Session
class API remains without BC break as it
will allow single messages as before.getPathInfo()
, getBaseUrl()
and getBasePath()
of
a Request
now all return a raw value (vs a urldecoded value before). Any call
to one of these methods must be checked and wrapped in a rawurldecode()
if
needed.