This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes#21421).
Discussion
----------
Use proper error message when session write fails #20807
This improves the error message that is thrown if a session write fails (see #20807)
As there was no way to get the actual handler, I introduced a method on the SessionHandlerProxy. I hope that's okay, otherwise please give me a hint on what to do.
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20807
| License | MIT
Commits
-------
c7a44be4b1 Use proper error message when session write fails #20807
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Do not squash input changes made from console.command event
| 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/issues/19441
| License | MIT
| Doc PR | n/a
Setting arguments/options from the `console.command` event is expected to work since https://github.com/symfony/symfony/pull/15938
Commits
-------
c8d364b721 [Console] Do not squash input changes made from console.command event
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Allow extensions to create ServiceLocator as services
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
https://github.com/symfony/symfony/pull/21770/files?w=1
With this PR, DI extensions are able to create "service locator" services.
They are easily created as such:
```php
$container->register('my_service_locator', ServiceLocator::class)
->addArgument(array(
'exposed_id' => new ServiceClosureArgument(new Reference('internal_id')),
))
```
I already need this in two different PRs to come.
Commits
-------
1d9663326e [DI] Allow creating ServiceLocator-based services in extensions
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fixed typo in a test after #21877
| 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 | ~
Reviewing the diff on GitHub, I realized I've missed some typos in a new test of #21877. Sorry!
Commits
-------
b21a0978de [Form] Fixed typo in a test after #21877
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI][Router][DX] Invalidate routing cache when container parameters changed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21426
| License | MIT
| Doc PR | N/A
Supersedes #21443 but only for master.
Indeed, this implementation uses a new feature: a `ContainerParametersResource` which compares cached containers parameters (collected at some point, here by the `Router`) with current ones in the container.
On the contrary of the previous PR targeting 2.7, this will only invalidate routing cache when parameters actually used in the routes changed and will avoid always rebuilding the routing cache when the container is rebuilt, just to catch the edge case of someone modifying a parameter.
Commits
-------
fad4d9e2ef [DI][Router][DX] Invalidate routing cache when container parameters changed
* 3.2:
[Serializer] Xml encoder throws exception for valid data
[Form] Hardened form type tests
fixed CS
Added setInputStream deprecation to UPGRADE guides
fixed CS
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Hardened form type tests
| 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 | ~
This one the PRs to come targeting 2.7 needed to harden the code base before doing some changes in master.
It takes care of the form types tests part (even if some other tests will be added later, it will also be easier after it), and unlocks merging https://github.com/symfony/symfony/pull/21481.
It also back ports tests added in https://github.com/symfony/symfony/pull/18357 for the TextType.
Since it's very hard to merge branches when modifying tests because of BC, and making every test type extend the base type test would involve many function calls to get the tested type, the function `getTestedType` is no longer abstract and return a constant to override instead, it's much better for performance, I didn't change the call in the base type test to keep BC but I suggest to deprecate it in master. Even if those are tests I really think it is worth keeping BC here.
The constants also ease testing in the ecosystem of form related libraries that need to be compatible with Symfony 2.7 and 3. I think using "test" as both prefix and suffix on namespaces, classes and names of the constants should discourage using them in real application code. Since this is just about our test suite, I don't think this should be considered a feature, so tis change should be good for 2.7.
Two other PRs will follow to solve conflicts in 2.8 and 3.2.
I missed last month patches, I hope I won't this time :).
Commits
-------
8cfc3e92ed [Form] Hardened form type tests
This PR was squashed before being merged into the 2.7 branch (closes#21671).
Discussion
----------
[Serializer] Xml encoder throws exception for valid data
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21617
| License | MIT
| Doc PR | None
#21617 Xml encoder throws exception for valid data
- add tests for bool and object encoding
- fix encoding for object in array and field
Commits
-------
5c2d4c671e [Serializer] Xml encoder throws exception for valid data
This PR was squashed before being merged into the 3.2 branch (closes#21876).
Discussion
----------
Added setInputStream deprecation to UPGRADE guides
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The before/after examples of this deprecation is quite hard to figure out. Having them in the UPGRADE guides will significantly help the migration.
Commits
-------
6f53465648 Added setInputStream deprecation to UPGRADE guides
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Form] fix BC layer for form type guessers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
5c38c4f [Form] fix BC layer for form type guessers