Commit Graph

49990 Commits

Author SHA1 Message Date
Fabien Potencier
3cdb4e449b Update CHANGELOG for 5.1.3 2020-07-24 06:22:46 +02:00
Fabien Potencier
f3cfae8ea7 Bump Symfony version to 4.4.12 2020-07-24 06:14:13 +02:00
Fabien Potencier
f5721c658e
Merge pull request #37648 from fabpot/release-4.4.11
released v4.4.11
2020-07-24 06:10:27 +02:00
Fabien Potencier
3cfbf521a4 Update VERSION for 4.4.11 2020-07-24 06:10:09 +02:00
Fabien Potencier
dca19c19b3 Update CHANGELOG for 4.4.11 2020-07-24 06:09:57 +02:00
Fabien Potencier
81fadc9cc1 Bump Symfony version to 3.4.44 2020-07-24 06:07:51 +02:00
Fabien Potencier
21e652ffdb
Merge pull request #37647 from fabpot/release-3.4.43
released v3.4.43
2020-07-24 05:49:18 +02:00
Fabien Potencier
5012c9237f updated VERSION for 3.4.43 2020-07-24 05:48:59 +02:00
Fabien Potencier
5837940399 update CONTRIBUTORS for 3.4.43 2020-07-24 05:48:58 +02:00
Fabien Potencier
03c2b40d2f updated CHANGELOG for 3.4.43 2020-07-24 05:48:16 +02:00
Nicolas Grekas
ef1566e999 Merge branch '5.0' into 5.1
* 5.0:
  Allows RedisClusterProxy instance in Lock RedisStore
2020-07-23 19:22:30 +02:00
Nicolas Grekas
9f67dd8a7c Merge branch '4.4' into 5.0
* 4.4:
  Allows RedisClusterProxy instance in Lock RedisStore
2020-07-23 19:20:42 +02:00
Nicolas Grekas
0eae7a6578 bug #37590 Allows RedisClusterProxy instance in Lock RedisStore (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Allows RedisClusterProxy instance in Lock RedisStore

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

This PR allow clients instance of RedisClusterProxy created by the StoreFactory in #28691 /cc @nicolas-grekas

Commits
-------

8ef63cd6bc Allows RedisClusterProxy instance in Lock RedisStore
2020-07-23 19:20:20 +02:00
Nicolas Grekas
20cf5df00b Merge branch '5.0' into 5.1
* 5.0:
  Allow doctrine/persistence 2
  Fix Redis tests
  [DoctrineBridge] Bump doctrine/data-fixtures.
2020-07-23 18:55:47 +02:00
Nicolas Grekas
081ad138f7 Merge branch '4.4' into 5.0
* 4.4:
  Allow doctrine/persistence 2
  Fix Redis tests
  [DoctrineBridge] Bump doctrine/data-fixtures.
2020-07-23 18:54:02 +02:00
Nicolas Grekas
2c84ea2b11 minor #37639 Allow doctrine/persistence 2 (derrabus)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Allow doctrine/persistence 2

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

Replaces #37416.

This PR unblocks the installation of `doctrine/persistence` version 2.

Notes:
* I had to bump `doctrine/data-fixtures` because composer would otherwise downgrade to an ancient alpha release with incomplete version constraints. This package is a dev dependency for our tests, so I think we're good here.
  **edit**: Moved to #37640.
* Until doctrine/data-fixtures#349 has been resolved, Doctrine/Bridge cannot be tested with version 2 of `doctrine/persistence`.

Commits
-------

cd22fe6c92 Allow doctrine/persistence 2
2020-07-23 18:50:08 +02:00
Alexander M. Turek
cd22fe6c92 Allow doctrine/persistence 2 2020-07-23 18:49:41 +02:00
Nicolas Grekas
4a8f11c1dd Merge branch '3.4' into 4.4
* 3.4:
  Fix Redis tests
  [DoctrineBridge] Bump doctrine/data-fixtures.
2020-07-23 18:48:29 +02:00
Nicolas Grekas
700f68f96c minor #37640 [DoctrineBridge] Bump doctrine/data-fixtures (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] Bump doctrine/data-fixtures

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

Discovered while working on #37639: DoctrineBridge is locked to an old an unmaintained branch of `doctrine/data-fixtures`. This is going to be a problem as soon as we want to support `doctrine/persistence` 2.

Commits
-------

