This PR was merged into the 5.1 branch.
Discussion
----------
[Validator] fix lowest allowed version for the PHPUnit bridge
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Fixes the `deps=low` build for the Validator component by only allowing versions of the PHPUnit bridge that contain #37153.
Commits
-------
fb7ee79dba fix lowest allowed version for the PHPUnit bridge
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
* 4.4:
fix merge
drop logger mock in favor of using the BufferingLogger
catch ValueError thrown on PHP 8
[Yaml Parser] Fix edge cases when parsing multiple documents
fix parsing comments not prefixed by a space
[Translator] Make sure a null locale is handled properly
deal with errors being thrown on PHP 8
[Cache] Allow cache tags to be objects implementing __toString()
[HttpKernel] Do not override max_redirects option in HttpClientKernel
remove superfluous cast
[HttpClient] Support for CURLOPT_LOCALPORT.
Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
Fixed exception message formatting
[FrameworkBundle] Fix error in xsd which prevent to register more than one metadata
[Console] work around disabled putenv()
[PhpUnitBridge] Fix error with ReflectionClass
[HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm
Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR
Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
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 5.1 branch.
Discussion
----------
[FrameworkBundle] loadRoutes shoud receive RoutingPhpFileLoader
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
<!--
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.
-->
In case when `sensio_framework_extra.router.annotations` options is set to `true` or not defined will throw this error
> In RoutingConfigurator.php line 28:
>
> Argument 2 passed to Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator::__construct() must be an instance of Symfony\Component\Routing\Loader\PhpFileLoader, instance of Symfony\Component\Routing\Loader\AnnotationFileLoader given, called in /opt/app/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php on line 176
Commits
-------
25a1131e47 loadRoutes shoud receive RoutingPhpFileLoader
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 5.2-dev branch.
Discussion
----------
[MonologBridge] Use composition instead of inheritance in monolog bridge
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets |
| License | MIT
| Doc PR |
In order to allow better customization in monolog activation strategy, this PR introduce composition instead of inheritance for these 2 classes :
- HttpCodeActivationStrategy
- NotFoundActivationStrategy
Commits
-------
0fb14394ca Use composition instead of inheritance in HttpCodeActivationStrategy
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Translator] Make sure a null locale is handled properly
| Q | A
| ------------- | ---
| Branch? | 4.4<!-- see below -->
| 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#38124 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- 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
-------
080ea5a0f7 [Translator] Make sure a null locale is handled properly
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 5.2-dev branch.
Discussion
----------
WebProfiler 5.2 is incompatible with HttpKernel 5.1
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
I have upgraded WebProfilerBundle to master in my project. Afterwards, the profiler crashes with the following error.
<img width="1049" alt="Bildschirmfoto 2020-09-17 um 21 45 23" src="https://user-images.githubusercontent.com/1506493/93520652-1a67a280-f92f-11ea-8f05-c72cbd996f19.png">
Looks like the changes of #36364 require HttpKernel to be bumped to 5.2 as well, so this PR suggests to do just that.
Commits
-------
115d6859d9 WebProfiler 5.2 is incompatible with HttpKernel 5.1
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Cache] Allow cache tags to be objects implementing __toString()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | maybe
| New feature? | maybe
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
`\Symfony\Contracts\Cache\CacheInterface::get(string $key, …)` implicitly converts objects with `__toString` while `CacheItem::tag()` will throw an exception. That’s a bit of a sharp edge.
Commits
-------
c2c03e050f [Cache] Allow cache tags to be objects implementing __toString()
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Do not override max_redirects option in HttpClientKernel
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38207
| License | MIT
| Doc PR | -
As [proposed](https://github.com/symfony/symfony/issues/38207#issuecomment-693382336) by @nicolas-grekas this pull request removes the `max_redirects` setting in the `\Symfony\Component\HttpKernel\HttpClientKernel::handle` method.
It solves the issue that requests made by the `\Symfony\Component\HttpClient\CachingHttpClient` wouldn't follow redirects as described in the linked issue.
Commits
-------
981a11beed [HttpKernel] Do not override max_redirects option in HttpClientKernel
This PR was merged into the 5.1 branch.
Discussion
----------
[Security] Log notice when no entry point is configured
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37068
| License | MIT
| Doc PR | -
In the new security system, authenticators are not necessarily authentication entry points. This can cause unexpected behavior if no entry point is configured. It's not really an error, that's why I choose the "notice" level: "Normal but significant events".
Commits
-------
68f891ff65 Log notice when no entry point is configured
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[HttpClient] Added RetryHttpClient
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | /
| License | MIT
| Doc PR | TODO
This PR adds a new HttpClient decorator to automatically retry failed requests.
When calling API, A very small % of requests are expected to timeout due to transient network issues. Some providers like AWS recommends retrying these requests and use a lower connection timeout so that the clients can fail fast and retry.
I used the almost the same configuration as Messenger
```yaml
framework:
http_client:
default_options:
retry_failed:
enabled: true // default false
decider_service: null
backoff_service: null
http_codes: [423, 425, 429, 500, 502, 503, 504, 507, 510]
max_retries: 3
delay: 1000
multiplier: 2
max_delay: 0
response_header: true
scoped_clients:
github:
scope: 'https://api\.github\.com'
retry_failed:
max_delay: 2000
```
Commits
-------
712ac5999d [HttpClient] Added RetryHttpClient
This PR was squashed before being merged into the 5.2-dev branch.
Discussion
----------
[Security] Added login throttling feature
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#37266
| License | MIT
| Doc PR | tbd
This "recreates" #37444 based on the RateLimiter component from #37546 <s>(commits are included in this branch atm)</s>.
Login throttling can be enabled on any user-based authenticator (thanks to the `UserBadge`) with this configuration:
```yaml
security:
firewalls:
default:
# default limits to 5 login attempts per minute, the number can be configured via "max_attempts"
login_throttling: ~
# or you can define your own RateLimiter on framework.rate_limiter and configure it instead:
login_throttling:
limiter: login
```
Commits
-------
afdd805b1c [Security] Added login throttling feature
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Support for CURLOPT_LOCALPORT
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/38081#issuecomment-688166943
| License | MIT
| Doc PR | N/A
Commits
-------
45fa6b8f24 [HttpClient] Support for CURLOPT_LOCALPORT.
This PR was merged into the 4.4 branch.
Discussion
----------
Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | #37564
| License | MIT
| Doc PR | N/A
This is #38103 on the 4.4 branch.
Commits
-------
73647e5ffe Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
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