From f23b4fa3f20f30610b4e75f294b3028df323cff7 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Wed, 11 Apr 2012 15:01:47 +0100 Subject: [PATCH] Added some bc breaks from the changelog into UPGRADE-2.1.md --- UPGRADE-2.1.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/UPGRADE-2.1.md b/UPGRADE-2.1.md index a73fdd9bee..b5eb679ec5 100644 --- a/UPGRADE-2.1.md +++ b/UPGRADE-2.1.md @@ -34,6 +34,11 @@ default_locale: fr ``` + * The methods `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. + ##### Retrieving the locale from a Twig template Before: `{{ app.request.session.locale }}` or `{{ app.session.locale }}` @@ -87,6 +92,45 @@ // ... } ``` + * The custom factories for the firewall configuration are now + registered during the build method of bundles instead of being registered + by the end-user. This means that you will you need to remove the 'factories' + keys in your security configuration. + + * The Firewall listener is now registered after the Router listener. This + means that specific Firewall URLs (like /login_check and /logout) must now + have proper routes defined in your routing configuration. + + * The user provider configuration has been refactored. The configuration + for the chain provider and the memory provider has been changed: + + Before: + + ``` yaml + security: + providers: + my_chain_provider: + providers: [my_memory_provider, my_doctrine_provider] + my_memory_provider: + users: + toto: { password: foobar, roles: [ROLE_USER] } + foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } + ``` + + After: + + ``` yaml + security: + providers: + my_chain_provider: + chain: + providers: [my_memory_provider, my_doctrine_provider] + my_memory_provider: + memory: + users: + toto: { password: foobar, roles: [ROLE_USER] } + foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } + ``` ### Form and Validator @@ -356,6 +400,37 @@ * Refactor code using `$session->*flash*()` methods to use `$session->getFlashBag()->*()`. +### Serializer + + * The key names craeted by the `GetSetMethodNormalizer` have changed from + from all lowercased to camelCased (e.g. `mypropertyvalue` to `myPropertyValue`). + + * The `item` element is now converted to an array when deserializing XML. + + ``` xml + + + <![CDATA[title1]]><![CDATA[title2]]> + + ``` + + Before: + + Array() + + After: + + Array( + [item] => Array( + [0] => Array( + [title] => title1 + ) + [1] => Array( + [title] => title2 + ) + ) + ) + ### FrameworkBundle * session options: lifetime, path, domain, secure, httponly were deprecated. @@ -401,4 +476,8 @@ To use mock session storage use the following. `handler_id` is irrelevant in th session: storage_id: session.storage.mock_file ``` +### WebProfilerBundle + + * You must clear old profiles after upgrading to 2.1. If you are using a + database then you will need to remove the table.