Commit Graph

40032 Commits

Author SHA1 Message Date
Nicolas Grekas
79f80d361c minor #37015 Fix abstract method name in PHP doc block (l-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix abstract method name in PHP doc block

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

Commits
-------

d6966c3147 Fix abstract method name in PHP doc block
2020-05-30 22:07:07 +02:00
Nicolas Grekas
282cafb093 Merge branch '3.4' into 4.4
* 3.4:
  Various cleanups
2020-05-30 22:06:45 +02:00
Laurent VOULLEMIER
d6966c3147
Fix abstract method name in PHP doc block 2020-05-30 21:50:06 +02:00
Nicolas Grekas
d8f282edca Various cleanups 2020-05-30 20:58:05 +02:00
Nicolas Grekas
255e9117a0 Merge branch '3.4' into 4.4
* 3.4:
  Fixes sprintf(): Too few arguments in form transformer
  [Console] Fix QuestionHelper::disableStty()
  validate subforms in all validation groups
  Update Hungarian translations
  Add meaningful message when Process is not installed (ProcessHelper)
  [PropertyAccess] Fix TypeError parsing again.
  [Form] add missing Czech validators translation
  [Validator] add missing Czech translations
  never directly validate Existence (Required/Optional) constraints
2020-05-30 20:50:54 +02:00
Nicolas Grekas
84081adbf7 bug #36894 [Validator] never directly validate Existence (Required/Optional) constraints (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] never directly validate Existence (Required/Optional) constraints

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

Using `Optional` or `Required` like "regular" constraints does not make any sense, but doing so didn't break before #36365. I suggest to ignore them for now and deprecate using them outside the `Collection` constraint in 5.2.

Commits
-------

d333aae187 never directly validate Existence (Required/Optional) constraints
2020-05-30 20:43:38 +02:00
Nicolas Grekas
8e40814164 bug #37007 [Console] Fix QuestionHelper::disableStty() (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix QuestionHelper::disableStty()

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

We broke it when adding `Terminal::hasSttyAvailable()`.
Let's fix it on 3.4 and move it to terminal on master, as suggested in #36977

Commits
-------

5d93b61278 [Console] Fix QuestionHelper::disableStty()
2020-05-30 20:43:03 +02:00
Nicolas Grekas
ca66e6cede minor #37003 [PropertyAccess] Fix TypeError parsing again (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] Fix TypeError parsing again

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

Apparently, the format of `TypeError`s has changed again in php8. While investigating, I noticed our error message parsing is not handling anonymous classes well, so I've added some test cases for them.

I chose a fuzzier regular expression to parse the expected return type from the error message. Additionally, I'm checking the stack trace if the caught `TypeError` is really caused by the accessor call.

Commits
-------

03b4e98630 [PropertyAccess] Fix TypeError parsing again.
2020-05-30 20:42:19 +02:00
Nicolas Grekas
2e8ae40183 bug #36865 [Form] validate subforms in all validation groups (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] validate subforms in all validation groups

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

Commits
-------

b819d94d14 validate subforms in all validation groups
2020-05-30 20:41:29 +02:00
Nicolas Grekas
a337ba5547 [HttpClient] fix issues in tests 2020-05-30 20:33:03 +02:00
Pedro Casado
ff7d3f4f01 Fixes sprintf(): Too few arguments in form transformer 2020-05-30 19:48:24 +02:00
Robin Chalas
5d93b61278 [Console] Fix QuestionHelper::disableStty() 2020-05-29 16:49:42 +02:00
Pierre du Plessis
472883313f
[Validator] Use Mime component to determine mime type for file validator 2020-05-29 14:10:59 +02:00
Christian Flothmann
b819d94d14 validate subforms in all validation groups 2020-05-29 11:57:12 +02:00
Gábor Egyed
1614595424
Update Hungarian translations 2020-05-29 09:47:21 +02:00
Laurent VOULLEMIER
3ab76e40ff Add meaningful message when Process is not installed (ProcessHelper) 2020-05-29 05:22:46 +02:00
Fabien Potencier
2ff26b7ce8 bug #36990 [Messenger] Change the default notify timeout value for PostgreSQL (fabpot)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] Change the default notify timeout value for PostgreSQL

| Q             | A
| ------------- | ---
| Branch?       | 5.1 <!-- see below -->
| Bug fix?      | yes-ish
| 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

The default value of 0 means that notify is kind of disable and that incurs many SQL requests. 10 minutes is kind of arbitrary but seems to be a good balance between waiting for a message (blocking) and trying again later in case of an issue.

Commits
-------

d9decf9da2 [Messenger] Change the default notify timeout value for PostgreSQL
2020-05-29 05:19:22 +02:00
Fabien Potencier
d9decf9da2 [Messenger] Change the default notify timeout value for PostgreSQL 2020-05-29 05:17:08 +02:00
Alexander M. Turek
03b4e98630 [PropertyAccess] Fix TypeError parsing again. 2020-05-29 02:04:36 +02:00
Fabien Potencier
96d2d19de2 bug #36995 [TwigBridge] fix fallback html-to-txt body converter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] fix fallback html-to-txt body converter

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

Right now, the content of the `<head>` and `<style>` are dumped as text. This fixes it.

Of course, use `league/html-to-markdown` if you need a better parser.

Commits
-------

6f59d60508 [TwigBridge] fix fallback html-to-txt body converter
2020-05-28 15:43:01 +02:00
Nicolas Grekas
6f59d60508 [TwigBridge] fix fallback html-to-txt body converter 2020-05-28 15:20:36 +02:00
Nicolas Grekas
8bbf62ea16 Merge branch '4.4' into 5.0
* 4.4:
  [Security/Http] fix merge
  [ErrorHandler] fix setting $trace to null in FatalError
2020-05-28 14:17:48 +02:00
Nicolas Grekas
15d4f7ac04 [Security/Http] fix merge 2020-05-28 14:17:38 +02:00
Nicolas Grekas
aa50c9287c [ErrorHandler] fix setting $trace to null in FatalError 2020-05-28 12:39:14 +02:00
Nicolas Grekas
50dda4c9a7 Merge branch '5.0' into 5.1
* 5.0:
  Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 11:10:22 +02:00
Nicolas Grekas
f5673905d5 Merge branch '4.4' into 5.0
* 4.4:
  Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 11:07:30 +02:00
Nicolas Grekas
5fe0f9490e minor #36992 Handle fetch mode deprecation of DBAL 2.11 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Handle fetch mode deprecation of DBAL 2.11

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

Continuation of #36987 on the 4.4 branch.

Commits
-------

