Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[FrameworkBundle] added some service aliases to avoid some BC breaks

  • Loading branch information...
commit 146a502a0e3527f6ffbda14ce06477b9b2a01232 1 parent 93d81a1
@fabpot fabpot authored
View
1  CHANGELOG-2.1.md
@@ -40,7 +40,6 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
* changed the default profiler storage to use the filesystem instead of SQLite
* added support for placeholders in route defaults and requirements (replaced by the value set in the service container)
* added Filesystem component as a dependency
- * [BC BREAK] changed `session.xml` service name `session.storage.native` to `session.storage.native_file`
* added new session storage drivers to session.xml: `session.storage.native_memcache`, `session.storage.native_memcached`,
`session.storage.native_sqlite`, `session.storage.null`, `session.storage.memcache`,
and `session.storage.memcached`. Added `session.storage.mock_file` service for functional session testing.
View
4 src/Symfony/Bundle/FrameworkBundle/Resources/config/session.xml
@@ -38,5 +38,9 @@
<tag name="kernel.event_subscriber" />
<argument type="service" id="service_container" />
</service>
+
+ <!-- for BC -->
+ <service id="session.storage.native" alias="session.storage.native_file" />
+ <service id="session.storage.filesystem" alias="session.storage.mock_file" />
</services>
</container>
View
8 src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php
@@ -46,9 +46,9 @@ public function get($name, $default = null)
return $this->session->get($name, $default);
}
- public function getFlash($type, $default = null)
+ public function getFlash($name, $default = null)
{
- return $this->session->getFlashes()->get($type);
+ return $this->session->getFlashes()->get($name);
}
public function getFlashes()
@@ -56,9 +56,9 @@ public function getFlashes()
return $this->session->getFlashes()->all();
}
- public function hasFlash($type)
+ public function hasFlash($name)
{
- return $this->session->getFlashes()->has($type);
+ return $this->session->getFlashes()->has($name);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.