Commit Graph

50739 Commits

Author SHA1 Message Date
Fabien Potencier
b7ee929e95 Merge branch '5.1'
* 5.1:
  Revert "Swallow errors"
  Swallow errors
  Allow Drupal to wrap the Symfony test listener
  Bump Symfony version to 5.1.6
  Update VERSION for 5.1.5
  Update CHANGELOG for 5.1.5
2020-09-02 13:09:33 +02:00
Fabien Potencier
a36c43b41f bug #38031 Allow Drupal to wrap the Symfony test listener (5.1 backport) (fabpot, alexpott)
This PR was merged into the 5.1 branch.

Discussion
----------

Allow Drupal to wrap the Symfony test listener (5.1 backport)

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | kinda
| 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 -->

This is a backport of #37708

Commits
-------

244e8d2408 Revert "Swallow errors"
ee8cc2666b Swallow errors
f9bfe7fd79 Allow Drupal to wrap the Symfony test listener
2020-09-02 13:08:19 +02:00
Fabien Potencier
afdb97e864 feature #37337 [Security] Configurable execution order for firewall listeners (scheb)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Security] Configurable execution order for firewall listeners

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | n/a

Hello there, I'm the author of `scheb/two-factor-bundle`, which extends Symfony's security layer with two-factor authentication. I've been closely following the recent changes by @wouterj to rework the security layer with "authenticators" (great work!). While I managed to make my bundle work with authenticators, I see some limitations in the security layer that I'd like to address to make such extensions easier to implement.

In #37336 I've submitted a draft to let security factories add their own authentication listeners to the firewall. This PR is intended to address the issue of execution order. If you look at the `Firewall` class

f64f59a9c0/src/Symfony/Component/Security/Http/Firewall.php (L62-L82)

authentication listeners are executed in the order of their creation. Additionally, there's hardcoded logic to execute `Symfony\Component\Security\Http\Firewall\AccessListener` always last and the logout listener second to last. I'd like to have a more flexible approach, to remove the hardcoded order and give authentication listeners the ability to determine their execution order.

I've added an optional interface to provide a priority to sort all registered authenitication listeners. Sorting is done in a compiler pass, so no time is wasted at runtime.

This is a draft, so I'd like to hear your opinion on this :)

Commits
-------

91388e871b Add ability to prioritize firewall listeners
2020-09-02 13:06:53 +02:00
Fabien Potencier
dad4e956c9 minor #38033 Remove unnecessary silence operator (alexpott)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Remove unnecessary silence operator

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 -->

A gobble-all-errors handler was added around the unserialize() call making the @ operator unnecessary.

Commits
-------

03201f0d23 No longer need to silence errors as we're catching them all
2020-09-02 13:03:38 +02:00
Tobias Schultze
6681b92524 [Cache] give control over cache prefix seed
The configurable cache prefix seed does not give full control over the cache prefix because the container class is added to the prefix in any case. This is a problem because the container class contains the app env name. We use different app environments for different deployment targets (dev and test). Dev and test should use the same redis cache. But this is impossible to achieve because even setting the cache prefix seed does not accomplish this.
2020-09-02 11:53:39 +02:00
Alex Pott
03201f0d23
No longer need to silence errors as we're catching them all 2020-09-02 10:52:53 +01:00
Alex Pott
244e8d2408
Revert "Swallow errors"
This reverts commit ee8cc2666b.
2020-09-02 10:51:41 +01:00
Alex Pott
ee8cc2666b
Swallow errors 2020-09-02 10:14:45 +01:00
Fabien Potencier
f9bfe7fd79
Allow Drupal to wrap the Symfony test listener 2020-09-02 10:08:38 +01:00
Jérémy Derussé
63a8570a42
Add a warning comment on ldap empty password 2020-09-02 10:52:12 +02:00
Fabien Potencier
a9c93fc094 Bump Symfony version to 5.1.6 2020-09-02 10:20:16 +02:00
Fabien Potencier
31b6a95fc2
Merge pull request #38029 from fabpot/release-5.1.5
released v5.1.5
2020-09-02 10:15:35 +02:00
Fabien Potencier
cc3335244c Update VERSION for 5.1.5 2020-09-02 10:15:18 +02:00
Fabien Potencier
c3409cd709 Update CHANGELOG for 5.1.5 2020-09-02 10:15:01 +02:00
Fabien Potencier
27c131ca7a Bump Symfony version to 4.4.14 2020-09-02 10:14:21 +02:00
Fabien Potencier
9b8314080f
Merge pull request #38028 from fabpot/release-4.4.13
released v4.4.13
2020-09-02 10:11:15 +02:00
Fabien Potencier
7982e499d6 Update VERSION for 4.4.13 2020-09-02 10:09:29 +02:00
Fabien Potencier
7bdf3eeab3 Update CHANGELOG for 4.4.13 2020-09-02 10:09:24 +02:00
Nicolas Grekas
a64b9449a3 Merge branch '5.1'
* 5.1:
  [HttpClient] Fix deps=low
