Commit Graph

48628 Commits

Author SHA1 Message Date
Fabien Potencier 28bb74cd50 bug #36661 [SecurityBundle] Fixed entry point service ID resolving and multiple guard entry points (wouterj)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[SecurityBundle] Fixed entry point service ID resolving and multiple guard entry points

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

@fabpot I am not able to reproduce [the error you reported](https://github.com/symfony/symfony/pull/36575#issuecomment-622272051) in any of my demo applications or in the tests introduced in this PR. The error indicates that no entry point is configured in your application, can you maybe try out this patch (given it now makes a hard error when more than one guard is used)? If it still doesn't work, can you maybe share your firewall configuration?

---

_build failures are unrelated_

Commits
-------

c75659350e Do not make AbstractFactory internal and revert method rename
6870a18803 Fixed entry point resolving and guard entry point configuration
2020-05-03 08:36:54 +02:00
Fabien Potencier 1308dd5553 feature #36666 [Security] Renamed VerifyAuthenticatorCredentialsEvent to CheckPassportEvent (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Renamed VerifyAuthenticatorCredentialsEvent to CheckPassportEvent

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

This event was named long before we introduced the concept of passports. Listeners on this event check the user, the credentials and any badges of the Security passport. I think `CheckPassportEvent` makes the most sense (more than `CheckCredentialsEvent`).

Also, I managed to break fabbot in the large PR. Just checked all new classes and added license headers in case they were missing (fabbot complained about most of them in this PR already).

Commits
-------

5ba4d1de86 Renamed VerifyAuthenticatorCredentialsEvent to CheckPassportEvent
2020-05-03 08:34:00 +02:00
Wouter de Jong c75659350e Do not make AbstractFactory internal and revert method rename 2020-05-02 20:58:17 +02:00
Wouter de Jong 5ba4d1de86 Renamed VerifyAuthenticatorCredentialsEvent to CheckPassportEvent 2020-05-02 20:51:30 +02:00
Wouter de Jong 6870a18803 Fixed entry point resolving and guard entry point configuration 2020-05-02 15:04:30 +02:00
Fabien Potencier c30d6f9e38 bug #36650 [Security] Fix bug introduced in entry_point configuration (#36575) (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Fix bug introduced in entry_point configuration (#36575)

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

Commits
-------

69784713bb Fixed #36575
2020-05-01 09:57:08 +02:00
Wouter J 69784713bb
Fixed #36575 2020-05-01 09:50:12 +02:00
Fabien Potencier ed1b6eaf83 bug #36609 Add missing port SQS Host Header request (jderusse)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Add missing port SQS Host Header request

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

When user provides a custom endpoint, the port is missing from the `Host` headers, leading to wrong URL when calling `getQueueUrl`

Commits
-------

41165beb48 Add missing port SQS Host Header request
2020-05-01 08:04:26 +02:00
Fabien Potencier da6620c035 bug #36635 [Notifier] Fix 3 errors for bridge Mattermost (Sébastien COURJEAN)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Notifier] Fix 3 errors for bridge Mattermost

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36632
| License       | MIT
| Doc PR        | symfony/symfony-docs#...

Fix 3 errors for bridge mattermost in notifier component.

Commits
-------

ca9439ac43 [Notifier] Fix 3 errors for bridge Mattermost
2020-05-01 08:02:37 +02:00
Sébastien COURJEAN ca9439ac43 [Notifier] Fix 3 errors for bridge Mattermost 2020-05-01 08:02:29 +02:00
Nicolas Grekas 0633308bb3 minor #36644 [FrameworkBundle][CacheWarmupCommand] Append files to preload (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][CacheWarmupCommand] Append files to preload

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

Files returned by the warmUp() method must be added to the preload file.

I also added checks to avoid empty preload calls in the preload file like this:
```
$classes = [];
Preloader::preload($classes);
```

Commits
-------

a82c7ab4c0 [FrameworkBundle][CacheWarmupCommand] Append files to preload
2020-04-30 19:42:17 +02:00
Nicolas Grekas 27c10f0f24 minor #36646 [HttpFoundation][HttpKernel] Add more preload always-needed symbols (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpFoundation][HttpKernel] Add more preload always-needed symbols

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Part of https://github.com/orgs/symfony/projects/1#card-37082675
| License       | MIT
| Doc PR        | -

`ConfigCache` is in the hot path because it is used for every request in the kernel boot (initializeContainer() method). I guess we can consider that every kernel is going to be booted so it should always be used.

`InputBag` should be added too - it is used in the Request initialization so it will likely be hit on every request as well - but maybe it wasn't added in the first place for a reason since other bags are already there?

Commits
-------

636a8bdf12 [HttpFoundation][HttpKernel] Add more preload always-needed symbols
2020-04-30 19:12:27 +02:00
Thomas Calvet 636a8bdf12 [HttpFoundation][HttpKernel] Add more preload always-needed symbols 2020-04-30 18:01:38 +02:00
Thomas Calvet a82c7ab4c0 [FrameworkBundle][CacheWarmupCommand] Append files to preload 2020-04-30 16:30:59 +02:00
Fabien Potencier a114f8d227 feature #36575 [Security] Require entry_point to be configured with multiple authenticators (wouterj)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Security] Require entry_point to be configured with multiple authenticators

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

See @weaverryan's comment at https://github.com/symfony/symfony/pull/33558#discussion_r403740402:

> I have it on my list to look at the entrypoint stuff more closely. But my gut reaction is this: let's fix them (or try to... or maybe in a PR after this) :). What I mean is this:
>
> -    It's always been confusing that your firewall may have multiple auth mechanisms that have their own "entry point"... and one is chosen seemingly at random :). I know it's not random, but why does the entrypoint from `form_login` "win" over `http_basic` if I have both defined under my firewall?
>
> -    Since we're moving to a new system, why not throw an exception the _moment_ that a firewall has multiple entrypoints available to it. Then we _force_ the user to choose the _one_ entrypoint that should be used.

---

**Before** (one authenticator)
```yaml
security:
  enable_authenticator_manager: true

  firewalls:
    main:
      form_login: ...

# form login is your entry point
```

**After**
Same as before

---

**Before** (multiple authenticators)
```yaml
security:
  enable_authenticator_manager: true

  firewalls:
    main:
      http_basic: ...
      form_login: ...

# for some reason, FormLogin is now your entry point! (config order doesn't matter)
```

**After**
```yaml
security:
  enable_authenticator_manager: true

  firewalls:
    main:
      http_basic: ...
      form_login: ...
      entry_point: form_login
```

---

**Before** (custom entry point service)
```yaml
security:
  enable_authenticator_manager: true

  firewalls:
    main:
      http_basic: ...
      form_login: ...
      entry_point: App\Security\CustomEntryPoint
```

**After**
Same as before

Commits
-------

7e861698e7 [Security] Require entry_point to be configured with multiple authenticators
2020-04-30 15:22:09 +02:00
Wouter de Jong 7e861698e7 [Security] Require entry_point to be configured with multiple authenticators 2020-04-30 15:22:03 +02:00
Fabien Potencier 71b3912143 minor #36628 Fxi missing use statement (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Fxi missing use statement

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

8022f6c4eb Fxi missing use statement
2020-04-30 07:45:48 +02:00
Fabien Potencier 8022f6c4eb Fxi missing use statement 2020-04-29 22:54:16 +02:00
Nicolas Grekas b2d1ec5d34 [DI] fix synthetic services in ResolveNoPreloadPass 2020-04-29 19:41:01 +02:00
Fabien Potencier 75e3d757fc bug #36622 [DI] limit recursivity of ResolveNoPreloadPass (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] limit recursivity of ResolveNoPreloadPass

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

Let's save some nesting levels, these definitions will be processed by the main loop anyway.

Commits
-------

6dd52f9719 [DI] limit recursivity of ResolveNoPreloadPass
2020-04-29 16:34:55 +02:00
Nicolas Grekas 6dd52f9719 [DI] limit recursivity of ResolveNoPreloadPass 2020-04-29 16:29:53 +02:00
Nicolas Grekas c699b9cb3d Merge branch '5.0'
* 5.0:
  [Validator] fix merge
2020-04-28 20:26:40 +02:00
Nicolas Grekas 270d204750 Merge branch '4.4' into 5.0
* 4.4:
  [Validator] fix merge
2020-04-28 20:26:18 +02:00
Nicolas Grekas dfc4a71eac [Validator] fix merge 2020-04-28 20:23:58 +02:00
Nicolas Grekas be8adfaf99 Merge branch '5.0'
* 5.0:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  Allow invalidateTags calls to be traced by data collector
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Mailer] Add a comment to avoid more wrong PRs on this piece of code
  [Form] apply automatically step=1 for datetime-local input
  remove getContainer overwrites in tests
  Fixing a bug where class_alias would cause incorrect items in debug:autowiring
  [DependencyInjection][ServiceSubscriber] Support late aliases
  Fix profiler nullable string type
