symfony/.git
4 months agoMerge pull request #38028 from fabpot/release-4.4.13 v4.4.13
Fabien Potencier [Wed, 2 Sep 2020 08:11:15 +0000 (10:11 +0200)]
Merge pull request #38028 from fabpot/release-4.4.13

released v4.4.13

4 months agoUpdate VERSION for 4.4.13
Fabien Potencier [Wed, 2 Sep 2020 08:09:29 +0000 (10:09 +0200)]
Update VERSION for 4.4.13

4 months agoUpdate CHANGELOG for 4.4.13
Fabien Potencier [Wed, 2 Sep 2020 08:09:24 +0000 (10:09 +0200)]
Update CHANGELOG for 4.4.13

4 months ago[HttpClient] Fix deps=low
Nicolas Grekas [Wed, 2 Sep 2020 08:01:15 +0000 (10:01 +0200)]
[HttpClient] Fix deps=low

4 months agosecurity #cve-2020-15094 Remove headers with internal meaning from HttpClient respons...
Fabien Potencier [Wed, 2 Sep 2020 07:40:48 +0000 (09:40 +0200)]
security #cve-2020-15094 Remove headers with internal meaning from HttpClient responses (mpdude)

This PR was merged into the 4.4 branch.

4 months agoRemove headers with internal meaning from HttpClient responses
Matthias Pigulla [Mon, 15 Jun 2020 07:28:47 +0000 (07:28 +0000)]
Remove headers with internal meaning from HttpClient responses