2020-09-02 10:02:46 +02:00
Nicolas Grekas
6f15fbfe54 Merge branch '4.4' into 5.1
* 4.4:
  [HttpClient] Fix deps=low
2020-09-02 10:02:12 +02:00
Nicolas Grekas
55f451e49c [HttpClient] Fix deps=low 2020-09-02 10:01:15 +02:00
Fabien Potencier
3854b8f8d7 Merge branch '5.1'
* 5.1:
  Remove headers with internal meaning from HttpClient responses
2020-09-02 09:46:15 +02:00
Fabien Potencier
5a0436ff8e Merge branch '4.4' into 5.1
* 4.4:
  Remove headers with internal meaning from HttpClient responses
2020-09-02 09:42:11 +02:00
Fabien Potencier
d9910e0b33 security #cve-2020-15094 Remove headers with internal meaning from HttpClient responses (mpdude)
This PR was merged into the 4.4 branch.
2020-09-02 09:40:48 +02:00
Matthias Pigulla
ba39753291 Remove headers with internal meaning from HttpClient responses 2020-09-02 09:40:10 +02:00
Fabien Potencier
4a10308a54 Merge branch '5.1'
* 5.1:
  Fix undefined index for inconsistent command name definition
2020-09-02 09:07:54 +02:00
Fabien Potencier
286e22354f Merge branch '4.4' into 5.1
* 4.4:
  Fix undefined index for inconsistent command name definition
2020-09-02 09:07:40 +02:00
Fabien Potencier
bca14aa5f8 Merge branch '3.4' into 4.4
* 3.4:
  Fix undefined index for inconsistent command name definition
2020-09-02 09:07:21 +02:00
Fabien Potencier
33cacadaf2 bug #38024 [Console] Fix undefined index for inconsistent command name definition (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix undefined index for inconsistent command name definition

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fixes #38015
| License       | MIT
| Doc PR        | -

The issue happens when the command name is set via construct/setName() and is routed via a command loader under a different name, which causes `Application::get(): Command` to return null (return type violation) with a notice. This makes it throws a proper CommandNotFoundException as expected.

Commits
-------

d59140e857 Fix undefined index for inconsistent command name definition
2020-09-02 07:48:39 +02:00
Fabien Potencier
9d7a8f39a9 Fix CS 2020-09-02 07:46:17 +02:00
Fabien Potencier
4753e4d712 feature #33850 [Serializer] fix denormalization of basic property-types in XML and CSV (mkrauser)
This PR was submitted for the 3.4 branch but it was squashed and merged into the 5.2-dev branch instead.

Discussion
----------

[Serializer] fix denormalization of basic property-types in XML and CSV

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33849
| License       | MIT
| Doc PR        |

Like I explained in the Issue, the serializer cannot de-serialize non-string basic properties (int, float, bool). This PR add's some logic to cast to the expected types.

