This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] drop logger mock in favor of using the BufferingLogger
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/pull/37808#discussion_r469463688
| License | MIT
| Doc PR |
Commits
-------
86a7e3289b drop logger mock in favor of using the BufferingLogger
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml Parser] Fix edge cases when parsing multiple documents
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
I identified some edge cases when parsing multiple YAML documents with the same parser instance, because the totalNumberOfLines was not reset and so any subsequent parsing considered the number of lines of the first document.
Consider this document:
```yaml
a:
b: |
row
row2
c: d
```
Normally, `a.b` would be parsed as `row\nrow2\n`. But if the parser parsed a shorter document before, the `\n` after row2 was missing, as the parser considered it as the end of the file (that's why the `c: d` at the end is important).
So this fix resets the `totalNumberOfLines` in the YAML parser to `null` so that any subsequent parsing will initialize the value for the new document and does not use the file length of the first parsed document.
I stumbled upon this because of a flickering unit test that was using the translation component. Sometimes the translated string contained a trailing `\n` and sometimes not. In the end it was based on this bug, as the translation files were not loaded in the same order every time (not really sure why. It's somehow related to the cache state, but even with a warm cache it was not totally deterministic).
Commits
-------
012ee4fa59 [Yaml Parser] Fix edge cases when parsing multiple documents
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] fix parsing comments not prefixed by a space
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38223
| License | MIT
| Doc PR |
Commits
-------
35b223aaa4 fix parsing comments not prefixed by a space
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] deal with errors being thrown on PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
6175d528e8 deal with errors being thrown on PHP 8
This PR was merged into the 3.4 branch.
Discussion
----------
Patch YAML superfluous cast
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4, 4.4 or 5.1 for bug fixes <!-- see below --> - 3.4 as branch to patch against as documented
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | -/- <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
Commits
-------
05a9660a1e remove superfluous cast
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR in BaseType
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
The purpose of this change is to find all usages of AbstractRendererEngine::CACHE_KEY_VAR. Currently, if you search for AbstractRendererEngine::CACHE_KEY_VAR you will see only access to it, i.e. (`$view->vars[AbstractRendererEngine::CACHE_KEY_VAR]`), but you can't find it in write level. With this pull request you can see where is was used for write.
Commits
-------
4fcb41c3ba Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR
The purpose of this change is to find all usages of AbstractRendererEngine::CACHE_KEY_VAR. Currently, if you search for AbstractRendererEngine::CACHE_KEY_VAR you will see only access to it, i.e. (`$view->vars[AbstractRendererEngine::CACHE_KEY_VAR]`), but you can't find it in write level. With this pull request you can see where is was used for write.
This PR was merged into the 3.4 branch.
Discussion
----------
Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes/no
| New feature? | no
| Deprecations? | no
| Tickets | #37564
| License | MIT
| Doc PR | N/A
Our test suite on the 3.4 branch should be compatible with more recent versions of PHPUnit now. In order to make sure that it stays that way, I'm proposing to bump PHPUnit to 8.5 for the php 7.2 job and 9.3 for the php 7.3 and 7.4 jobs.
Commits
-------
ff47516ea0 Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
This PR was merged into the 3.4 branch.
Discussion
----------
[DoctrineBridge] add choice_translation_domain tests to prevent further regressions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix #https://github.com/symfony/symfony/pull/37521#issuecomment-678247192
| License | MIT
| Doc PR |
Commits
-------
7775b3707b add choice_translation_domain tests to prevent further regressions
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Skip the cookie_max_age fixture on PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
This PR suggest to skip a certain integration test on php 8. The integration test in question triggers a warning by setting a way too high expiration date when calling `setcookie()`. Apparently, this warning has been upgraded to a fatal error on php 8.
Since the integration test is run in a separate process, we might as well adjust the expectation of that test case, but I don't really see the point in asserting fatal error behavior, to be honest.
Commits
-------
d6d9b2927d [HttpFoundation] Skip the cookie_max_age fixture on PHP 8.
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
Update validators.tr.xlf
Turkish Spelling error corrected.
| Q | A
| ------------- | ---
| Branch? | 4.4 5.1 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| 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 -->
<!--
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 master.
-->
Commits
-------
f346eccb60 Update validators.tr.xlf
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add missing Serbian (sr_Latn & sr_Cyrl) translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | none
<!--
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 master.
-->
Commits
-------
e927c7cf69 add mising sr (latn & cyrl) translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] allow consumers to mock all methods
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38048
| License | MIT
| Doc PR |
Commits
-------
3227303dab allow consumers to mock all methods
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] promote warnings to value errors on PHP 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
82d9d41d57 [Intl] promote warnings to value errors on PHP 8
This PR was squashed before being merged into the 3.4 branch.
Discussion
----------
DateTime validator support for trailing data
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37094
| License | MIT
Commits
-------
27f6e28f5b DateTime validator support for trailing data
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Skip a test that was meant for HHVM
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
This PR skips a test that fails on php 8. If I read the test correctly, it is meant to run on HHVM, so I assumed it's save to skip it if we're on PHP.
Commits
-------
bf62a4d622 [Debug] Skip a test that was meant for HHVM.
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.
Discussion
----------
[Console] guard $argv + $token against null, preventing unnecessary exceptions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| Tickets | Fix https://github.com/symfony/symfony/issues/38105
| License | MIT
This issue was causing an unnecessary exception, leading to difficulty in locating the actual offending code as reported by many cases as detailed in #38105
Commits
-------
dbe335d9be guard $argv + $token against null, preventing unnecessary exceptions
This PR was merged into the 3.4 branch.
Discussion
----------
Prevent parsing invalid octal digits as octal numbers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Values starting with `0` but containing `8` or `9` such as `0123456789` are not valid octal numbers, therefore they should be parsed as regular strings. This is consistent with how other invalid octal values are parsed, e.g. `01234567ab` already gets parsed as the string `"01234567ab"`.
Commits
-------
c7dcd82f03 Prevent parsing invalid octal digits as octal numbers
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.
Discussion
----------
[Console] Make sure $maxAttempts is an int or null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The behavior of the "less than" operator for mixed types has changed in php 8. It is now possible to call `setMaxAttempts()` with a random string without raising the expected `InvalidArgumentException`. I've added an explicit type cast in order to restore the previous behavior.
Commits
-------
4fcd4916ed [Console] Make sure $maxAttempts is an int or null.
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Fix caster for invalid SplFileInfo objects on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
The behavior of uninitialized `SplFileInfo` classes has changed in php 8: https://3v4l.org/s4c4O
* `getPathname()` won't return `false` anymore.
* The error raised by most accessors is now recoverable. On php 7, it's fatal.
This PR adjusts the caster for those objects to the new behavior.
Commits
-------
ab45e2aaae [VarDumper] Fix caster for invalid SplFileInfo objects on php 8.
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Adjust output parsing of CoverageListenerTrait for PHPUnit 9.3
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37637, #37564
| License | MIT
| Doc PR | N/A
This PR makes `CoverageListenerTrait` pass with PHPUnit 9.3. It contains a backport of #38054.
The problem that is addressed here is that a one of the fixture classes is now included in the output despite having a coverage of zero. The test now accepts both cases:
* The class is omitted from the output
* The class appears with 0.00% coverage.
Commits
-------
a3831dc0f2 [PhpUnitBridge] Adjust output parsing for PHPUnit 9.3.
99c98bd716 [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Skip test cases that produce a TypeError on php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
On php 8, `NumberFormatter::setAttribute()` will throw a type error if the provided value is not of type `int|float`. This is why I'm skipping the corresponding tests for now. Alternatively, we could check for the PHP version in Symfony's implementation of that class and throw the `TypeError` as well, if we're on php 8. But since this is a breaking change, I'm was unsure if I sould go that way.
Commits
-------
7f1055b97c [Intl] Skip test cases that produce a TypeError on php 8.
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add Bosnian (BS) translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#30275
| License | MIT
| Doc PR | none
<!--
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 master.
-->
Commits
-------
dd44563004 add bosnian (bs) translation