Commit Graph

49441 Commits

Author SHA1 Message Date
Fabien Potencier
b04512a6fa Merge branch '5.1'
* 5.1:
  [Security] Run functional tests also for the authenticator system
  Fix register csrf protection listener
  bumped Symfony version to 5.1.2
  updated VERSION for 5.1.1
  updated CHANGELOG for 5.1.1
2020-06-13 17:58:10 +02:00
Fabien Potencier
a89cc6bf79 minor #37267 [SecurityBundle] Run functional tests for the authenticator system (wouterj)
This PR was merged into the 5.1 branch.

Discussion
----------

[SecurityBundle] Run functional tests for the authenticator system

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

<s>Includes https://github.com/symfony/symfony/pull/37261 until it's merged.</s>

This runs all relevant functional tests in the security bundle for both the traditional and the authenticator system. This will hopefully avoid breaking more code in further releases.

deps=high builds will be green once this has been merged up into master.

---

During the functional tests, some inconsistencies were fixed. Three tests revealed larger inconsistencies that couldn't be fixed easily. These are not run for the new system as of now, we need to investigate further how to proceed with them. I'll create a separate issue/discussion for these:

* `Symfony\Bundle\SecurityBundle\Tests\Functional\FirewallEntryPointTest::testItUsesTheConfiguredEntryPointWhenUsingUnknownCredentials`
* `Symfony\Bundle\SecurityBundle\Tests\Functional\CsrfFormLoginTest::testFormLoginWithInvalidCsrfToken`
* `Symfony\Bundle\SecurityBundle\Tests\Functional\SecurityRoutingIntegrationTest::testSecurityConfigurationForExpression`

Commits
-------

49639caeaf [Security] Run functional tests also for the authenticator system
2020-06-13 17:21:48 +02:00
Wouter de Jong
49639caeaf [Security] Run functional tests also for the authenticator system 2020-06-13 17:06:42 +02:00
Fabien Potencier
080eef05b7 bug #37261 Fix register csrf protection listener (Ne-Lexa)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

Fix register csrf protection listener

| Q             | A
| ------------- | ---
| Branch?       | 5.1.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | np
| Tickets       | #37254
| License       | MIT

Fix TypeError. Expected instance `CsrfTokenManagerInterface`, but `SessionTokenStorage` was given.

```
Uncaught Error: Argument 1 passed to Symfony\Component\Security\Http\EventListener\CsrfProtectionListener::__construct() must implement interface Symfony\Component\Security\Csrf\CsrfTokenManagerInterface, instance of Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage given

Uncaught PHP Exception TypeError: "Argument 1 passed to Symfony\Component\Security\Http\EventListener\CsrfProtectionListener::__construct() must implement interface Symfony\Component\Security\Csrf\CsrfTokenManagerInterface, instance of Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage given
```

Commits
-------

485361e847 Fix register csrf protection listener
2020-06-13 17:05:39 +02:00
wapplay
485361e847 Fix register csrf protection listener 2020-06-13 17:05:31 +02:00
Tobias Schultze
1b41bdee86 minor #37234 [Cache] Move configuration to PHP (iamvar)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Cache] Move configuration to PHP

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

Move Cache Component Container configuration to PHP

Commits
-------

e267263e6f [Cache] Move configuration to PHP
2020-06-12 23:21:04 +02:00
iamvar
e267263e6f [Cache] Move configuration to PHP 2020-06-12 22:34:36 +03:00
Tobias Schultze
187936d548 minor #37222 [Validator][FrameworkBundle] Move configurations from XML to PHP (simivar)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Validator][FrameworkBundle] Move configurations from XML to PHP

| 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       | Part of #37186 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
<!--
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.
-->

Move `src/Symfony/Bundle/FrameworkBundle/Resources/config/validator*.xml` configurations to PHP

Commits
-------

46de8900f0 [FrameworkBundle] Move Validator configuration to PHP
2020-06-12 18:13:05 +02:00
Tobias Schultze
f5310cee19 minor #37217 [FrameworkBundle] Move session configuration to PHP (cocorambo)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Move session configuration to PHP

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

Move session configuration file to php

Commits
-------

de8f07d5bd [FrameworkBundle] Move session configuration to PHP
2020-06-12 17:27:08 +02:00
Nicolas Martin
de8f07d5bd [FrameworkBundle] Move session configuration to PHP 2020-06-12 17:26:57 +02:00
Fabien Potencier
d5aa77e5e1 feature #37241 [Console] Fix Docblock for CommandTester::getExitCode (Jean85)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Console] Fix Docblock for CommandTester::getExitCode

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

While doing static analysis on my code, I found a false positive that led me to this little fix.

Commits
-------

