Commit Graph

54027 Commits

Author SHA1 Message Date
Nicolas Grekas
993f8093db minor #40669 [Notifier] [FakeSms] Add missing LICENSE and .gitattributes file (OskarStark)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeSms] Add missing LICENSE and .gitattributes file

| 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       |  | License       | MIT
| Doc PR        |

cc @nicolas-grekas

Commits
-------

4704f4ef1f [Notifier] [FakeSms] Add missing LICENSE and .gitattributes file
2021-04-01 12:14:44 +02:00
Nyholm
095f382a44
minor #40604 Improve ExtractorInterface phpdoc (VincentLanglet)
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
2021-04-01 12:02:30 +02:00
Vincent Langlet
255b608d6d
Improve ExtractorInterface phpdoc 2021-04-01 12:02:24 +02:00
Oskar Stark
4704f4ef1f [Notifier] [FakeSms] Add missing LICENSE and .gitattributes file 2021-04-01 11:58:08 +02:00
Nicolas Grekas
c143284aa3 minor #40666 Doc: Fix unclosed backtick in UPGRADE-6.0.md (glensc)
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
2021-04-01 11:08:09 +02:00
Nicolas Grekas
6f4b0a3715 bug #40667 [Messenger] fix deprecation layer in AbstractFailedMessagesCommand (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Messenger] fix deprecation layer in AbstractFailedMessagesCommand

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Added in #38468, spotted in #40643

Commits
-------

079cb31b7e [Messenger] fix deprecation layer in AbstractFailedMessagesCommand
2021-04-01 10:44:28 +02:00
Nicolas Grekas
079cb31b7e [Messenger] fix deprecation layer in AbstractFailedMessagesCommand 2021-04-01 10:27:23 +02:00
Nicolas Grekas
11db9cd250 minor #40643 Use symfony/deprecation-contracts instead of trigger_error (andrew-demb)
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
2021-04-01 10:19:34 +02:00
Andrii Dembitskyi
1acc296773 Use symfony/deprecation-contracts instead of trigger_error 2021-04-01 10:19:26 +02:00
Elan Ruusamäe
c4c79662db
Update UPGRADE-6.0.md
Fix unclosed backtick
2021-04-01 02:13:11 +03:00
Nyholm
f963ae476a
minor #40657 [Notifier] add missing LICENSE file for SpotHit (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] add missing LICENSE file for SpotHit

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

f4c28cbfc5 [Notifier] add missing LICENSE file for SpotHit
2021-03-31 21:48:03 +02:00
Nicolas Grekas
f4c28cbfc5 [Notifier] add missing LICENSE file for SpotHit 2021-03-31 18:35:27 +02:00
Fabien Potencier
f6159038ed feature #40576 [Mime] Remove @internal from Headers methods (VincentLanglet)
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
2021-03-31 13:46:29 +02:00
Nyholm
2f20156021
minor #40648 [Notifier] [FakeSms] Change DSN to be more realistic (OskarStark)
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
2021-03-31 09:55:22 +02:00
Oskar Stark
0b13575df5 [Notifier] [FakeSms] Change DSN to be more realistic 2021-03-31 09:19:44 +02:00
Robin Chalas
3154509985 feature #40575 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL (dunglas)
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
2021-03-30 16:47:58 +02:00
Kévin Dunglas
5d29d76612 [FrameworkBundle][HttpKernel][TwigBridge] Add an helper to generate fragments URL 2021-03-30 16:47:49 +02:00
Robin Chalas
7327919e9e feature #38468 Messenger multiple failed transports (monteiro)
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
2021-03-30 16:29:57 +02:00
Hugo Monteiro
5810b6c378 Messenger multiple failed transports 2021-03-30 16:28:46 +02:00
Nyholm
d7b6805f83
minor #40626 [Notifier] [FakeSms] Use correct namespace (OskarStark)
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
2021-03-29 14:31:11 +02:00
Alexander M. Turek
92dcdaa75b Merge branch '5.2' into 5.x
* 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
2021-03-29 14:19:02 +02:00
Alexander M. Turek
1993bb2fa5 Merge branch '4.4' into 5.2
* 4.4:
  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