2020-04-28 20:01:52 +02:00
Nicolas Grekas 77cdbffcb3 Merge branch '4.4' into 5.0
* 4.4:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  Allow invalidateTags calls to be traced by data collector
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Mailer] Add a comment to avoid more wrong PRs on this piece of code
  [Form] apply automatically step=1 for datetime-local input
  Fixing a bug where class_alias would cause incorrect items in debug:autowiring
  [DependencyInjection][ServiceSubscriber] Support late aliases
2020-04-28 19:58:55 +02:00
Nicolas Grekas 49b74baab4 Merge branch '3.4' into 4.4
* 3.4:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Form] apply automatically step=1 for datetime-local input
2020-04-28 19:55:16 +02:00
Fabien Potencier ad6f8608e9
Merge pull request #36612 from fabpot/release-3.4.40
released v3.4.40
2020-04-28 19:41:57 +02:00
Fabien Potencier f59e0e9c23 updated VERSION for 3.4.40 2020-04-28 19:41:38 +02:00
Fabien Potencier 1822b065d7 update CONTRIBUTORS for 3.4.40 2020-04-28 19:41:24 +02:00
Fabien Potencier 99080bdbe7 updated CHANGELOG for 3.4.40 2020-04-28 19:40:55 +02:00
Jérémy Derussé 41165beb48
Add missing port SQS Host Header request 2020-04-28 15:17:36 +02:00
Nicolas Grekas 4170346ea7 bug #36581 [DI] fix not preloading excluded service factories (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] fix not preloading excluded service factories

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

