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 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 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
This PR was merged into the 5.2 branch.
Discussion
----------
Add missing entries in gitattributes
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Adds `/.gitattributes export-ignore` in some bridges
Commits
-------
36f5ff1550 Add missing entries in gitattributes
* 5.1:
Fix merge.
Fix CS
[Messenger] Test generated SQL
[Config] YamlReferenceDumper: No default value required for VariableNode with array example
Remove PHPUnit configuration files from components without tests.
[DependencyInjection] Fix container linter for union types.
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Test generated SQL
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Follow-up to #39166.
This is an attempt to the SQL generated by the `Symfony\Component\Messenger\Transport\Doctrine\Connection::get()` method. The challange was to create a locking SELECT statement, taking into account the different ways to create a lock in different SQL dialects.
This test verifies if the correct lock statements are generated for MySQL and SQL Server.
Commits
-------
1f1b62afb6 [Messenger] Test generated SQL
This PR was merged into the 4.4 branch.
Discussion
----------
[Config] YamlReferenceDumper: No default value required for VariableNode with array example
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? |
| Tickets |
| License | MIT
| Doc PR |
This will fix#39328 in a better way.
A `VariableNode` may have an array as value and also a default value as "null". (Like the workflow component).
When we dump the config, we generate invalid yaml:
```
workflows:
enabled: false
workflows:
# Prototype
name:
# Select which Transition events should be dispatched for this Workflow
events_to_dispatch: null
# Examples:
- workflow.enter
- workflow.transition
```
With this PR, we will remove the `null` default value from the dumped config.
#SymfonyHackday
Commits
-------
9104fd4539 [Config] YamlReferenceDumper: No default value required for VariableNode with array example
This PR was merged into the 5.1 branch.
Discussion
----------
[Notifier] Remove PHPUnit configuration files from components without tests
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Follows #39331 by @wouterj.
PHPUnit 9.5 fails if we look for tests in directories that do not exist. This is very reasonable behavior, imho.
However, we do have some bridges in the Notifier component that don't provide any tests. Running PHPUnit on those bridges is pointless, which is why I'd like to remove the PHPUnit configuration from them. We can re-add the files as soon as we add tests.
#SymfonyHackday
Commits
-------
710340dfb2 Remove PHPUnit configuration files from components without tests.
* 5.1:
[Messenger] StopWorkersCommand improve doc helper
Added compatibility with PHPunit 9.5
do not apply the Valid constraint on scalar form data
[Test] Reproduce issue with cascading validation
[SecurityBundle] Don't use the container as resource type in fixtures.
Fix bug with whitespace in Kernel::stripComments()
* 4.4:
[Messenger] StopWorkersCommand improve doc helper
Added compatibility with PHPunit 9.5
do not apply the Valid constraint on scalar form data
[Test] Reproduce issue with cascading validation
[SecurityBundle] Don't use the container as resource type in fixtures.
Fix bug with whitespace in Kernel::stripComments()
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] do not apply the Valid constraint on scalar form data
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38039
| License | MIT
| Doc PR |
#SymfonyHackday
Commits
-------
453bb3ebde do not apply the Valid constraint on scalar form data
41b9457887 [Test] Reproduce issue with cascading validation
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fixed PHPunit 9.5 compatibility
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39329
| License | MIT
| Doc PR | -
Let's see if this works 🍀
#SymfonyHackday
Commits
-------
5134de52f1 Added compatibility with PHPunit 9.5
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Messenger] StopWorkersCommand improve doc helper
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix
| License | MIT
Small improvement :)
Commits
-------
e136068743 [Messenger] StopWorkersCommand improve doc helper