4 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Wed, 2 Sep 2020 07:07:21 +0000 (09:07 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  Fix undefined index for inconsistent command name definition

4 months agobug #38024 [Console] Fix undefined index for inconsistent command name definition...
Fabien Potencier [Wed, 2 Sep 2020 05:48:39 +0000 (07:48 +0200)]
bug #38024 [Console] Fix undefined index for inconsistent command name definition (chalasr)

This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fix undefined index for inconsistent command name definition

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

The issue happens when the command name is set via construct/setName() and is routed via a command loader under a different name, which causes `Application::get(): Command` to return null (return type violation) with a notice. This makes it throws a proper CommandNotFoundException as expected.

Commits
-------

d59140e857 Fix undefined index for inconsistent command name definition

4 months agoFix undefined index for inconsistent command name definition
Robin Chalas [Tue, 1 Sep 2020 17:03:51 +0000 (19:03 +0200)]
Fix undefined index for inconsistent command name definition

4 months agobug #38023 [DI] fix inlining of non-shared services (nicolas-grekas)
Nicolas Grekas [Tue, 1 Sep 2020 18:02:38 +0000 (20:02 +0200)]
bug #38023 [DI] fix inlining of non-shared services (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix inlining of non-shared services

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

Commits
-------

380cb10587 [DI] fix inlining of non-shared services

4 months ago[DI] fix inlining of non-shared services
Nicolas Grekas [Tue, 1 Sep 2020 14:31:57 +0000 (16:31 +0200)]
[DI] fix inlining of non-shared services

4 months agobug #38020 [PhpUnitBridge] swallow deprecations (xabbuh)
Fabien Potencier [Tue, 1 Sep 2020 10:08:42 +0000 (12:08 +0200)]
bug #38020 [PhpUnitBridge] swallow deprecations (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] swallow deprecations

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

Commits
-------

f0067c106c swallow deprecations

4 months agoswallow deprecations
Christian Flothmann [Mon, 31 Aug 2020 15:41:58 +0000 (17:41 +0200)]
swallow deprecations

4 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Tue, 1 Sep 2020 05:50:54 +0000 (07:50 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  Bump Symfony version to 3.4.45
  Update VERSION for 3.4.44
  Update CONTRIBUTORS for 3.4.44
  Update CHANGELOG for 3.4.44

4 months agobug #38010 [Cache] Psr16Cache does not handle Proxy cache items (alex-dev)
Nicolas Grekas [Mon, 31 Aug 2020 16:53:24 +0000 (18:53 +0200)]
bug #38010 [Cache] Psr16Cache does not handle Proxy cache items (alex-dev)

This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Psr16Cache does not handle Proxy cache items

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

Add test for Psr16Cache along with a ProxyAdapter

Commits
-------

e525fa1055 [Cache] Psr16Cache does not handle Proxy cache items

4 months ago[Cache] Psr16Cache does not handle Proxy cache items
Alexandre Parent [Mon, 31 Aug 2020 14:08:37 +0000 (10:08 -0400)]
[Cache] Psr16Cache does not handle Proxy cache items

4 months agobug #37937 [Serializer] fixed fix encoding of cache keys with anonymous classes ...
Nicolas Grekas [Mon, 31 Aug 2020 16:04:23 +0000 (18:04 +0200)]
bug #37937 [Serializer] fixed fix encoding of cache keys with anonymous classes (michaelzangerle)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Serializer] fixed fix encoding of cache keys with anonymous classes

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

Commits
-------

3a4675359d [Serializer] fixed fix encoding of cache keys with anonymous classes

4 months ago[Serializer] fixed fix encoding of cache keys with anonymous classes
Michael Zangerle [Tue, 25 Aug 2020 09:11:10 +0000 (11:11 +0200)]
[Serializer] fixed fix encoding of cache keys with anonymous classes

4 months agoBump Symfony version to 4.4.13
Fabien Potencier [Mon, 31 Aug 2020 06:14:12 +0000 (08:14 +0200)]
Bump Symfony version to 4.4.13

4 months agoMerge pull request #37998 from fabpot/release-4.4.12 v4.4.12
Fabien Potencier [Mon, 31 Aug 2020 06:09:59 +0000 (08:09 +0200)]
Merge pull request #37998 from fabpot/release-4.4.12

released v4.4.12

4 months agoUpdate VERSION for 4.4.12
Fabien Potencier [Mon, 31 Aug 2020 06:09:42 +0000 (08:09 +0200)]
Update VERSION for 4.4.12

4 months agoUpdate CHANGELOG for 4.4.12
Fabien Potencier [Mon, 31 Aug 2020 06:09:33 +0000 (08:09 +0200)]
Update CHANGELOG for 4.4.12

4 months agoBump Symfony version to 3.4.45
Fabien Potencier [Mon, 31 Aug 2020 05:58:19 +0000 (07:58 +0200)]
Bump Symfony version to 3.4.45

4 months agoMerge pull request #37997 from fabpot/release-3.4.44 v3.4.44
Fabien Potencier [Mon, 31 Aug 2020 05:54:22 +0000 (07:54 +0200)]
Merge pull request #37997 from fabpot/release-3.4.44

released v3.4.44

4 months agoUpdate VERSION for 3.4.44
Fabien Potencier [Mon, 31 Aug 2020 05:53:42 +0000 (07:53 +0200)]
Update VERSION for 3.4.44

4 months agoUpdate CONTRIBUTORS for 3.4.44
Fabien Potencier [Mon, 31 Aug 2020 05:52:54 +0000 (07:52 +0200)]
Update CONTRIBUTORS for 3.4.44

4 months agoUpdate CHANGELOG for 3.4.44
Fabien Potencier [Mon, 31 Aug 2020 05:51:46 +0000 (07:51 +0200)]
Update CHANGELOG for 3.4.44

4 months agominor #37988 [FrameworkBundle] fix tests (xabbuh)
Fabien Potencier [Sun, 30 Aug 2020 09:56:37 +0000 (11:56 +0200)]
minor #37988 [FrameworkBundle] fix tests (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix tests

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

Commits
-------

19015ec404 [FrameworkBundle] fix tests

4 months ago[FrameworkBundle] fix tests
Christian Flothmann [Sun, 30 Aug 2020 09:40:10 +0000 (11:40 +0200)]
[FrameworkBundle] fix tests

4 months agoFix CS
Fabien Potencier [Sun, 30 Aug 2020 07:21:38 +0000 (09:21 +0200)]
Fix CS

4 months agobug #37966 [HttpClient][MockHttpClient][DX] Throw when the response factory callable...
Fabien Potencier [Sun, 30 Aug 2020 06:55:38 +0000 (08:55 +0200)]
bug #37966 [HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response

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

The current message is `TypeError: Argument 4 passed to Symfony\Component\HttpClient\Response\MockResponse::fromRequest() must implement interface Symfony\Contracts\HttpClient\ResponseInterface, instance of Generator given`.

I lost some time with this because I was passing a callable that returns a \Generator instead of passing the resulting \Generator directly. We could support that case but I guess with the added exception message, it is clear we don't support it at all.

Commits
-------

564dce39f8 [HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response

4 months agominor #37967 [FrameworkBundle] Do not pass the base uri twice to scoped http clients...
Fabien Potencier [Sun, 30 Aug 2020 06:53:37 +0000 (08:53 +0200)]
minor #37967 [FrameworkBundle] Do not pass the base uri twice to scoped http clients (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Do not pass the base uri twice to scoped http clients

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

I looked at my dumped scoped http client PHP file and I noticed the base uri was passed two times. I thought there was a bug somewhere in my configuration. Actually, we only need to pass it as the method argument here.

Commits
-------

e2fce0d89f [FrameworkBundle] Do not pass the base uri twice to scoped http clients

4 months agoFix typo
Fabien Potencier [Fri, 28 Aug 2020 16:19:28 +0000 (18:19 +0200)]
Fix typo

4 months ago[HttpClient][MockHttpClient][DX] Throw when the response factory callable does not...
Thomas Calvet [Thu, 27 Aug 2020 15:46:33 +0000 (17:46 +0200)]
[HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response

4 months agobug #37971 [PropertyInfo] Backport support for typed properties (PHP 7.4) (dunglas)
Fabien Potencier [Fri, 28 Aug 2020 10:27:56 +0000 (12:27 +0200)]
bug #37971 [PropertyInfo] Backport support for typed properties (PHP 7.4) (dunglas)

This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo] Backport support for typed properties (PHP 7.4)

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | N/A. <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/13719 to be fixed

Backports #34557 as suggested.

One of my workmate hit this issue with the Serializer component and it was not obvious for him why it was not working, without hint.

Commits
-------

1b19f255a3 [PropertyInfo] Backport support for typed properties (PHP 7.4)

4 months agominor #37974 [PhpUnitBridge] Create a predictable symlink pointing to the local insta...
Fabien Potencier [Fri, 28 Aug 2020 10:27:13 +0000 (12:27 +0200)]
minor #37974 [PhpUnitBridge] Create a predictable symlink pointing to the local install (dunglas)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Create a predictable symlink pointing to the local install

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

Static analysis tools such as PHPStan need to be able to autoload classes provided by to work. It's also useful to use the assertions provided by PHPUnit with other testing tools such as Behat.
When using `simple-phpunit`, PHPUnit isn't installed in the `vendor/` directory, consequently other tools cannot autoload its classes.

A workaround is to configure these tools to load the autoloader installed by `simple-phpunit`. Example with PHPstan:

```neon
parameters:
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-9.2-0/vendor/autoload.php
```

However, the path of the autoloader isn't predictable: it depends of PHPUnit version.

This PR changes `simple-phpunit` to create a symlink with a predictable path (`vendor/.phpunit/phpunit`) pointing to the currently used version of PHPUnit, so it is possible to hardcode this value in config files.

The symlink is recreated before every run, so if a different version of PHPUnit must be used because the PHP version in use is different from the previous run (frequent when developing libraries compatible with multiple PHP versions), it still works.

Commits
-------

bf7654f245 [PhpUnitBridge] Create a predictable symlink pointing to the local install

4 months ago[PhpUnitBridge] Create a predictable symlink pointing to the local install
Kévin Dunglas [Fri, 28 Aug 2020 08:54:30 +0000 (10:54 +0200)]
[PhpUnitBridge] Create a predictable symlink pointing to the local install

4 months ago[PropertyInfo] Backport support for typed properties (PHP 7.4)
Kévin Dunglas [Sat, 23 Nov 2019 16:12:25 +0000 (17:12 +0100)]
[PropertyInfo] Backport support for typed properties (PHP 7.4)

4 months agobug #37970 [PhpUnitBridge] Polyfill new phpunit 9.1 assertions (phpfour)
Fabien Potencier [Fri, 28 Aug 2020 07:51:20 +0000 (09:51 +0200)]
bug #37970 [PhpUnitBridge] Polyfill new phpunit 9.1 assertions (phpfour)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Polyfill new phpunit 9.1 assertions

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

Backport of #37567, follows the discussion on #37960.

Commits
-------

d945b88c1a [PhpUnitBridge] Polyfill new phpunit 9.1 assertions

4 months ago[PhpUnitBridge] Polyfill new phpunit 9.1 assertions
Mohammad Emran Hasan [Mon, 13 Jul 2020 06:07:04 +0000 (12:07 +0600)]
[PhpUnitBridge] Polyfill new phpunit 9.1 assertions

4 months ago[FrameworkBundle] Do not pass the base uri twice to scoped http clients
Thomas Calvet [Thu, 27 Aug 2020 16:01:08 +0000 (18:01 +0200)]
[FrameworkBundle] Do not pass the base uri twice to scoped http clients

4 months agominor #37964 [PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTra...
Fabien Potencier [Thu, 27 Aug 2020 14:50:42 +0000 (16:50 +0200)]
minor #37964 [PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait (dunglas)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a

Move the polyfill method introduced in #37960 in the `Assert` trait. Sorry I noticed this trait later.

Commits
-------

0426113eda [PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait

4 months ago[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait
Kévin Dunglas [Thu, 27 Aug 2020 14:43:53 +0000 (16:43 +0200)]
[PhpUnitBridge] Move assertMatchesRegularExpression in PolyfillAssertTrait

4 months agobug #37960 [PhpUnit] Add polyfill for assertMatchesRegularExpression() (dunglas)
Fabien Potencier [Thu, 27 Aug 2020 14:03:12 +0000 (16:03 +0200)]
bug #37960 [PhpUnit] Add polyfill for assertMatchesRegularExpression() (dunglas)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnit] Add polyfill for assertMatchesRegularExpression()

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

`assertRegExp()` is now deprecated in favor of `assertMatchesRegularExpression`.

Commits
-------

33eccd2a00 [PhpUnit] Add polyfill for assertMatchesRegularExpression()

4 months ago[PhpUnit] Add polyfill for assertMatchesRegularExpression()
Kévin Dunglas [Wed, 26 Aug 2020 21:49:04 +0000 (23:49 +0200)]
[PhpUnit] Add polyfill for assertMatchesRegularExpression()

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Wed, 26 Aug 2020 08:30:46 +0000 (10:30 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  Backport: Improve link script with rollback when using symlink
  fix more numeric cases changing in PHP 8

5 months agominor #37952 Backport: Improve link script with rollback when using symlink (noniagri...
Fabien Potencier [Wed, 26 Aug 2020 08:30:29 +0000 (10:30 +0200)]
minor #37952 Backport: Improve link script with rollback when using symlink (noniagriconomie)

This PR was merged into the 3.4 branch.

Discussion
----------

Backport: Improve link script with rollback when using symlink

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | N/A <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | N/A

Backports #37915 to 3.4.

Even if it's a new feature, it's a contributors tool that can be used for any version to try out.

Commits
-------

ab92e9f4c3 Backport: Improve link script with rollback when using symlink

5 months agoBackport: Improve link script with rollback when using symlink
noniagriconomie [Fri, 21 Aug 2020 17:05:22 +0000 (19:05 +0200)]
Backport: Improve link script with rollback when using symlink

5 months agobug #37949 [Yaml] fix more numeric cases changing in PHP 8 (xabbuh)
Fabien Potencier [Wed, 26 Aug 2020 06:48:07 +0000 (08:48 +0200)]
bug #37949 [Yaml] fix more numeric cases changing in PHP 8 (xabbuh)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Yaml] fix more numeric cases changing in PHP 8

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/yaml/commit/968ffcfa6554b05a38c69b5c20d351e5dc4a4f15#r41697638
| License       | MIT
| Doc PR        |

see also https://wiki.php.net/rfc/saner-numeric-strings

Commits
-------

7cd5106041 fix more numeric cases changing in PHP 8

5 months agofix more numeric cases changing in PHP 8
Christian Flothmann [Wed, 26 Aug 2020 06:25:12 +0000 (08:25 +0200)]
fix more numeric cases changing in PHP 8

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Sun, 23 Aug 2020 09:22:13 +0000 (11:22 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  account for is_numeric() behavior changes in PHP 8
  fix expected exception messages on PHP 8

5 months agobug #37921 [Yaml] account for is_numeric() behavior changes in PHP 8 (xabbuh)
Fabien Potencier [Sun, 23 Aug 2020 09:03:06 +0000 (11:03 +0200)]
bug #37921 [Yaml] account for is_numeric() behavior changes in PHP 8 (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] account for is_numeric() behavior changes in PHP 8

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

Commits
-------

05db8e0fef account for is_numeric() behavior changes in PHP 8

5 months agoaccount for is_numeric() behavior changes in PHP 8
Christian Flothmann [Sun, 23 Aug 2020 07:58:10 +0000 (09:58 +0200)]
account for is_numeric() behavior changes in PHP 8

5 months agominor #37911 [Cache] fix expected exception message on PHP 8 (xabbuh)
Fabien Potencier [Sat, 22 Aug 2020 06:24:01 +0000 (08:24 +0200)]
minor #37911 [Cache] fix expected exception message on PHP 8 (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix expected exception message on PHP 8

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

Commits
-------

2c9af570a2 fix expected exception messages on PHP 8

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Fri, 21 Aug 2020 17:19:37 +0000 (19:19 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  fix passing arguments to call_user_func_array() on PHP 8
  [Filesystem] fix test on PHP 8

5 months agobug #37912 [ExpressionLanguage] fix passing arguments to call_user_func_array() on...
Fabien Potencier [Fri, 21 Aug 2020 16:53:32 +0000 (18:53 +0200)]
bug #37912 [ExpressionLanguage] fix passing arguments to call_user_func_array() on PHP 8 (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[ExpressionLanguage] fix passing arguments to call_user_func_array() on PHP 8

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

Commits
-------

a55ce7c8bb fix passing arguments to call_user_func_array() on PHP 8

5 months agofix expected exception messages on PHP 8
Christian Flothmann [Fri, 21 Aug 2020 13:18:27 +0000 (15:18 +0200)]
fix expected exception messages on PHP 8

5 months agofix passing arguments to call_user_func_array() on PHP 8
Christian Flothmann [Fri, 21 Aug 2020 14:12:43 +0000 (16:12 +0200)]
fix passing arguments to call_user_func_array() on PHP 8

5 months agominor #37910 [Filesystem] fix test on PHP 8 (xabbuh)
Fabien Potencier [Fri, 21 Aug 2020 13:37:43 +0000 (15:37 +0200)]
minor #37910 [Filesystem] fix test on PHP 8 (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] fix test on PHP 8

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

Commits
-------

c08178978a [Filesystem] fix test on PHP 8

5 months agominor #37908 allow Doctrine DBAL 3 (xabbuh)
Fabien Potencier [Fri, 21 Aug 2020 13:33:39 +0000 (15:33 +0200)]
minor #37908 allow Doctrine DBAL 3 (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

allow Doctrine DBAL 3

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

Commits
-------

967331e63a allow Doctrine DBAL 3

5 months agoallow Doctrine DBAL 3
Christian Flothmann [Fri, 21 Aug 2020 11:57:31 +0000 (13:57 +0200)]
allow Doctrine DBAL 3

5 months ago[Filesystem] fix test on PHP 8
Christian Flothmann [Fri, 21 Aug 2020 12:41:08 +0000 (14:41 +0200)]
[Filesystem] fix test on PHP 8

5 months agobug #37907 [Messenger] stop using the deprecated schema synchronizer API (xabbuh)
Fabien Potencier [Fri, 21 Aug 2020 10:14:49 +0000 (12:14 +0200)]
bug #37907 [Messenger] stop using the deprecated schema synchronizer API (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] stop using the deprecated schema synchronizer API

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

see the failing tests and doctrine/dbal#4213

Commits
-------

40129d6239 stop using the deprecated schema synchronizer API

5 months agostop using the deprecated schema synchronizer API
Christian Flothmann [Fri, 21 Aug 2020 09:39:43 +0000 (11:39 +0200)]
stop using the deprecated schema synchronizer API

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Fri, 21 Aug 2020 09:47:32 +0000 (11:47 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  [Validator] Add Lithuanian translation for ISIN constraint

5 months agobug #37900 [Mailer] Fixed mandrill api header structure (wulff)
Fabien Potencier [Fri, 21 Aug 2020 06:31:54 +0000 (08:31 +0200)]
bug #37900 [Mailer] Fixed mandrill api header structure (wulff)

This PR was submitted for the 5.1 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Mailer] Fixed mandrill api header structure

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

When using the Mandrill API transport, it is not possible to set a reply-to address.

**How to reproduce**
Create a new email and add a reply-to address:

```php
$email = (new Email())
    ->from('from@example.com')
    ->to('to@example.com')
    ->replyTo('replyto@example.com')
    ->subject('subject')
    ->text('text');
$mailer->send($email);
```

The expected result is a payload which contains the following headers:

```
"headers": {
    "reply-to": "replyto@example.com"
}
```

But instead, the `getPayload()` method produces these headers:

```
"headers": [
    "reply-to: replyto@example.com"
]
```

**Additional context**
See https://mandrillapp.com/api/docs/messages.html.

Commits
-------

aeb4c5e6c7 [Mailer] Fixed mandrill api header structure

5 months ago[Mailer] Fixed mandrill api header structure
wulff [Thu, 20 Aug 2020 17:19:41 +0000 (19:19 +0200)]
[Mailer] Fixed mandrill api header structure

5 months agominor #37895 [HttpClient][ResponseTrait] Fix typo (fancyweb)
Fabien Potencier [Thu, 20 Aug 2020 13:33:51 +0000 (15:33 +0200)]
minor #37895 [HttpClient][ResponseTrait] Fix typo (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient][ResponseTrait] Fix typo

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

Commits
-------

cbd8ca0625 [HttpClient][ResponseTrait] Fix typo

5 months ago[HttpClient][ResponseTrait] Fix typo
Thomas Calvet [Thu, 20 Aug 2020 12:25:15 +0000 (14:25 +0200)]
[HttpClient][ResponseTrait] Fix typo

5 months agobug #37888 [Mailer] Reorder headers used to determine Sender (cvmiert)
Fabien Potencier [Wed, 19 Aug 2020 17:15:16 +0000 (19:15 +0200)]
bug #37888 [Mailer] Reorder headers used to determine Sender (cvmiert)

This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Mailer] Reorder headers used to determine Sender

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

Use the `Return-Path` header as the last candidate to determine the Envelope's sender address.

The `Return-Path` is usually configured _in addition_ to the `Sender` and/or `From` header: it allows for email bounces and complaints to be sent to a dedicated email address. It should therefor not be used as the first candidate header to determine the sender.

Commits
-------

7e60a8f8c9 [Mailer] Reorder headers used to determine Sender

5 months ago[Mailer] Reorder headers used to determine Sender
Clara van Miert [Wed, 19 Aug 2020 15:08:06 +0000 (17:08 +0200)]
[Mailer] Reorder headers used to determine Sender

Use the `Return-Path` header as the last candidate to determine the
Envelope's sender address.

The `Return-Path` is usually configured _in addition_ to the `Sender`
and/or `From` header: it allows for email bounces and complaints to be
sent to a dedicated email address. It should therefore not be used as
the first candidate header to determine the sender.

5 months agominor #37881 [Validator] Add Lithuanian translation for ISIN constraint (norkunas)
Fabien Potencier [Wed, 19 Aug 2020 04:57:51 +0000 (06:57 +0200)]
minor #37881 [Validator] Add Lithuanian translation for ISIN constraint (norkunas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add Lithuanian translation for ISIN constraint

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

Commits
-------

d652041647 [Validator] Add Lithuanian translation for ISIN constraint

5 months ago[Validator] Add Lithuanian translation for ISIN constraint
Tomas [Wed, 19 Aug 2020 04:26:06 +0000 (07:26 +0300)]
[Validator] Add Lithuanian translation for ISIN constraint

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Tue, 18 Aug 2020 11:39:55 +0000 (13:39 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  mark the AssertingContextualValidator class as internal
  make return type correct

5 months agominor #37760 make return type correct (vladyslavstartsev)
Fabien Potencier [Tue, 18 Aug 2020 11:29:18 +0000 (13:29 +0200)]
minor #37760 make return type correct (vladyslavstartsev)

This PR was merged into the 3.4 branch.

Discussion
----------

make return type correct

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

Since the real return type is `\ArrayIterator` AND array of `FormView` I've decided to change it. Also the other reason is that phpstan iks kind of failing because of this and I need to `assert` things in children of this class.

Commits
-------

32b5b9e1d7 make return type correct

5 months agobug #37872 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport (arend...
Fabien Potencier [Tue, 18 Aug 2020 10:13:56 +0000 (12:13 +0200)]
bug #37872 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport (arendjantetteroo)

This PR was merged into the 4.4 branch.

Discussion
----------

[Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport

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

Fixes #37870

The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.

Commits
-------

c4e5131757 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport

5 months ago[Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport
Arend-Jan Tetteroo [Tue, 18 Aug 2020 09:42:56 +0000 (11:42 +0200)]
[Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport

Fixes #37870

The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.

5 months agominor #37869 Fix the parameter names in the SecurityFactoryInterface::create() method...
Fabien Potencier [Tue, 18 Aug 2020 10:08:43 +0000 (12:08 +0200)]
minor #37869 Fix the parameter names in the SecurityFactoryInterface::create() method (leofeyer)

This PR was merged into the 4.4 branch.

Discussion
----------

Fix the parameter names in the SecurityFactoryInterface::create() method

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

With regard to PHP 8, Psalm has added a named arguments check:
https://psalm.dev/articles/getting-ready-for-named-arguments

This check currently fails, because the `SecurityFactoryInterface` uses different parameter names than the `AbstractFactory`. You can see for yourselves at https://psalm.dev/r/81413a1c96.

Commits
-------

a73f5c1587 Fix the parameter names in the SecurityFactoryInterface::create() method

5 months agominor #37871 [Validator] mark the AssertingContextualValidator class as internal...
Fabien Potencier [Tue, 18 Aug 2020 09:14:27 +0000 (11:14 +0200)]
minor #37871 [Validator] mark the AssertingContextualValidator class as internal (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] mark the AssertingContextualValidator class as internal

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

Commits
-------

7ff0287cd6 mark the AssertingContextualValidator class as internal

5 months agomark the AssertingContextualValidator class as internal
Christian Flothmann [Tue, 18 Aug 2020 09:07:13 +0000 (11:07 +0200)]
mark the AssertingContextualValidator class as internal

5 months agoFix the parameter names in the SecurityFactoryInterface::create() method
Leo Feyer [Tue, 18 Aug 2020 08:04:43 +0000 (10:04 +0200)]
Fix the parameter names in the SecurityFactoryInterface::create() method

5 months agobug #37860 [Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when...
Fabien Potencier [Tue, 18 Aug 2020 07:29:41 +0000 (09:29 +0200)]
bug #37860 [Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one

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

The strategy is to sort the passed classes from the "bottom" one in the hierarchy to the "top" one so that the first `is_a` in `getMappedObjectType()` is right.

Commits
-------

c16a192473 [Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one

5 months ago[Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminato...
Thomas Calvet [Mon, 17 Aug 2020 16:29:12 +0000 (18:29 +0200)]
[Serializer][ClassDiscriminatorMapping] Fix getMappedObjectType() when a discriminator child extends another one

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Tue, 18 Aug 2020 05:51:51 +0000 (07:51 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  replace the deprecated assertDirectoryNotExists() method

5 months agominor #37856 [Filesystem] replace the deprecated assertDirectoryNotExists() method...
Fabien Potencier [Mon, 17 Aug 2020 14:47:20 +0000 (16:47 +0200)]
minor #37856 [Filesystem] replace the deprecated assertDirectoryNotExists() method (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Filesystem] replace the deprecated assertDirectoryNotExists() method

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

Commits
-------

9fd8a940e0 replace the deprecated assertDirectoryNotExists() method

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Mon, 17 Aug 2020 12:26:54 +0000 (14:26 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  [Validator] fix tests
  ensure that the validator is a mock object for backwards-compatibility

5 months agominor #37855 [Validator] fix tests (xabbuh)
Fabien Potencier [Mon, 17 Aug 2020 12:26:29 +0000 (14:26 +0200)]
minor #37855 [Validator] fix tests (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] fix tests

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

Commits
-------

f04f507cd5 [Validator] fix tests

5 months agoreplace the deprecated assertDirectoryNotExists() method
Christian Flothmann [Mon, 17 Aug 2020 12:24:05 +0000 (14:24 +0200)]
replace the deprecated assertDirectoryNotExists() method

5 months ago[Validator] fix tests
Christian Flothmann [Mon, 17 Aug 2020 12:06:24 +0000 (14:06 +0200)]
[Validator] fix tests

5 months agobug #37853 [Validator] ensure that the validator is a mock object for backwards-compa...
Fabien Potencier [Mon, 17 Aug 2020 11:51:16 +0000 (13:51 +0200)]
bug #37853 [Validator] ensure that the validator is a mock object for backwards-compatibility (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] ensure that the validator is a mock object for backwards-compatibility

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

I accidentally broke the class in #37808. The validator was a mock object before (see the failing tests on the `5.1` branch).

Commits
-------

1c9b6714c7 ensure that the validator is a mock object for backwards-compatibility

5 months agoensure that the validator is a mock object for backwards-compatibility
Christian Flothmann [Mon, 17 Aug 2020 10:04:09 +0000 (12:04 +0200)]
ensure that the validator is a mock object for backwards-compatibility

5 months agominor #37831 stop using deprecated PHPUnit APIs (xabbuh)
Fabien Potencier [Mon, 17 Aug 2020 09:56:45 +0000 (11:56 +0200)]
minor #37831 stop using deprecated PHPUnit APIs (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

stop using deprecated PHPUnit APIs

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

Commits
-------

3d209c46e4 stop using deprecated PHPUnit APIs

5 months agostop using deprecated PHPUnit APIs
Christian Flothmann [Thu, 13 Aug 2020 17:28:52 +0000 (19:28 +0200)]
stop using deprecated PHPUnit APIs

5 months agoFix CS
Fabien Potencier [Mon, 17 Aug 2020 07:39:58 +0000 (09:39 +0200)]
Fix CS

5 months agoMerge branch '3.4' into 4.4
Fabien Potencier [Mon, 17 Aug 2020 07:31:35 +0000 (09:31 +0200)]
Merge branch '3.4' into 4.4

* 3.4:
  Fix CS
  [Validator] Add Polish translation for ISIN constraint

5 months agoFix CS
Fabien Potencier [Mon, 17 Aug 2020 07:16:16 +0000 (09:16 +0200)]
Fix CS

5 months agoFix CS
Fabien Potencier [Mon, 17 Aug 2020 06:12:26 +0000 (08:12 +0200)]
Fix CS

5 months agobug #36340 [Serializer] Fix configuration of the cache key (dunglas)
Fabien Potencier [Mon, 17 Aug 2020 06:10:54 +0000 (08:10 +0200)]
bug #36340 [Serializer] Fix configuration of the cache key (dunglas)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Serializer] Fix configuration of the cache key

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35574 doctrine/orm#8030 (partially)
| License       | MIT
| Doc PR        | n/a

Currently, a bug prevents to configure the context keys to exclude from the cache key computation. The value is always replaced in the constructor. This PR fixes the problem.

Commits
-------

3b034cb343 [Serializer] Fix configuration of the cache key

5 months ago[Serializer] Fix configuration of the cache key
Kévin Dunglas [Sat, 4 Apr 2020 07:41:07 +0000 (09:41 +0200)]
[Serializer] Fix configuration of the cache key

5 months agobug #36810 [Messenger] Do not stack retry stamp (jderusse)
Fabien Potencier [Mon, 17 Aug 2020 06:02:22 +0000 (08:02 +0200)]
bug #36810 [Messenger] Do not stack retry stamp (jderusse)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Messenger] Do not stack retry stamp

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

With the "RecoverableException" or a very high number of retry, the message is currently stacking a lot of stamp, which increase the size of the message sent to queue and (in my case) reach the "maximum size allowed" after 60 retries + php serializer

This PR removes previous stamps before adding the new Delay+RetryStamps.

Commits
-------

ad6f8532c6 [Messenger] Do not stack retry stamp