Commit Graph

52119 Commits

Author SHA1 Message Date
Alexander M. Turek
873b0b4f53 Merge branch '5.1' into 5.2
* 5.1:
  Add tests on CacheDataCollector
  [ProxyManagerBridge] fix tests
  [ProxyManagerBridge] relax fixture in tests
  Fix circular detection with multiple paths
2020-11-12 23:35:35 +01:00
Alexander M. Turek
b8afc7cba3 Merge branch '4.4' into 5.1
* 4.4:
  Add tests on CacheDataCollector
  [ProxyManagerBridge] fix tests
  [ProxyManagerBridge] relax fixture in tests
  Fix circular detection with multiple paths
2020-11-12 23:25:33 +01:00
Alexander M. Turek
038497cb80 minor #38898 [Cache] Add tests on CacheDataCollector (ScullWM)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Add tests on CacheDataCollector

| 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 -->
| 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 5.x.
-->

The `calculateStatistics()` method of `Symfony\Component\Cache\DataCollector\CacheDataCollector` contain a lot of logic and manipulate multi-dimensional array that could be refactor with VO.

But before doing this, I would add test on this part.

Commits
-------

7b4310f045 Add tests on CacheDataCollector
2020-11-12 17:05:23 +01:00
Thomas P
7b4310f045 Add tests on CacheDataCollector 2020-11-12 16:25:20 +01:00
Nicolas Grekas
ecf9859609 [ProxyManagerBridge] fix tests 2020-11-12 14:19:35 +01:00
Nicolas Grekas
47041370c0 [ProxyManagerBridge] relax fixture in tests 2020-11-12 13:55:13 +01:00
Alexander M. Turek
faead9574a bug #39058 [DependencyInjection] Fix circular detection with multiple paths (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix circular detection with multiple paths

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

There are currently 2 kind of issues related to the Dependency Injection:

