This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
Improve ExtractorInterface phpdoc
| Q | A
| ------------- | ---
| Branch? | 5.x
| 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 -->
<!--
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
-->
I think this phpdoc can be improved
Commits
-------
255b608d6d Improve ExtractorInterface phpdoc
This PR was merged into the 5.3-dev branch.
Discussion
----------
Doc: Fix unclosed backtick in UPGRADE-6.0.md
Fix unclosed backtick.
| Q | A
| ------------- | ---
| Branch? | 5.x for features / 4.4 or 5.2 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.
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
Commits
-------
c4c79662db Update UPGRADE-6.0.md
This PR was merged into the 5.3-dev branch.
Discussion
----------
Use symfony/deprecation-contracts instead of trigger_error
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes <!-- 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 -->
As `symfony/deprecation-contracts` added to requirements with PR #40468, we can update `trigger_error` call in favor reusing deprecation abstractions
Commits
-------
1acc296773 Use symfony/deprecation-contracts instead of trigger_error
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Mime] Remove @internal from Headers methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| 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 5.x.
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
I don't understand why the methods
- `Headers::getHeaderBody()`
- `Headers::setHeaderBody()`
- `Headers::getHeaderParameter()`
- `Headers::setHeaderParameter()`
are marked as internal.
They are already used by others libraries, like
a6c3fa9aea/Transport/MandrillApiTransport.php (L92)a6c3fa9aea/Transport/MandrillApiTransport.php (L99)
The implementation shouldn't change so they could be under the BC promise.
Plus they are useful, and I don't see any other way that reimplementing the method if we want to do something like
```
->getHeaderParameter('Content-Disposition', 'name')
```
Commits
-------
592fb13456 Remove internal annotation
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] [FakeSms] Change DSN to be more realistic
| 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 | Follows https://github.com/symfony/symfony/pull/39949
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Just a minor tests change
Commits
-------
0b13575df5 [Notifier] [FakeSms] Change DSN to be more realistic
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix n/a
| License | MIT
| Doc PR | todo
This PR adds a new helper to generate raw fragment URL. Fragments will be useful to generate lazy frames with Symfony UX Turbo (https://github.com/symfony/ux/pull/64). This will also be convenient when using hinclude, ESI etc in case you want full control over the generated HTML.
This is also more in sync with the new best practices we apply in the form component (generate the HTML by yourself instead of using Twig helpers hiding the HTML elements).
Example:
```html
<turbo-frame id="set_aside_tray" src="{{ fragment_uri(controller('Symfony\Bundle\FrameworkBundle\Controller', {template: "foo.html.twig"})) }}">
<img src="/icons/spinner.gif">
</turbo-frame>
```
Commits
-------
5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
Messenger multiple failed transports
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#34911
| License | MIT
| Doc PR | symfony/symfony-docs#13489
<!--
https://github.com/symfony/symfony-docs/pull/13489 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/roadmap):
- 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.
-->
## Strategy applied
- Pass a map of transports and failed transports to the `SendFailedMessageToFailureTransportListener`. This way we re-use the same listener.
- Local failed transport has more priority than a global failed transport defined.
## Configuration example
```yaml
# config/packages/messenger.yaml
framework:
# no need to set failed transport globally if I want a specific behaviour per transport.
failure_transport: failed # all transports have this failed transport
messenger:
transports:
failed: 'doctrine://default?queue_name=failed'
failed_important: 'doctrine://default?queue_name=failed_important'
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
failure_transport: failed # takes precedence over the global defined "failed_transport"
retry_strategy:
max_retries: 3
delay: 1000
multiplier: 2
async_no_failure_transport: # it will use the global defined transport if no one is defined.
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
retry_strategy:
max_retries: 3
delay: 1000
multiplier: 2
async_send_specific_failure_queue:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
failed_transport: failed_important # takes precedence over the global defined "failed_transport"
retry_strategy:
max_retries: 3
delay: 1000
multiplier: 2
```
You can test this feature easily on a [demo project](https://github.com/monteiro/messenger-multiple-failed-transports-pr34979). Just follow the [README](https://github.com/monteiro/messenger-multiple-failed-transports-pr34979).
**More information on issue #34911**
## What needs to be done so this can be merged:
- [x] validate strategy
- [ ] update src/**/CHANGELOG.md files
- [x] update tests to cover all cases
- [x] create doc PR
Commits
-------
5810b6c378 Messenger multiple failed transports
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] [FakeSms] Use correct namespace
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Follow #39949
| License | MIT
| Doc PR |
This fixes the build
Needed after https://github.com/symfony/symfony/pull/40550
Commits
-------
5572bab94d [Notifier] [FakeSms] Use correct namespace
* 5.2:
Bump Symfony version to 5.2.7
Update VERSION for 5.2.6
Update CHANGELOG for 5.2.6
Bump Symfony version to 4.4.22
Update VERSION for 4.4.21
Update CONTRIBUTORS for 4.4.21
Update CHANGELOG for 4.4.21
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Security] Rename UserInterface::getUsername() to getUserIdentifier()
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| Tickets | Fix part of #39308
| License | MIT
| Doc PR | tbd
This continues the great work by @chalasr in #40267 and rounds up the `UserInterface` cleanup.
The `getUsername()` has been a point of confusion for many years. In today's applications, many domains no longer have a username, but instead rely on a user's email address or the like. Even more, this username has to be unique for all Security functionality to work correctly - so it's more confusing in complex applications relying on e.g. "username+company" to be unique.
**This PR proposes to rename the method to `getUserIdentifier()`**, to more clearly indicate the goal of the method (note: I'm open for any other suggestion).
For BC, the `getUsername()` method is deprecated in 5.3 and `getUserIdentifier()` will be added to the `UserInterface` in 6.0. PHPdocs are used to improve type-hinting for 5.3 & 5.4. Both authentication managers (the legacy and experimental one) check the authenticated user object and trigger a deprecation if `getUserIdentifier()` is not implemented.
* [x] **judge whether we need to have better deprecations for calling `getUsername()` in the application code.**
Consistent with these changes, I've also done the same BC change for `TokenInterface::getUsername()`.
* [x] **do the same for remember me's `PersistentTokenInterface::getUsername()`**
* [x] **also rename `UserProviderInterface::loadUserByUsername()` & `UsernameNotFoundException`**
* [x] **also rename `UserLoaderInterface::loadUserByUsername()`**
I'm very much looking forward for feedback and help for this important, but BC-heavy, rename. 😃
Commits
-------
8afd7a3765 [Security] Rename UserInterface::getUsername() to getUserIdentifier()
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Use more concrete user classes in tests
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Similar to #40609.
https://github.com/symfony/symfony/pull/40145 keeps resisting... this should be the last mocked user & user provider in the 5.2 tests, looking at the failing deps=high build.
Commits
-------
631408b757 [Security] Use more concrete user classes in tests
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Use concrete UserInterface and UserProviderInterface classes in the tests
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | n/a
Fixes failing deps=high builds in #40403
Commits
-------
89d9de2077 Use concrete user related classes in the tests
This PR was merged into the 4.4 branch.
Discussion
----------
[Filesystem] Fix dumpFile() method call
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | ?
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
The dumpFile() method in the Filesystem component takes two arguments (filename and content). I found a test with the third argument set to null.
Commits
-------
2b33d4af65 [Filesystem] Fix dumpFile() method call
* 5.2:
skip intl dependent tests if the extension is missing
make DateCaster tests timezone-agnostic
error if the input string couldn't be parsed as a date
IntegerType: Always use en for IntegerToLocalizedStringTransformer Fixes#40456
Uses the correct assignment action for console options depending if they are short or long
[HttpKernel] ConfigDataCollector to return known data without the need of a Kernel
[HttpClient] fix using stream_copy_to_stream() with responses cast to php streams
FIx Trying to clone an uncloneable object of class
* 4.4:
skip intl dependent tests if the extension is missing
make DateCaster tests timezone-agnostic
error if the input string couldn't be parsed as a date
IntegerType: Always use en for IntegerToLocalizedStringTransformer Fixes#40456
Uses the correct assignment action for console options depending if they are short or long
[HttpKernel] ConfigDataCollector to return known data without the need of a Kernel
[HttpClient] fix using stream_copy_to_stream() with responses cast to php streams
FIx Trying to clone an uncloneable object of class