Commit Graph

47367 Commits

Author SHA1 Message Date
vudaltsov
4e089b411c Added the missing reset tag to mailer.logger_message_listener 2020-07-29 20:46:22 +03:00
Laurent VOULLEMIER
cef16f591f [VarDumper] Improve previous fix on light array coloration 2020-07-29 17:09:23 +02:00
Nicolas Grekas
b6ea86e7a2 bug #37697 [Messenger] reduce column length for MySQL 5.6 compatibility (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] reduce column length for MySQL 5.6 compatibility

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

Commits
-------

bc5f35c609 reduce column length for MySQL 5.6 compatibility
2020-07-29 16:49:14 +02:00
Nicolas Grekas
fbcef6e1e2 [Contracts] remove version in composer.json 2020-07-29 16:46:19 +02:00
Christian Flothmann
bc5f35c609 reduce column length for MySQL 5.6 compatibility 2020-07-29 10:26:17 +02:00
Fabien Potencier
cc827466bb minor #37688 Minor improvement (noniagriconomie)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

Minor improvement

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

Related to https://symfony.com/releases

Commits
-------

e80dfe7c67 Minor improvement
2020-07-29 07:57:56 +02:00
Antoine Makdessi
e80dfe7c67 Minor improvement 2020-07-29 07:57:47 +02:00
Fabien Potencier
600e5d1219 minor #37693 Removed redundant strtolower in ConsumeMessagesCommand (vudaltsov)
This PR was merged into the 4.4 branch.

Discussion
----------

Removed redundant strtolower in ConsumeMessagesCommand

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

Commits
-------

e288834cda Removed redundant strtolower in ConsumeMessagesCommand
2020-07-29 07:55:08 +02:00
Valentin Udaltsov
e288834cda
Removed redundant strtolower in ConsumeMessagesCommand 2020-07-29 04:50:45 +03:00
Christophe Coevoet
84a4c4db97 minor #37675 Fix RedisStore constructor signature (b1rdex)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix RedisStore constructor signature

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

This is a fix for a regression from #37590

Commits
-------

6831271feb Fix RedisStore constructor signature
2020-07-27 11:31:10 +02:00
Anatoly Pashin
6831271feb
Fix RedisStore constructor signature
This is a fix for a regression from #37590
2020-07-27 11:39:16 +10:00
Philipp Kolesnikov
bdec105a72 [Cache] Fix #37667 2020-07-26 15:13:16 +10: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
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
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
b7c6d20181 [Messenger] fix computing the id of same-name middleware 2020-07-23 12:40:00 +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
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
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
Fabien Potencier
87a5135306 Fix CS 2020-07-23 08:37:54 +02:00
Fabien Potencier
564550bbf8 minor #37587 [WebProfileBundle] Readability update (shreypuranik)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

[WebProfileBundle] Readability update

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

Updating ContentSecurityPolicyHandler by moving array out of foreach loop for ease of readability.

Commits
-------

6a7685f315 Readability update
2020-07-23 08:36:58 +02:00