Commits
-------

2a20c6e605 [DI] fix not preloading excluded service factories
2020-04-26 16:30:55 +02:00
Nicolas Grekas 1bc3ee798d bug #36536 [Cache] Allow invalidateTags calls to be traced by data collector (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Allow invalidateTags calls to be traced by data collector

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

`TraceableTagAwareAdapter` is not used in the fullstack framework since tag aware pools don't have the `cache.pool` tag (it's the decorated adapter that has it). This PR aims to use `TraceableTagAwareAdapter` when a pool is configured with `tags: true`

Commits
-------

28fdb3a879 Allow invalidateTags calls to be traced by data collector
2020-04-26 16:19:08 +02:00
Nicolas Grekas 048e6f3dd8 minor #36571 [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) (Lozik)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36533
| License       | MIT
| Doc PR        | none
<!--
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 master.
-->
This PR changes the label of the peak memory usage from `MB` into `MiB` in the time and memory panels of the web profiler, as discussed in #36533.

The changed file `Resources/views/Collector/time.html.twig` is completely updated by commit c9433b0090 for v4.3. So for correctly displaying the label in 4.4 (& 5.0), the file `Resources/views/Collector/time.js` needs to be updated.

Commits
-------

89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
2020-04-26 14:49:57 +02:00
Loïc Beurlet 89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) 2020-04-26 14:49:41 +02:00
Fabien Potencier 1889672a59 minor #36584 [Validator] add tests for the ConstraintViolationBuilder class (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add tests for the ConstraintViolationBuilder class

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