4b611015d5 [DoctrineBridge] Bump doctrine/data-fixtures.
2020-07-23 18:46:43 +02:00
Nicolas Grekas
b4bc6fecb5 minor #37642 [Lock][Cache] Fix Redis tests (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock][Cache] Fix Redis tests

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

In branch 3.4, travis started a redis-server container and tests run correctly.

Starting from 4.4, the travis test suite don't start the server anymore, which is not an issue for 4.4's tests because tests are skiped.

The issue is when branch 4.4 run the 3.4's test suite to check if component changes in 4.4 does not affect 3.4. in that case, the 3.4 tests suite is run without redise-server.
see https://travis-ci.org/github/symfony/symfony/jobs/711062047 for example

This PR replace the error handler (didn't worked) by catching the exception in a similar way than https://github.com/symfony/symfony/pull/36647

Commits
-------

f524c85161 Fix Redis tests
2020-07-23 18:45:00 +02:00
Jérémy Derussé
f524c85161
Fix Redis tests 2020-07-23 14:42:41 +02:00
Alexander M. Turek
4b611015d5 [DoctrineBridge] Bump doctrine/data-fixtures. 2020-07-23 14:17:19 +02:00
Jérémy Derussé
8ef63cd6bc
Allows RedisClusterProxy instance in Lock RedisStore 2020-07-23 13:31:42 +02:00
Nicolas Grekas
ea258254d0 Merge branch '5.0' into 5.1
* 5.0:
  [Messenger] fix computing the id of same-name middleware
2020-07-23 12:40:24 +02:00
Nicolas Grekas
da30c7a4e8 Merge branch '4.4' into 5.0
* 4.4:
  [Messenger] fix computing the id of same-name middleware
2020-07-23 12:40:15 +02:00
Nicolas Grekas
b7c6d20181 [Messenger] fix computing the id of same-name middleware 2020-07-23 12:40:00 +02:00
Nicolas Grekas
62dbb9a39a Merge branch '5.0' into 5.1
* 5.0:
  Connect to RedisCluster with password auth
  Fix PHPUnit 8.5 deprecations.
  Fix EmailHeaderSame to make use of decoded value
  Allow same middleware to be used multiple times with different arguments
2020-07-23 12:04:31 +02:00
Nicolas Grekas
7373802d04 Merge branch '4.4' into 5.0
* 4.4:
  Connect to RedisCluster with password auth
  Fix PHPUnit 8.5 deprecations.
  Fix EmailHeaderSame to make use of decoded value
  Allow same middleware to be used multiple times with different arguments
2020-07-23 12:04:24 +02:00
Nicolas Grekas
df1a1ff069 bug #37583 [Mime] Fix EmailHeaderSame to make use of decoded value (evertharmeling)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Fix EmailHeaderSame to make use of decoded value

Fixes #35062

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

Commits
-------

8a3f50746d Fix EmailHeaderSame to make use of decoded value
2020-07-23 11:59:39 +02:00
Nicolas Grekas
0d867bcc0d bug #37569 [Messenger] Allow same middleware to be used multiple times with different arguments (HypeMC)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Allow same middleware to be used multiple times with different arguments

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

Middleware service names now take into account arguments as well to allow the same middleware to be used multiple times with different arguments:
```yaml
framework:
    messenger:
        buses:
            messenger.bus.default:
                middleware:
                    - doctrine_ping_connection: ['main']
                    - doctrine_ping_connection: ['logs']
```

Commits
-------

d10e43d085 Allow same middleware to be used multiple times with different arguments
2020-07-23 11:57:42 +02:00
Nicolas Grekas
ebc7f4b97e bug #37624 [Cache] Connect to RedisCluster with password auth (mforbak)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Cache] Connect to RedisCluster with password auth

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

Currently it is not possible to connect to RedisCluster with password. AUTH param is described in documentation (last example) https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection but totally ignored in the code and connection fails

```
RedisAdapter::createConnection(
    'redis:?host[localhost]&host[localhost:6379]&host[/var/run/redis.sock:]&auth=my-password&redis_cluster=1'
);
```

See RedisCluster usage here https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#declaring-a-cluster-with-an-array-of-seeds

Commits
-------

e873ddd72c Connect to RedisCluster with password auth
2020-07-23 11:54:49 +02:00
Michal Forbak
e873ddd72c Connect to RedisCluster with password auth
Currently it is not possible to connect to RedisCluster with password. AUTH param is described in documentation (last example) https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection but totally ignored in the code and connection fails

```
RedisAdapter::createConnection(
    'redis:?host[localhost]&host[localhost:6379]&host[/var/run/redis.sock:]&auth=my-password&redis_cluster=1'
);
```

See RedisCluster usage here https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#declaring-a-cluster-with-an-array-of-seeds
2020-07-23 11:54:41 +02:00
Nicolas Grekas
c971a27f9e Merge branch '3.4' into 4.4
* 3.4:
  Fix PHPUnit 8.5 deprecations.
2020-07-23 11:48:09 +02:00
Nicolas Grekas
8c9f181822 minor #37566 [3.4] Fix PHPUnit 8.5 deprecations (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Fix PHPUnit 8.5 deprecations

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

PHPUnit 8.5 introduced several deprecations. Addressing them will allow us to upgrade to PHPUnit 9.

Commits
-------

ec525e6e04 Fix PHPUnit 8.5 deprecations.
2020-07-23 11:44:31 +02:00
Alexander M. Turek
ec525e6e04 Fix PHPUnit 8.5 deprecations. 2020-07-23 11:37:51 +02:00
Nicolas Grekas
bc1a16d130 minor #37636 [PhpUnitBridge] Fix tests on Windows (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[PhpUnitBridge] Fix tests on Windows

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

Commits
-------

266fe76208 [PhpUnitBridge] Fix tests on Windows
2020-07-23 11:29:22 +02:00
Nicolas Grekas
266fe76208 [PhpUnitBridge] Fix tests on Windows 2020-07-23 11:26:24 +02:00
Nicolas Grekas
1b7714a05c Merge branch '5.0' into 5.1
* 5.0:
  fix merge
  Require PHPUnit 9.3 on PHP 8
  [Cache] fix catching auth errors
  Fix CS
  [FrameworkBundle] set default session.handler alias if handler_id is not provided
  Fix CS
  Readability update
  Fix checks for phpunit releases on Composer 2 (resolves #37601)
  [Serializer] Support multiple levels of discriminator mapping
  Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
  [SCA] Minor fixes on tests
  [WebProfilerBundle] modified url generation to use absolute urls
  [Mailer] Fix reply-to functionality in the SendgridApiTransport
  [Mime] Fix compat with HTTP requests
  ticket_36879 - Fix mandrill raw http request setting from email/name
2020-07-23 10:36:24 +02:00
Nicolas Grekas
5d79383028 Merge branch '4.4' into 5.0
* 4.4:
  fix merge
  Require PHPUnit 9.3 on PHP 8
  [Cache] fix catching auth errors
  Fix CS
  [FrameworkBundle] set default session.handler alias if handler_id is not provided
  Fix CS
  Readability update
  Fix checks for phpunit releases on Composer 2 (resolves #37601)
  [Serializer] Support multiple levels of discriminator mapping
  Use hexadecimal numerals instead of hexadecimals in strings to represent error codes.
  [SCA] Minor fixes on tests
  [WebProfilerBundle] modified url generation to use absolute urls
  [Mailer] Fix reply-to functionality in the SendgridApiTransport
  [Mime] Fix compat with HTTP requests
  ticket_36879 - Fix mandrill raw http request setting from email/name
2020-07-23 10:36:09 +02:00
Nicolas Grekas
8103b307c8 fix merge 2020-07-23 10:35:20 +02:00
Nicolas Grekas
50505cb9d2 Merge branch '3.4' into 4.4
* 3.4:
  [Cache] fix catching auth errors
  Fix CS
  [FrameworkBundle] set default session.handler alias if handler_id is not provided
  Fix CS
  Readability update
  Fix checks for phpunit releases on Composer 2 (resolves #37601)
  [SCA] Minor fixes on tests
2020-07-23 10:31:43 +02:00
Nicolas Grekas
65fc07a90e bug #37635 [Cache] fix catching auth errors (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix catching auth errors

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

Should make tests green.
https://github.com/symfony/symfony/pull/37635/files?w=1

Commits
-------

ee6b5145bf [Cache] fix catching auth errors
2020-07-23 10:24:30 +02:00
Nicolas Grekas
a0f7c887ff minor #37595 Require PHPUnit 9.3 on PHP 8 (GrahamCampbell)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Require PHPUnit 9.3 on PHP 8

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

The first version of PHPUnit to support PHP 8.0 is PHPUnit 9.3.

---

Depends on https://github.com/symfony/symfony/pull/37607. Related to https://github.com/composer/composer/pull/9054.

Commits
-------

54b13c04c9 Require PHPUnit 9.3 on PHP 8
2020-07-23 10:22:05 +02:00
Graham Campbell
54b13c04c9 Require PHPUnit 9.3 on PHP 8 2020-07-23 10:21:55 +02:00
Nicolas Grekas
ee6b5145bf [Cache] fix catching auth errors 2020-07-23 10:10:45 +02:00
Fabien Potencier
2dbbe50d0c bug #37628 [Serializer] Support multiple levels of discriminator mapping (jeroennoten)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Support multiple levels of discriminator mapping

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

When using multiple levels of discriminator mapping for denormalizing to a multiple level class hierarchy, only the top level discriminator mapping is considered, resulting in an error: **Cannot instantiate abstract class ...**

Example:
```php
/**
 * @DiscriminatorMap(typeProperty="type", mapping={"group"=GroupNode::class, "item"=ItemNode::class})
 */
abstract class Node {
    // ...
}

class GroupNode extends Node {
    // ...
}

/**
 * @DiscriminatorMap(typeProperty="item_type", mapping={"foo"=FooItemNode::class, "bar"=BarItemNode::class})
 */
abstract class ItemNode extends Node {
    // ...
}

class FooItemNode {
    // ...
}

class BarItemNode {
    // ...
}

$objectNormalizer = new ObjectNormalizer(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())));
$node = $objectNormalizer->denormalize(['type' => 'item', 'item_type' => 'foo']);
```

This results in an error: **Cannot instantiate abstract class ItemNode**. Expected is that `$node` is of type `FooItemNode` after denormalization.

The solution is to recursively call `AbstractObjectNormalizer::instantiateObject()` when a mapping is found, instead of always calling `parent::instantiateObject()`.

Commits
-------

324ad95fee [Serializer] Support multiple levels of discriminator mapping
2020-07-23 08:55:00 +02:00
Fabien Potencier
6b92038e1c bug #37629 [Messenger] fix ignored account & endpoint options amazon sqs connection (surikman)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] fix ignored account & endpoint options amazon sqs connection

| Q             | A
| ------------- | ---
| Branch?       | 5.1<!-- 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       | Fix #37598   <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch master.
-->

Commits
-------

fc90a3b7c6 [Messenger] fix ignore account & endpoint options amazon sqs connection
2020-07-23 08:50:17 +02:00
Fabien Potencier
e5543dc72d Fix CS 2020-07-23 08:46:18 +02:00
Fabien Potencier
09c97bd6dd bug #37572 [FrameworkBundle] set default session.handler alias if handler_id is not provided (Youssef BENHSSAIEN)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] set default session.handler alias if handler_id is not provided

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

Without a configured [`handler_id`](https://symfony.com/doc/current/session.html#configuration), the `session.handler` alias is not created, and somes services depend on this alias specialy.

Related to the reported issue above (affected version 4.4.9), the `ServiceHandlerInterface` is an alias of `session.handler`, when execute :
- `bin/console debug:container session.handler` : The alias is not defined, so the `ContainerDebugCommand` look for a service containing the `session.handler` as part of his name (ContainerDebugCommand::findServiceIdsContaining() is called and returns by default `session.handler.native_file`)
-  `bin/console debug:container SessionHandlerInterface` : The service is defined as an alias of `session.handler`, when calling `ContainerBuilder::getDefinition('session.handler')` the exception occured as the alias is not defined.

# Implemented solution
Create a default `session.handler` when the param `handler_id` is not provided (I choosed `session.handler.native_file` rather than `NullSessionHandler`).

# Affected versions
From [`3.4`](https://github.com/symfony/framework-bundle/blob/3.4/DependencyInjection/FrameworkExtension.php#L879) to [`5.1`](https://github.com/symfony/framework-bundle/blob/5.1/DependencyInjection/FrameworkExtension.php#L955)

Commits
-------

46c8c3791b [FrameworkBundle] set default session.handler alias if handler_id is not provided
2020-07-23 08:40:06 +02:00
Youssef BENHSSAIEN
46c8c3791b [FrameworkBundle] set default session.handler alias if handler_id is not provided 2020-07-23 08:39:55 +02:00