Commit Graph

45968 Commits

Author SHA1 Message Date
Thomas Calvet
0904e57b85 [SecurityBundle][FirewallMap] Remove unused property 2019-12-13 17:57:31 +01:00
Grégoire Pineau
be2eb6fcc7 [Messenger][AMQP] Use delivery_mode=2 by default 2019-12-13 14:40:46 +01:00
Nicolas Grekas
e04331657f bug #34904 [Validator][ConstraintValidator] Safe fail on invalid timezones (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator][ConstraintValidator] Safe fail on invalid timezones

Co-authored-by: Scott Dawson <scott@loyaltycorp.com.au>

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

Alternative to https://github.com/symfony/symfony/pull/33902.

I will explain why I think it is better this way:

1. We set the timezone with the setter because it's 100% safe, it never fails. It fall backs to the default timezone if the provided timezone is not supported (as if we passed null, so the same behavior that always existed). We are therefore compatible with all edge cases.
2. We don't validate the timezone with `\DateTimeZone::listIdentifiers()`. It only returns full identifiers like "Europe/Paris" but it doesn't take into account "numeric" identifiers such as "+08:00" which are perfectly valid. I added a test case to ensure we stay valid with this case. + some invalid identifiers for the native `\IntlDateFormatter` are valid with the polyfill that uses `\DateTimeZone` (eg : `X`). I don't think we can validate anything safely that will work reliably on both implementations.

Commits
-------

3b1b994cb3 [Validator][ConstraintValidator] Safe fail on invalid timezones
2019-12-13 13:34:40 +01:00
Nicolas Grekas
da7dedaaa0 bug #34935 [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass

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

We remove the "removing" passes again and to avoid what https://github.com/symfony/symfony/pull/34502 fixed, we skip validating the "live" container removed ids in the pass (the "live" container is supposed to have the same definitions than the "debug container" one).

Logically, an errored service cannot pass the "live" container compilation without being removed. Consequently, it also skips the errored services that ended up being removed in the "live" container.

Commits
-------

