This PR was merged into the 2.3 branch.
Discussion
----------
[Validator] Fixed: The state of the XML/YAML loaders was changed even if an exception was thrown upon loading
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12158
| License | MIT
| Doc PR | -
Commits
-------
85d464a [Validator] Fixed: The state of the XML/YAML loaders was changed even if an exception was thrown upon loading
This PR was squashed before being merged into the 2.7 branch (closes#13445).
Discussion
----------
[2.7] Added deprecation warning for get request service in controller
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | yes (but well, it's 2.7)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
becd694 [2.7] Added deprecation warning for get request service in controller
This PR was squashed before being merged into the 2.7 branch (closes#13500).
Discussion
----------
[Serializer] Normalizers can serialize collections and scalars
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | n/a
Currently, the logic for serializing `array` and scalars is hardcoded in the serializer. This is not possible to have a custom serializer normalizing collections. This a big limitation, for instance it's not possible to create an normalizer creating [Hydra collections](http://www.hydra-cg.com/spec/latest/core/#h-collections) for a PHP array.
This PR fix that.
Commits
-------
1cf8eb2 [Serializer] Normalizers can serialize collections and scalars
This PR was merged into the 2.6 branch.
Discussion
----------
[WebProfilerBundle] Fixes event listener attaching error in IE
I haven't tested the change, because I don't any working Symfony installation at hand. By the looks of changes it should work.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not sure (do we have JS tests?)
| Fixed tickets | #13447
| License | MIT
| Doc PR |
Commits
-------
21693e4 [WebProfilerBundle] Fixes event listener attaching error in IE
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes#13630).
Discussion
----------
[Console] fixed ArrayInput, if array contains 0 key.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
```php
$input = new ArrayInput(array('Fabien', '--foo' => 'bar'));
var_dump($input->getParameterOption('--foo')); // this is 'Fabien'.
```
Because `in_array` third argument's default is `false`.
`in_array(0, $values)` returns `true` in many cases.
Commits
-------
a642e4b [Console] fixed ArrayInput, if array contains 0 key.
* 2.6: (21 commits)
[FrameworkBundle] Fix title and placeholder rendering in php form templates.
[TwigBridge] Removed duplicated code from TwigRenderer
[Translator][Logging] implement TranslatorBagInterface.
RequestDataCollector - small fix
renamed composer.phar to composer to be consistent with the Symfony docs
[FrameworkBundle] bumped min version of Routing to 2.3
removed composer --dev option everywhere
fixed a test
[Console] Fixed output bug, if escaped string in a formatted string.
“console help” ignores --raw option
Fix form icon position in web profiler
[Security] Remove ContextListener's onKernelResponse listener as it is used
Revert "minor #12652 [HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value (skler)"
Revert "fixed assertion"
fixed assertion
[HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value
fixed URL
Add reference to documentation in FormEvents phpdocs
[YAML] Fix one-liners to work with multiple new lines
Keep "pre" meaning for var_dump quick-and-dirty debug
...
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/Security/Http/Firewall/ContextListener.php
src/Symfony/Component/Security/Http/Tests/Firewall/ContextListenerTest.php
* 2.3:
[FrameworkBundle] Fix title and placeholder rendering in php form templates.
RequestDataCollector - small fix
renamed composer.phar to composer to be consistent with the Symfony docs
[FrameworkBundle] bumped min version of Routing to 2.3
removed composer --dev option everywhere
fixed a test
[Console] Fixed output bug, if escaped string in a formatted string.
[Security] Remove ContextListener's onKernelResponse listener as it is used
Revert "minor #12652 [HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value (skler)"
Revert "fixed assertion"
fixed assertion
[HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value
fixed URL
Add reference to documentation in FormEvents phpdocs
[YAML] Fix one-liners to work with multiple new lines
Keep "pre" meaning for var_dump quick-and-dirty debug
[Console][Table] Fix cell padding with multi-byte
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/Console/Helper/TableHelper.php
This PR was merged into the 2.3 branch.
Discussion
----------
[FrameworkBundle] Fix title and placeholder rendering in php form templates
Small fix for rendering placeholder on widgets in php templates.
| Q | A |
| ------------- | --- |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | no |
| Fixed tickets | - |
| License | MIT |
| Doc PR | - |
This is a test case for #13290, including a fix applied on 2.3, since that's the earliest supported branch the bug exist.
In 2.6 the template is a bit different, and unfortunately I couldn't re-use #13290's fix.
When this is merged into 2.3, and then to 2.6 I think we can also merge #13290.
Commits
-------
f82193d [FrameworkBundle] Fix title and placeholder rendering in php form templates.
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] Replaced raster PNG icons with vector SVG icons
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13298
| License | MIT
| Doc PR | -
Follow up of #13298 : inline svg is supported by the same browsers that support data-uri+svg
Commits
-------
00e3a42 Replaced raster PNG icons with vector SVG icons
This PR was submitted for the 2.7 branch but it was merged into the 2.6 branch instead (closes#13638).
Discussion
----------
[TwigBridge] Removed duplicated code from TwigRenderer
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
See https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/FormRenderer.php#L65-L69
Commits
-------
1a9aca7 [TwigBridge] Removed duplicated code from TwigRenderer
This PR was merged into the 2.6 branch.
Discussion
----------
Fix form icon position in web profiler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Form icon in web profiler toolbar moved to the left edge
![pe64g11](https://cloud.githubusercontent.com/assets/213810/6077805/4523c5ba-adfb-11e4-9e8c-61c4940cd7c1.png)
This fix changes icon position to its default value.
Commits
-------
b128439 Fix form icon position in web profiler
This PR was merged into the 2.7 branch.
Discussion
----------
[Asset] added the component
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #10973, #11748, #11876, #4883, #12474
| License | MIT
| Doc PR | not yet
TODO:
- [ ] submit documentation PR
The current Asset sub-namespace in Templating has several (major) problems:
* It does not cover all use cases (see #10973 and #4883 for some example)
* It has some design issues (relies on the Request instance and so requires the request scope, very coupled with the PHP templating sub-system, see #11748 and #11876)
To decouple this feature and make it reusable in Silex for instance, and to fix the design issues and make it more extensible, I've decided to extract and rework the features provided into a new Asset component.
Basically, this component allows the developer to easily manage asset URLs: versioning, paths, and hosts.
Both the new and the old asset management features are kept in this PR to avoid breaking BC; the old system is of course deprecated and automatically converted to the new one.
Even if the features are quite similar, and besides the flexilibity of the new system, here are some differences:
* `PathPackage` always prepend the path (even if the given path starts with `/`).
* Usage is stricter (for instance, `PathPackage` requires a basePath to be passed and `UrlPackage` requires that at least on URL is passed).
* In the configuration, named packages inherits from the version and version format of the default package by default.
* It is not possible to override the version when asking for a URL (instead, you can define your own version strategy implementation -- the use cases explained in #6092 are easily implemented this way).
* It's not possible to generate absolute URLs (see #13264 for a better alternative using composition; so using `absolute_url(asset_path('me.png')) should work)`.
#10973 was about adding shortcuts for bundles, which is a good idea; but given that you rarely reference built-in or third-party bundle assets and because we now have a one-bundle default approach named AppBundle, the same can be achieved with just a simple piece of configuration with the new assets feature:
```yml
framework:
assets:
packages:
app:
base_path: /bundles/app/
img:
base_path: /bundles/app/images/
```
Then:
```jinja
{{ asset('images/me.png', 'app') }}
# /bundles/app/images/me.png
{{ asset('me.png', 'img') }}
# /bundles/app/images/me.png
```
#12474 discussed the possibility to add a version for absolute URL. It's not possible to do that in a generic way as the version strategy involves both the version and the path, which obviously cannot work when the path is an absolute URL already. Instead, one should use the `asset_version` Twig function to add the version manually.
Commits
-------
0750d02 removed usage of the deprecated forms of asset() in the core framework
f74a1f2 renamed asset_path() to asset() and added a BC layer
4d0adea [Asset] added a NullContext class
d33c41d [Asset] added the component
This PR was merged into the 2.3 branch.
Discussion
----------
removed composer --dev option everywhere
| 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
Commits
-------
0fe4913 renamed composer.phar to composer to be consistent with the Symfony docs
af59316 removed composer --dev option everywhere
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#13629).
Discussion
----------
RequestDataCollector - small fix
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
7ed48db RequestDataCollector - small fix
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes#13607).
Discussion
----------
[Console] Fixed output bug, if escaped string in a formatted string.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
If there is a escaped tag in a formatted string, the output wasn't correct.
I have add a test for this problem and integrated a solution for this.
Commits
-------
1c62eb7 [Console] Fixed output bug, if escaped string in a formatted string.
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#11379).
Discussion
----------
Added new Forwarded header support for Request::getClientIps
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11073
| License | MIT
| Doc PR | no
Commits
-------
4c8a25a Added new Forwarded header support for Request::getClientIps
This PR was submitted for the 2.7 branch but it was merged into the 2.6 branch instead (closes#13611).
Discussion
----------
[Console] “console help” ignores --raw option
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The option for DescriptorHelper::describe() is `raw_text`, not `raw`.
Commits
-------
eabc5d8 “console help” ignores --raw option
This PR was merged into the 2.7 branch.
Discussion
----------
[Form][DoctrineBridge] Optimize EntityType by only loading choices for values restricted by values
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Optimize EntityType by only loading choices for values in the same way that EntityLoader customization does (if you provide a query_builder).
Commits
-------
2185883 Optimize EntityType by only loading choices for values in the same way that EntityLoader customization does (if you provide a query_builder).
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#9782).
Discussion
----------
[Security] added string representation for core Users
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I often use type casting and `__toString()` to print my users as this lets me very easily keep one canonical format for their representation. In functional tests however, it is easier to use in-memory users but this defaults to instances of the core `User` object. Because these don't have a string representation all the nice type casting crashes.
Hence I propose to represent the core Users by their username string by default. It would be useful in a lot of cases and I can't see any harm in it?
Commits
-------
722c3a7 [Security] added string representation for core Users
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#12174).
Discussion
----------
[TwigBundle] Add loader priority
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Add the ability to specify a priority to the tag of `twig.loader` services.
eg:
```
<service id="twig.loader.filesystem" class="%twig.loader.filesystem.class%" public="false">
<argument type="service" id="templating.locator" />
<argument type="service" id="templating.name_parser" />
<tag name="twig.loader" priority="100"/>
</service>
```
Commits
-------
67dffea Add Twig loader priority