This PR was merged into the 5.1 branch.
Discussion
----------
[Notifier] Streamline changelogs of notifier bridges
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | ---
| License | MIT
| Doc PR | ---
This should be considered a bug fix as it does not touches any PHP file.
I will continue the work for `5.2` branch after the merge
Commits
-------
95bcab29d1 [Notifier] Streamline changelogs of notifier bridges
This PR was merged into the 5.3-dev branch.
Discussion
----------
[HttpKernel] Marked the class DebugHandlersListener as internal
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
1ee7e4c94c [HttpKernel] Marked the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fix disabling DeprecationErrorHandler from PHPUnit configuration file
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/38239
| License | MIT
| Doc PR | -
The linked issue description is right, the bridge's bootstrap is hit before the env variables from the phpunit.xml file are read and set. So the easiest solution is to read it ourselves in the root script (like we already do for some of them).
Commits
-------
41158b8878 [PhpUnitBridge] Fix disabling DeprecationErrorHandler from phpunit configuration file
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Throws cleanup
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The actual throw statements have been removed years ago, but the annotations stayed.
Such annotations fool static analysis tools to trigger false positives for unhandled exceptions.
Commits
-------
8b9b62048c Remove unused @throws tags and handling of never thrown exceptions
This PR was merged into the 5.2 branch.
Discussion
----------
[Cache] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39280
| License | MIT
Currently, deleting cache keys is broken for users using PhpRedis with Redis-server < 4.0.0. The current implementation expects PhpRedis to throw an exception if the 'unlink'-function is used but unavailable, after which it's supposed to switch to using the 'del'-function. Using the 'unlink'-function on lower Redis-server versions seems to not throw an exception, but instead it appears to silently fail.
This pull request changes this behavior and checks the Redis-server version instead. If the version is 4.0 or higher, it uses the unlink function. If not, it uses the del-function.
Also see https://redis.io/commands/unlink > "Available since 4.0.0".
(Footnote: this is one of my first times contributing to an open-source project and my first time contributing to Symfony. I've tried following the guidelines, but please let me know if I missed anything. I'm unsure how I would go about unit testing this specific bugfix due to it being dependent on the Redis version, so I omitted it. Please let me know if a unit test is indeed required for this and if so, let me know if you have any suggestions on how to go about that.)
Commits
-------
9363f3b973 [Cache] Fixed incorrect usage of UNLINK with PHPRedis with Redis < 4.0
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Cache] Support Redis Sentinel mode when using phpredis/phpredis extension
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#39362
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/14668
The version 5.2.0 of the [Redis PHP extension](http://pecl.php.net/package/redis), released back in March 2020, added support for Redis Sentinel mode with the help of the `RedisSentinel` class.
Usage of the `Symfony/Cache RedisAdapter` can continue to be the same, thus relying on the `$options['redis_persistent']` option to both enable and define the master name.
Commits
-------
814ffabbd8 [Cache] Support Redis Sentinel mode when using phpredis/phpredis extension
This PR was merged into the 5.1 branch.
Discussion
----------
[FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Something we missed in #36470 apparently.
Commits
-------
d502ba9e5d [FrameworkBundle] acces public-deprecated services via the private container to remove false-positive deprecations
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Update the ICU data to 68.1
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Ideally, this should be merged after #39370.
Commits
-------
f3eda44058 [Intl] Update the ICU data to 68.1
* 5.2:
[Serializer] Fixed serialize and denormalize return types
Run intl-data tests on resources change
[Notifier] Add exception for deprecated slack dsn
[FrameworkBundle] fix preserving some special chars in the query string when redirecting
[HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery()
This PR was merged into the 5.2 branch.
Discussion
----------
[HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery()
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39307
| License | MIT
| Doc PR | -
Same as #39357 for 5.2
Commits
-------
8682bdc521 [HttpFoundation] fix parsing some special chars with HeaderUtils::parseQuery()
* 5.1:
[Serializer] Fixed serialize and denormalize return types
Run intl-data tests on resources change
[FrameworkBundle] fix preserving some special chars in the query string when redirecting
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] fix preserving some special chars in the query string
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39307
| License | MIT
| Doc PR | -
Commits
-------
6ecae5719c [FrameworkBundle] fix preserving some special chars in the query string when redirecting
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle] Add validator.expression_language service
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
This add a `validator.expression_language` service to allow better than in-memory caching of validation expression.
This also opens possibilities to extend the expression language available in validation expression through the use of `ExpressionFunctionProviderInterface` and a compiler pass.
I tried to do something close as what exists for `security.expression_language` service but I still have some questions.
- Which kind of tests should I write for this feature?
- Does it deserve having it's own child `ExpressionLanguage` class?
#SymfonyHackday
Commits
-------
41c5901047 [FrameworkBundle] Add validator.expression_language service
This PR was merged into the 4.4 branch.
Discussion
----------
Run intl-data tests on resources change
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? |no
| Tickets | -
| License | MIT
| Doc PR | -
`intl-data` tests are run whenever we update ICU data as they're rather time-consuming.
This proposal automates intl-data test runs with Github Actions. Tests will only be run on pull requests or pushes that modifyy ICU data. Full run on Github Actions takes 6-7mins. Example run: https://github.com/jakzal/symfony/actions/runs/406526765
<img width="1204" alt="image" src="https://user-images.githubusercontent.com/190447/101393171-92a28c00-38be-11eb-9efa-8f0a75ff04b0.png">
Commits
-------
745020892f Run intl-data tests on resources change
This PR was squashed before being merged into the 5.1 branch.
Discussion
----------
[Serializer] Fixed serialize and denormalize return types
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
Since #35235 `SerializerInterface::deserialize()` and `DenormalizerInterface::denormalize()` return types are no longer correct.
I suggest using `mixed` to allow custom denormalizers to denormalize to any type. For instance, I might add `ClosureDenormalizer` or `NullDenormalizer` or `ResourceDenormalizer`, technically there are no limits.
Commits
-------
67277e55f0 [Serializer] Fixed serialize and denormalize return types
This PR was merged into the 5.2 branch.
Discussion
----------
[Notifier] Add exception for deprecated slack dsn
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | Fix#39204
| License | MIT
| Doc PR | -
The DSN for the Slack integration changed again from 5.1 to 5.2. There was the idea to output an exception for that.
Commits
-------
6b56b4c6f9 [Notifier] Add exception for deprecated slack dsn
* 5.1:
[HttpFoundation] Removed obsolete test.
[HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
[Security][Validator] Add missing Portuguese translations
Add Croatian (hr) translations
* 4.4:
[HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
[Security][Validator] Add missing Portuguese translations
Add Croatian (hr) translations
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
This PR fixes the type error when user set `null` as data in the `new JsonResponse(null, 200, [], true)` and true in the fourth argument to mark that value is json.
```
TypeError: Argument 1 passed to Symfony\Component\HttpFoundation\JsonResponse::setJson() must be of the type string, object given, called in /home/projects/symfony/src/Symfony/Component/HttpFoundation/JsonResponse.php on line 52
```
Commits
-------
7fcba9611d [HttpFoundation] Fix TypeError: Argument 1 passed to JsonResponse::setJson() must be of the type string, object given