876c64e52e Rework to throw exception if status code is not initialized; add tests
2020-06-12 16:43:07 +02:00
Alessandro Lai
876c64e52e
Rework to throw exception if status code is not initialized; add tests 2020-06-12 16:38:11 +02:00
Fabien Potencier
8d27e453b4 minor #37216 [FrameworkBundle] Move console configuration to PHP (Ahmed Raafat)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Move console configuration to PHP

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

Commits
-------

ef01839225 [FrameworkBundle] Move console configuration to PHP
2020-06-12 15:59:09 +02:00
Fabien Potencier
cef93eaec5 feature #35834 [Notifier] Remove default transport property in Transports class (jschaedl)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Remove default transport property in Transports class

| 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       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | tbd. <!-- required for new features -->

At the moment the `Transports` class uses the first element of the injected transports array as the default transport: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Notifier/Transport/Transports.php#L35

If you try to send a message that doesn't define a transport (`!$message->getTransport()`) the default transport is used. I see two main drawbacks with this solution that I try to fix with this PR:

1. There is no check if the given message is supported by the default transport. What means that the transport is going to fail with an Exception, if it's not supporting the given message. E.g. the `SlackTransport` only supports `ChatMessage`s with nullable options or options from type `SlackOptions`. So as a default transport the `SlackTransport` can't handle all types of `ChatMessage`s.

2. Why should we only send the message using the default transport if there are more possible transports which are probably supported?

I did the following to fix the mentioned drawbacks:

- removed the default transport property
- added a check to make sure the transport defined by the message supports it
- send the message to **all** supported transports, in case the given message does not define a transport
- added a test

Commits
-------

5c167b08d3 [Notifier] Remove default transport property in Transports class
2020-06-12 14:23:25 +02:00
Jan Schädlich
5c167b08d3 [Notifier] Remove default transport property in Transports class 2020-06-12 14:23:20 +02:00
Fabien Potencier
86c79ce316 bumped Symfony version to 5.1.2 2020-06-12 14:20:44 +02:00
Fabien Potencier
c093c648ae
Merge pull request #37248 from fabpot/release-5.1.1
released v5.1.1
2020-06-12 13:26:14 +02:00
Fabien Potencier
6aafc48ddf updated VERSION for 5.1.1 2020-06-12 13:25:56 +02:00
Fabien Potencier
5ad89d13b6 updated CHANGELOG for 5.1.1 2020-06-12 13:25:49 +02:00
simivar
46de8900f0 [FrameworkBundle] Move Validator configuration to PHP 2020-06-12 11:24:12 +02:00
Nicolas Grekas
813d220aa1 Merge branch '5.1'
* 5.1:
  cs
  fix merge
2020-06-12 10:40:00 +02:00
Nicolas Grekas
3afa4b2e72 Merge branch '5.0' into 5.1
* 5.0:
  cs
  fix merge
2020-06-12 10:39:51 +02:00
Nicolas Grekas
7b6ffda0b9 cs 2020-06-12 10:39:40 +02:00
Nicolas Grekas
d735b76302 fix merge 2020-06-12 10:38:59 +02:00
Nicolas Grekas
da28c38b9f Merge branch '5.1'
* 5.1:
  fix merge
2020-06-12 10:26:30 +02:00
Nicolas Grekas
acc88829de Merge branch '5.0' into 5.1
* 5.0:
  fix merge
2020-06-12 10:26:18 +02:00
Nicolas Grekas
15747d3ebb Merge branch '4.4' into 5.0
* 4.4:
  fix merge
2020-06-12 10:26:05 +02:00
Nicolas Grekas
6304b6b11a fix merge 2020-06-12 10:25:05 +02:00
Nicolas Grekas
e0478c0ab7 Merge branch '5.1'
* 5.1:
  fix merge
2020-06-12 10:22:55 +02:00
Nicolas Grekas
5b70cc8ac8 Merge branch '5.0' into 5.1
* 5.0:
  fix merge
