This PR was merged into the 3.2-dev branch.
Discussion
----------
Remove reverted feature from 3.2 changelog
Reverted in a4ce063
Commits
-------
bc1ffea Remove reverted feature from changelog
This PR was merged into the 3.1 branch.
Discussion
----------
Remove extra line in doc-block comment
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Commits
-------
6bfd0f1 Remove extra line in doc-block comment
This PR was submitted for the 3.1 branch but it was merged into the 2.7 branch instead (closes#20321).
Discussion
----------
Compatibility with Twig 1.27
| Q | A
| ------------- | ---
| Branch? | "master" for new features / 2.7, 2.8 or 3.1 for fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
In FilesystemLoader::findTemplate(), you must accept a second argument that when set to "false" returns "false" instead of throwing an exception. Not supporting this argument is deprecated since version 1.27.
Commits
-------
77c5395 Compatibility with Twig 1.27
This PR was merged into the 3.1 branch.
Discussion
----------
[DependencyInjection] Remove old code in XML loader
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
d090159 [DependencyInjection] Remove old code in XML loader
This PR was merged into the 3.2-dev branch.
Discussion
----------
Added a default ide file link web view
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When having no `framework.ide` configured or `framework.ide = symfony` the file link open the source in a web view (eg `_profiler/open?file=/src/AppBundle/Controller/DefaultController.php&line=50#line50`).
![](https://cl.ly/2Z0W2J020p43/feature_ide.png)
Commits
-------
ba6bcca Added a default ide file link web view
This PR was merged into the 2.7 branch.
Discussion
----------
[SecurityBundle] Fix twig-bridge lowest dep
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
To make tests green again on 2.7
Commits
-------
6856faf [SecurityBundle] Fix twig-bridge lowest dep
This PR was merged into the 3.1 branch.
Discussion
----------
[Yaml] Fix 7.1 compat
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Should make CI green again with PHP 7.1 RC4.
Commits
-------
89b78f2 [Yaml] Fix 7.1 compat
This PR was merged into the 3.2-dev branch.
Discussion
----------
[TwigBundle] made Twig cache independent of the project root directory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (except if people configured relative paths instead of absolute ones, but this was not supported in earlier versions of Twig)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This makes Twig cache keys independent of the project root directory, thanks to Twig 1.27.
It cannot be merged in 2.7 as a bug fix as people might have used relative paths for some Twig paths (no officially supported by Twig anyway), which would have resolved to `getcwd()` before, but will now be interpreted as being relative to `%kernel.root_dir%` now.
Commits
-------
dc38af3 [TwigBundle] made Twig cache independent of the project root directory
* 3.1:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
A decorated service should not keep the autowiring types
merge tags instead of completely replacing them
* 2.8:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
A decorated service should not keep the autowiring types
merge tags instead of completely replacing them
* 2.7:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
merge tags instead of completely replacing them
This PR was merged into the 2.7 branch.
Discussion
----------
Fix edge case with StreamedResponse where headers are sent twice
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets |
| License | MIT
| Doc PR |
If you have PHPs output buffering enabled (`output_buffering=4096` in your php.ini per example), there is an edge case with the StreamedResponse object where the headers are sent twice. Even if it is harmless most of the time, it can be critical sometimes (per example, if an `Access-Control-Allow-Origin` header is duplicated the browser will block the request).
Explanation: because the streamed response may need the request in order to generate the content, the `StreamedResponseListener` class calls the send method of the `Response` when the event `kernel.response` is fired. To prevent the content from being duplicated, a state has been introduced in the `sendContent()` method and it works fine.
But there is an edge case is the headers of the response. If the content generated by the `sendContent()` method is smaller than the value defined for `output_buffering` in the `php.ini` then the buffer won't be flushed and the `headers_sent()` function will return false.
Therefore when `$response->send()` is called for the second time (in the `app.php` file), the headers will be sent a second time.
Commits
-------
a79991f Fix edge case with StreamedResponse where headers are sent twice
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] A decorated service should not keep the autowiring types
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20260#issuecomment-255364862
| License | MIT
| Doc PR | n/a
When decorating a service which is not abstract and has `autowiring_types`, the decorator should be the one used for autowiring methods of autowired services, so we should explicitly empty them on the decorated definition after merged them into the child. See https://github.com/symfony/symfony/pull/20260#issuecomment-255364862 for a use case where we are forced to manually empty the decorated service's `autowiring_types`.
Commits
-------
5951378 A decorated service should not keep the autowiring types
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] merge tags instead of completely replacing them
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20150, #20207
| License | MIT
| Doc PR |
In #20207, I missed the `array_merge()` call. Thus, previously set tags of the decorating service would have been discarded by the compiler pass.
Commits
-------
c333eb7 merge tags instead of completely replacing them