2021-03-29 14:17:49 +02:00
Oskar Stark
5572bab94d [Notifier] [FakeSms] Use correct namespace 2021-03-29 14:17:30 +02:00
Oskar Stark
c14d189ba5 feature #39949 [Notifier] [FakeSms] Add the bridge (JamesHemery)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeSms] Add the bridge

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      |no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | symfony/symfony-docs#14870
| Recipe PR        | symfony/recipes#882

@OskarStark Bridge added :)

Commits
-------

351065e774 [Notifier] [FakeSms] Add the bridge
2021-03-29 14:05:03 +02:00
James Hemery
351065e774 [Notifier] [FakeSms] Add the bridge 2021-03-29 14:04:56 +02:00
Fabien Potencier
d6020a95f5 Bump Symfony version to 5.2.7 2021-03-29 07:20:15 +02:00
Fabien Potencier
f52424eb40
Merge pull request #40617 from fabpot/release-5.2.6
released v5.2.6
2021-03-29 07:17:12 +02:00
Fabien Potencier
4217e4c4cc Update VERSION for 5.2.6 2021-03-29 07:16:58 +02:00
Fabien Potencier
361206abe0 Update CHANGELOG for 5.2.6 2021-03-29 07:16:50 +02:00
Fabien Potencier
09fe7333bb Bump Symfony version to 4.4.22 2021-03-29 07:15:29 +02:00
Fabien Potencier
0139b7a745
Merge pull request #40616 from fabpot/release-4.4.21
released v4.4.21
2021-03-29 07:11:20 +02:00
Fabien Potencier
c990794868 Update VERSION for 4.4.21 2021-03-29 07:11:04 +02:00
Fabien Potencier
be1805450e Update CONTRIBUTORS for 4.4.21 2021-03-29 07:10:41 +02:00
Fabien Potencier
58b03fbae3 Update CHANGELOG for 4.4.21 2021-03-29 07:10:17 +02:00
Robin Chalas
40a2c19ae7 feature #40403 [Security] Rename UserInterface::getUsername() to getUserIdentifier() (wouterj)
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()
2021-03-28 22:25:04 +02:00
Wouter de Jong
8afd7a3765 [Security] Rename UserInterface::getUsername() to getUserIdentifier() 2021-03-28 22:24:55 +02:00
Robin Chalas
c469ea6fff Merge branch '5.2' into 5.x
* 5.2:
  [Security] Use more concrete user classes in tests
  fix docblock
2021-03-28 19:35:24 +02:00
Robin Chalas
567e1183b7 minor #40612 [Security] Use more concrete user classes in tests (wouterj)
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
2021-03-28 19:29:15 +02:00
Wouter de Jong
631408b757 [Security] Use more concrete user classes in tests 2021-03-28 19:23:00 +02:00
Vincent Langlet
592fb13456 Remove internal annotation 2021-03-28 19:13:50 +02:00
Nyholm
5545755b58
minor #40611 [HttpKernel] fix docblock (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpKernel] fix docblock

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

73999b8a3a fix docblock
2021-03-28 18:31:18 +02:00
Wouter de Jong
f30c103cb6 Merge branch '5.2' into 5.x
* 5.2:
  Use concrete user related classes in the tests
  [Filesystem] Fix dumpFile() method call
2021-03-28 16:57:18 +02:00
Wouter de Jong
b5f0f7bb82 Merge branch '4.4' into 5.2
* 4.4:
  [Filesystem] Fix dumpFile() method call
2021-03-28 16:30:26 +02:00
Wouter de Jong
6e206bc8aa minor #40609 [Security] Use concrete UserInterface and UserProviderInterface classes in the tests (wouterj)
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
2021-03-28 16:28:53 +02:00
Wouter de Jong
89d9de2077 Use concrete user related classes in the tests
This allows the tests to automatically adapt for changes in the UserInterface
and UserProviderInterface in 5.x
2021-03-28 16:18:37 +02:00
Christian Flothmann
73999b8a3a fix docblock 2021-03-28 15:55:03 +02:00
Nyholm
77870a5cec
minor #40608 [Filesystem] Fix dumpFile() method call (sebpacz)
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
2021-03-28 14:06:57 +02:00
sebpacz
2b33d4af65 [Filesystem] Fix dumpFile() method call 2021-03-28 11:59:32 +02:00
Christian Flothmann
9139f774af Merge branch '5.2' into 5.x
* 5.2:
  fix merge
2021-03-28 11:59:21 +02:00
Christian Flothmann
d33973bbbe fix merge 2021-03-28 11:59:03 +02:00