2020-06-12 10:22:42 +02:00
Nicolas Grekas
8fa1cea06d fix merge 2020-06-12 10:22:28 +02:00
Nicolas Grekas
a10b542cd4 Merge branch '5.1'
* 5.1:
  [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
  switch the context when validating nested forms
  remove unused param from validator service config
  Fix typo
  [HttpKernel] Fix regression where Store does not return response body correctly
  rework form validator tests
  Update AbstractController.php
2020-06-12 10:18:54 +02:00
Nicolas Grekas
03bd1bf90a Merge branch '5.0' into 5.1
* 5.0:
  [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
  switch the context when validating nested forms
  remove unused param from validator service config
  Fix typo
  [HttpKernel] Fix regression where Store does not return response body correctly
  rework form validator tests
  Update AbstractController.php
2020-06-12 10:11:32 +02:00
Nicolas Grekas
6c4695f4ec Merge branch '4.4' into 5.0
* 4.4:
  [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
  switch the context when validating nested forms
  remove unused param from validator service config
  Fix typo
  [HttpKernel] Fix regression where Store does not return response body correctly
  rework form validator tests
  Update AbstractController.php
2020-06-12 10:11:14 +02:00
Nicolas Grekas
02df1c9b53 Merge branch '3.4' into 4.4
* 3.4:
  switch the context when validating nested forms
  Fix typo
  [HttpKernel] Fix regression where Store does not return response body correctly
  rework form validator tests
  Update AbstractController.php
2020-06-12 10:10:13 +02:00
Fabien Potencier
fd51aeb20b bug #37227 [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables

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

Follow up to https://github.com/symfony/symfony/pull/37193

Unresolved parameters pointing to environment variables can be added to definitions after ResolveParameterPlaceHoldersPass execution. It is the case in the initial reported bug (RegisterListenersPass is executed after ResolveParameterPlaceHoldersPass). In this case, the parameter value is an env placeholder, so we need to try to resolve it.

Commits
-------

dac3c8fae8 [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables
2020-06-12 10:01:48 +02:00
Thomas Calvet
dac3c8fae8 [DependencyInjection][CheckTypeDeclarationsPass] Handle unresolved parameters pointing to environment variables 2020-06-12 09:37:04 +02:00
Fabien Potencier
1f83212541 bug #37103 [Form] switch the context when validating nested forms (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] switch the context when validating nested forms

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

Commits
-------

38135de549 switch the context when validating nested forms
2020-06-12 09:33:15 +02:00
Christian Flothmann
38135de549 switch the context when validating nested forms 2020-06-12 09:11:17 +02:00
Fabien Potencier
6b499e6f51 minor #37232 [APP_CACHE_DIR] Ensure a split per environment when using that new variable (Plopix)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[APP_CACHE_DIR] Ensure a split per environment when using that new variable

| Q             | A
| ------------- | ---
| Branch       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/13819

All the explanation here: https://github.com/symfony/symfony-docs/pull/13819

Commits
-------

06b793f59e Ensure a split per environment
2020-06-12 08:08:05 +02:00
Fabien Potencier
f1989fe41c minor #37236 remove unused param from validator service config (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

remove unused param from validator service config

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

Commits
-------

d75ec21cdb remove unused param from validator service config
2020-06-12 08:06:18 +02:00
Tobias Schultze
d75ec21cdb remove unused param from validator service config 2020-06-12 02:09:24 +02:00
Tobias Schultze
806fd22685 minor #37202 [PropertyAccess] Move configuration to PHP (qneyrat, Tobion)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[PropertyAccess] Move configuration to PHP

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

Commits
-------

5acddfb726 add comment for consistency
3f25c072c2 [PropertyAccess] Move configuration to PHP
2020-06-12 01:39:53 +02:00
Tobias Schultze
5acddfb726
add comment for consistency 2020-06-12 01:24:46 +02:00
Tobias Schultze
3acc72afe4 minor #37226 [Lock] Move configuration to PHP (Tomas Javaisis)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Lock] Move configuration to PHP

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

Change lock config file from XML to PHP.

Commits
-------

7882cd5527 [Lock] Move configuration to PHP
2020-06-12 01:12:43 +02:00
Tomas Javaisis
7882cd5527 [Lock] Move configuration to PHP 2020-06-12 01:12:33 +02:00
Tobias Schultze
b667eed120 minor #37215 [FrameworkBundle] Move web configuration to PHP (ck-developer, Tobion)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Move web configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT

Commits
-------

9000e72a23 add missing abstract_arg to fix replace arguments
8a81abeb6f [FrameworkBundle] Move web configuration to PHP
2020-06-12 01:09:36 +02:00
Tobias Schultze
c0a3a64db0 minor #37225 [SecurityBundle] convert templating configuration to PHP (ck-developer)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[SecurityBundle] convert templating configuration to PHP

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Ref #37186
| License       | MIT

Commits
-------

0c36a4b8d9 [SecurityBundle] convert templating configuration to PHP
2020-06-12 01:02:18 +02:00
Tobias Schultze
9000e72a23
add missing abstract_arg to fix replace arguments
fix failing tests "Cannot replace arguments if none have been configured yet."
2020-06-12 00:59:44 +02:00
c.khedhi@prismamedia.com
0c36a4b8d9 [SecurityBundle] convert templating configuration to PHP 2020-06-12 00:42:23 +02:00