This PR was merged into the 4.4 branch.
Discussion
----------
Add missing translations for Swedish
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41483
| License | MIT
Add missing Swedish translations to Security component.
Commits
-------
65e96dd13f Add missing translations for Swedish
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing translations for Thai
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41086
| License | MIT
Add missing Thai translations to Security component.
Commits
-------
d3249baa06 Add missing translations for Thai
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Remove duplicate catch block
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Spottet while reviewing https://github.com/symfony/symfony/pull/41576 by `@derrabus`
Commits
-------
32cac1c6f2 Remove duplicate catch block
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle][WebProfilerBundle] Don't pass null to string parameters
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #41552
| License | MIT
| Doc PR | N/A
This should fix the remaining issues from our bundle tests
Commits
-------
5af6edae62 [FrameworkBundle][WebProfilerBundle] Don't pass null to string parameters
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] Don't pass null to strtoupper()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #41552
| License | MIT
| Doc PR | N/A
This error popped up on 5.3, but not on 4.4. That's why I missed it when fixing the other occurrence with #41240.
Commits
-------
3c8cf9a3d4 [Translation] Don't pass null to strtoupper()
This PR was merged into the 4.4 branch.
Discussion
----------
Fix incompatible implicit float-to-int conversions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #41552
| License | MIT
| Doc PR | N/A
PHP 8.1 is picky about implicit float-to-int casts if we lose precision because of that cast. This PR should fix all cases that bubbled up in our test suite.
Commits
-------
fc7447681c Fix incompatible implicit float-to-int conversions
This PR was merged into the 4.4 branch.
Discussion
----------
[Security] Added missing translations for Croatian (hr)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#41039
| License | MIT
| Doc PR | -
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch 5.x.
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
Commits
-------
0bce1f6de1 Add missing security translations
This PR was merged into the 4.4 branch.
Discussion
----------
Fix Serializable deprecations triggered by token mocks
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #41552
| License | MIT
| Doc PR | N/A
On 4.4, `TokenInterface` extends `Serializable` but does not enforce implementations to implement `__serialize()` as well. When creating a mock from this interface, PHPUnit will emit code that triggers a deprecation warning on PHP 8.1.
This PR introduces stricter versions of `TokenInterface` to work around that problem.
My goal was to keep the diff small and mergable. We can probably drop most of the changes when merging to 5.2 because the two methods have been added there.
Commits
-------
48e76fafc6 Fix Serializable deprecations triggered by token mocks
This PR was merged into the 4.4 branch.
Discussion
----------
Add return types to JsonSerializable implementations
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Part of #41552
| License | MIT
| Doc PR | N/A
PHP 8.1 will trigger a deprecation warning if we implement `JsonSerializable` without a return type. I've added return types to the two mock implementations that were affected.
Commits
-------
9246b53f7c Add return types to JsonSerializable implementations
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Serializer] Do not allow to denormalize string with spaces only to valid a DateTime object
| Q | A
| ------------- | ---
| Branch? |4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
This PR fixes an issue when `$data` variable contains only spaces. In this case DateTimeNormalizer creates a DateTime object.
Commits
-------
21c0829a25 [Serializer] Do not allow to denormalize string with spaces only to valid a DateTime object
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Console] Escape synopsis output
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#41315 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
960cb520df [Console] Escape synopsis output
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] Document null support in NumberToLocalizedStringTransformer
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
`Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer` explicitly checks for and returns nulls but these aren't documented in the class' doc blocks, which causes static analysis tools to report a false positive when checking for these null values elsewhere. This adds the missing null types to the doc blocks.
Commits
-------
1fda3d0284 Document null support in NumberToLocalizedStringTransformer
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Add ReturnTypeWillChange to SessionHandlers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | maybe?
| Tickets |
| License | MIT
| Doc PR |
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against branch 5.x.
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
This adds `#[ReturnTypeWillChange]` annotations for `SessionHandler` methods to satisfy the [Tentative Return Types RFC](https://wiki.php.net/rfc/internal_method_return_types). This doesn't cover all classes (e.g. `MockPdo` is also affected), just the ones relating to `SessionHandler` etc.
It's worth noting that the `gc()` method is spec'd as `int|false` on our side, so I've updated type hints accordingly. The method used to return bool prior to PHP 7.1.
Commits
-------
8954b4f922 [HttpFoundation] Add ReturnTypeWillChange to SessionHandlers
This PR was submitted for the 5.2 branch but it was squashed and merged into the 4.4 branch instead.
Discussion
----------
[Form] Use !isset for checks cause this doesn't falsely include 0
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40999
| License | MIT
By using isset 0 won't falsely included anymore
Commits
-------
cd541c5a63 [Form] Use !isset for checks cause this doesn't falsely include 0