Commit Graph

50768 Commits

Author SHA1 Message Date
Fabien Potencier
4c96577d4d minor #38044 Add tests for translated error messages of json authentication (Malte Schlüter)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Add tests for translated error messages of json authentication

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

In PR #38037 i added the translator to the json authenticator but there are some tests missing. I added some now.

Commits
-------

b50fc19af0 Add tests for translated error messages of json authentication
2020-09-03 17:07:11 +02:00
Malte Schlüter
b50fc19af0 Add tests for translated error messages of json authentication 2020-09-03 13:33:24 +02:00
Nicolas Grekas
e59ccc5cc0 Merge branch '5.1'
* 5.1:
  [SecurityBundle] fix tests
  relax some test assertions
2020-09-03 13:20:29 +02:00
Nicolas Grekas
b2609c4bae [SecurityBundle] fix tests 2020-09-03 13:19:25 +02:00
Christian Flothmann
a110caa581 Merge branch '4.4' into 5.1
* 4.4:
  relax some test assertions
2020-09-03 12:43:26 +02:00
Christian Flothmann
fdcef0c625 minor #38045 [FrameworkBundle] relax some test assertions (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] relax some test assertions

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

Commits
-------

473e2933f0 relax some test assertions
2020-09-03 12:20:37 +02:00
Christian Flothmann
473e2933f0 relax some test assertions 2020-09-03 11:25:00 +02:00
Christian Flothmann
7ce234a34b Merge branch '5.1' into master
* 5.1:
  fix tests
2020-09-03 10:41:50 +02:00
Christian Flothmann
7bfff76fae minor #38043 [PhpUnitBridge] fix tests (xabbuh)
This PR was merged into the 5.1 branch.

Discussion
----------

[PhpUnitBridge] fix tests

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

Commits
-------

0a4cb62677 fix tests
2020-09-03 10:41:28 +02:00
Christian Flothmann
0a4cb62677 fix tests 2020-09-03 10:04:57 +02:00
Fabien Potencier
b094d4304e feature #38037 Translate failure messages of json authentication (Malte Schlüter)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

Translate failure messages of json authentication

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

Until now the failure messages of the json authentication were not translated. I'm not sure if it's a bug or a new feature. The changes shouldn't be a BC.

Commits
-------

7684663818 Translate failure messages of json authentication
2020-09-03 09:36:03 +02:00
Malte Schlüter
7684663818 Translate failure messages of json authentication 2020-09-03 09:35:53 +02:00
Nathan Dench
282ed2850c [PropertyInfo] Fix typed collections in PHP 7.4 2020-09-03 10:26:19 +10:00
Nicolas Grekas
4ee85e8e3b Merge branch '5.1'
* 5.1:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
  Fix CS
  Add a warning comment on ldap empty password
  Bump Symfony version to 4.4.14
  Update VERSION for 4.4.13
  Update CHANGELOG for 4.4.13
  [PhpunitBridge] Fix deprecation type detection
2020-09-02 18:27:44 +02:00
Nicolas Grekas
034602699e Merge branch '4.4' into 5.1
* 4.4:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
2020-09-02 18:23:27 +02:00
Nicolas Grekas
2e8ca94fb8 Merge remote-tracking branch 'origin/4.4' into 5.1
* origin/4.4:
  Fix CS
  Add a warning comment on ldap empty password
  Bump Symfony version to 4.4.14
  Update VERSION for 4.4.13
  Update CHANGELOG for 4.4.13
  [PhpunitBridge] Fix deprecation type detection
2020-09-02 18:21:51 +02:00
Fabien Potencier
01577db355 minor #38038 [Security] Add some missing CHANGELOG entries (chalasr)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Security] Add some missing CHANGELOG entries

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

Mentions #37337 in CHANGELOG files.

Commits
-------

46ce480801 [Security] Add some missing CHANGELOG entries
2020-09-02 18:15:42 +02:00
Nicolas Grekas
6c2a1c9a57 Merge branch '3.4' into 4.4
* 3.4:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
2020-09-02 18:08:58 +02:00
Nicolas Grekas
4351a70637 Enable "native_constant_invocation" CS rule 2020-09-02 18:06:40 +02:00
Robin Chalas
46ce480801 [Security] Add some missing CHANGELOG entries 2020-09-02 17:49:20 +02:00
Nicolas Grekas
160a5bf556 Merge branch '5.1'
* 5.1:
  [PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is used
2020-09-02 17:48:48 +02:00
Nicolas Grekas
a8726dfa7b bug #38013 [PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is used (l-vo)
This PR was merged into the 5.1 branch.

Discussion
----------

[PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is used

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

when trigger_deprecation is used, the deprecation types (self, direct, indirect) are not properly detected because the file where the deprecation come from is always `deprecation-contracts/functions.php`. This PR aims to fix that.

Commits
-------

fd39961180 [PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is used
2020-09-02 17:22:00 +02:00
Laurent VOULLEMIER
fd39961180 [PHPUnitBridge] Fix deprecation type detection when trigger_deprecation is used 2020-09-02 17:21:37 +02:00
Fabien Potencier
52719f2800 bug #37959 [PhpunitBridge] Fix deprecation type detection (when several autoload files are used) (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpunitBridge] Fix deprecation type detection (when several autoload files are used)

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

Several autoload files are supported by the PHPUnit Bridge but when the internal paths are registered (for deprecation type detection), the paths (from prefixes) of the last autoload file override the paths previously registered. This PR fixes this bug.

Commits
-------

cc7b6c5e5a [PhpunitBridge] Fix deprecation type detection
2020-09-02 16:59:26 +02:00
Fabien Potencier
c653f2c2a5 minor #38036 [FrameworkBundle] Make AbstractPhpFileCacheWarmer public (ossinkine)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Make AbstractPhpFileCacheWarmer public

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

The same as https://github.com/symfony/symfony/pull/37951 but with 3.4 as base branch, see https://github.com/doctrine/DoctrineBundle/pull/1196#issuecomment-683663897

cc @nicolas-grekas

Commits
-------

b82d9a2dc7 Make AbstractPhpFileCacheWarmer public
2020-09-02 16:14:27 +02:00
Gocha Ossinkine
b82d9a2dc7 Make AbstractPhpFileCacheWarmer public 2020-09-02 19:04:26 +05:00
Fabien Potencier
ddede31d09 Fix CS 2020-09-02 14:17:05 +02:00
Fabien Potencier
f0c4d3130e minor #38030 [Ldap] Add comment about bind with empty password (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add comment about bind with empty password

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

When LDAP server allows unauthenticated binds, calling the method `bind` with a blank password will return a positive response.

This is not an issue when using High Level classes of Symfony, because this case is handled in `LdapBindAuthenticationProvider` and `CheckLdapCredentialsListener`.
And passing a blank password could be a valid use case for the low level class `Connection`.

This PR adds a comment on the parameter `$password` to let people Know about this

Commits
-------

63a8570a42 Add a warning comment on ldap empty password
2020-09-02 14:14:12 +02:00
Fabien Potencier
e06d339353 feature #35890 [Cache] give control over cache prefix seed (Tobion)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Cache] give control over cache prefix seed

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

Reopened #35723 for master.

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). We want dev and test to use the same redis cache. But this is impossible to achieve because even setting the cache prefix seed does not accomplish this.

Commits
-------

6681b92524 [Cache] give control over cache prefix seed
2020-09-02 14:12:28 +02:00
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