Similar logic is already present in the [XmlUtils](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Config/Util/XmlUtils.php#L215)-Class of the Config-Component

Commits
-------

3824dafffb [Serializer] fix denormalization of basic property-types in XML and CSV
2020-09-02 07:44:29 +02:00
Matthias Krauser
3824dafffb [Serializer] fix denormalization of basic property-types in XML and CSV 2020-09-02 07:44:16 +02:00
Nicolas Grekas
78eca9607a Merge branch '5.1'
* 5.1:
  [DI] fix inlining of non-shared services
2020-09-01 20:07:47 +02:00
Nicolas Grekas
117317c8e3 Merge branch '4.4' into 5.1
* 4.4:
  [DI] fix inlining of non-shared services
2020-09-01 20:07:16 +02:00
Robin Chalas
d59140e857 Fix undefined index for inconsistent command name definition 2020-09-01 20:06:56 +02:00
Nicolas Grekas
804f194d9d bug #38023 [DI] fix inlining of non-shared services (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix inlining of non-shared services

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37863
| License       | MIT
| Doc PR        | -

Commits
-------

380cb10587 [DI] fix inlining of non-shared services
2020-09-01 20:02:38 +02:00
Nicolas Grekas
380cb10587 [DI] fix inlining of non-shared services 2020-09-01 19:42:15 +02:00
Fabien Potencier
a060635b97 feature #38017 [PHPUnitBridge] deprecations not disabled anymore when disabled=0 (l-vo)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[PHPUnitBridge] deprecations not disabled anymore when disabled=0

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

According to the [docs](https://symfony.com/doc/current/components/phpunit_bridge.html#disabling-the-deprecation-helper), `disabled=1` turns off deprecations mode on phpunit-bridge. It's not totally true since deprecations are disabled as soon as `disabled` key is present in `SYMFONY_DEPRECATIONS_HELPER`. So if `disabled=0` deprecations are still disabled.

Instead of updating the doc, this PR suggest to make `disabled` behavior consistent with `verbose` behavior, so:
- `disabled` => deprecations disabled
- `disabled=0` => deprecations enabled
- `disabled=1` => deprecations disabled

Commits
-------

6908e3d156 [PHPUnitBridge] deprecations not enabled anymore when disabled=0
2020-09-01 18:27:52 +02:00
Fabien Potencier
dc63d712ab feature #33381 [Form] dispatch submit events for disabled forms too (xabbuh)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Form] dispatch submit events for disabled forms too

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27217
| License       | MIT
| Doc PR        |

TODO:

- [ ] add a test case covering the validation use case

Commits
-------

6da42ae2d1 dispatch submit events for disabled forms too
2020-09-01 18:26:17 +02:00
Laurent VOULLEMIER
6908e3d156 [PHPUnitBridge] deprecations not enabled anymore when disabled=0
Allow to pass 0 or 1 to "disabled" to be consistent with "verbose" key behavior
2020-09-01 15:29:20 +02:00
Christian Flothmann
59ae592909 Merge branch '5.1' into master
* 5.1:
  Missed AbstractArgument
  swallow deprecations
2020-09-01 15:18:17 +02:00
Christian Flothmann
b7cd4c7d4e Merge branch '4.4' into 5.1
* 4.4:
  swallow deprecations
2020-09-01 15:16:17 +02:00
Fabien Potencier
692fa7a5c1 bug #38022 Missed AbstractArgument (a-menshchikov)
This PR was merged into the 5.1 branch.

Discussion
----------

Missed AbstractArgument

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

Missed in 5.1

Commits
-------

b5a47dac52 Missed AbstractArgument
2020-09-01 14:38:02 +02:00
Fabien Potencier
b73ee65c04 Merge branch '5.1'
* 5.1:
  stop using the deprecated at() PHPUnit matcher
2020-09-01 14:25:43 +02:00
Fabien Potencier
3061bfeb48 minor #37874 stop using the deprecated at() PHPUnit matcher (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

stop using the deprecated at() PHPUnit matcher

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

Commits
-------

e36e73b9cf stop using the deprecated at() PHPUnit matcher
2020-09-01 14:25:21 +02:00
Christian Flothmann
6da42ae2d1 dispatch submit events for disabled forms too 2020-09-01 14:24:09 +02:00
Zmey
b5a47dac52
Missed AbstractArgument 2020-09-01 15:23:56 +03:00
Fabien Potencier
8ec0e588c3 bug #38020 [PhpUnitBridge] swallow deprecations (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] swallow deprecations

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

Commits
-------

f0067c106c swallow deprecations
2020-09-01 12:08:42 +02:00
Christian Flothmann
f0067c106c swallow deprecations 2020-09-01 11:34:43 +02:00
Fabien Potencier
ccfc4ba269 feature #35338 Added support for using the "{{ label }}" placeholder in constraint messages (a-menshchikov)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

Added support for using the "{{ label }}" placeholder in constraint messages

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #12238
| License       | MIT
| Doc PR        |

- [ ] Add docs PR

Commits
-------

0d9f44235c Added support for using the "{{ label }}" placeholder in constraint messages
2020-09-01 09:49:57 +02:00