1. performance issue when project contains many loops (#37850)
Which has been fixed by #38882

2. Infinity loop in some case (#38970)
Which has been fixed by #38980 and #39021

The new issue #39056 has been introduced by #38882 (The performance issue refactor) because in order to optimize loop detection, I take a short cut and choose to not collect ALL the circular loop but only the one that matters

I was wrong. All loops matters.

This PR fix my previous refacto to collect ALL the paths, with a low CPU footprint

Commits
-------

1c3721e8ad Fix circular detection with multiple paths
2020-11-12 11:26:24 +01:00
Jérémy Derussé
fcc832b720
Merge branch '5.1' into 5.2
* 5.1:
  [Filesystem] fix cleaning up tmp files when dumpFile() fails
  [MimeType] Add missing alias for @mime_type
2020-11-12 11:05:01 +01:00
Jérémy Derussé
9bff2e7aed
Merge branch '4.4' into 5.1
* 4.4:
  [Filesystem] fix cleaning up tmp files when dumpFile() fails
  [MimeType] Add missing alias for @mime_type
2020-11-12 10:58:18 +01:00
Jérémy Derussé
4bb1229261
minor #39047 [MimeType] Add missing alias for service @mime_type (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[MimeType] Add missing alias for service @mime_type

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

I found that this was missing. Im not sure why these have not been added before. Was it intentional?

Commits
-------

7b733d651d [MimeType] Add missing alias for @mime_type
2020-11-12 10:56:29 +01:00
Jérémy Derussé
17a2231c17
bug #39059 [Filesystem] fix cleaning up tmp files when dumpFile() fails (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem] fix cleaning up tmp files when dumpFile() fails

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

Commits
-------

33fce73bdf [Filesystem] fix cleaning up tmp files when dumpFile() fails
2020-11-12 10:53:41 +01:00
Thomas Calvet
9645fa39ec [Validator][RecursiveContextualValidator] Prevent validated hash collisions 2020-11-12 09:33:23 +01:00
Nicolas Grekas
33fce73bdf [Filesystem] fix cleaning up tmp files when dumpFile() fails 2020-11-11 23:20:15 +01:00
Jérémy Derussé
1c3721e8ad
Fix circular detection with multiple paths 2020-11-11 19:26:13 +01:00
Nicolas Grekas
c0d4ed0c3e Bump branch-version 2020-11-11 12:27:31 +01:00
Nyholm
7b733d651d
[MimeType] Add missing alias for @mime_type 2020-11-10 15:45:35 +01:00
Fabien Potencier
5b3976a888 Bump Symfony version to 5.2.0 2020-11-10 09:06:25 +01:00
Fabien Potencier
8de113edaf
Merge pull request #39043 from fabpot/release-5.2.0-RC1
released v5.2.0-RC1
2020-11-10 08:54:54 +01:00
Fabien Potencier
f33a0d355b Update VERSION for 5.2.0-RC1 2020-11-10 08:54:37 +01:00
Fabien Potencier
9c44a321cd Update CHANGELOG for 5.2.0-RC1 2020-11-10 08:54:29 +01:00
Fabien Potencier
c721e025ea bug #39004 [Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText (Jean85)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText

| Q             | A
| ------------- | ---
| Branch?       | 5.x (bugfix of a 5.x-only feature)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39003
| License       | MIT

~WIP~ This is now complete and, thanks to @yceruto, I've fixed two bugs in this PR:
 * `ErrorDetailsStamp` couldn't be (de)serialized properly with that constructor argument
 * `FlattenException::$statusText` wasn't (de)normalized

Commits
-------

9af554cb41 [Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText
2020-11-10 07:17:29 +01:00
Alessandro Lai
9af554cb41 [Messenger] Fix JSON deserialization of ErrorDetailsStamp and normalization of FlattenException::$statusText 2020-11-10 07:17:22 +01:00
Christian Flothmann
a9895ea72b Merge branch '5.1' into 5.x
* 5.1:
  failing test for issue 38861
  [DoctrineBridge]  indexBy could reference to association columns
2020-11-09 20:34:12 +01:00
Christian Flothmann
05e944b9e5 Merge branch '4.4' into 5.1
* 4.4:
  failing test for issue 38861
  [DoctrineBridge]  indexBy could reference to association columns
2020-11-09 20:27:47 +01:00
Christian Flothmann
cdfa9c2d8b Merge branch '3.4' into 4.4
* 3.4:
  failing test for issue 38861
  [DoctrineBridge]  indexBy could reference to association columns
2020-11-09 20:21:10 +01:00
Nicolas Grekas
6724ca799a bug #38628 [DoctrineBridge] indexBy could reference to association columns (juanmiguelbesada)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge]  indexBy could reference to association columns

| 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 -->
| Tickets       | Fix #37982 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | -
<!--
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 5.x.
-->

This is my approach to solve #37982. It partials reverts @xabbuh PR #38604

This is my first Symfony contribution, so please, tell me if I need to do something more or something is wrong.

Also, this bug affects 4.x and 5.x versions. I think merging in this branches is done automatically. If not, please tell me.

Thanks you

Commits
-------

f9a0e000e9 failing test for issue 38861
4c36145664 [DoctrineBridge]  indexBy could reference to association columns
2020-11-09 18:47:11 +01:00
Bart Wach
f9a0e000e9 failing test for issue 38861 2020-11-09 18:46:57 +01:00
Juan Miguel Besada
4c36145664 [DoctrineBridge] indexBy could reference to association columns 2020-11-09 18:41:59 +01:00
Fabien Potencier
2994ef0e1a Merge branch '5.1' into 5.x
* 5.1:
  Optimize circular collection by removing flattening
2020-11-09 13:21:52 +01:00
Fabien Potencier
382d6fc696 Merge branch '4.4' into 5.1
* 4.4:
  Optimize circular collection by removing flattening
2020-11-09 13:21:43 +01:00
Fabien Potencier
0ae674a29a bug #39021 [DependencyInjection] Optimize circular collection by removing flattening (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

 [DependencyInjection] Optimize circular collection by removing flattening

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

Alternative to #39019

Commits
-------

e649f47726 Optimize circular collection by removing flattening
2020-11-09 13:20:23 +01:00
Jérémy Derussé
e649f47726
Optimize circular collection by removing flattening 2020-11-09 12:28:57 +01:00
Fabien Potencier
47c2764064 Merge branch '5.1' into 5.x
* 5.1:
  also reset id readers
  Fix LDAP pagination
2020-11-09 11:58:06 +01:00
Fabien Potencier
64089870ce Merge branch '4.4' into 5.1
* 4.4:
  also reset id readers
  Fix LDAP pagination
2020-11-09 11:57:52 +01:00
Fabien Potencier
46410f876e bug #39031 [Ldap] Fix pagination (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Fix pagination

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

This replaces #38875 to fix a bug introduced by #38392

Commits
-------

4fe0a6f2b9 Fix LDAP pagination
2020-11-09 11:55:57 +01:00
Fabien Potencier
dfe60bb8a4 minor #39029 Adds constants for YamlEncoder options (dbrumann)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Adds constants for YamlEncoder options

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT

As I understand it encoders and normalizers use (public) constants for context keys so IDEs can help by providing autocomplete. I added these constants for the YamlEncoder where they are missing right now. For reference see other encoders like CsvEncoder or XmlEncoder.

Commits
-------

6ebf7e164e Adds constants for YamlEncoder options
2020-11-09 11:52:36 +01:00
Fabien Potencier
0d10f6b6b8 bug #39038 [DoctrineBridge] also reset id readers (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge]    also reset id readers

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

Commits
-------

784bd0080d also reset id readers
2020-11-09 11:48:59 +01:00
Christian Flothmann
784bd0080d also reset id readers 2020-11-09 09:59:19 +01:00
Denis Brumann
6ebf7e164e
Adds constants for YamlEncoder options 2020-11-08 12:35:30 +01:00
Fabien Potencier
77c82cfa18 feature #39032 [Validator] Allow load mappings from attributes without doctrine/annotations (derrabus)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Validator] Allow load mappings from attributes without doctrine/annotations

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       | #38096
| License       | MIT
| Doc PR        | TODO

Follows #38309.

Currently, we cannot enable constraint mapping from attributes without having `doctrine/annotations` installed. Lifting that limitation is a bit tricky because `ValidatorBuilder::enableAnnotationMapping()` creates an annotation reader if you don't pass one. This PR aims at deprecating this behavior.

I know it's a bit late for such a change in 5.2 and I should have seen earlier that this part was missing. 😓 Since I don't expect people to go all-in on attributes on day one, it's probably okay to postpone this change to 5.3.

Commits
-------

441c80603e [Validator] Allow load mappings from attributes without doctrine/annotations.
2020-11-08 09:40:34 +01:00
Alexander M. Turek
441c80603e [Validator] Allow load mappings from attributes without doctrine/annotations. 2020-11-07 22:48:53 +01:00
Jérémy Derussé
4fe0a6f2b9
Fix LDAP pagination 2020-11-07 21:18:28 +01:00
Alexander M. Turek
7b4d22f8d0 feature #39022 [FrameworkBundle] Allow to use attribute-based configuration of routing/serializer without doctrine/annotations (derrabus)
This PR was merged into the 5.2-dev branch.

Discussion
----------

 [FrameworkBundle] Allow to use attribute-based configuration of routing/serializer without doctrine/annotations

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

Follows #37474, #38525

Currently, we need `doctrine/annotations` to be installed in order to configure routing and serializer via PHP attributes. Given that for both components we can already replace Doctrine Annotations completely, I'd like to get rid of that limitation.

Commits
-------

e5492e2e55 [FrameworkBundle] Configure PHP Attributes without doctrine/annotations.
2020-11-07 20:25:59 +01:00
Maxime Steinhausser
50c7c3d364 bug #39002 [Validator] Override the default option of the choice constraint (benji07)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Validator] Override the default option of the choice constraint

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

We have a bundle that run test against the last version of symfony and we detect BC Break when passing a string as the first argument of the class Choice

Our code extends the Choice class and change the defaultOption.

I saw that others constraints class had new construct signature (for php8 attributes), but only some of them kept the array options as their first arguments. Why ?

ping @ogizanagi @derrabus

https://travis-ci.com/github/Elao/PhpEnums/jobs/410045368
```
1) Elao\Enum\Tests\Unit\Bridge\Symfony\Validator\Constraint\EnumTest::testDefaultValueIsEnumClass
Symfony\Component\Validator\Exception\MissingOptionsException: The options "class" must be set for constraint "Elao\Enum\Bridge\Symfony\Validator\Constraint\Enum".
/home/travis/build/Elao/PhpEnums/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php:171
/home/travis/build/Elao/PhpEnums/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraint.php:110
/home/travis/build/Elao/PhpEnums/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/Choice.php:75
/home/travis/build/Elao/PhpEnums/src/Bridge/Symfony/Validator/Constraint/Enum.php:39
/home/travis/build/Elao/PhpEnums/tests/Unit/Bridge/Symfony/Validator/Constraint/EnumTest.php:22
```

Commits
-------

d553750054 Allow user to override default options when extending the Choice Constraint
2020-11-07 17:47:31 +01:00
Robin Chalas
f226d981af Merge branch '5.1' into 5.x
* 5.1:
  [Messenger] Fix DBAL deprecations in PostgreSQLConnection
  [DoctrineBridge] Fix DBAL deprecations in middlewares.
2020-11-07 17:24:48 +01:00
Robin Chalas
245d04189e Merge branch '4.4' into 5.1
* 4.4:
  [DoctrineBridge] Fix DBAL deprecations in middlewares.
2020-11-07 17:24:27 +01:00
Robin Chalas
01316d6014 bug #39026 [Messenger] Fix DBAL deprecations in PostgreSqlConnection (chalasr)
This PR was merged into the 5.1 branch.

Discussion
----------

[Messenger] Fix DBAL deprecations in PostgreSqlConnection

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

Commits
-------

bc42cf604e [Messenger] Fix DBAL deprecations in PostgreSQLConnection
2020-11-07 17:22:16 +01:00
Benjamin Lévêque
d553750054 Allow user to override default options when extending the Choice Constraint
Co-authored-by: Maxime Steinhausser <maxime.steinhausser@gmail.com>
2020-11-07 17:03:44 +01:00
Robin Chalas
b8a5e48105 bug #39025 [DoctrineBridge] Fix DBAL deprecations in middlewares (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Fix DBAL deprecations in middlewares

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

Commits
-------

969da48c98 [DoctrineBridge] Fix DBAL deprecations in middlewares.
2020-11-07 15:51:28 +01:00
Robin Chalas
bc42cf604e [Messenger] Fix DBAL deprecations in PostgreSQLConnection 2020-11-07 15:49:46 +01:00