Commit Graph

46706 Commits

Author SHA1 Message Date
Alexander Schranz
d082eca7dd Add reproducer to for hit after update expire cacheItem 2020-04-18 16:28:10 +02:00
Nicolas Grekas
f815b011c3 [Cache] fix FilesystemTagAwareAdapter failing when a tag link preexists 2020-04-18 16:28:10 +02:00
Nicolas Grekas
80c5060401 Merge branch '3.4' into 4.4
* 3.4:
  [SecurityBundle] fix accepting env vars in remember-me configurations
  [Form] Fixed handling groups sequence validation
  [Cache] Avoid memory leak in TraceableAdapter::reset()
2020-04-18 14:50:46 +02:00
Nicolas Grekas
a347a84453 bug #36483 [SecurityBundle] fix accepting env vars in remember-me configurations (zek)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] fix accepting env vars in remember-me configurations

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

As @wouterj explained we cannot use env variables after #35910 merged.

> Hmm, so I'm guessing this is what happens:
>
> * `lifetime` is now an `integerNode()`
> * For the Config component (which IIRC doesn't know anything about env variables), you're passing a string: `"%env(int:REMEMBER_ME_COOKIE_LIFETIME)%"`
> * This throws an error, although if it wouldn't, the DI component would sucessfully process the string into a integer before it's used by any PHP class.
>
> So we either make Config aware of environment variables (that's probably a huge feature) or we revert the `integerNode()` changes (as you suggested).
>
> @HeahDude am I mislooking something, or would reverting these 2 lines not result in much harm? (only a little less strict config processor)

Commits
-------

46c278316c [SecurityBundle] fix accepting env vars in remember-me configurations
2020-04-18 14:12:43 +02:00
Talha Zekeriya Durmuş
46c278316c [SecurityBundle] fix accepting env vars in remember-me configurations 2020-04-18 14:12:03 +02:00
Nicolas Grekas
0f1a5c452e bug #36343 [Form] Fixed handling groups sequence validation (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed handling groups sequence validation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | FIx https://github.com/symfony/symfony/issues/9939#issuecomment-607459505, Fix #35556
| License       | MIT
| Doc PR        | ~

This is not the same as the original issue fixed by #36245, that was reported in https://github.com/symfony/symfony/issues/9939#issuecomment-607459505.

The form also fails to cascade sequence validation properly because each nested field is validated against the sequence, and one can fail at a step independently from another which could failed in another step. I've added a lot of tests to ensure this is working properly and tested in a website skeleton too.

This PR aims to close #35556 which tries to fix the same issue but afterwards in its implementation as said in https://github.com/symfony/symfony/pull/35556#discussion_r379289230.

Commits
-------

dfb61c204c [Form] Fixed handling groups sequence validation
2020-04-18 14:07:22 +02:00
Jules Pietri
dfb61c204c
[Form] Fixed handling groups sequence validation 2020-04-18 13:27:37 +02:00
Fabien Potencier
17bbaa502a bug #36460 [Cache] Avoid memory leak in TraceableAdapter::reset() (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Avoid memory leak in TraceableAdapter::reset()

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

When we call `ServicesResetter::reset()`, we want to reset the
application to its initial states. We don't want a memory leak :p

Commits
-------

15a8610c0c [Cache] Avoid memory leak in TraceableAdapter::reset()
2020-04-17 05:10:57 +02:00
Thomas Calvet
24150370c3 [DependencyInjection][ServiceSubscriber] Support late aliases 2020-04-16 18:36:56 +02:00
Fabien Potencier
3aa7f0c5bf bug #36467 Mailer from sender fixes (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Mailer from sender fixes

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35818, Fix #35805, Fix #33753 | License       | MIT
| Doc PR        | n/a

Commits
-------

e885860edc Fix From/Sender handling in Emails
2020-04-16 17:12:45 +02:00
Fabien Potencier
e885860edc Fix From/Sender handling in Emails 2020-04-16 16:49:30 +02:00
Grégoire Pineau
15a8610c0c [Cache] Avoid memory leak in TraceableAdapter::reset() 2020-04-15 20:25:28 +02:00
Nicolas Grekas
14a204636d bug #36408 [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions (soyuka)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | na
| License       | MIT
| Doc PR        | na

expectExceptionMessageRegExp is deprecated coming phpunit 8.5.3  see https://github.com/sebastianbergmann/phpunit/issues/4133

Not sure if I need to add something else lmk.

Commits
-------

cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
2020-04-15 17:56:18 +02:00
soyuka
cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions 2020-04-15 17:55:41 +02:00
Fabien Potencier
39a7ee1a61 bug #36447 Remove return type for Twig function workflow_metadata() (gisostallenberg)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove return type for Twig function workflow_metadata()

Technically it is allowed to have metadata other than string, even data that does not cast to string, like an array.

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

The workflow metadata store can contain not only strings, but setting nested metadata results in an error when workflow_metadata() is used in Twig.
Also see #36391

Commits
-------

55664c5a17 Remove return type for Twig function workflow_metadata()
2020-04-15 11:12:33 +02:00
Robin Chalas
efb0dee407 bug #36449 [Messenger] Make sure redis transports are initialized correctly (Seldaek)
This PR was squashed before being merged into the 4.4 branch (closes #36449).

Discussion
----------

[Messenger] Make sure redis transports are initialized correctly

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

Took me a while to figure out why my messages were dispatched/handled twice.. Turns out I had two messenger transports using the same dsn and the parsing was broken so they ended up both polling from a `""` stream, which caused them to both handle the messages (I think).

Below my config, note the trailing slash in the dsn was the root cause of the issue, but I don't think it's that unreasonable.

```
.env:

MESSENGER_TRANSPORT_DSN=redis://localhost:6379/?dbindex=3

messenger.yml:

            async_urgent:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    group: async_urgent
                    stream: messages_urgent
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    group: async
                    stream: messages

```

Commits
-------

68b3b898d8 [Messenger] Make sure redis transports are initialized correctly
2020-04-14 13:53:10 +02:00
Jordi Boggiano
68b3b898d8 [Messenger] Make sure redis transports are initialized correctly 2020-04-14 13:52:59 +02:00
Giso Stallenberg
55664c5a17 Remove return type for Twig function workflow_metadata()
Technically it is allowed to have metadata other than string, even data that does not cast to string, like an array.
Also see https://github.com/symfony/symfony/issues/36391
2020-04-14 11:16:32 +02:00
Nicolas Grekas
b3333e552d [DI] fix typo 2020-04-14 10:30:58 +02:00
Nicolas Grekas
acb1060754 Merge branch '3.4' into 4.4
* 3.4:
  [DI] fix loading defaults when using the PHP-DSL
  RepeatedType should always have inner types mapped
2020-04-13 12:13:05 +02:00
Nicolas Grekas
f70286333f bug #36411 [Form] RepeatedType should always have inner types mapped (biozshock)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] RepeatedType should always have inner types mapped

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Doc PR| https://github.com/symfony/symfony-docs/pull/13519 |
| Tickets       | Fix #36410
| License       | MIT

Always set mapped=true to override inner type mapped setting.
Throw an exception if inner types of RepeatedType has mapped=false

Commits
-------

728cd66a13 RepeatedType should always have inner types mapped
2020-04-13 11:46:34 +02:00
Nicolas Grekas
41c93b65bf bug #36441 [DI] fix loading defaults when using the PHP-DSL (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix loading defaults when using the PHP-DSL

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

Commits
-------

51e0d3792c [DI] fix loading defaults when using the PHP-DSL
2020-04-13 11:45:24 +02:00
Nicolas Grekas
51e0d3792c [DI] fix loading defaults when using the PHP-DSL 2020-04-13 11:33:40 +02:00
Fabien Potencier
7b8a3748af minor #36440 Fixed another false-negative fabbot error on exception message in SecurityExtension (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

Fixed another false-negative fabbot error on exception message in SecurityExtension

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

I saw all false-negatives where fixed in the code today. This one has been coming up in my Security PRs lately, so it must have been missed.

Commits
-------

4f6381323c Fixed false-negative fabbot error on exception message
2020-04-13 08:25:02 +02:00
Wouter de Jong
4f6381323c Fixed false-negative fabbot error on exception message 2020-04-13 00:16:27 +02:00
Fabien Potencier
093a71500a Fix tests 2020-04-12 18:56:09 +02:00
Fabien Potencier
96b28104bf Merge branch '3.4' into 4.4
* 3.4:
  Fix test
2020-04-12 18:54:34 +02:00
Fabien Potencier
311a944a08 Fix test 2020-04-12 18:54:01 +02:00
Fabien Potencier
9f9383b25f Fix code 2020-04-12 18:45:36 +02:00
Fabien Potencier
e4d4428bb3 Fix code 2020-04-12 18:39:58 +02:00
Fabien Potencier
e03e1bf420 minor #36438 Tweak the code to avoid fabbot false positives (4.4) (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Tweak the code to avoid fabbot false positives (4.4)

| 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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

To avoid false positives from fabbot, I've changed some exception messages (the way we concatenate values) to avoid them.

Commits
-------

7d2cab1644 Tweak the code to avoid fabbot false positives
2020-04-12 18:18:20 +02:00
Fabien Potencier
7d2cab1644 Tweak the code to avoid fabbot false positives 2020-04-12 18:14:02 +02:00
Fabien Potencier
11a707200d Merge branch '3.4' into 4.4
* 3.4:
  Tweak the code to avoid fabbot false positives
2020-04-12 16:39:55 +02:00
Fabien Potencier
270d1be04a minor #36437 Tweak the code to avoid fabbot false positives (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Tweak the code to avoid fabbot false positives

| Q             | A
| ------------- | ---
| Branch?       | 3.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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

To avoid false positives from fabbot, I've changed some exception messages (the way we concatenate values) to avoid them.

Commits
-------

ad6f75e5c8 Tweak the code to avoid fabbot false positives
2020-04-12 16:35:48 +02:00
Fabien Potencier
ad6f75e5c8 Tweak the code to avoid fabbot false positives 2020-04-12 16:33:46 +02:00
Nicolas Grekas
8b84ab6002 [Lock] remove mention of mongodb 2020-04-12 13:06:58 +02:00
Nicolas Grekas
d53973afdb Merge branch '3.4' into 4.4
* 3.4:
  [Routing] µtweaks
2020-04-12 13:06:44 +02:00
Nicolas Grekas
a21c1127dc [Routing] µtweaks 2020-04-12 11:58:27 +02:00
Nicolas Grekas
31eecc3925 [travis] fix CI (ter) 2020-04-12 11:46:54 +02:00
Nicolas Grekas
44212f96d8 Merge branch '3.4' into 4.4
* 3.4:
  Revert "[travis][appveyor] don't cache .phpunit"
  silence E_NOTICE triggered since PHP 7.4
  [Form] Removed legacy check in `ValidationListener`
  do not merge constraints within interfaces
  [Validator] Fixed default group for nested composite constraints
2020-04-12 11:41:03 +02:00
Nicolas Grekas
966989a2b9 Revert "[travis][appveyor] don't cache .phpunit"
This reverts commit 5182253aa2.
2020-04-12 11:36:17 +02:00
Fabien Potencier
4e6a3bddf5 bug #36434 [HttpKernel] silence E_NOTICE triggered since PHP 7.4 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] silence E_NOTICE triggered since PHP 7.4

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

Commits
-------

c4e2c447ba silence E_NOTICE triggered since PHP 7.4
2020-04-12 11:33:14 +02:00
Christian Flothmann
c4e2c447ba silence E_NOTICE triggered since PHP 7.4 2020-04-12 11:28:02 +02:00
Fabien Potencier
6a27337333 bug #36365 [Validator] Fixed default group for nested composite constraints (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed default group for nested composite constraints

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

Take a breath: when composite constraints are nested in a parent composite constraint without having non composite nested constraints (i.e empty), then the default group is not added, making the validator failing to validate in any group (including default), because there is no group at all, which should never happen.

Commits
-------

117ee34698 [Validator] Fixed default group for nested composite constraints
2020-04-12 09:44:21 +02:00
Fabien Potencier
f84592ac83 bug #36422 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only

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

Commits
-------

a5b884cd94 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only
2020-04-12 09:39:11 +02:00
Fabien Potencier
280674f8bc bug #36417 Force ping after transport exception (oesteve)
This PR was merged into the 4.4 branch.

Discussion
----------

Force ping after transport exception

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

SMTP transport fails for long running processes after tranport exception, if stream is closed all messages will throw a transport exception until $lastMessageTime exceds $pingThreshold.

With this PR, after transport expception the transport will ping the server to check if the connection is still alive.

Commits
-------

7ccbef62f6 Force ping after transport Exception
2020-04-12 09:31:22 +02:00
Fabien Potencier
cd4a4bd3d1 bug #35591 [Validator] do not merge constraints within interfaces (greedyivan)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] do not merge constraints within interfaces

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

This fix disables merge constraints within interfaces.

There is no reason to merge constraints from one interface to another because each class merges the constraints of all its interfaces. Only one check is needed is to eliminate all interfaces that comes from parent class to avoid duplication.

Commits
-------

67f336b808 do not merge constraints within interfaces
2020-04-12 09:28:41 +02:00
Fabien Potencier
db733da440 minor #36428 [Form] Removed legacy check in ValidationListener (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Removed legacy check in `ValidationListener`

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

A left over of #13198, should have been removed in 3.0. The tests don't use `null` anymore, no update needed here, this is just about removing dead code.

Commits
-------

e479e51f7c [Form] Removed legacy check in `ValidationListener`
2020-04-12 09:19:14 +02:00
Nicolas Grekas
0745ea4b1b Merge branch '3.4' into 4.4
* 3.4:
  [travis][appveyor] don't cache .phpunit
2020-04-12 00:30:01 +02:00
Nicolas Grekas
5182253aa2 [travis][appveyor] don't cache .phpunit 2020-04-12 00:02:45 +02:00