a0f581ba9d [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass
2019-12-13 13:19:04 +01:00
Thomas Calvet
a0f581ba9d [FrameworkBundle][DependencyInjection] Skip removed ids in the lint container command and its associated pass 2019-12-13 13:18:52 +01:00
Nicolas Grekas
a24b16534e bug #34957 [Security] Revert "AbstractAuthenticationListener.php error instead info" (larzuk91)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Security] Revert "AbstractAuthenticationListener.php error instead info"

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

This reverts commit 867eb78cfe.

After that change, every failed login attempt is logged as an error. It's flooding our errors log channel

Commits
-------

9d306f9046 [SECURITY] Revert "AbstractAuthenticationListener.php error instead info. Rebase of #28462"
2019-12-13 13:11:54 +01:00
Diego Aguiar
9d306f9046 [SECURITY] Revert "AbstractAuthenticationListener.php error instead info. Rebase of #28462"
This reverts commit 867eb78cfe.
2019-12-13 13:11:48 +01:00
Nicolas Grekas
1d59e1eff0 bug #34922 [FrameworkBundle][Secrets] Hook configured local dotenv file (fancyweb)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Secrets] Hook configured local dotenv file

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

Configured local_dotenv_file does not currently substitute the secrets.vault service definition first argument value, rendering this configuration option useless + we don't need to set defaults in secrets.xml since everything is overriden in FrameworkExtension with the same default values (from the configuration).

Commits
-------

56f542c36b [FrameworkBundle][Secrets] Hook configured local dotenv file
2019-12-13 13:07:54 +01:00
Thomas Calvet
56f542c36b [FrameworkBundle][Secrets] Hook configured local dotenv file 2019-12-13 13:07:46 +01:00
Stefan Kruppa
41b56eac29 [DI] Improve performance of processDefinition 2019-12-13 12:59:23 +01:00
Nicolas Grekas
212dc53431 bug #34967 [HttpFoundation] fix redis multi host dsn not recognized (Jan Christoph Beyer)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] fix redis multi host dsn not recognized

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

#34177 added support configurating session handlers with DSNs. It was no possible to pass a redis-DSN like
`redis:?host[localhost]&host[localhost:6379]&host[/var/run/redis.sock:]&auth=my-password&redis_cluster=1'`

since the check was
`case 0 === strpos($connection, 'redis://'):`

Commits
-------

81ba07aa26 fix redis multi host dsn not recognized
2019-12-13 12:54:36 +01:00
Jan Christoph Beyer
81ba07aa26 fix redis multi host dsn not recognized 2019-12-13 12:54:15 +01:00
Nicolas Grekas
0636177aa6 bug #34963 [Lock] fix constructor argument type declaration (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] fix constructor argument type declaration

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

Commits
-------

201af4f31d fix constructor argument type declaration
2019-12-13 12:50:28 +01:00
Christian Flothmann
201af4f31d fix constructor argument type declaration 2019-12-13 09:10:41 +01:00
Nicolas Grekas
88ed8172d8 Merge branch '4.3' into 4.4
* 4.3:
  Fix leftover from doctrine/persistence < 1.3
2019-12-12 16:06:09 +01:00
Nicolas Grekas
96f04d9b32 Fix leftover from doctrine/persistence < 1.3 2019-12-12 16:05:14 +01:00
Nicolas Grekas
866de0fb8b Merge branch '4.3' into 4.4
* 4.3:
  Require doctrine/persistence ^1.3
2019-12-12 16:02:38 +01:00
Nicolas Grekas
72a2aff829 bug #34955 Require doctrine/persistence ^1.3 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Require doctrine/persistence ^1.3

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

This is the only way to remove direct deprecations triggered by doctrine/persistence ^1.3.
Requires v1.3.0 to be tagged before the next bug fix release.
/cc @alcaeus

The only deprecations that remain are triggered by the ORM now.

Commits
-------

ce5dcb96c1 Require doctrine/persistence ^1.3
2019-12-12 15:55:06 +01:00
Nicolas Grekas
ce5dcb96c1 Require doctrine/persistence ^1.3 2019-12-12 15:53:41 +01:00
Morten Wulff
ef0aa4dc87 [Mailer] fixed undefined index when sending mail
When a Mandrill API request is succesful, it returns an array of
results, one for each recipient. To get rid of the undefined index
error, we grab the message ID from the first recipient in the array.
2019-12-12 15:08:08 +01:00
Nicolas Grekas
a656a57736 [Messenger] Fix deprecation 2019-12-12 14:54:44 +01:00
Nicolas Grekas
12f46ba538 Merge branch '4.3' into 4.4
* 4.3:
  Add missing annotation
2019-12-12 14:35:29 +01:00
Nicolas Grekas
80d15cdcf9 Merge branch '3.4' into 4.3
* 3.4:
  Add missing annotation
2019-12-12 14:34:31 +01:00
Nicolas Grekas
4ec093abc8 Add missing annotation 2019-12-12 14:33:51 +01:00
Nicolas Grekas
93b2f9ef6f Merge branch '4.3' into 4.4
* 4.3:
  Fix merge
2019-12-12 14:26:43 +01:00
Nicolas Grekas
7d88be8978 Fix merge 2019-12-12 14:16:57 +01:00
Nicolas Grekas
a31119b89c Merge branch '4.3' into 4.4
* 4.3:
  Fix merge
  [DoctrineBridge] try to fix deprecations from doctrine/persistence
  [DI] Add support for immutable setters in CallTrait
  [Cache] Propagate expiry when syncing items in ChainAdapter
  [Routing] fix memoryleak when loading compiled routes
  [Translation] fix memoryleak in PhpFileLoader
2019-12-12 13:53:52 +01:00
Nicolas Grekas
ad4b5fd653 Fix merge 2019-12-12 13:43:22 +01:00
Nicolas Grekas
72936e457f Merge branch '3.4' into 4.3
* 3.4:
  [DoctrineBridge] try to fix deprecations from doctrine/persistence
  [Translation] fix memoryleak in PhpFileLoader
2019-12-12 13:39:14 +01:00
Nicolas Grekas
cff8b25a5a minor #34949 [DoctrineBridge] try to fix deprecations from doctrine/persistence (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] try to fix deprecations from doctrine/persistence

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

Follows https://github.com/doctrine/persistence/pull/71
But the BC layer is not working yet, as highlighted by the `XXX` in the attached patch.
At least for the corresponding interfaces, doctrine/persistence should always alias the legacy name to the new one.

/cc @greg0ire @alcaeus FYI

Commits
-------

53a4711520 [DoctrineBridge] try to fix deprecations from doctrine/persistence
2019-12-12 13:20:08 +01:00
Nicolas Grekas
53a4711520 [DoctrineBridge] try to fix deprecations from doctrine/persistence 2019-12-12 13:13:32 +01:00
Nicolas Grekas
d294085689 bug #34923 [DI] Fix support for immutable setters in CallTrait (Lctrs)
This PR was merged into the 4.3 branch.

Discussion
----------

[DI] Fix support for immutable setters in CallTrait

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

Commits
-------

90ace51328 [DI] Add support for immutable setters in CallTrait
2019-12-11 13:26:30 +01:00
Lctrs
90ace51328 [DI] Add support for immutable setters in CallTrait 2019-12-11 13:18:17 +01:00
Fabien Potencier
25494fa519 bug #34878 [TwigBundle] fix broken FilesystemLoader::exists() with Twig 3 (dpesch)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBundle] fix broken FilesystemLoader::exists() with Twig 3

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

This fix adapts the declaration of Twig 3 `\Twig\Loader\FilesystemLoader::findTemplate()` which expects to return `string|null` and returns `null` instead of `false`.

Returning `false` breaks `\Twig\Loader\FilesystemLoader::exists()` which returns `true` if `findTemplate()` does not return `null`.

Twig 2 should not be affected by this patch. The `exists()` method expects `null` or `false` for not found templates: <fdb691a424/src/Loader/FilesystemLoader.php (L169)>

Commits
-------

ff1d77e155 bug #34877 [TwigBundle] fix findTemplate() to return `null`
2019-12-11 01:24:49 +01:00
Fabien Potencier
d91efd31f6 bug #34921 [HttpFoundation] Removed "Content-Type" from the preferred format guessing mechanism (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Removed "Content-Type" from the preferred format guessing mechanism

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

Confirmed, inferring the `Content-Type` of the response using the `Content-Type` provided for the request body is NOT a good idea. The HTTP RFC explicitly states that `Accept` must be used to hint a preferred response format (`Content-Type` on the request indicates the type of associated its the body).

Use `Accept` if provided (a best practice anyway), and fallback to the default value (HTML by default) otherwise.

Commits
-------

776523e56a Removed request header "Content-Type" from the preferred format guessing mechanism
2019-12-11 01:19:19 +01:00
Fabien Potencier
6bf764a4ed bug #34886 [HttpKernel] fix triggering deprecation in file locator (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] fix triggering deprecation in file locator

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

Commits
-------

142b1793e0 fix triggering deprecation in file locator
2019-12-11 01:18:36 +01:00
Fabien Potencier
349ea047e6 bug #34918 [Translation] fix memoryleak in PhpFileLoader (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] fix memoryleak in PhpFileLoader

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

This happens when running the test suite with opcache disabled (as it is the case by default since `opcache.enable_cli=0`).
Doing this "require" in a loop (for each test case) compiles the file at each iteration and doesn't reclaim memory (there is no garbage collector for opcodes).

Commits
-------

5c9e3bac96 [Translation] fix memoryleak in PhpFileLoader
2019-12-11 01:14:09 +01:00
Fabien Potencier
ebadf51543 bug #34920 [Routing] fix memoryleak when loading compiled routes (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Routing] fix memoryleak when loading compiled routes

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

Same as #34918 for Routing. That's the last significant memory hog I've identified.

Commits
-------

85371a174e [Routing] fix memoryleak when loading compiled routes
2019-12-11 01:13:19 +01:00
Nicolas Grekas
3df1d1efe0 bug #34787 [Cache] Propagate expiry when syncing items in ChainAdapter (trvrnrth)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] Propagate expiry when syncing items in ChainAdapter

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

If a lower adapter provides item metadata, propagate the expiry time when syncing the item to upper ones.

Commits
-------

77138acea6 [Cache] Propagate expiry when syncing items in ChainAdapter
2019-12-10 17:56:02 +01:00
Trevor North
77138acea6 [Cache] Propagate expiry when syncing items in ChainAdapter
If a lower adapter provides item metadata, propagate the expiry time when
syncing the item to upper ones.
2019-12-10 17:45:08 +01:00
Nicolas Grekas
648544f432 Merge branch '4.3' into 4.4
* 4.3:
  Fix CS
2019-12-10 16:11:53 +01:00
Nicolas Grekas
5da657bcf3 Merge branch '3.4' into 4.3
* 3.4:
  Fix CS
2019-12-10 16:11:12 +01:00
Nicolas Grekas
c90cf3301a Fix CS 2019-12-10 16:06:53 +01:00
Yonel Ceruto
776523e56a Removed request header "Content-Type" from the preferred format guessing mechanism 2019-12-10 09:58:16 -05:00
Nicolas Grekas
85371a174e [Routing] fix memoryleak when loading compiled routes 2019-12-10 15:07:26 +01:00
Nicolas Grekas
4c50968dd8 [Validator] fix low deps 2019-12-10 14:43:13 +01:00
Nicolas Grekas
894c96bd32 minor #34917 Don't patch BadFileName.php fixture file (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

Don't patch BadFileName.php fixture file

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

Commits
-------

ba9d432d48 Don't patch BadFileName.php fixture file
2019-12-10 14:41:05 +01:00
Michael Voříšek
130df8ca8c Fix invalid Windows path normalization 2019-12-10 14:02:44 +01:00
Thomas Calvet
ba9d432d48 Don't patch BadFileName.php fixture file 2019-12-10 13:56:22 +01:00
Nicolas Grekas
5c9e3bac96 [Translation] fix memoryleak in PhpFileLoader 2019-12-10 13:51:10 +01:00