This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fixed class_alias() for PHPUnit\Framework\Error\Error
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
PHPUnit 6.x removed the PHPUnit_Framework_* classes in favor of PHP namespaces, but one error class did not map the same as the others: `PHPUnit_Framework_Error`.
Instead of mapping to `PHPUnit\Framework\Error` in the same way that `PHPUnit_Framework_Error_Warning` mapped to `PHPUnit\Framework\Error\Warning`, this base class was replaced with `PHPUnit\Framework\Error\Error`, so we cannot map it using simple string replacement like its descendants.
Commits
-------
8e607b58df [PhpUnitBridge] Fix class_alias() for PHPUnit\Framework\Error\Error
PHPUnit 6.x removed the PHPUnit_Framework_* classes in favor of PHP namespaces, but one error class did not map the same as the others: `PHPUnit_Framework_Error`.
Instead of mapping to `PHPUnit\Framework\Error` in the same way that `PHPUnit_Framework_Error_Warning` mapped to `PHPUnit\Framework\Error\Warning`, this base class was replaced with `PHPUnit\Framework\Error\Error`.
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Return false directly and remove unused variable
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37848
| License | MIT
| Doc PR | -
To return true, $type and $log both need to be true. But to enter the condition, one of them has to be false.
I also spotted an unused variable below so I removed it.
Commits
-------
3933957d1a [ErrorHandler] Return false directly and remove unused variable
This PR was merged into the 4.4 branch.
Discussion
----------
[OptionsResolver] Assert that the error type is valid in deprecations test
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
A change in the code could cause a warning for example and still produce the expected number of errors and the expected last error. Checking the type of the error is a little bit better. The best would be to check all the expected deprecations one by one, maybe later? 😄
Commits
-------
926d18f2f9 [OptionsResolver] Assert that the error type is valid in deprecations test
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpClient] Allow bearer token with colon
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
The JetBrains Hub (YouTrack API) creates tokens with a `perm:` prefix. This doesn't work right now, because HttpClient doesn't allow a colon in the bearer token.
As far as I can see, there is no reason to disallow the use of the semicolon in the bearer token, so this PR fixes it.
Example of a token: `perm:c3RlcGhhbg==.NTUtMw==.NiZw16agafhsQAShTvclhb78hyJh2H`
Commits
-------
82ed1ec20a [HttpClient] Allow bearer token with colon
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] Fix custom formats deprecation with HTML5 widgets
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/37698
| License | MIT
| Doc PR | -
1. The options resolver only show the deprecations for user defined (overidden) options.
2. The default value of the `html5` option is enough to pass the logical condition of the callback.
That means that only setting the `format` option (like in the reproducer) does not trigger the deprecation while it should. I think we need a feature in the options resolver component to handle those kind of cases 🤷♂️
Meanwhile, we can fix the issue by "deprecating" all the concerned options of the logical condition of the callback.
Commits
-------
d28182f99b [Form] Fix custom formats deprecation with HTML5 widgets
This PR was merged into the 4.4 branch.
Discussion
----------
[Contracts][Translation] Optional Intl dependency
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| 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 -->
same as #38283, and should help streamlining #38230
Commits
-------
d65d39da14 [Contracts][Translation] Optional Intl dependency
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Translator] Optional Intl dependency
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38279
| 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.
-->
i decided to cast $locale at construct, given its property is documented to be string
Commits
-------
a2eb263457 [Translator] Optional Intl dependency
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Escape JSON encoded log context
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | eno <!-- 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 -->
Fixes https://github.com/symfony/symfony/issues/35569#issuecomment-581317792
Fixes https://github.com/symfony/symfony/issues/35569#issuecomment-696767559
The initial issue remains though (the webprofiler showing the logs tab in the exception panel), i'll try to give it another look sometime, but this is a quick win nevertheless.
cc @yceruto
Commits
-------
5572a68ed7 [ErrorHandler] Escape JSON encoded log context
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.
Discussion
----------
update missing translations arabic
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4, 4.4 or 5.1 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/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
-------
76a47b38e2 update missing translations arabic
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] simplify the test
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/pull/38228#discussion_r491045753
| License | MIT
| Doc PR |
Commits
-------
bb64fc9c3b [Yaml] simplify the test
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] fix test by letting mock throw the actual expected exception
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37808
| License | MIT
| Doc PR |
This fixes a mistake I made when rewriting the tests in #37808.
Commits
-------
f6f162dcdd fix test by letting mock throw the actual expected exception
* 3.4:
drop logger mock in favor of using the BufferingLogger
[Yaml Parser] Fix edge cases when parsing multiple documents
fix parsing comments not prefixed by a space
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 4.4 branch.
Discussion
----------
[Validator] catch ValueError thrown on PHP 8
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
see php/php-src@95f4ee38bb
Commits
-------
fb0d7beaaf catch ValueError thrown on PHP 8
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