When running the translation:debug command, if a template contains invalid twig markup,
an exception is thrown. This patch rethrows a new exception that includes the filename
being parsed in the message to aid debuging.
This PR was squashed before being merged into the 2.6-dev branch (closes#12198).
Discussion
----------
[HttpFoundation] Allow Cache-Control headers on StreamedResponse
StreamedResponse currently always sets `Cache-Control: no-cache` headers, which prevents all caching of streamed responses.
This change removes this limitation to allow normal cache control response behaviour.
Some caching proxies support caching streamed responses using chunked encoding, most notably AWS CloudFront:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#ResponseCustomTransferEncoding
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/6530
| License | MIT
| Doc PR |
Commits
-------
dd7a9b6 [HttpFoundation] Allow Cache-Control headers on StreamedResponse
This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5307
| License | MIT
| Doc PR | -
According to my own testing, this should fix the generation of HTML patterns when `Regex::$match` is set to false. Additionally, patterns containing pipes (or statements) are fixed. See the test cases for examples.
Commits
-------
bf006f5 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
This PR was merged into the 2.3 branch.
Discussion
----------
[Session] remove invalid hack in session regenerate
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. Such mistakes won't happen anymore with #12341
This reverts #8270 and following. Also it makes absolutely no sense to do this only for the `files` save handler which creates huge inconsistencies. All save handlers are affected and it's more a documentation thing.
Commits
-------
703d906 [Session] remove invalid workaround in session regenerate
This PR was merged into the 2.3 branch.
Discussion
----------
[Kernel] ensure session is saved before sending response
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #6417, #7885
| License | MIT
| Doc PR | n/a
Saves the session, in case it is still open, before sending the response.
This ensures several things in case the developer did not save the session explicitly:
- If a session save handler without locking is used, it ensures the data is available
on the next request, e.g. after a redirect. PHPs auto-save at script end via
session_register_shutdown is executed after fastcgi_finish_request. So in this case
the data could be missing the next request because it might not be saved the moment
the new request is processed.
- A locking save handler (e.g. the native 'files') circumvents concurrency problems like
the one above. By saving the session before long-running things in the terminate event,
we ensure the session is not blocked longer than needed.
- When regenerating the session ID no locking is involved in PHPs session design. See
https://bugs.php.net/bug.php?id=61470 for a discussion. So in this case, the session must
be saved anyway before sending the headers with the new session ID. Otherwise session
data could get lost again for concurrent requests with the new ID. One result could be
that you get logged out after just logging in.
This listener should be executed as one of the last listeners, so that previous listeners
can still operate on the open session. This prevents the overhead of restarting it.
Listeners after closing the session can still work with the session as usual because
Symfonys session implementation starts the session on demand. So writing to it after
it is saved will just restart it.
Commits
-------
b7bfef0 [Kernel] ensure session is saved before sending response
This PR was merged into the 2.6-dev branch.
Discussion
----------
[VarDumper] Use symfony.com's colorscheme
As promised, this PR changed the current colorscheme to something used in Symfony. This means developers have a consistent experience and the colorscheme is easier to read.
While doings this, I also improved the `HtmlDumper#style()` method to make it easier to understand and maintain. I also changed a bit of the output it created, mostly adding visibility prefixes to properties.
**Before**
![sf-dump-before](https://cloud.githubusercontent.com/assets/749025/4828241/b070d32e-5f7e-11e4-9d51-865ffd47753e.png)
**After**
![sf-dump-after](https://cloud.githubusercontent.com/assets/749025/4828244/b4ec3e52-5f7e-11e4-9031-71f41bc30c25.png)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | -
| Deprecations? | -
| Tests pass? | -
| Fixed tickets | #12348
| License | MIT
| Doc PR | the one about the VarDumper
Commits
-------
07a1e70 Changed meta color
a316420 [VarDumper] use symfony.com colorscheme
7ffba44 [VarDumper] UML prefixes for properties
This PR was merged into the 2.6-dev branch.
Discussion
----------
[VarDumper] polymorphic and stateless output selection
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/4243
While writing the documentation for the VarDumper component, it came to me that selecting the output destination was a state-full process for streams.
This PR fixes that by allowing not only callbacks but also streams on the second argument of `AbstractDumper::dump()`.
I also updated some interfaces to make the feature/names more straightforward.
See c578fe7962 for the related documentation update.
Commits
-------
9b9fb5a [VarDumper] polymorphic and stateless output selection
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#12371).
Discussion
----------
[ClassLoader] Cast $useIncludePath property to boolean
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
32001a4 [ClassLoader] Cast $useIncludePath property to boolean
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#12374).
Discussion
----------
[HttpFoundation] Minor spelling fix in PHPDocs
| Q | A
| ------------- | ---
| Fixed tickets |
| License | MIT
Commits
-------
35791fd [HttpFoundation] Minor spelling fix in PHPDocs
This PR was merged into the 2.5 branch.
Discussion
----------
[2.5] Remove aligned '=>' and '='
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | [https://github.com/symfony/symfony/issues/12284]
| License | MIT
PR for 2.3 branch : https://github.com/symfony/symfony/pull/12293
Commits
-------
e638ccb Remove aligned '=>' and '='
This PR was merged into the 2.3 branch.
Discussion
----------
[Config] fix filelocator with empty name
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
fix filelocator with empty name + phpdoc in config component
Commits
-------
63b8c07 [DependencyInjection] use inheritdoc for loaders
ddd2fe2 [Config] fix filelocator with empty name
The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. This reverts #8270 and following.
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] serialize the compiled route to speed things up
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | not really
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12012, #12220
| License | MIT
| Doc PR | -
This also makes the CompiledRoute implement Serializable in order to:
1. make the serialization format shorter
2. have no null bytes in there, which the native serializer add for private properties, and thus would complicate saving in databases etc.
3. Since the Route now includes the CompiledRoute in the serialization, the CompiledRoute serialization must be consistent as well. We can only ensure that in future symfony version by implementing Serializable.
We should add to our symfony BC promise, that only classes that implement Serializable are ensured to be deserializable correctly with serialized representations of the class in previous symfony versions.
Commits
-------
fd88de7 [Routing] serialize the compiled route to speed things up
This PR was merged into the 2.6-dev branch.
Discussion
----------
[DebugBundle] add XML schema definition for the DebugBundle
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
d9c239d add XML schema definition for the DebugBundle
This PR was merged into the 2.6-dev branch.
Discussion
----------
[OptionsResolver] fix count() and exceptions
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Please see commits.
Commits
-------
b93c4c0 [OptionsResolver] add missing exception based on OutOfBoundsException and clarify message
8bcbcc3 [OptionsResolver] fix calling resolve from within closure
dc1250c [OptionsResolver] fix invalid value exception formatting
6c2130f [OptionsResolver] fix counting of options
This also makes the CompiledRoute implement Serializable in order to:
1. make the serialization format shorter
2. have no null bytes in there, which the native serializer add for private properties, and thus would complicate saving in databases etc.
3. We should add to our symfony BC promise, that only classes that implement Serializable are ensured to be deserializable correctly with serialized representations of the class in previous symfony versions.
This PR was merged into the 2.6-dev branch.
Discussion
----------
decodes some special chars in a URL query
| Q | A
| ------------- | ---
| Bug fix? | yes|no (not sure :) )
| New feature? | no
| BC breaks? | yes|no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12200
| License | MIT
| Doc PR |
Commits
-------
cd2c2e3 decodes some special chars in a URL query
This PR was merged into the 2.6-dev branch.
Discussion
----------
Various fixes
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12278
| License | MIT
| Doc PR | -
A 3 in one PR (diff is best viewed [with whitespaces ignored](https://github.com/symfony/symfony/pull/12285/files?w=1)):
- changed the way the DebugHandlerListeners desactivates itself
- reduced a N×N iteration to a N one in ContainerAwareEventListener::removeListener
- fixed an issue in VarDumper
Commits
-------
ac8efd9 [HttpKernel] fix DebugHandlersListener
5af0f89 [EventDispatcher] perf optim
c7cf6cf [VarDumper] fix control chars styling
* 2.5:
Remove aligned '=>' and '='
Break infinite loop while resolving aliases
[Security][listener] change priority of switchuser
Improved the phpdoc for security token classes
bumped Symfony version to 2.5.7
updated VERSION for 2.5.6
updated CHANGELOG for 2.5.6
bumped Symfony version to 2.3.22
updated VERSION for 2.3.21
update CONTRIBUTORS for 2.3.21
updated CHANGELOG for 2.3.21
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php
src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/Debug/ExceptionHandler.php
src/Symfony/Component/Form/Extension/Core/Type/BaseType.php
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
src/Symfony/Component/Form/Extension/Core/Type/DateType.php
src/Symfony/Component/Form/Extension/Core/Type/TimeType.php
src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php
src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Core/SecurityContextInterface.php
src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationFailureHandler.php
src/Symfony/Component/Security/Http/Authentication/DefaultAuthenticationSuccessHandler.php
src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php
src/Symfony/Component/Serializer/Serializer.php
src/Symfony/Component/Validator/Constraints/File.php
This PR was squashed before being merged into the 2.3 branch (closes#12293).
Discussion
----------
Remove aligned '=>' and '='
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | [https://github.com/symfony/symfony/issues/12284]
| License | MIT
Could you said to me if i should make an other PR for 2.5 branch.
Commits
-------
51312d3 Remove aligned '=>' and '='
This PR was merged into the 2.6-dev branch.
Discussion
----------
don't translate error messages twice
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As @stof pointed out in #12164, error messages are already translated
when they are passed to the template.
Commits
-------
4bd8661 don't translate error messages twice
This PR was merged into the 2.3 branch.
Discussion
----------
[Security][listener] change priority of switchuser
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Hi,
I have the following users:
- Manager: Allowed to access to (/admin) and has a role ROLE_ALLOWED_TO_SWITCH
- Partner: Allowed to access to (/partner)
When I attempt to switch to partner user I get "Access denied", well I think the switchuser listener must be registred before access listener.
Commits
-------
5f8047d [Security][listener] change priority of switchuser
This PR was merged into the 2.3 branch.
Discussion
----------
Improved the phpdoc for security token classes
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This will avoid to have Scrutinizer complaining that we pass an array of string rather than an array of RoleInterface for instance.
Commits
-------
7b6d115 Improved the phpdoc for security token classes