This PR was merged into the 5.2-dev branch.
Discussion
----------
[Messenger] Do not call getQueueUrl when the url is known in AmazonSqs transport
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#38849
| License | MIT
| Doc PR | TODO
When user provides a DSN that looks like a queueUrl, we don't need to call the `getQueueUrl` method. This PR inject the known queueUrl and prevent performing a useless call to the API when sending a message
Commits
-------
f1f44d48e0 Do not call getQueueUrl when the url is known
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Messenger] Improve formatting of exception in failed message
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | not really, enhancement of an existing feature
| Deprecations? | no
| Tickets | Fix#32310
| License | MIT
This PR improves the formatting of exception details in failed messenges when displayed using `messenger:failed:show <id> -vv`.
Before:
<img width="807" alt="Screen Shot 2020-11-01 at 1 05 24 PM" src="https://user-images.githubusercontent.com/4370753/97802602-ea593200-1c44-11eb-8bcb-7fcf2d3f1db0.png">
After:
<img width="803" alt="Screen Shot 2020-11-01 at 1 03 09 PM" src="https://user-images.githubusercontent.com/4370753/97802615-f0e7a980-1c44-11eb-8c12-46b2d4510364.png">
I created a `ThrownExceptionDetails` class which will be displayed as a normal exception when dumped with the VarDumper component. Not sure if this is the right way to do it and if the class is in the right namespace, but this is the best solution I could came up with to fix#32310. I'm open for other suggestions.
Commits
-------
2ad1adda69 [Messenger] Improve formatting of thrown exception in show failed message command
This PR was merged into the 5.2-dev branch.
Discussion
----------
[HttpFundation][FrameworkBundle] Deprecate the HEADER_X_FORWARDED_ALL constant
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | TODO
The `HEADER_X_FORWARDED_ALL` implicitly trust the `x-forwarded-host` header, leading to possible host header attack (as warned in the [documentation](https://symfony.com/doc/current/reference/configuration/framework.html#trusted-hosts).)
Moreover, this `HEADER_X_FORWARDED_ALL` does not really fowards **all** headers, as ti does not supports `X-Forwarded-Prefix` headers.
This PR deprecate the constant and the new framework bundle configuration. It will be removed in 6.0. People have to use: either:
- `Request::setTrustedProxies(['1.2.3.4'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);`
- `Request::setTrustedProxies(['1.2.3.4'], Request::HEADER_X_FORWARDED_TRAEFIK);`
- `framework.trusted_headers: [x-forwarded-for, x-forwarded-host, x-forwarded-port, x-forwarded-proto]`
Commits
-------
7cf4dd6917 Deprecate HEADER_X_FORWARDED_ALL constant
This PR was merged into the 5.1 branch.
Discussion
----------
[HttpClient] Check status code before decoding content in TraceableResponse
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | np
| Tickets | -
| License | MIT
| Doc PR | -
Using `toArray()` on the response of a traceable client, the status code is currently checked after json decoding, which leads to `JsonException` being thrown instead of `ClientException`.
It should be the opposite, as for non-traceable responses.
Commits
-------
e5595dae73 [HttpClient] Check status code before decoding content in TraceableResponse
This PR was merged into the 4.4 branch.
Discussion
----------
Rename security.pt_PT.xlf to security.pt.xlf
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38774
| License | MIT
Missing translations for Portuguese (pt).
As agreed in https://github.com/symfony/symfony/issues/38739#issuecomment-721210579 the common Portuguese translation file for security domain should be ``security.pt.xlf`` rather than ``security.pt_PT.xlf``
Commits
-------
3dd385f319 Rename security.pt_PT.xlf to security.pt.xlf
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] fix replaying skipped tests
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Spotted while working on https://github.com/symfony/polyfill/pull/310
See also https://3v4l.org/D6Gro for the newly skipped tests in symfony/intl
Commits
-------
849d1b3845 [PhpUnitBridge] fix replaying skipped tests
This PR was merged into the 4.4 branch.
Discussion
----------
Switch nightly run to 8.0snapshot
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
It's too early to test on php 8.1, so let's switch to 8.0 instead.
Commits
-------
b4730cbe1d Switch nightly run to 8.0snapshot
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Register AddErrorDetailsStampListener from the Messenger component as event subscriber
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
This is a fix for a bug in version 5.2-BETA3.
In #32904, adding the error details to a failed message in the Messenger component was moved to a separate listener. However, this listener is not registered in the FrameworkBundle, resulting in no error details stored at all (when using the Symfony skeleton). This PR adds that missing registration.
Commits
-------
deda2ac411 [FrameworkBundle] Register AddErrorDetailsStampListener from the Messenger component as event subscriber
This PR was merged into the 5.2-dev branch.
Discussion
----------
[Notifier] Add unit tests for NullMessage, NullTransport and NullTransportFactory
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| 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
| 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 5.x.
-->
Commits
-------
8a78dc2c97 [Notifier] Add unit tests for NullMessage, NullTransport and NullTransportFactory
* 5.1:
[Process] Dont test TTY if there is no TTY support
Fixing some Mongolian
translating the validators for european portuguese language
Fix CI
Update validators.he.xlf
Update security.he.xlf
Update validators.he.xlf
Improve performances in CircualReference detection
[PHPUnitBridge] Fixed crash on Windows with PHP 8
Fix session called initized several time
* 4.4:
[Process] Dont test TTY if there is no TTY support
Fixing some Mongolian
translating the validators for european portuguese language
Fix CI
Update validators.he.xlf
Update security.he.xlf
Update validators.he.xlf
Improve performances in CircualReference detection
[PHPUnitBridge] Fixed crash on Windows with PHP 8
Fix session called initized several time
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Fix session initialized several times
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
The session injected in the request is a factory. When the request is **cloned** (ie sub-request) while the session is not yet used in the master request (the session is still a factory), both Master and Sub request will have a factory.
If both requests attempt to read the session afterward, they both triggers the factory, and both initialize the session.
It's not a dead end for the `SessionListener` because the session come from the container and is shared, but:
- the session is initialized ($storage->setOptions(['cookie_secure' => true])) twice
- if we replace the sesssion from container to a factory, it could be an issue
Commits
-------
30a3c7c87b Fix session called initized several time
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] Improve performances in CircualReference detection
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#37850
| License | MIT
| Doc PR | -
This PR change the way circular references are detected. And improve the project submitted in #37850 [by **86%**](https://blackfire.io/profiles/compare/cc4aa41d-5b63-4caa-9a1b-fc282dc5d64a/graph) (Build the container in 1.1 sec instead of 10)
Issue is: When a project contains a lot Circular Reference, the Dumper [spend a lot of time](https://blackfire.io/profiles/54f6eba2-b93c-4f2b-a268-1e58883faecb/graph) in merging those circular references.
note: a circular reference is not an issue when an service is not injected by constructor, but this Can not be known until all references are resolved (performed previously by connectCircularReferences)
This PR removed the connectCircularReferences and generate a flatten tree of dependencies:
- the key is the service ID
- the value is the list of direct **AND** indirect dependency + path to join the dependency
I also [benched the PR with a project with few references](https://blackfire.io/profiles/compare/2f9902e6-3347-40b3-8421-e1fd09c067d2/graph) and result are almost the same before/after.
Commits
-------
d4db75692b Improve performances in CircualReference detection
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Process] Dont test TTY if there is no TTY support
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38946
| License | MIT
| Doc PR |
Commits
-------
e918e5ab30 [Process] Dont test TTY if there is no TTY support
This PR was merged into the 4.4 branch.
Discussion
----------
[PHPUnitBridge] Fixed crash on Windows with PHP 8
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
The install command crashed with the message "The filename, directory name, or volume label syntax is incorrect.".
It happens only on Windows with PHP 8.
Probably due to https://github.com/php/php-src/blob/PHP-8.0/UPGRADING#L1121-L1123
I have a small repo to show the problem and how it is fixed: https://github.com/villfa/test-phpunit-bridge
Commits
-------
4b958917fd [PHPUnitBridge] Fixed crash on Windows with PHP 8
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
Fixing some Mongolian
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38916
| License | MIT
| Doc PR |
Hey @luffy1727, could you help me with the last two strings here?
Commits
-------
5c848d9796 Fixing some Mongolian
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
translating the validators for european portuguese language
| Q | A
| ------------- | ---
| Branch? | 5.x for features / 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 5.x.
-->
Commits
-------
c0524197a0 translating the validators for european portuguese language
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Merge RecursiveValidatorTest with its parents
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
`RecursiveValidatorTest` as two abstract parent classes that to my understanding exist mainly for historic reasons: We used to have different validator implementations and those abstract classes contained some shared test cases. This is not the case anymore, which leaves `RecursiveValidatorTest` as the only child class of those two abstract classes.
This PR suggests to merge the three classes into one.
I've executed the test suite before and after the change and PHPUnit reported the same number of assertions and test cases.
I've also checked how the merge to 5.1 and 5.x would look like. The merge to 5.1 works without conflicts. From 5.1 to 5.x, two additional test cases have to be moved down and the reference to a few fixture classes needs to be adjusted.
Commits
-------
6822774d37 [Validator] Merge RecursiveValidatorTest with its parents.
This PR was merged into the 4.4 branch.
Discussion
----------
[Finder] Force set access time in test
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no, it only updates the tests
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38942
| License | MIT
| Doc PR |
OSX don't really update atime (access time). They claim it is because performance reasons. So this PR will update the test to make PHP force access time on a file.
The different runs of `testAccept` depends on each other because each test modifies the filesystem a bit. That is why I added the extra `sleep(1)`.
Commits
-------
c5ec51abdf [Finder] Force set access time in test
This PR was merged into the 4.4 branch.
Discussion
----------
Fix transiant tests in 4.4
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I noticed this week 2 currencies of this failure. in both case the `METADATA_EXPIRY` were 1.5 sec under the expected value
Commits
-------
833029ca7e Fix transiant tests in 4.4
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Form] Add missing Azerbaijani translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Part of #38725 and #38710
| License | MIT
| Doc PR | N/A
Commits
-------
142cfeed55 [Form] Add missing Azerbaijani translation