Commits
-------

fb3aaefbf2 add tests for the ConstraintViolationBuilder class
2020-04-26 12:56:11 +02:00
Christian Flothmann fb3aaefbf2 add tests for the ConstraintViolationBuilder class 2020-04-26 10:10:12 +02:00
Nicolas Grekas 2a20c6e605 [DI] fix not preloading excluded service factories 2020-04-25 22:55:37 +02:00
Fabien Potencier 6b4851168d feature #36570 [Security] Integrated Guards with the Authenticator system (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Integrated Guards with the Authenticator system

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

This way, the guard configuration (and guard authenticators) can use the new authenticator system as well. Advantages:

* Any bundle providing guard integration (e.g. Lexik JWT, Knp Oauth) can now integrate with the authenticator system as well
* (after we've integrated LDAP as well) Anyone can set `security.enable_authenticator_manager: true` to test the new experimental system without needing to update any PHP code.

cc @weaverryan

Commits
-------

8708a6c37d Integrated Guards with the Authenticator system
2020-04-25 16:35:45 +02:00
Fabien Potencier e3dc5effa6 bug #36566 [PhpUnitBridge] Use COMPOSER_BINARY env var if available (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use COMPOSER_BINARY env var if available

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/36401
| License       | MIT
| Doc PR        | -

Commits
-------

6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available
2020-04-25 14:18:34 +02:00
Fabien Potencier b3cdf5c989 minor #36568 [PhpUnitBridge] Improve dirname usage (Jean85)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Improve dirname usage

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36499
| License       | MIT

This is a very small performance improvement on top of #36539

Commits
-------

e721cfd65c Improve dirname usage
2020-04-25 14:02:39 +02:00
Wouter de Jong 8708a6c37d Integrated Guards with the Authenticator system 2020-04-24 19:07:56 +02:00
Alessandro Lai e721cfd65c
Improve dirname usage 2020-04-24 16:08:51 +02:00
Thomas Calvet 6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available 2020-04-24 14:56:41 +02:00
Laurent VOULLEMIER 28fdb3a879 Allow invalidateTags calls to be traced by data collector 2020-04-24 13:56:40 +02:00
Fabien Potencier fe5eacd3a2 bug #36560 [YAML] escape DEL(\x7f) (sdkawata)
This PR was merged into the 3.4 branch.

Discussion
----------

[YAML] escape DEL(\x7f)

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

Commits
-------

734d97bdcc [YAML] escape DEL(\x7f)
2020-04-24 12:37:21 +02:00
sdkawata 734d97bdcc [YAML] escape DEL(\x7f) 2020-04-24 19:16:04 +09:00
Fabien Potencier c6cf433589 feature #36562 Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)" (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"

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

This reverts commit 477ee19778, reversing changes made to 9bfa25869a.

The reverted PR is #30501. Actually, it's a partial revert: changes made to the `Routing` component are not reverted.

The reason for this revert is that a discussion is still on-going in #35653 (which provides the same configuration extensions to yaml+xml), and we won't be able to resolve them in time for 5.1.

Better postpone for 5.2.

@HeahDude I invite you to open a PR after this one, reverting this very PR, which we'll consider again but for 5.2 if you don't mind.

Commits
-------

e4e8945aef Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"
2020-04-24 12:11:53 +02:00
Nicolas Grekas e4e8945aef Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"
This reverts commit 477ee19778, reversing
changes made to 9bfa25869a.
2020-04-24 12:08:40 +02:00