1385213a9a Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 10:58:00 +02:00
Martin Hujer
afdda5d764 [Form] add missing Czech validators translation 2020-05-28 10:39:10 +02:00
Alexander M. Turek
1385213a9a Handle fetch mode deprecation of DBAL 2.11. 2020-05-28 10:27:51 +02:00
Nicolas Grekas
f36ec7cc81 Merge branch '5.0' into 5.1
* 5.0:
  Handle fetch mode deprecation of DBAL 2.11.
  Fixed handling of CSRF logout error
  [WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)
  [DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example
2020-05-28 10:20:44 +02:00
Nicolas Grekas
da25ef172d Merge branch '4.4' into 5.0
* 4.4:
  Handle fetch mode deprecation of DBAL 2.11.
  Fixed handling of CSRF logout error
  [WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB)
  [DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example
2020-05-28 10:20:26 +02:00
Nicolas Grekas
dfe8c816a6 Merge branch '3.4' into 4.4
* 3.4:
  Handle fetch mode deprecation of DBAL 2.11.
  Fixed handling of CSRF logout error
2020-05-28 10:15:49 +02:00
Fabien Potencier
8861ee18a2 minor #36979 [Validator] Add missing translations for cs locale (Czech) (mhujer)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing translations for cs locale (Czech)

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

Is it enough to submit this only against 3.4 to have it included also in 5.1 version?

Commits
-------

3d18c1c185 [Validator] add missing Czech translations
2020-05-28 10:15:44 +02:00
Alexander M. Turek
ed518551e1 Handle fetch mode deprecation of DBAL 2.11. 2020-05-28 09:55:04 +02:00
Wouter de Jong
e3d9b259e0 Fixed security-* package dependencies 2020-05-27 21:00:01 +02:00
Martin Hujer
3d18c1c185 [Validator] add missing Czech translations 2020-05-27 12:08:15 +02:00
Dmitriy Derepko
5db0a8bf4b [Contracts/Deprecation] fix composer.json for PHP 8 2020-05-27 10:34:37 +02:00
Wouter de Jong
50348f2eb7 Fixed handling of CSRF logout error 2020-05-26 17:30:38 +02:00
Loïc Beurlet
a91204a79d [WebProfilerBundle] changed label of memory usage in time panel (Mb into MiB) 2020-05-26 14:58:50 +02:00
Wouter de Jong
f3b8a58513 [DotEnv][WebLink][Templating][ErrorHandler] Updated README with minimal example 2020-05-26 11:42:42 +02:00
Fabien Potencier
9a16c8ef27 bumped Symfony version to 5.1.0 2020-05-26 09:39:17 +02:00
Fabien Potencier
5715e6e4f0 updated VERSION for 5.1.0-RC2 2020-05-26 09:22:08 +02:00
Fabien Potencier
7f6934c257 bug #36966 Fix extra SQL support in Doctrine migrations (fabpot)
This PR was merged into the 5.1 branch.

Discussion
----------

Fix extra SQL support in Doctrine migrations

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

/cc @weaverryan

Commits
-------

1d1f3e1cd4 Fix extra SQL support in Doctrine migrations
2020-05-26 09:17:46 +02:00
Fabien Potencier
1d1f3e1cd4 Fix extra SQL support in Doctrine migrations 2020-05-26 08:12:19 +02:00
Nicolas Grekas
1ac069de0f [HttpClient] fix management of shorter-than-requested timeouts with AmpHttpClient 2020-05-25 19:37:45 +02:00
Nicolas Grekas
780c57672b Merge branch '5.0' into 5.1
* 5.0:
  Allow email message to have "To", "Cc", or "Bcc" header to be valid
  [FrameworkBundle] Removed detection of Serializer < 3.2
  Update pull request template for 5.1.
  [Security/Core] fix PHP8 deprecation
2020-05-25 14:33:44 +02:00
Nicolas Grekas
2c262df4ef Merge branch '4.4' into 5.0
* 4.4:
  Allow email message to have "To", "Cc", or "Bcc" header to be valid
  [FrameworkBundle] Removed detection of Serializer < 3.2
  Update pull request template for 5.1.
  [Security/Core] fix PHP8 deprecation
2020-05-25 14:33:25 +02:00
Nicolas Grekas
6a8b22d3b1 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Removed detection of Serializer < 3.2
  Update pull request template for 5.1.
2020-05-25 14:18:50 +02:00
Nicolas Grekas
92adc3f0e5 [Lock] fix test 2020-05-25 13:55:11 +02:00
Javier Eguiluz
835712747d [Security] Updated a deprecation message 2020-05-25 11:48:26 +02:00
Ernest Hymel
35b7e1cb9a Allow email message to have "To", "Cc", or "Bcc" header to be valid 2020-05-25 07:42:33 +02:00
Alexander M. Turek
7f3132ebe3 [FrameworkBundle] Fix MicroKernelTrait for php 8 2020-05-24 23:59:22 +02:00
Nicolas Grekas
bf43fa3b34 minor #36941 [HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc() (derrabus)
This PR was merged into the 5.1 branch.

Discussion
----------

[HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc()

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

This should fix the remaining red php 8 test of the HttpFoundation suite.

Commits
-------

12f734d8b3 [HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc().
2020-05-24 20:56:05 +02:00
Alexander M. Turek
9badd71687 [FrameworkBundle] Removed detection of Serializer < 3.2 2020-05-24 17:32:05 +02:00
Alexander M. Turek
b27b535126 [DependencyInjection] Fixed tests for wither with static return type. 2020-05-24 17:04:36 +02:00
Alexander M. Turek
12f734d8b3 [HttpFoundation] Avoid TypeError when calling \SessionHandlerInterface::gc(). 2020-05-24 14:18:07 +02:00
Nicolas Grekas
5233cb96f4 bug #36938 Don't call method_exists() with non-objects. (derrabus)
This PR was merged into the 5.1 branch.

Discussion
----------

Don't call method_exists() with non-objects.

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

Followup to #36901.

Commits
-------

9efb442ce5 Don't call method_exists() with non-objects.
2020-05-24 12:54:01 +02:00
Alexander M. Turek
9efb442ce5 Don't call method_exists() with non-objects. 2020-05-24 12:15:36 +02:00
Nicolas Grekas
c0d4617820 [Lock] skip tests when ext-mongo is not installed 2020-05-24 12:09:11 +02:00
Nicolas Grekas
aa53bdb77b [Security/Core] fix PHP8 deprecation 2020-05-24 11:45:24 +02:00
Nicolas Grekas
e3069df98f bug #36936 [FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8 (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8

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

In PHP 8, abstract methods on traits are now enforcing that their using classes match the signature.

But this is not the semantics we need in this trait: we want to allow ppl to use a different type of configurators, to provide extensibility of the DSL each provide.

This makes nightly job fail with fatal error currently.

There is no other options here.

/cc @nikic FYI

Commits
-------

4473f454ca [FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8
2020-05-24 11:40:24 +02:00
Alexander M. Turek
e3aa78fd51 [HttpClient] Adjust AmpResponse to the stricter trait handling in php 8. 2020-05-24 11:25:47 +02:00
Nicolas Grekas
4473f454ca [FrameworkBundle] don't use abstract methods in MicroKernelTrait, their semantics changed in PHP 8 2020-05-24 11:24:07 +02:00
Nicolas Grekas
6868f6cd1a Merge branch '5.0' into 5.1
* 5.0:
  [travis] display deprecations in nightly jobs
2020-05-24 10:59:54 +02:00
Nicolas Grekas
466b70d655 Merge branch '4.4' into 5.0
* 4.4:
  [travis] display deprecations in nightly jobs
2020-05-24 10:58:00 +02:00
Nicolas Grekas
2ed4e0efce Merge branch '5.0' into 5.1
* 5.0:
  Parse and render anonymous classes correctly on php 8
  Enable APCu for the php 8 build.
  [Process] Fix failing test on php 8.
  [HttpKernel] fix test
  Make PHP 8 green on Travis
  Revert "[Cache] allow DBAL v3"
  [PropertyAccessor] Added missing property path on php 8.
  Don't execute tests with DBAL 2.x on php 8.
2020-05-24 10:49:09 +02:00
Nicolas Grekas
49eb5c9c1f Merge branch '4.4' into 5.0
* 4.4:
  Parse and render anonymous classes correctly on php 8
  Enable APCu for the php 8 build.
  [Process] Fix failing test on php 8.
  [HttpKernel] fix test
  Make PHP 8 green on Travis
  Revert "[Cache] allow DBAL v3"
  [PropertyAccessor] Added missing property path on php 8.
  Don't execute tests with DBAL 2.x on php 8.
2020-05-24 10:40:42 +02:00
Nicolas Grekas
6d02565ea7 bug #36914 Parse and render anonymous classes correctly on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Parse and render anonymous classes correctly on php 8

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

The format of the value that `get_class()` returns for anonymous classes has changed in php 8. This PR attempts to detect both formats, with the help of the PHP80 polyfill where possible.

Commits
-------

9d702fd94b Parse and render anonymous classes correctly on php 8
2020-05-24 10:35:29 +02:00
Alexander M. Turek
9d702fd94b Parse and render anonymous classes correctly on php 8 2020-05-24 10:33:35 +02:00
Alexander M. Turek
98e5105bd3 [Process] Fix failing test on php 8. 2020-05-23 21:47:49 +02:00
Nicolas Grekas
5ebcd26f06 [HttpKernel] fix test 2020-05-23 19:37:50 +02:00
Nicolas Grekas
7b871133e9 Merge branch '3.4' into 4.4
* 3.4:
  Make PHP 8 green on Travis
2020-05-23 19:20:05 +02:00
Nicolas Grekas
571d46cf01 Make PHP 8 green on Travis 2020-05-23 19:05:51 +02:00
Nicolas Grekas
9de714c3d4 minor #36928 [PropertyAccessor] Added missing property path on php 8 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyAccessor] Added missing property path on php 8

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

This PR adds the property path to the exception message to fix failing tests on php 8.

Commits
-------

6a73bcdb8e [PropertyAccessor] Added missing property path on php 8.
2020-05-23 18:30:14 +02:00
Nicolas Grekas
896b69c907 Revert "[Cache] allow DBAL v3"
This reverts commit d12b3b6a72.
2020-05-23 18:25:19 +02:00
Alexander M. Turek
6a73bcdb8e [PropertyAccessor] Added missing property path on php 8. 2020-05-23 17:44:24 +02:00
Alexander M. Turek
7dc3f9cb42 Don't execute tests with DBAL 2.x on php 8. 2020-05-23 17:32:20 +02:00
Nicolas Grekas
8dfac5c3b9 Merge branch '5.0' into 5.1
* 5.0:
  [BrowserKit] fix bad merge
2020-05-23 15:13:03 +02:00
Nicolas Grekas
fceea7ce01 [BrowserKit] fix bad merge 2020-05-23 15:12:54 +02:00
Nicolas Grekas
56faca9c38 Merge branch '5.0' into 5.1
* 5.0: (28 commits)
  [Cache] $lifetime cannot be null
  [Serializer] minor cleanup
  fix merge
  Run PHP 8 as 7.4.99
  Remove calls to deprecated ReflectionParameter::getClass().
  [VarDumper] fix PHP 8 support
  Add php 8 to travis.
  [Cache] Accessing undefined constants raises an Error in php8
  [Cache] allow DBAL v3
  Skip Doctrine DBAL on php 8 until we have a compatible version.
  [DomCrawler] Catch expected ValueError.
  Made method signatures compatible with their corresponding traits.
  [ErrorHandler] Apply php8 fixes from Debug component.
  [DomCrawler] Catch expected ValueError.
  [Validator] Catch expected ValueError.
  [VarDumper] ReflectionFunction::isDisabled() is deprecated.
  [BrowserKit] Raw body with custom Content-Type header
  [PropertyAccess] Parse php 8 TypeErrors correctly.
  [Intl] Fix call to ReflectionProperty::getValue() for static properties.
  [HttpKernel] Prevent calling method_exists() with non-string values.
  ...
2020-05-23 15:08:13 +02:00
Nicolas Grekas
c8c7d4c458 [Cache] $lifetime cannot be null 2020-05-23 15:02:18 +02:00
Nicolas Grekas
08afeed555 Merge branch '4.4' into 5.0
* 4.4: (27 commits)
  [Serializer] minor cleanup
  fix merge
  Run PHP 8 as 7.4.99
  Remove calls to deprecated ReflectionParameter::getClass().
  [VarDumper] fix PHP 8 support
  Add php 8 to travis.
  [Cache] Accessing undefined constants raises an Error in php8
  [Cache] allow DBAL v3
  Skip Doctrine DBAL on php 8 until we have a compatible version.
  [DomCrawler] Catch expected ValueError.
  Made method signatures compatible with their corresponding traits.
  [ErrorHandler] Apply php8 fixes from Debug component.
  [DomCrawler] Catch expected ValueError.
  [Validator] Catch expected ValueError.
  [VarDumper] ReflectionFunction::isDisabled() is deprecated.
  [BrowserKit] Raw body with custom Content-Type header
  [PropertyAccess] Parse php 8 TypeErrors correctly.
  [Intl] Fix call to ReflectionProperty::getValue() for static properties.
  [HttpKernel] Prevent calling method_exists() with non-string values.
  Fix wrong roles comparison
  ...
2020-05-23 14:58:59 +02:00
Nicolas Grekas
236a2145fc Merge branch '3.4' into 4.4
* 3.4:
  [Serializer] minor cleanup
2020-05-23 14:50:36 +02:00
Nicolas Grekas
1a21a7582e bug #36921 [OptionsResolver][Serializer] Remove calls to deprecated ReflectionParameter::getClass() (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[OptionsResolver][Serializer] Remove calls to deprecated ReflectionParameter::getClass()

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

Following #36891, this PR removes the remaining calls to `ReflectionParameter::getClass()` from the 4.4 branch.

Commits
-------

1575d853f1 Remove calls to deprecated ReflectionParameter::getClass().
2020-05-23 14:48:29 +02:00
Nicolas Grekas
ca695e55e8 [Serializer] minor cleanup 2020-05-23 14:46:57 +02:00
Nicolas Grekas
6f07b19b03 Merge branch '3.4' into 4.4
* 3.4:
  Run PHP 8 as 7.4.99
  [VarDumper] fix PHP 8 support
  Add php 8 to travis.
  [Cache] Accessing undefined constants raises an Error in php8
2020-05-23 14:24:27 +02:00
Alexander M. Turek
1575d853f1 Remove calls to deprecated ReflectionParameter::getClass(). 2020-05-23 14:09:32 +02:00
Nicolas Grekas
c4ac3c19c6 bug #36920 [VarDumper] fix PHP 8 support (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix PHP 8 support

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

/cc @derrabus FYI

Commits
-------

9bc1ab62cf [VarDumper] fix PHP 8 support
2020-05-23 14:06:05 +02:00
Nicolas Grekas
9bc1ab62cf [VarDumper] fix PHP 8 support 2020-05-23 14:00:17 +02:00
Nicolas Grekas
6e368f136f bug #36917 [Cache] Accessing undefined constants raises an Error in php8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Accessing undefined constants raises an Error in php8

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

Calling `constant()` for an undefined constant will raise an `Error` on php 8. This PR adjust the Memcached tests to this new behavior.

Commits
-------

49fd0efb12 [Cache] Accessing undefined constants raises an Error in php8
2020-05-23 13:35:31 +02:00
Wouter de Jong
387ed4a0a3 Removed "services" prototype node from "custom_authenticator" 2020-05-23 12:20:38 +02:00
Alexander M. Turek
49fd0efb12 [Cache] Accessing undefined constants raises an Error in php8 2020-05-23 11:57:43 +02:00
Nicolas Grekas
d12b3b6a72 [Cache] allow DBAL v3 2020-05-23 11:12:58 +02:00
Nicolas Grekas
8de1091347 Merge branch '3.4' into 4.4
* 3.4:
  Skip Doctrine DBAL on php 8 until we have a compatible version.
  [DomCrawler] Catch expected ValueError.
  [Validator] Catch expected ValueError.
  [VarDumper] ReflectionFunction::isDisabled() is deprecated.
  [PropertyAccess] Parse php 8 TypeErrors correctly.
  [Intl] Fix call to ReflectionProperty::getValue() for static properties.
  [HttpKernel] Prevent calling method_exists() with non-string values.
  [Debug] php 8 does not pass $context to error handlers.
  [Config] Removed implicit cast of ReflectionProperty to string.
  [Debug] Undefined variables raise a warning in php 8.
  [Debug] Skip test that would trigger a fatal error on php 8.
  Address deprecation of ReflectionType::getClass().
  Properties $originalName and $mimeType are never null in UploadedFile
2020-05-23 11:11:46 +02:00
Nicolas Grekas
f32c2c15d9 minor #36909 [ErrorHandler] Apply php8 fixes from Debug component (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Apply php8 fixes from Debug component

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

The changes of #36898 and #36897 ported to the ErrorHandler component.

Commits
-------

54f18698af [ErrorHandler] Apply php8 fixes from Debug component.
2020-05-23 10:32:54 +02:00
Alexander M. Turek
1090738264 Skip Doctrine DBAL on php 8 until we have a compatible version. 2020-05-23 10:20:35 +02:00
Nicolas Grekas
410b6214ea bug #36891 Address deprecation of ReflectionType::getClass() (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Address deprecation of ReflectionType::getClass()

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

Calling `ReflectionType::getClass()` will trigger a deprecation warning on php 8. This PR switches to `getType()` if available.

Commits
-------

53b1677a4e Address deprecation of ReflectionType::getClass().
2020-05-23 09:35:15 +02:00
Nicolas Grekas
fb91dc24eb bug #36899 [VarDumper] ReflectionFunction::isDisabled() is deprecated (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] ReflectionFunction::isDisabled() is deprecated

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

See php/php-src#5473. Calling `ReflectionFunction::isDisabled()` is pointless on php 8 and doing so triggers a deprecation warning.

Someone who is more familiar with that component might want to have a second look on this PR. I'm not really sure if this is the right way to fix the issue.

Commits
-------

1da347e5ba [VarDumper] ReflectionFunction::isDisabled() is deprecated.
2020-05-23 09:34:32 +02:00
Nicolas Grekas
42692d625d bug #36905 [Validator] Catch expected ValueError (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Catch expected ValueError

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

`mb_check_encoding()` raises a `ValueError` on php 8 if an invalid encoding was passed. The validator that was patched here is expected to fail gracefully in that situation. This PR restores that behavior under php 8.

Maybe we can reconsider this behavior for Symfony 5.2. It feels a bit odd to me because we swallow a potential misconfiguration of the validator.

Commits
-------

8f3f67f82a [Validator] Catch expected ValueError.
2020-05-23 09:32:18 +02:00
Nicolas Grekas
5d7b7e9616 bug #36915 [DomCrawler] Catch expected ValueError (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DomCrawler] Catch expected ValueError

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

This is #36906 ported to the 4.4 branch.

Commits
-------

32691e5157 [DomCrawler] Catch expected ValueError.
2020-05-23 09:22:08 +02:00
Alexander M. Turek
32691e5157 [DomCrawler] Catch expected ValueError. 2020-05-23 02:03:06 +02:00
Alexander M. Turek
6fda276feb Made method signatures compatible with their corresponding traits. 2020-05-22 22:05:30 +02:00
Alexander M. Turek
54f18698af [ErrorHandler] Apply php8 fixes from Debug component. 2020-05-22 21:58:53 +02:00
Alexander M. Turek
b1db13728b [DomCrawler] Catch expected ValueError. 2020-05-22 21:35:43 +02:00
Alexander M. Turek
8f3f67f82a [Validator] Catch expected ValueError. 2020-05-22 20:52:50 +02:00
Alexander M. Turek
1da347e5ba [VarDumper] ReflectionFunction::isDisabled() is deprecated. 2020-05-22 20:50:36 +02:00
Nicolas Grekas
e220e7cc01 bug #36904 [PropertyAccess] Parse php 8 TypeErrors correctly (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] Parse php 8 TypeErrors correctly

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

The wording of `TypeError` messages has changed in php 8. Since `PropertyAccessor` parses those messages, the logic needed some adjustments.

Commits
-------

7100c3ce1b [PropertyAccess] Parse php 8 TypeErrors correctly.
2020-05-22 20:33:39 +02:00
Nicolas Grekas
4e191688fe minor #36898 [Debug] php 8 does not pass $context to error handlers (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] php 8 does not pass $context to error handlers

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

php 8 will call error handlers without the optional `$context` parameter. Thus, error handlers that make that parameter mandatory will break.

Commits
-------

593897c9e1 [Debug] php 8 does not pass $context to error handlers.
2020-05-22 20:25:20 +02:00
Fabien Potencier
6d7c696742 bug #36839 [BrowserKit] Raw body with custom Content-Type header (azhurb)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[BrowserKit] Raw body with custom Content-Type header

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

Currently, if you try to send POST/PUT request with custom `Content-Type` header and specified body, the real request will contain `text/plain` content type.

Following code
```php
$client->request(
    'POST',
    '/url',
    [],
    [],
    [
        'CONTENT_TYPE' => 'application/json'
    ],
    '{"foo":"bar"}'
);
```
produces next request
```
POST /
Content-Type: text/plain; charset=utf-8

{"foo":"bar"}
```

With this fix, the request will be
```
POST /
Content-Type: application/json

{"foo":"bar"}
```

Commits
-------

d2dd92be77 [BrowserKit] Raw body with custom Content-Type header
2020-05-22 19:28:00 +02:00
Oleksii Zhurbytskyi
d2dd92be77 [BrowserKit] Raw body with custom Content-Type header 2020-05-22 19:27:55 +02:00
Fabien Potencier
2468314e94 minor #36837 UploadedFile minor fixes (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

UploadedFile minor fixes

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

According to the [constructor assignments](cb7e78c809/src/Symfony/Component/HttpFoundation/File/UploadedFile.php (L60)), properties `$originalName` and `$mimeType` are never null in `UploadedFile`, so `getClientOriginalName()` and `getClientMimeType()` always return `string`. Also `$test` does not need a default value because it's always set in the constructor.

Commits
-------

eb8d626c27 Properties $originalName and $mimeType are never null in UploadedFile
2020-05-22 19:19:03 +02:00
MatTheCat
d933fa136f Revert https://github.com/symfony/symfony/pull/34986 2020-05-22 19:15:59 +02:00
Jérémy Derussé
a010a87373 Make ExpressionLanguageSyntax validator usable with annotation 2020-05-22 19:13:22 +02:00
Fabien Potencier
14ffc0231f minor #36902 [Intl] Fix call to ReflectionProperty::getValue() for static properties (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Fix call to ReflectionProperty::getValue() for static properties

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

When we call `ReflectionProperty::getValue()` for a static property, we don't need to pass any arguments. The code that was fixed here raised a `TypeError` on php 8 because the argument has to be an object now.

Commits
-------

d4045897d6 [Intl] Fix call to ReflectionProperty::getValue() for static properties.
2020-05-22 19:06:23 +02:00
Fabien Potencier
77a826c8b7 bug #36896 [Config] Removed implicit cast of ReflectionProperty to string (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Removed implicit cast of ReflectionProperty to string

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

PHP 8 does not allow casting `ReflectionProperty` instances to string anymore.

Commits
-------

8adbadede7 [Config] Removed implicit cast of ReflectionProperty to string.
2020-05-22 19:04:16 +02:00
Fabien Potencier
b2026966a7 minor #36897 [Debug] Undefined variables raise a warning in php 8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] Undefined variables raise a warning in php 8

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

`ErrorHandlerTest` executes code with undefined variables to test how the error handler handles the triggered errors. In php 8.0, the severity and error message for this class of errors has been changed. I've adjusted the test accordingly.

Commits
-------

1d20b514f2 [Debug] Undefined variables raise a warning in php 8.
2020-05-22 18:47:25 +02:00
Robin Chalas
a7c09acda0 bug #36873 [Messenger] Fixed check for allowed options in AwsSqs configuration (kroshilin)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] Fixed check for allowed options in AwsSqs configuration

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

Before this fix it was unavailable to create Connection with access_key and secret_key in options, because they were added to $clientConfiguration var, and check for extra options was against $configuration var. Which lead to exception.
The idea is to check input options against self::DEFAULT_OPTIONS (which contains all available options)

Commits
-------

fb1967210e [Messenger] Fixed check for allowed options in AwsSqs configuration
2020-05-22 17:48:57 +02:00
Alexander M. Turek
7100c3ce1b [PropertyAccess] Parse php 8 TypeErrors correctly. 2020-05-22 16:26:18 +02:00
Eric Hertwig
de7f3fceec [Messenger] Add suggestion for Amazon SQS transport and make check more readable 2020-05-22 15:43:15 +02:00
Alexander M. Turek
d4045897d6 [Intl] Fix call to ReflectionProperty::getValue() for static properties. 2020-05-22 15:42:59 +02:00
Alexander M. Turek
1bbfdcbb8d [HttpKernel] Prevent calling method_exists() with non-string values. 2020-05-22 15:23:31 +02:00
Thibaut Salanon
7d2ad4b265 Fix wrong roles comparison 2020-05-22 14:29:11 +02:00
Alexander M. Turek
593897c9e1 [Debug] php 8 does not pass $context to error handlers. 2020-05-22 13:12:29 +02:00
Alexander M. Turek
8adbadede7 [Config] Removed implicit cast of ReflectionProperty to string. 2020-05-22 12:56:48 +02:00
Alexander M. Turek
1d20b514f2 [Debug] Undefined variables raise a warning in php 8. 2020-05-22 12:23:23 +02:00
Nicolas Grekas
52abcbeec9 minor #36892 [Debug] Skip test that would trigger a fatal error on php 8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] Skip test that would trigger a fatal error on php 8

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

This PR skips a test of `DebugClassLoader`. The test uses incompatible method signatures in class inheritance to provoke a php warning that should be handled by the debug class loader. On php 8 however, this error is not recoverable anymore, so the tested logic will be obsolete there.

Commits
-------

573d0dd493 [Debug] Skip test that would trigger a fatal error on php 8.
2020-05-22 10:14:52 +02:00
Christian Flothmann
d333aae187 never directly validate Existence (Required/Optional) constraints 2020-05-22 09:54:54 +02:00
Nicolas Grekas
47180fe447 Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix setting platform.php
2020-05-21 20:35:07 +02:00
Nicolas Grekas
dd902d939f [PhpUnitBridge] fix setting platform.php 2020-05-21 20:33:26 +02:00
Alexander M. Turek
573d0dd493 [Debug] Skip test that would trigger a fatal error on php 8. 2020-05-21 16:02:48 +02:00
Alexander M. Turek
53b1677a4e Address deprecation of ReflectionType::getClass(). 2020-05-21 15:02:25 +02:00
Nicolas Grekas
4f93cc164a Merge branch '5.0' into 5.1
* 5.0:
  fix merge
2020-05-21 00:29:05 +02:00
Nicolas Grekas
4a365d2cf2 Merge branch '4.4' into 5.0
* 4.4:
  fix merge
2020-05-21 00:28:59 +02:00
Nicolas Grekas
0349890720 fix merge 2020-05-21 00:28:08 +02:00
Nicolas Grekas
819f76a11f Merge branch '5.0' into 5.1
* 5.0:
  [PhpUnitBridge] fix installing on PHP 8 (ter)
  [PhpUnitBridge] fix installing on PHP 8 (bis)
  [PhpUnitBridge] fix installing on PHP 8
2020-05-21 00:11:07 +02:00
Nicolas Grekas
f280829ad8 Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] fix installing on PHP 8 (ter)
  [PhpUnitBridge] fix installing on PHP 8 (bis)
  [PhpUnitBridge] fix installing on PHP 8
2020-05-21 00:10:58 +02:00
Nicolas Grekas
ef6a85b7ea Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix installing on PHP 8 (ter)
  [PhpUnitBridge] fix installing on PHP 8 (bis)
2020-05-21 00:10:46 +02:00
Nicolas Grekas
5ec5bfb23c [PhpUnitBridge] fix installing on PHP 8 (ter) 2020-05-21 00:09:52 +02:00
Nicolas Grekas
c101259192 [PhpUnitBridge] fix installing on PHP 8 (bis) 2020-05-20 23:58:15 +02:00
Nicolas Grekas
a6ea1da1e6 Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix installing on PHP 8
2020-05-20 23:50:56 +02:00
Nicolas Grekas
606715b6ec [PhpUnitBridge] fix installing on PHP 8 2020-05-20 23:49:59 +02:00
Nicolas Grekas
e65cdb685f Merge branch '5.0' into 5.1
* 5.0:
  [PhpUnitBridge] fix leftover
  [PhpUnitBridge] fix installing under PHP >= 8
  Use ">=" for the "php" requirement
  bump icu 67.1
2020-05-20 19:43:50 +02:00
Nicolas Grekas
b429b15eb5 Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] fix leftover
  [PhpUnitBridge] fix installing under PHP >= 8
  Use ">=" for the "php" requirement
  bump icu 67.1
2020-05-20 19:38:26 +02:00
Nicolas Grekas
53d89f71d6 Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix leftover
  [PhpUnitBridge] fix installing under PHP >= 8
2020-05-20 19:31:34 +02:00
Nicolas Grekas
b6151ed6cc [PhpUnitBridge] fix leftover 2020-05-20 19:29:51 +02:00
Nicolas Grekas
5aa25ceb41 [PhpUnitBridge] fix installing under PHP >= 8 2020-05-20 18:13:38 +02:00
Nicolas Grekas
f8aa0873cf Use ">=" for the "php" requirement 2020-05-20 10:37:50 +02:00
Roland Franssen
920e319051 bump icu 67.1 2020-05-19 19:12:53 +02:00
Nicolas Grekas
0fd5b95178 bug #36859 [Validator] allow passing a validator to Validation::createCallable() (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[Validator] allow passing a validator to Validation::createCallable()

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

As spotted by @stof in https://github.com/symfony/symfony/pull/31466#issuecomment-630054227

Commits
-------

1357cbf8ed [Validator] allow passing a validator to Validation::createCallable()
2020-05-19 19:03:49 +02:00
Nicolas Grekas
754bba483e minor #36866 [DI][Preload] Remove preload primitive types (Michał Jusięga, michaljusiega)
This PR was merged into the 5.1 branch.

Discussion
----------

[DI][Preload] Remove preload primitive types

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | no, but it could be for the future
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

After bump my project to  5.1.x-dev I saw the generated file of `*.preload.php` contains classes that are primitive types like int, string, bool.

```
composer create-project symfony/website-skeleton preload "5.1.x-dev"
cat preload/var/cache/dev/App_KernelDevDebugContainer.preload.php | grep "bool\|string\|int"
```

```
$ cat test/var/cache/dev/App_KernelDevDebugContainer.preload.php | grep "bool\|string\|int"
$classes[] = 'int';
$classes[] = 'string';
$classes[] = 'Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator';
$classes[] = 'Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint';
$classes[] = 'Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator';
$classes[] = 'Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer';
$classes[] = 'bool';
$classes[] = 'Symfony\Component\Validator\ContainerConstraintValidatorFactory';
$classes[] = 'Symfony\Component\Validator\Constraints\EmailValidator';
$classes[] = 'Symfony\Component\Validator\Constraints\ExpressionValidator';
$classes[] = 'Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator';
$classes[] = 'Symfony\\Component\\Form\\Extension\\Validator\\Constraints\\Form';
```

I don't know if it is expected behaviour, but if not - then PR fix it.

~~In addition, classes are sorted for better reading.~~

Commits
-------

4d05dbbfb5 [DI] Remove preload primitive types
2020-05-19 19:02:44 +02:00
Michał Jusięga
4d05dbbfb5 [DI] Remove preload primitive types 2020-05-19 19:02:10 +02:00
Nicolas Grekas
b7ecb1582a Merge branch '5.0' into 5.1
* 5.0:
  [Validator] Add missing translations of nn locale
  [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
  [Intl] bump icu 67.1
2020-05-19 18:57:22 +02:00
Nicolas Grekas
6237e3d569 Merge branch '4.4' into 5.0
* 4.4:
  [Validator] Add missing translations of nn locale
  [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
  [Intl] bump icu 67.1
2020-05-19 18:57:09 +02:00
Nicolas Grekas
2c57ae2b97 Merge branch '3.4' into 4.4
* 3.4:
  [Validator] Add missing translations of nn locale
  [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
  [Intl] bump icu 67.1
2020-05-19 18:54:45 +02:00
Nicolas Grekas
5fc4d1b645 minor #36863 [Validator] Add missing translations of nn locale (themilanfan)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing translations of nn locale

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

Added missing translations to validator with locale nn

Commits
-------

040d01e53b [Validator] Add missing translations of nn locale
2020-05-19 18:38:52 +02:00
Giuseppe Campanelli
040d01e53b [Validator] Add missing translations of nn locale 2020-05-19 18:38:46 +02:00
Nicolas Grekas
af0df4ce14 bug #36833 [HttpKernel] Fix that the Store would not save responses with the X-Content-Digest header present (mpdude)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present

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

Responses fetched from upstream sources might have a `X-Content-Digest` header, for example if the Symfony Cache is used upstream. This currently prevents the `Store` from saving such responses. In general, the value of this header should not be trusted.

As I consider this header an implementation detail of the `Store`, the fix tries to be local to that class; we should not rely on the `HttpCache` or other classes to remove untrustworthy headers for us.

This fixes the issue that when using the `HttpCache` in combination with the Symfony HttpClient, responses that have also been cached upstream in an instance of `HttpCache` are not cached locally. It adds the overhead of re-computing the content digest every time the `HttpCache` successfully re-validated a response.

Commits
-------

d8964fb8b7 [HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
2020-05-19 18:37:57 +02:00
Matthias Pigulla
d8964fb8b7 [HttpKernel] Fix that the Store would not save responses with the X-Content-Digest header present 2020-05-19 18:37:51 +02:00
Nicolas Grekas
42c79753eb minor #36860 [Intl] bump icu 67.1 (ro0NL)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Intl] bump icu 67.1

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

mainly some new locales+scripts (see 3a3a9ba)

Commits
-------

29eb271184 [Intl] bump icu 67.1
2020-05-19 18:34:53 +02:00
Roland Franssen
29eb271184 [Intl] bump icu 67.1 2020-05-19 18:34:45 +02:00
Anton Kroshilin
fb1967210e [Messenger] Fixed check for allowed options in AwsSqs configuration
Before this fix it was unavailable to create Connection with access_key and secret_key in options, because they were added to $clientConfiguration var, and check for extra options was against $configuration var. Which lead to exception.
The idea is to check input options against self::DEFAULT_OPTIONS (which contains all available options)
2020-05-19 17:36:26 +03:00
Nicolas Grekas
b92399136e Merge branch '5.0' into 5.1
* 5.0:
  [PhpUnitBridge] fix bad detection of unsilenced deprecations
  [Security] Unserialize $parentData, if needed, to avoid errors
  [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM)
2020-05-19 10:31:21 +02:00
Nicolas Grekas
31ffd761c3 Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] fix bad detection of unsilenced deprecations
  [Security] Unserialize $parentData, if needed, to avoid errors
  [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM)
2020-05-19 10:31:00 +02:00
Nicolas Grekas
fd584bb9b3 Merge branch '3.4' into 4.4
* 3.4:
  [PhpUnitBridge] fix bad detection of unsilenced deprecations
  [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM)
2020-05-19 10:30:42 +02:00
Nicolas Grekas
9d5bb11ec9 [PhpUnitBridge] fix bad detection of unsilenced deprecations 2020-05-19 10:12:21 +02:00
rfaivre
b447433b67 [Security] Unserialize $parentData, if needed, to avoid errors 2020-05-18 23:38:28 +02:00
Nicolas Grekas
1357cbf8ed [Validator] allow passing a validator to Validation::createCallable() 2020-05-18 18:55:18 +02:00
Fabien Potencier
5f829bdaeb [HttpKernel] Fix error logger when stderr is redirected to /dev/null (FPM) 2020-05-18 17:28:46 +02:00
Fabien Potencier
24067f1889 Merge branch '5.0' into 5.1
* 5.0:
  Revert "Change priority of KernelEvents::RESPONSE subscriber"
2020-05-18 09:51:22 +02:00
Fabien Potencier
08f204c79a Merge branch '4.4' into 5.0
* 4.4:
  Revert "Change priority of KernelEvents::RESPONSE subscriber"
2020-05-18 09:51:10 +02:00
Alexander M. Turek
9f8d225aa1 Revert "Change priority of KernelEvents::RESPONSE subscriber"
This reverts commit 6ed624ad16.
2020-05-16 15:57:47 +02:00
vudaltsov
eb8d626c27 Properties $originalName and $mimeType are never null in UploadedFile 2020-05-16 16:15:54 +03:00
Fabien Potencier
21dc296b18 bumped Symfony version to 5.1.0 2020-05-16 14:36:23 +02:00
Fabien Potencier
73acbab57b updated VERSION for 5.1.0-RC1 2020-05-16 14:31:53 +02:00
Nicolas Grekas
c268915352 bug #36832 [Security] Improved upgrade path for custom remember me services (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Improved upgrade path for custom remember me services

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | -
| Deprecations? | -
| Tickets       | https://github.com/symfony/symfony/pull/36806#issuecomment-628592543
| License       | MIT
| Doc PR        |

This improves the upgrade path for custom remember me services now `LogoutHandlerInterface` has been deprecated.

As suggested in https://github.com/symfony/symfony/pull/36806#issuecomment-628592543, the `logout()` method should be added to the `RememberMeServicesInterface` in Symfony 6.

This patch allows developers to write a custom class implementing only `RememberMeServicesInterface` with a `logout()` method. Requiring them to implement `LogoutHandlerInterface` will mean they have to maintain 2 version of the class to support both Symfony 5.1+ and 6.0.

Commits
-------

c49d00f984 Added deprecation for RememberMe services without logout() method
2020-05-16 13:32:52 +02:00
Wouter de Jong
c49d00f984 Added deprecation for RememberMe services without logout() method 2020-05-16 13:05:23 +02:00
Nicolas Grekas
773bebc381 Merge branch '5.0'
* 5.0:
  [VarDumper] fix for change in PHP 7.4.6 (bis)
  [VarExporter] fix for change in PHP 7.4.6
  [BrowserKit] Allow Referer set by history to be overridden (3.4)
2020-05-16 12:14:47 +02:00
Nicolas Grekas
7e376fd5b5 Merge branch '4.4' into 5.0
* 4.4:
  [VarDumper] fix for change in PHP 7.4.6 (bis)
  [VarExporter] fix for change in PHP 7.4.6
  [BrowserKit] Allow Referer set by history to be overridden (3.4)
2020-05-16 12:14:41 +02:00
Nicolas Grekas
94e8c42736 Merge branch '3.4' into 4.4
* 3.4:
  [VarDumper] fix for change in PHP 7.4.6 (bis)
  [BrowserKit] Allow Referer set by history to be overridden (3.4)
2020-05-16 12:07:46 +02:00
Nicolas Grekas
cb7e78c809 bug #36592 [BrowserKit] Allow Referer set by history to be overridden (Slamdunk)
This PR was merged into the 3.4 branch.

Discussion
----------

[BrowserKit] Allow Referer set by history to be overridden

| Q             | A
| ------------- | ---
| Branch?       | 3.4, see https://github.com/symfony/symfony/pull/36591 for 5.0
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

4774946fbd [BrowserKit] Allow Referer set by history to be overridden (3.4)
2020-05-16 12:06:03 +02:00
Nicolas Grekas
e69673562c [VarDumper] fix for change in PHP 7.4.6 (bis) 2020-05-16 12:04:57 +02:00
Nicolas Grekas
1e9486de89 [VarExporter] fix for change in PHP 7.4.6 2020-05-16 12:04:25 +02:00
Nicolas Grekas
cf04f1ec50 bug #36800 [DI] Renamed some PHP-DSL functions (javiereguiluz)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[DI] Renamed some PHP-DSL functions

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

As discussed in #36778, Symfony wants to move from XML to PHP for its own configuration. I propose these function renames to make the PHP-DSL a bit easier to understand:

```php
<?php
// Before
$services->set(Foo::class)
    ->args([ref(Bar::class), service('stdClass')]);

// After
$services->set(Foo::class)
    ->args([service(Bar::class), inline_service('stdClass')]);
```

Commits
-------

366405b93d [DI] Renamed some PHP-DSL functions
2020-05-16 11:33:23 +02:00
Javier Eguiluz
366405b93d [DI] Renamed some PHP-DSL functions 2020-05-16 11:33:10 +02:00
Nicolas Grekas
5dd99f2062 bug #36806 RememberMeLogoutListener should depend on LogoutHandlerInterface (scheb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

RememberMeLogoutListener should depend on LogoutHandlerInterface

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

`RememberMeLogoutListener`, which was introduced together with the new authenticator security in Symfony 5.1,  depends on `AbstractRememberMeServices`. This forces people to always extend from `AbstractRememberMeServices`, even when they're implementing the correct interface.

I'd suggest to depend on the minimum interface, which is `LogoutHandlerInterface`, instead.

Example of the type errors you'd get otherwise:
`
Argument 1 passed to Symfony\Component\Security\Http\EventListener\RememberMeLogoutListener::__construct() must be an instance of Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices, instance of Scheb\TwoFactorBundle\Security\Authentication\RememberMe\RememberMeServicesDecorator given, called in var/cache/dev/Container3IpOCEd/getSecurity_Logout_Listener_RememberMe_MainService.php on line 22
`

with

```php
class RememberMeServicesDecorator implements RememberMeServicesInterface, LogoutHandlerInterface
[...]
```

Commits
-------

994700fbae Depend on LogoutHandlerInterface
2020-05-16 11:30:21 +02:00
Nicolas Grekas
a86058c2fb bug #36805 [Security\Core] Fix NoopAuthenticationManager::authenticate() return value (chalasr)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security\Core] Fix NoopAuthenticationManager::authenticate() return value

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

Commits
-------

b05da72a3c [Security\Core] Fix NoopAuthenticationManager::authenticate() return value
2020-05-16 11:27:10 +02:00
Robin Chalas
b05da72a3c [Security\Core] Fix NoopAuthenticationManager::authenticate() return value 2020-05-16 11:27:00 +02:00
Nicolas Grekas
02cedc3804 minor #36785 [Messenger] Move doctrine deps to require-dev (tyx)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Move doctrine deps to require-dev

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 #36740
| License       | MIT

To avoid requiring all doctrine stuff when require symfony/messenger
(that require symfony/doctrine-messenger to ensure BC)

Commits
-------

b73b26eb79 Move doctrine deps to require-dev
2020-05-16 11:17:14 +02:00
Nicolas Grekas
fb80229a3b minor #36826 [String] Move Inflector's polyfill-ctype dependency to String (derrabus)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] Move Inflector's polyfill-ctype dependency to String

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

With  #35092, the inflector implementation was moved to the string component, including all calls to `ext-ctype`. This is why I think the dependency on the corresponding polyfill should be moved as well, which is what this PR does.

Commits
-------

de960b8007 [String] Move Inflector's polyfill-ctype dependency to String.
2020-05-16 11:16:27 +02:00
Nicolas Grekas
be93a222e4 Merge branch '5.0'
* 5.0:
  [VarDumper] fix for change in PHP 7.4.6
  Added regression test for AccountStatusException behavior (ref #36822)
  [HttpClient] fix PHP warning + accept status code >= 600
  [Security/Core] fix compat of `NativePasswordEncoder` with pre-PHP74 values of `PASSWORD_*` consts
  embed resource name in error message
  [FrameworkBundle] fix stringable annotation
  Change priority of KernelEvents::RESPONSE subscriber
  Fix register event listeners compiler pass
  Missing description in `messenger:setup-transports` command
  [Serializer] fix issue with PHP 8
  [WebProfiler] Remove 'none' when appending CSP tokens
  [TwigBundle] FormExtension does not have a constructor anymore since sf 4.0
  [Yaml] Fix escaped quotes in quoted multi-line string
2020-05-16 11:12:54 +02:00
Nicolas Grekas
241542e543 Merge branch '4.4' into 5.0
* 4.4:
  [VarDumper] fix for change in PHP 7.4.6
  Added regression test for AccountStatusException behavior (ref #36822)
  [HttpClient] fix PHP warning + accept status code >= 600
  [Security/Core] fix compat of `NativePasswordEncoder` with pre-PHP74 values of `PASSWORD_*` consts
  embed resource name in error message
  [FrameworkBundle] fix stringable annotation
  Change priority of KernelEvents::RESPONSE subscriber
  Fix register event listeners compiler pass
  Missing description in `messenger:setup-transports` command
  [Serializer] fix issue with PHP 8
  [WebProfiler] Remove 'none' when appending CSP tokens
  [TwigBundle] FormExtension does not have a constructor anymore since sf 4.0
  [Yaml] Fix escaped quotes in quoted multi-line string
2020-05-16 11:10:03 +02:00
Nicolas Grekas
cc519aa5a9 bug #36823 [HttpClient] fix PHP warning + accept status code >= 600 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix PHP warning + accept status code >= 600

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

This fixes the PHP warning reported in the linked issue.

This also relaxes the accepted status codes, with https://www.linkedin.com/company/linkedin/ as an example that returns a non-conformant one (`999`).

These are now handled as 5xx codes, ie they trigger a ServerException.

Commits
-------

c764b5c36e [HttpClient] fix PHP warning + accept status code >= 600
2020-05-16 11:09:03 +02:00
Nicolas Grekas
bce37603cb bug #36824 [Security/Core] fix compat of NativePasswordEncoder with pre-PHP74 values of PASSWORD_* consts (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security/Core] fix compat of `NativePasswordEncoder` with pre-PHP74 values of `PASSWORD_*` consts

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

Commits
-------

df32171cb2 [Security/Core] fix compat of `NativePasswordEncoder` with pre-PHP74 values of `PASSWORD_*` consts
2020-05-16 11:07:52 +02:00
Nicolas Grekas
ae67376ad3 bug #36811 [DependencyInjection] Fix register event listeners compiler pass (X-Coder264)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix register event listeners compiler pass

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

I've wanted to use the simpler event listener registration syntax (https://symfony.com/blog/new-in-symfony-4-4-simpler-event-listeners) in my project and it didn't work so I'm sending this fix.

We use the `KnpPaginatorBundle` bundle which also [calls the `RegisterListenersPass` compiler pass](https://github.com/KnpLabs/KnpPaginatorBundle/blob/v5.2.0/src/DependencyInjection/Compiler/PaginatorConfigurationPass.php#L22) in order to register with the event dispatcher their custom tags for listeners and subscribers (`knp_paginator.listener` and `knp_paginator.subscriber`).

Their compiler pass is `TYPE_BEFORE_REMOVING` and priority zero which is the same type and priority as the pass that gets [added by FrameworkBundle](https://github.com/symfony/symfony/blob/v4.4.8/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php#L125). Since both the type and priority is the same the order of execution is `undefined` (because [that is how regular sort behaves in PHP which is used by default by `krsort`](https://github.com/symfony/symfony/blob/v4.4.8/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php#L264)) and the `RegisterListenersPass` currently removes the `eventAliasesParameter` parameter from the container if it is set (which is [set here](https://github.com/symfony/symfony/blob/v4.4.8/src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml#L9)). So what happens in my app is that the Knp compiler pass runs first, the `event_dispatcher.event_aliases` parameter is removed and then the FrameworkBundle registered compiler pass runs and since the aliases are not present anymore the events do not get aliased properly. The event dispatcher service in the compiled container looks like:

```php
$instance->addListener('Symfony\Component\HttpKernel\Event\RequestEvent', ...);
```

instead of the expected

```php
$instance->addListener('kernel.request', ...);
```

This means that my listener never gets called on the kernel request event.

Another potential fix would be to adjust the Knp compiler pass priority, but seeing as that would fix only that bundle (who knows how many bundles out there have the same problem) and that I don't see any drawback in letting the `event_dispatcher.event_aliases` parameter stay in the container I think that this is better to fix here.

Commits
-------

646878d072 Fix register event listeners compiler pass
2020-05-16 11:07:08 +02:00
Nicolas Grekas
fb4c3f920f Merge branch '3.4' into 4.4
* 3.4:
  [VarDumper] fix for change in PHP 7.4.6
  Added regression test for AccountStatusException behavior (ref #36822)
  embed resource name in error message
  [Serializer] fix issue with PHP 8
  [Yaml] Fix escaped quotes in quoted multi-line string
2020-05-16 11:03:35 +02:00
Nicolas Grekas
924822c2e8 [VarDumper] fix for change in PHP 7.4.6 2020-05-16 10:59:45 +02:00
Nicolas Grekas
cec0dfe5b3 minor #36780 [Translator] embed resource name in error message (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] embed resource name in error message

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

Someone reported on Slack that they accidentally stored a translation file with the `.twig` extension and that the error message was quite confusing.

Commits
-------

507a5963e4 embed resource name in error message
2020-05-16 10:35:38 +02:00
Wouter J
08fbfcf5a0 Added regression test for AccountStatusException behavior (ref #36822) 2020-05-15 23:22:25 +02:00
Alexander M. Turek
de960b8007 [String] Move Inflector's polyfill-ctype dependency to String. 2020-05-15 17:20:05 +02:00
Nicolas Grekas
c764b5c36e [HttpClient] fix PHP warning + accept status code >= 600 2020-05-15 16:28:26 +02:00
Nicolas Grekas
df32171cb2 [Security/Core] fix compat of NativePasswordEncoder with pre-PHP74 values of PASSWORD_* consts 2020-05-15 14:38:59 +02:00
Christian Flothmann
507a5963e4 embed resource name in error message 2020-05-15 09:32:03 +02:00
Nicolas Grekas
65e6812c1d [FrameworkBundle] fix stringable annotation 2020-05-14 20:47:17 +02:00
Timothée Barray
b73b26eb79 Move doctrine deps to require-dev
To avoid requiring all doctrine stuff when require symfony/messenger
(that require symfony/doctrine-messenger to ensure BC)
2020-05-14 17:52:50 +02:00
Fabien Potencier
e5c82c566e bug #36789 Change priority of KernelEvents::RESPONSE subscriber (marcw)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Change priority of KernelEvents::RESPONSE subscriber

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

This PR changes the priority of the `KernelEvents::RESPONSE` subscriber of the `ProfilerListener` so that it is the penultimate to be executed (just before `StreamedResponseListener`).

The reason is that other listeners that were executed after this one CAN change the response (such as `SessionListener` for example). This creates a headache when debugging, with a discrepancy between what is shown in a curl command, and by the Symfony profiler.

Commits
-------

6ed624ad16 Change priority of KernelEvents::RESPONSE subscriber
2020-05-14 11:30:03 +02:00
Marc Weistroff
6ed624ad16 Change priority of KernelEvents::RESPONSE subscriber 2020-05-14 11:29:57 +02:00
Fabien Potencier
315010422f bug #36786 [WebProfiler] Remove 'none' when appending CSP tokens (ndench)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfiler] Remove 'none' when appending CSP tokens

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

@nicolas-grekas  asked me to to have a look at this after #36678.

If a user has a CSP policy of `default-src 'none'`, then the WebProfiler copies `'none'` to `script-src` and `style-src` then adds other sources. This creates an invalid policy since `'none'` is only allowed when it's the only item in the source list.

This will probably need to be merged into 3.4 first, I started on 4.4 so I can test in my current symfony project which requires 4.4.

Commits
-------

967bc4a860 [WebProfiler] Remove 'none' when appending CSP tokens
2020-05-13 19:00:16 +02:00
Antonio Pauletich
646878d072 Fix register event listeners compiler pass 2020-05-13 18:27:55 +02:00
Christian Scheb
994700fbae Depend on LogoutHandlerInterface 2020-05-13 15:07:15 +02:00
Carlos Buenosvinos
d31d1e0111 Missing description in messenger:setup-transports command
making `bin/console` to show an empty description when the rest of the commands have one.
2020-05-12 22:52:55 +02:00
Fabien Potencier
a73523b065 minor #36798 Secrets, Security, and Messenger commands descriptions should not end with a "." (dot) (carlosbuenosvinos)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

Secrets, Security, and Messenger commands descriptions should not end with a "." (dot)

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (to be switched while merging)
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

When running `bin/console` almost all the command descriptions do not end with a ".". So in order to be consistent, we should remove it from the Secrets Commands.

**Current Output for Secrets Commands (with dots)**
![image](https://user-images.githubusercontent.com/351553/81734096-4a8bca00-9493-11ea-8d5c-bb1dda20bcb0.png)

**Other Command Descriptions (without dots)**
![image](https://user-images.githubusercontent.com/351553/81734428-c84fd580-9493-11ea-8312-05557c7e6f0b.png)

![image](https://user-images.githubusercontent.com/351553/81734489-def62c80-9493-11ea-8d2b-1eb3668291cc.png)

**Symfony CLI output (without dots)**
![image](https://user-images.githubusercontent.com/351553/81734720-3eecd300-9494-11ea-805e-2a3ae3178e8c.png)

Commits
-------

4f7633983e Secrets, Security, and Messenger commands descriptions should not end with a "." (dot)
2020-05-12 22:48:08 +02:00
Carlos Buenosvinos
4f7633983e Secrets, Security, and Messenger commands descriptions should not end with a "." (dot) 2020-05-12 22:47:58 +02:00
Nicolas Grekas
44b45cbaf1 [Serializer] fix issue with PHP 8 2020-05-12 22:34:06 +02:00
Catalin Dan
a53d12674c bug #36793 [DI][Preload] Use require_once instead of require when appending cache warmer-returned files to preload file. 2020-05-12 20:28:51 +03:00
Nathan Dench
967bc4a860 [WebProfiler] Remove 'none' when appending CSP tokens 2020-05-12 17:24:37 +10:00
Fabien Potencier
a8cb3cd2da bug #36743 [Yaml] Fix escaped quotes in quoted multi-line string (ossinkine)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] Fix escaped quotes in quoted multi-line string

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

This PR continues https://github.com/symfony/symfony/pull/19304

This PR fixes incorrect parsing quoted multi-line string which contain escaped quotes, see tests

Commits
-------

2e99caacaf [Yaml] Fix escaped quotes in quoted multi-line string
2020-05-11 09:51:54 +02:00
Fabien Potencier
1de42a5f08 bug #36773 [HttpClient] preserve the identity of responses streamed by TraceableHttpClient (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] preserve the identity of responses streamed by TraceableHttpClient

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

Commits
-------

afc44dae16 [HttpClient] preserve the identity of responses streamed by TraceableHttpClient
2020-05-10 18:21:09 +02:00
Tobias Schultze
35e391aaa2 [TwigBundle] FormExtension does not have a constructor anymore since sf 4.0 2020-05-10 16:50:02 +02:00
Nicolas Grekas
afc44dae16 [HttpClient] preserve the identity of responses streamed by TraceableHttpClient 2020-05-10 09:16:11 +02:00
Nicolas Grekas
ab8eca0ef6 [HttpClient] add TimeoutExceptionInterface 2020-05-09 20:37:03 +02:00
Nicolas Grekas
2ed6a0d74c Merge branch '5.0'
* 5.0:
  [HttpClient] fix testTimeoutIsNotAFatalError (bis)
2020-05-09 19:43:56 +02:00
Nicolas Grekas
b3e49ee2b4 Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] fix testTimeoutIsNotAFatalError (bis)
2020-05-09 19:43:51 +02:00
Nicolas Grekas
333f7187dc [HttpClient] fix testTimeoutIsNotAFatalError (bis) 2020-05-09 19:43:44 +02:00
Nicolas Grekas
3cdd2e4643 Merge branch '5.0'
* 5.0:
  [HttpClient] fix testTimeoutIsNotAFatalError
2020-05-09 18:24:19 +02:00
Nicolas Grekas
0ff13b2404 Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] fix testTimeoutIsNotAFatalError
2020-05-09 18:24:13 +02:00
Nicolas Grekas
00ae470307 [HttpClient] fix testTimeoutIsNotAFatalError 2020-05-09 18:24:06 +02:00
Nicolas Grekas
53423db039 Merge branch '5.0'
* 5.0:
  [HttpClient] improve testTimeoutIsNotAFatalError
  Fix for #36715
2020-05-09 17:57:56 +02:00
Nicolas Grekas
c794cab0cb Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] improve testTimeoutIsNotAFatalError
  Fix for #36715
2020-05-09 17:57:42 +02:00
Nicolas Grekas
4ab6ff37bd [HttpClient] improve testTimeoutIsNotAFatalError 2020-05-09 17:57:30 +02:00
Fabien Potencier
6310084f25 bug #36716 [Mime] handle passing custom mime types as string (mcneely)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] handle passing custom mime types as string

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36715
| License       | MIT
| Doc PR        | none
Fix's issue where custom mimetypes were failing

Commits
-------

f3005ec653 Fix for #36715
2020-05-09 14:32:08 +02:00
Paul L. McNeely
f3005ec653
Fix for #36715 2020-05-09 07:22:40 -05:00
Fabien Potencier
97a578201d minor #36763 [Security] Improve method signatures (minor) (umulmrum)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Improve method signatures (minor)

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

Improves type declarations and docblocks of new authenticator-related methods.

Commits
-------

b009254090 [Security] Improve method signatures (minor)
2020-05-09 14:14:32 +02:00
Nicolas Grekas
52c52a846c Merge branch '5.0'
* 5.0:
  [HttpClient] test that timeout is not fatal
2020-05-09 14:11:30 +02:00
Nicolas Grekas
d01ea50f7b Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] test that timeout is not fatal
2020-05-09 14:10:43 +02:00
Nicolas Grekas
36ccf4c65b [HttpClient] test that timeout is not fatal 2020-05-09 14:08:40 +02:00
Stefan Kruppa
b009254090 [Security] Improve method signatures (minor) 2020-05-09 13:45:48 +02:00
Nicolas Grekas
8fec0654d2 bug #36765 [HttpClient] fix dealing with informational response (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] fix dealing with informational response

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

Skipping the test was a bad idea, the failure was legit.

Commits
-------

9068aa48e2 [HttpClient] fix dealing with informational response
2020-05-08 23:44:02 +02:00
Nicolas Grekas
012247dc98 minor #36764 [HttpClient] remove "experimental" annotations (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpClient] remove "experimental" annotations

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

Commits
-------

db4cb51f0c [HttpClient] remove "experimental" annotations
2020-05-08 23:43:12 +02:00
Nicolas Grekas
2b554d8ad7 [Contracts] bump branch alias 2020-05-08 23:41:03 +02:00
Nicolas Grekas
9068aa48e2 [HttpClient] fix dealing with informational response 2020-05-08 22:52:14 +02:00
Nicolas Grekas
db4cb51f0c [HttpClient] remove "experimental" annotations 2020-05-08 22:08:25 +02:00
Nicolas Grekas
fb90fb3bb7 minor #36758 [5.1] CS fixes (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[5.1] CS fixes

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

Commits
-------

bb164e6615 [5.1] CS fixes
2020-05-08 14:37:13 +02:00
Nicolas Grekas
f8616f8eae Merge branch '5.0'
* 5.0:
  [PhpUnitBridge] fix bad test
  [4.4] CS fixes
  [3.4] CS fixes
  Disable phpunit verbosity
  Queue name is a required parameter
  [FrameworkBundle] display actual target for error in AssetsInstallCommand
  Remove patches for Doctrine bugs and deprecations
  [Mime] fix bad method call on "EmailAddressContains"
  [DI][EventDispatcher] added contract for implementation
2020-05-08 14:36:29 +02:00
Nicolas Grekas
0b34b39cc8 Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] fix bad test
  [4.4] CS fixes
  [3.4] CS fixes
  Disable phpunit verbosity
  Queue name is a required parameter
  [FrameworkBundle] display actual target for error in AssetsInstallCommand
  Remove patches for Doctrine bugs and deprecations
  [Mime] fix bad method call on "EmailAddressContains"
  [DI][EventDispatcher] added contract for implementation
2020-05-08 14:34:39 +02:00
Nicolas Grekas
edb517699a [PhpUnitBridge] fix bad test 2020-05-08 14:32:38 +02:00
Nicolas Grekas
da8b9552ad Merge branch '3.4' into 4.4
* 3.4:
  [3.4] CS fixes
2020-05-08 12:54:34 +02:00
Nicolas Grekas
bb164e6615 [5.1] CS fixes 2020-05-08 12:41:08 +02:00
Nicolas Grekas
eba09d47e7 [4.4] CS fixes 2020-05-08 12:39:41 +02:00
Nicolas Grekas
02b378f248 [3.4] CS fixes 2020-05-08 12:38:31 +02:00
theravel
9d48eedbdc Queue name is a required parameter 2020-05-08 12:02:31 +02:00