2011-08-26 16:45:40 +01:00
|
|
|
CHANGELOG for 2.1.x
|
|
|
|
===================
|
|
|
|
|
|
|
|
This changelog references the relevant changes (bug and security fixes) done
|
|
|
|
in 2.1 minor versions.
|
|
|
|
|
|
|
|
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
|
|
|
|
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.1.0...v2.1.1
|
|
|
|
|
2011-08-29 14:31:57 +01:00
|
|
|
2.1.0
|
|
|
|
-----
|
2011-08-26 16:45:40 +01:00
|
|
|
|
2011-12-29 16:29:56 +00:00
|
|
|
### DoctrineBridge
|
2011-10-07 13:12:01 +01:00
|
|
|
|
2011-10-15 02:39:16 +01:00
|
|
|
* added a default implementation of the ManagerRegistry
|
|
|
|
* added a session storage for Doctrine DBAL
|
2011-10-07 13:12:01 +01:00
|
|
|
|
2012-01-02 16:47:49 +00:00
|
|
|
### TwigBridge
|
|
|
|
|
2012-01-22 09:45:06 +00:00
|
|
|
* added a csrf_token function
|
2012-01-02 16:47:49 +00:00
|
|
|
* added a way to specify a default domain for a Twig template (via the 'trans_default_domain' tag)
|
|
|
|
|
2011-11-08 18:00:05 +00:00
|
|
|
### AbstractDoctrineBundle
|
2011-11-01 14:25:47 +00:00
|
|
|
|
|
|
|
* This bundle has been removed and the relevant code has been moved to the Doctrine bridge
|
|
|
|
|
2011-09-22 07:04:24 +01:00
|
|
|
### DoctrineBundle
|
|
|
|
|
2012-01-03 10:18:20 +00:00
|
|
|
* This bundle has been moved to the Doctrine organization
|
2012-03-06 19:41:09 +00:00
|
|
|
* added optional `group_by` property to `EntityType` that supports either a
|
|
|
|
`PropertyPath` or a `\Closure` that is evaluated on the entity choices
|
|
|
|
* The `em` option for the `UniqueEntity` constraint is now optional (and should
|
|
|
|
probably not be used anymore).
|
2011-09-22 07:04:24 +01:00
|
|
|
|
2011-09-14 08:06:29 +01:00
|
|
|
### FrameworkBundle
|
|
|
|
|
2012-04-02 16:48:37 +01:00
|
|
|
* moved Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
|
|
|
|
* moved Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher to Symfony\Component\EventDispatcher\ContainerAwareTraceableEventDispatcher
|
2011-10-24 08:11:18 +01:00
|
|
|
* added a router:match command
|
2012-02-12 15:19:38 +00:00
|
|
|
* added a config:dump-reference command
|
2011-09-30 05:58:54 +01:00
|
|
|
* added kernel.event_subscriber tag
|
2011-09-28 16:40:20 +01:00
|
|
|
* added a way to create relative symlinks when running assets:install command (--relative option)
|
2011-09-28 08:17:08 +01:00
|
|
|
* added Controller::getUser()
|
2011-09-19 17:03:40 +01:00
|
|
|
* [BC BREAK] assets_base_urls and base_urls merging strategy has changed
|
2011-09-16 17:49:11 +01:00
|
|
|
* changed the default profiler storage to use the filesystem instead of SQLite
|
2012-03-06 19:41:09 +00:00
|
|
|
* added support for placeholders in route defaults and requirements (replaced
|
|
|
|
by the value set in the service container)
|
2011-12-22 19:04:58 +00:00
|
|
|
* added Filesystem component as a dependency
|
2012-02-11 21:20:40 +00:00
|
|
|
* added support for hinclude (use ``standalone: 'js'`` in render tag)
|
2012-02-29 08:44:47 +00:00
|
|
|
* session options: lifetime, path, domain, secure, httponly were deprecated.
|
2012-03-06 19:41:09 +00:00
|
|
|
Prefixed versions should now be used instead: cookie_lifetime, cookie_path,
|
|
|
|
cookie_domain, cookie_secure, cookie_httponly
|
|
|
|
* [BC BREAK] following session options: 'lifetime', 'path', 'domain', 'secure',
|
|
|
|
'httponly' are now prefixed with cookie_ when dumped to the container
|
|
|
|
* Added `handler_id` configuration under `session` key to represent `session.handler`
|
|
|
|
service, defaults to `session.handler.native_file`.
|
2012-03-21 07:08:00 +00:00
|
|
|
* Added `gc_maxlifetime`, `gc_probability`, and `gc_divisor` to session
|
|
|
|
configuration.This means session garbage collection has a
|
|
|
|
`gc_probability`/`gc_divisor` chance of being run. The `gc_maxlifetime` means
|
2012-03-21 03:22:23 +00:00
|
|
|
how long a session can idle for which is separate from cookie lifetime which
|
|
|
|
defines how long a cookie can be store on the remote client.
|
|
|
|
|
2011-09-14 08:06:29 +01:00
|
|
|
|
2012-02-09 09:22:21 +00:00
|
|
|
### MonologBundle
|
|
|
|
|
|
|
|
* This bundle has been moved to its own repository (https://github.com/symfony/MonologBundle)
|
|
|
|
|
2011-09-22 08:44:58 +01:00
|
|
|
### SecurityBundle
|
|
|
|
|
2011-11-22 08:26:42 +00:00
|
|
|
* [BC BREAK] The custom factories for the firewall configuration are now
|
|
|
|
registered during the build method of bundles instead of being registered
|
|
|
|
by the end-user (you need to remove the 'factories' keys in your security
|
|
|
|
configuration).
|
2011-11-17 19:16:17 +00:00
|
|
|
|
2011-11-22 08:26:42 +00:00
|
|
|
* [BC BREAK] The Firewall listener is now registered after the Router one. It
|
|
|
|
means that specific Firewall URLs (like /login_check and /logout must now
|
|
|
|
have proper route defined in your routing configuration)
|
merged branch stof/security_providers (PR #2454)
Commits
-------
d2195cc Fixed phpdoc and updated the changelog
9e41ff4 [SecurityBundle] Added a validation rule
b107a3f [SecurityBundle] Refactored the configuration
633f0e9 [DoctrineBundle] Moved the entity provider service to DoctrineBundle
74732dc [SecurityBundle] Added a way to extend the providers section of the config
Discussion
----------
[WIP][SecurityBundle] Added a way to extend the providers section of the config
Bug fix: no
Feature addition: yes
BC break: <del>no (for now)</del> yes
Tests pass: yes
This adds a way to extend the ``providers`` section of the security config so that other bundles can hook their stuff into it. An example is available in DoctrineBundle which is now responsible to handle the entity provider (<del>needs some cleanup as the service definition is still in SecurityBundle currently</del>). This will allow PropelBundle to provide a ``propel:`` provider for instance.
In order to keep BC with the existing configuration for the in-memory and the chain providers, I had to allow using a prototyped node instead of forcing using an array node with childrens. This introduces some issues:
- impossible to validate easily that a provider uses only one setup as prototyped node always have a default value (the empty array)
- the ``getFixableKey`` method is needed in the interface to support the XML format by pluralizing the name.
Here is my non-BC proposal for the configuration to clean this:
```yaml
security:
providers:
first:
memory: # BC break here by adding a level before the users
users:
joe: { password: foobar, roles: ROLE_USER }
john: { password: foobarbaz, roles: ROLE_USER }
second:
entity: # this one is BC
class: Acme\DemoBundle\Entity\User
third:
id: my_custom_provider # also BC
fourth:
chain: # BC break by adding a level before the providers
providers: [first, second, third]
```
What do you think about it ? Do we need to keep the BC in the config of the bundle or no ?
Btw note that the way to register the factories used by the firewall section should be refactored using the new way to provide extension points in the extensions (as done here) instead of relying on the end user to register factories, which would probably mean a BC break anyway.
---------------------------------------------------------------------------
by lsmith77 at 2011/10/23 09:19:23 -0700
i don't think we should keep BC. the security config is complex as is .. having BC stuff in there will just make it even harder and confusing.
---------------------------------------------------------------------------
by willdurand at 2011/10/23 09:41:25 -0700
Is the security component tagged with `@api` ?
So basically, we just have to create a factory (`ModelFactory` for instance) and to register it in the `security` extension, right ? Seems quite simple to extend and much better than the hardcoded version…
Why did you call the method to pluralize a key `getFixableKey` ?
---------------------------------------------------------------------------
by beberlei at 2011/10/23 14:48:26 -0700
Changing security config will introduce risk for users. We should avoid that
---------------------------------------------------------------------------
by stof at 2011/10/23 15:34:47 -0700
@beberlei as the config is validated, it will simply give them an exception during the loading of the config if they don't update their config.
---------------------------------------------------------------------------
by stof at 2011/10/24 01:01:42 -0700
@schmittjoh @fabpot Could you give your mind about it ?
---------------------------------------------------------------------------
by stof at 2011/10/31 17:08:12 -0700
@fabpot @schmittjoh ping
---------------------------------------------------------------------------
by stof at 2011/11/11 14:08:18 -0800
I updated the PR by implementing my proposal as the latest IRC meeting agreed that we don't need to keep the BC for this change. This allows to add the validation rule now.
---------------------------------------------------------------------------
by stof at 2011/11/16 11:16:06 -0800
@fabpot ping
---------------------------------------------------------------------------
by fabpot at 2011/11/16 22:29:05 -0800
@stof: Before merging, you must also add information about how to upgrade in the CHANGELOG-2.1.md file.
---------------------------------------------------------------------------
by stof at 2011/11/17 00:01:23 -0800
@fabpot done
2011-11-17 15:00:33 +00:00
|
|
|
|
2011-11-22 08:26:42 +00:00
|
|
|
* [BC BREAK] refactored the user provider configuration. The configuration
|
|
|
|
changed for the chain provider and the memory provider:
|
2011-11-17 07:59:41 +00:00
|
|
|
|
2012-01-17 00:44:51 +00:00
|
|
|
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] }
|
|
|
|
```
|
2011-11-17 07:59:41 +00:00
|
|
|
|
2012-01-12 18:15:35 +00:00
|
|
|
* [BC BREAK] Method `equals` was removed from `UserInterface` to its own new
|
|
|
|
`EquatableInterface`, now user class can implement this interface to override
|
|
|
|
the default implementation of users equality test.
|
|
|
|
|
2011-09-22 08:44:58 +01:00
|
|
|
* added a validator for the user password
|
2011-11-22 08:23:52 +00:00
|
|
|
* added 'erase_credentials' as a configuration key (true by default)
|
2011-11-22 13:49:42 +00:00
|
|
|
* added new events: `security.authentication.success` and `security.authentication.failure`
|
|
|
|
fired on authentication success/failure, regardless of authentication method,
|
|
|
|
events are defined in new event class: `Symfony\Component\Security\Core\AuthenticationEvents`.
|
2011-09-22 08:44:58 +01:00
|
|
|
|
2012-03-05 17:47:46 +00:00
|
|
|
* Added optional CSRF protection to LogoutListener:
|
|
|
|
|
|
|
|
``` yaml
|
|
|
|
security:
|
|
|
|
firewalls:
|
|
|
|
default:
|
|
|
|
logout:
|
|
|
|
path: /logout_path
|
|
|
|
target: /
|
|
|
|
csrf_parameter: _csrf_token # Optional (defaults to "_csrf_token")
|
|
|
|
csrf_provider: form.csrf_provider # Required to enable protection
|
|
|
|
intention: logout # Optional (defaults to "logout")
|
|
|
|
```
|
|
|
|
|
|
|
|
If the LogoutListener has CSRF protection enabled but cannot validate a token,
|
|
|
|
then a LogoutException will be thrown.
|
|
|
|
|
|
|
|
* Added `logout_url` templating helper and Twig extension, which may be used to
|
|
|
|
generate logout URL's within templates. The security firewall's config key
|
|
|
|
must be specified. If a firewall's logout listener has CSRF protection
|
|
|
|
enabled, a token will be automatically added to the generated URL.
|
|
|
|
|
2011-10-24 16:11:00 +01:00
|
|
|
### SwiftmailerBundle
|
|
|
|
|
2012-02-09 08:51:46 +00:00
|
|
|
* This bundle has been moved to its own repository (https://github.com/symfony/SwiftmailerBundle)
|
2011-10-24 16:11:00 +01:00
|
|
|
* moved the data collector to the bridge
|
|
|
|
* replaced MessageLogger class with the one from Swiftmailer 4.1.3
|
|
|
|
|
2011-11-07 19:03:35 +00:00
|
|
|
### TwigBundle
|
|
|
|
|
|
|
|
* added the real template name when an error occurs in a Twig template
|
|
|
|
|
2011-09-22 07:28:07 +01:00
|
|
|
### WebProfilerBundle
|
|
|
|
|
2011-12-13 13:18:21 +00:00
|
|
|
[BC BREAK] You must clear old profiles after upgrading to 2.1 (don't forget to
|
|
|
|
remove the table if you are using a DB)
|
|
|
|
|
|
|
|
* added support for the request method
|
2011-10-24 08:11:18 +01:00
|
|
|
* added a routing panel
|
2011-10-23 11:00:47 +01:00
|
|
|
* added a timeline panel
|
2011-09-22 07:28:07 +01:00
|
|
|
* The toolbar position can now be configured via the `position` option (can be `top` or `bottom`)
|
|
|
|
|
2011-09-20 19:51:19 +01:00
|
|
|
### BrowserKit
|
|
|
|
|
|
|
|
* [BC BREAK] The CookieJar internals have changed to allow cookies with the same name on different sub-domains/sub-paths
|
|
|
|
|
2011-11-01 14:30:43 +00:00
|
|
|
### Config
|
|
|
|
|
2011-12-13 11:23:37 +00:00
|
|
|
* added a way to add documentation on configuration
|
2011-11-01 14:30:43 +00:00
|
|
|
* implemented `Serializable` on resources
|
2011-12-06 19:55:17 +00:00
|
|
|
* LoaderResolverInterface is now used instead of LoaderResolver for type hinting
|
2011-11-01 14:30:43 +00:00
|
|
|
|
2011-09-29 13:52:52 +01:00
|
|
|
### Console
|
|
|
|
|
2011-12-18 13:33:08 +00:00
|
|
|
* added a --raw option to the list command
|
2011-12-18 11:39:06 +00:00
|
|
|
* added support for STDERR in the console output class (errors are now sent to STDERR)
|
2011-10-25 16:11:49 +01:00
|
|
|
* made the defaults (helper set, commands, input definition) in Application more easily customizable
|
2011-09-29 13:52:52 +01:00
|
|
|
* added support for the shell even if readline is not available
|
2011-12-15 19:02:22 +00:00
|
|
|
* added support for process isolation in Symfony shell via `--process-isolation` switch
|
2012-03-16 19:28:57 +00:00
|
|
|
* added support for `--`, which disables options parsing after that point (tokens will be parsed as arguments)
|
2011-09-29 13:52:52 +01:00
|
|
|
|
2011-08-29 14:38:12 +01:00
|
|
|
### ClassLoader
|
|
|
|
|
2012-04-02 18:03:58 +01:00
|
|
|
* added a DebugClassLoader able to wrap any autoloader providing a findFile method
|
2012-04-02 17:45:31 +01:00
|
|
|
* added a new ApcClassLoader using composition to wrap other loaders
|
|
|
|
* added a new ClassLoader which does not distinguish between namespaced and pear-like classes (as the PEAR
|
|
|
|
convention is a subset of PSR-0) and supports using Composer's namespace maps
|
2012-02-06 16:45:32 +00:00
|
|
|
* added a class map generator
|
2011-08-29 14:38:12 +01:00
|
|
|
* added support for loading globally-installed PEAR packages
|
|
|
|
|
2011-12-05 18:39:21 +00:00
|
|
|
### DependencyInjection
|
|
|
|
|
|
|
|
* component exceptions that inherit base SPL classes are now used exclusively (this includes dumped containers)
|
|
|
|
|
2011-09-23 07:10:01 +01:00
|
|
|
### DomCrawler
|
|
|
|
|
2012-01-04 15:20:28 +00:00
|
|
|
* refactor the Form class internals to support multi-dimensional fields (the public API is backward compatible)
|
2011-09-28 08:53:50 +01:00
|
|
|
* added a way to get parsing errors for Crawler::addHtmlContent() and Crawler::addXmlContent() via libxml functions
|
2011-09-23 07:10:01 +01:00
|
|
|
* added support for submitting a form without a submit button
|
|
|
|
|
2011-11-22 08:42:16 +00:00
|
|
|
### EventDispatcher
|
|
|
|
|
|
|
|
* added a reference to the EventDispatcher on the Event
|
2011-11-22 08:52:31 +00:00
|
|
|
* added a reference to the Event name on the event
|
2012-03-10 04:10:57 +00:00
|
|
|
* added fluid interface to the dispatch() method which now returns the Event object
|
2011-11-22 08:42:16 +00:00
|
|
|
|
2011-12-22 19:04:58 +00:00
|
|
|
### Filesystem
|
|
|
|
|
|
|
|
* created this new component
|
|
|
|
|
2011-08-29 14:31:57 +01:00
|
|
|
### Finder
|
2011-08-29 13:45:37 +01:00
|
|
|
|
2011-08-29 14:31:57 +01:00
|
|
|
* Finder::exclude() now supports an array of directories as an argument
|
2011-08-29 13:45:37 +01:00
|
|
|
|
2011-09-24 14:29:19 +01:00
|
|
|
### Form
|
|
|
|
|
2012-01-26 15:54:42 +00:00
|
|
|
* [BC BREAK] ``read_only`` field attribute now renders as ``readonly="readonly"``, use ``disabled`` instead
|
2012-01-16 20:55:17 +00:00
|
|
|
* [BC BREAK] child forms now aren't validated anymore by default
|
|
|
|
* made validation of form children configurable (new option: cascade_validation)
|
2011-11-08 08:06:23 +00:00
|
|
|
* added support for validation groups as callbacks
|
2011-10-10 18:47:28 +01:00
|
|
|
* made the translation catalogue configurable via the "translation_domain" option
|
2011-09-27 09:12:54 +01:00
|
|
|
* added Form::getErrorsAsString() to help debugging forms
|
2011-09-24 14:29:19 +01:00
|
|
|
* allowed setting different options for RepeatedType fields (like the label)
|
2012-01-03 09:28:35 +00:00
|
|
|
* added support for empty form name at root level, this enables rendering forms
|
|
|
|
without form name prefix in field names
|
2012-01-30 09:57:14 +00:00
|
|
|
* [BC BREAK] form and field names must start with a letter, digit or underscore
|
|
|
|
and only contain letters, digits, underscores, hyphens and colons
|
2012-01-28 12:37:13 +00:00
|
|
|
* [BC BREAK] changed default name of the prototype in the "collection" type
|
2012-03-29 14:06:33 +01:00
|
|
|
from "$$name$$" to "\__name\__". No dollars are appended/prepended to custom
|
2012-01-28 12:37:13 +00:00
|
|
|
names anymore.
|
2012-02-02 09:02:49 +00:00
|
|
|
* [BC BREAK] improved ChoiceListInterface
|
|
|
|
* [BC BREAK] added SimpleChoiceList and LazyChoiceList as replacement of
|
|
|
|
ArrayChoiceList
|
|
|
|
* added ChoiceList and ObjectChoiceList to use objects as choices
|
2012-01-30 09:57:14 +00:00
|
|
|
* [BC BREAK] removed EntitiesToArrayTransformer and EntityToIdTransformer.
|
|
|
|
The former has been replaced by CollectionToArrayTransformer in combination
|
|
|
|
with EntityChoiceList, the latter is not required in the core anymore.
|
2012-01-16 23:46:26 +00:00
|
|
|
|
|
|
|
* [BC BREAK] renamed
|
|
|
|
|
2012-01-30 09:57:14 +00:00
|
|
|
* ArrayToBooleanChoicesTransformer to ChoicesToBooleanArrayTransformer
|
|
|
|
* ScalarToBooleanChoicesTransformer to ChoiceToBooleanArrayTransformer
|
|
|
|
* ArrayToChoicesTransformer to ChoicesToValuesTransformer
|
|
|
|
* ScalarToChoiceTransformer to ChoiceToValueTransformer
|
2012-01-16 23:46:26 +00:00
|
|
|
|
2012-01-30 09:57:14 +00:00
|
|
|
to be consistent with the naming in ChoiceListInterface.
|
2012-01-16 23:46:26 +00:00
|
|
|
|
2012-01-30 09:57:14 +00:00
|
|
|
* [BC BREAK] removed FormUtil::toArrayKey() and FormUtil::toArrayKeys().
|
|
|
|
They were merged into ChoiceList and have no public equivalent anymore.
|
|
|
|
* choice fields now throw a FormException if neither the "choices" nor the
|
2012-01-16 23:46:26 +00:00
|
|
|
"choice_list" option is set
|
2012-02-02 09:02:49 +00:00
|
|
|
* the radio type is now a child of the checkbox type
|
2012-02-02 09:36:03 +00:00
|
|
|
* the collection, choice (with multiple selection) and entity (with multiple
|
2012-02-01 17:52:43 +00:00
|
|
|
selection) types now make use of addXxx() and removeXxx() methods in your
|
|
|
|
model
|
2012-02-02 12:44:00 +00:00
|
|
|
* added options "add_method" and "remove_method" to collection and choice type
|
2012-02-02 13:30:38 +00:00
|
|
|
* forms now don't create an empty object anymore if they are completely
|
|
|
|
empty and not required. The empty value for such forms is null.
|
2012-02-10 11:01:35 +00:00
|
|
|
* added constant Guess::VERY_HIGH_CONFIDENCE
|
2012-02-07 09:51:21 +00:00
|
|
|
* FormType::getDefaultOptions() now sees default options defined by parent types
|
|
|
|
* [BC BREAK] FormType::getParent() does not see default options anymore
|
2012-02-10 12:47:43 +00:00
|
|
|
* [BC BREAK] The methods `add`, `remove`, `setParent`, `bind` and `setData`
|
|
|
|
in class Form now throw an exception if the form is already bound
|
2011-09-24 14:29:19 +01:00
|
|
|
|
2011-08-29 14:31:57 +01:00
|
|
|
### HttpFoundation
|
2011-08-29 13:45:37 +01:00
|
|
|
|
2012-02-06 09:53:46 +00:00
|
|
|
* added a getTargetUrl method to RedirectResponse
|
[HttpFoundation] added support for streamed responses
To stream a Response, use the StreamedResponse class instead of the
standard Response class:
$response = new StreamedResponse(function () {
echo 'FOO';
});
$response = new StreamedResponse(function () {
echo 'FOO';
}, 200, array('Content-Type' => 'text/plain'));
As you can see, a StreamedResponse instance takes a PHP callback instead of
a string for the Response content. It's up to the developer to stream the
response content from the callback with standard PHP functions like echo.
You can also use flush() if needed.
From a controller, do something like this:
$twig = $this->get('templating');
return new StreamedResponse(function () use ($templating) {
$templating->stream('BlogBundle:Annot:streamed.html.twig');
}, 200, array('Content-Type' => 'text/html'));
If you are using the base controller, you can use the stream() method instead:
return $this->stream('BlogBundle:Annot:streamed.html.twig');
You can stream an existing file by using the PHP built-in readfile() function:
new StreamedResponse(function () use ($file) {
readfile($file);
}, 200, array('Content-Type' => 'image/png');
Read http://php.net/flush for more information about output buffering in PHP.
Note that you should do your best to move all expensive operations to
be "activated/evaluated/called" during template evaluation.
Templates
---------
If you are using Twig as a template engine, everything should work as
usual, even if are using template inheritance!
However, note that streaming is not supported for PHP templates. Support
is impossible by design (as the layout is rendered after the main content).
Exceptions
----------
Exceptions thrown during rendering will be rendered as usual except that
some content might have been rendered already.
Limitations
-----------
As the getContent() method always returns false for streamed Responses, some
event listeners won't work at all:
* Web debug toolbar is not available for such Responses (but the profiler works fine);
* ESI is not supported.
Also note that streamed responses cannot benefit from HTTP caching for obvious
reasons.
2011-10-17 16:17:34 +01:00
|
|
|
* added support for streamed responses
|
2011-10-17 16:16:22 +01:00
|
|
|
* made Response::prepare() method the place to enforce HTTP specification
|
2011-10-05 10:09:51 +01:00
|
|
|
* [BC BREAK] moved management of the locale from the Session class to the Request class
|
2011-09-28 07:18:50 +01:00
|
|
|
* added a generic access to the PHP built-in filter mechanism: ParameterBag::filter()
|
2011-09-14 08:45:15 +01:00
|
|
|
* made FileBinaryMimeTypeGuesser command configurable
|
2011-09-13 07:48:32 +01:00
|
|
|
* added Request::getUser() and Request::getPassword()
|
2011-08-29 14:31:57 +01:00
|
|
|
* added support for the PATCH method in Request
|
|
|
|
* removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3
|
2011-09-02 14:54:04 +01:00
|
|
|
* added ResponseHeaderBag::makeDisposition() (implements RFC 6266)
|
2011-09-06 07:59:53 +01:00
|
|
|
* made mimetype to extension conversion configurable
|
2012-02-08 23:15:47 +00:00
|
|
|
* [BC BREAK] Moved all session related classes and interfaces into own namespace, as
|
2012-03-23 07:20:03 +00:00
|
|
|
`Symfony\Component\HttpFoundation\Session` and renamed classes accordingly.
|
|
|
|
Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`.
|
2012-03-06 19:41:09 +00:00
|
|
|
* SessionHandlers must implement `\SessionHandlerInterface` or extend from the
|
|
|
|
`Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class.
|
|
|
|
* Added internal storage driver proxy mechanism for forward compatibility with
|
|
|
|
PHP 5.4 `\SessionHandler` class.
|
|
|
|
* Added session handlers for PHP native Memcache, Memcached and SQLite session
|
|
|
|
save handlers.
|
|
|
|
* Added session handlers for custom Memcache, Memcached and Null session save handlers.
|
|
|
|
* [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`.
|
|
|
|
* [BC BREAK] `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.
|
|
|
|
* [BC BREAK] Introduced mock implementations of `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 with`MockFileSessionStorage`
|
|
|
|
for functional tests. These do not interact with global session ini
|
|
|
|
configuration values, session functions or `$_SESSION` supreglobal. This means
|
|
|
|
they can be configured directly allowing multiple instances to work without
|
|
|
|
conflicting in the same PHP process.
|
|
|
|
* [BC BREAK] Removed the `close()` method from the `Session` class, as this is
|
|
|
|
now redundant.
|
2012-02-11 14:53:54 +00:00
|
|
|
* Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()`
|
2012-03-06 19:41:09 +00:00
|
|
|
`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.
|
|
|
|
* Session data is now managed by `SessionBagInterface` which to better encapsulate
|
|
|
|
session data.
|
|
|
|
* Refactored session attribute and flash messages system to their own
|
|
|
|
`SessionBagInterface` implementations.
|
|
|
|
* Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This
|
|
|
|
implementation is ESI compatible.
|
|
|
|
* Added `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()`.
|
|
|
|
* Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate
|
|
|
|
attributes storage behaviour from 2.0.x (default).
|
|
|
|
* Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for
|
|
|
|
namespace session attributes.
|
2012-02-11 06:41:34 +00:00
|
|
|
* Flash API can stores messages in an array so there may be multiple messages
|
|
|
|
per flash type. The old `Session` class API remains without BC break as it
|
|
|
|
will single messages as before.
|
2012-03-31 17:51:36 +01:00
|
|
|
* Added basic session meta-data to the session to record session create time,
|
|
|
|
last updated time, and the lifetime of the session cookie that was provided
|
|
|
|
to the client.
|
2011-08-29 13:45:37 +01:00
|
|
|
|
2011-09-06 06:47:18 +01:00
|
|
|
### HttpKernel
|
|
|
|
|
2011-12-19 18:52:36 +00:00
|
|
|
* added CacheClearerInterface
|
2011-12-15 16:54:17 +00:00
|
|
|
* added a kernel.terminate event
|
2011-10-23 11:00:47 +01:00
|
|
|
* added a Stopwatch class
|
|
|
|
* added WarmableInterface
|
2011-10-15 02:38:40 +01:00
|
|
|
* improved extensibility between bundles
|
2012-02-12 12:29:30 +00:00
|
|
|
* added Memcache(d)-based profiler storages
|
2011-09-06 06:47:18 +01:00
|
|
|
* added a File-based profiler storage
|
2011-09-06 06:54:13 +01:00
|
|
|
* added a MongoDB-based profiler storage
|
2011-12-22 19:04:58 +00:00
|
|
|
* moved Filesystem class to its own component
|
2011-09-06 06:47:18 +01:00
|
|
|
|
2011-11-09 20:55:11 +00:00
|
|
|
### Locale
|
|
|
|
|
|
|
|
* added Locale::getIcuVersion() and Locale::getIcuDataVersion()
|
|
|
|
|
2011-12-16 14:41:31 +00:00
|
|
|
### Process
|
|
|
|
|
|
|
|
* added ProcessBuilder
|
|
|
|
|
2011-09-30 06:48:34 +01:00
|
|
|
### Routing
|
|
|
|
|
2012-02-07 16:15:28 +00:00
|
|
|
* the UrlMatcher does not throw a \LogicException any more when the required scheme is not the current one
|
2011-10-24 08:11:18 +01:00
|
|
|
* added a TraceableUrlMatcher
|
2012-04-04 02:35:48 +01:00
|
|
|
* added the possibility to define options, default values and requirements for placeholders in prefix, including imported routes
|
2011-09-30 06:48:34 +01:00
|
|
|
* added RouterInterface::getRouteCollection
|
|
|
|
|
2011-11-07 22:28:28 +00:00
|
|
|
### Security
|
|
|
|
|
2011-11-17 06:47:06 +00:00
|
|
|
* after login, the user is now redirected to `default_target_path` if `use_referer` is true and the referrer is the `login_path`.
|
2011-11-07 22:28:28 +00:00
|
|
|
* added a way to remove a token from a session
|
2012-01-30 13:24:56 +00:00
|
|
|
* [BC BREAK] changed `MutableAclInterface::setParentAcl` to accept `null`, review your implementation to reflect this change.
|
2011-11-07 22:28:28 +00:00
|
|
|
|
2011-11-24 01:40:26 +00:00
|
|
|
### Serializer
|
|
|
|
|
2012-01-08 21:32:36 +00:00
|
|
|
* [BC BREAK] changed `GetSetMethodNormalizer`'s key names from all lowercased to camelCased (e.g. `mypropertyvalue` to `myPropertyValue`)
|
2012-01-04 15:20:28 +00:00
|
|
|
* [BC BREAK] convert the `item` XML tag to an array
|
2011-11-25 08:46:40 +00:00
|
|
|
|
2012-01-17 00:44:51 +00:00
|
|
|
``` xml
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<response>
|
|
|
|
<item><title><![CDATA[title1]]></title></item><item><title><![CDATA[title2]]></title></item>
|
|
|
|
</response>
|
|
|
|
```
|
|
|
|
|
|
|
|
Before:
|
|
|
|
|
|
|
|
Array()
|
|
|
|
|
|
|
|
After:
|
|
|
|
|
|
|
|
Array(
|
|
|
|
[item] => Array(
|
|
|
|
[0] => Array(
|
|
|
|
[title] => title1
|
|
|
|
)
|
|
|
|
[1] => Array(
|
|
|
|
[title] => title2
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-11-25 08:46:40 +00:00
|
|
|
|
2011-08-29 14:31:57 +01:00
|
|
|
### Translation
|
2011-08-29 13:45:37 +01:00
|
|
|
|
2011-12-07 21:38:10 +00:00
|
|
|
* changed the default extension for XLIFF files from .xliff to .xlf
|
2011-11-09 21:02:31 +00:00
|
|
|
* added support for gettext
|
2011-09-15 07:19:52 +01:00
|
|
|
* added support for more than one fallback locale
|
2011-09-13 07:49:25 +01:00
|
|
|
* added support for translations in ResourceBundles
|
2011-09-13 07:46:58 +01:00
|
|
|
* added support for extracting translation messages from templates (Twig and PHP)
|
2011-08-29 14:31:57 +01:00
|
|
|
* added dumpers for translation catalogs
|
2011-09-06 07:02:25 +01:00
|
|
|
* added support for QT translations
|
2011-09-02 08:25:13 +01:00
|
|
|
|
|
|
|
### Validator
|
|
|
|
|
2011-11-01 14:30:43 +00:00
|
|
|
* added support for `ctype_*` assertions in `TypeValidator`
|
2011-09-29 14:56:37 +01:00
|
|
|
* added a Size validator
|
2011-09-29 14:45:52 +01:00
|
|
|
* added a SizeLength validator
|
2011-09-06 07:19:05 +01:00
|
|
|
* improved the ImageValidator with min width, max width, min height, and max height constraints
|
2011-09-02 08:25:13 +01:00
|
|
|
* added support for MIME with wildcard in FileValidator
|
2012-01-30 19:57:20 +00:00
|
|
|
* changed Collection validator to add "missing" and "extra" errors to
|
|
|
|
individual fields
|
|
|
|
* changed default value for `extraFieldsMessage` and `missingFieldsMessage`
|
|
|
|
in Collection constraint
|
2012-01-31 20:35:48 +00:00
|
|
|
* made ExecutionContext immutable
|
2012-02-01 12:53:45 +00:00
|
|
|
* deprecated Constraint methods `setMessage`, `getMessageTemplate` and
|
|
|
|
`getMessageParameters`
|
2012-02-03 16:45:10 +00:00
|
|
|
* added support for dynamic group sequences with the GroupSequenceProvider pattern
|
2011-11-07 15:43:15 +00:00
|
|
|
|
|
|
|
### Yaml
|
|
|
|
|
|
|
|
* Yaml::parse() does not evaluate loaded files as PHP files by default anymore (call Yaml::enablePhpParsing() to get back the old behavior)
|