Commit Graph

48398 Commits

Author SHA1 Message Date
Alexander M. Turek 55707fbcba minor #39030 [LDAP] Add ldap tests to github CI (lucasaba, jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[LDAP] Add ldap tests to github CI

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

Adds LDAP test on github actions pipeline and corrects sum bugs in the LDAP Component test

It also adds a bug resolution from @Nek- made in #38875

Commits
-------

ea78f728b1 Use GithubAction to run ldap tests
af9562b12c Adds LDAP Adapter test in integration group
2020-11-16 16:51:33 +01:00
Jérémy Derussé ea78f728b1
Use GithubAction to run ldap tests 2020-11-16 16:15:08 +01:00
Alexander M. Turek cf70d3a180 bug #39091 [Config] Recheck glob brace support after GlobResource was serialized (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config] Recheck glob brace support after GlobResource was serialized

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

cc @bastnic

This bug was reported on Symfony Slack: `$this->globBrace` is set to `null` after unserialization from the `.meta` file.

Instead of serializing this property, I decided to reinitialize the property after unserialization. I think that's a safer option (e.g. it works when the cache is build on a different server with different globBrace support than the one running the application).

Commits
-------

d9534779cf Reinitialize globBrace after unserialization
2020-11-16 15:38:21 +01:00
Luca Saba af9562b12c
Adds LDAP Adapter test in integration group
Adds ext-ldap on github-actions
2020-11-16 15:17:13 +01:00
Robin Chalas beeafb1cb7 bug #39092 Fix critical extension when reseting paged control (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix critical extension when reseting paged control

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

The issue has been introduced here in #38392 and prevent performing an operation after fetched a paginated result => ldap throws an `Could not XXX: Critical extension is unavailable`

At this line: https://github.com/symfony/symfony/pull/38392/files#diff-24b79f3ac1a99938f5acb158a450e38d30c1984a5d333b5b20f2c38a73d10e31L183, the previous code called `ldap_control_paged_result($con, 0);` using the default value (`false`) for the `$critical` argument.
The replaced version always use `true`.

This PR restore the previous behavior by using `false` when reseting the pagination.

Commits
-------

a2b74762a6 Fix critical extension when reseting paged control
2020-11-16 14:02:21 +01:00
Jérémy Derussé a2b74762a6
Fix critical extension when reseting paged control 2020-11-16 12:50:58 +01:00
Wouter de Jong d9534779cf Reinitialize globBrace after unserialization 2020-11-16 12:15:53 +01:00
Alexander M. Turek 091265bbbb bug #38614 [HttpFoundation] Fix for virtualhosts based on URL path (mvorisek)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Fix for virtualhosts based on URL path

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

This PR fixes base URL detection when:
- virtualhost is based on URL path
- AND local path does not match that URL virtual host path prefix

fix covered with tests

Commits
-------

75ff86811f [HttpFoundation] Fix for virtualhosts based on URL path
2020-11-15 23:42:48 +01:00
Chi-teck bd72a56505 Check if method inheritEnvironmentVariables exists 2020-11-14 17:10:20 +00:00
Fabien Potencier 1f4625053c minor #39080 [Yaml] remove unreachable code (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] remove unreachable code

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

mistakenly added in #33658

Commits
-------

5907444e81 remove unreachable code
2020-11-14 16:22:22 +01:00
Christian Flothmann 5907444e81 remove unreachable code 2020-11-14 15:49:24 +01:00
Thomas Calvet c5a107e4cc [PhpUnitBridge] Fix test fixture file name 2020-11-13 17:28:59 +01:00
Alexander M. Turek 7fba1e55c4 minor #39073 [HttpKernel] Update doc block on ExceptionEvent (noniagriconomie)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Update doc block on ExceptionEvent

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

Related to the code https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php#L63

Commits
-------

4e45d2da3b Update ExceptionEvent.php
2020-11-13 14:02:52 +01:00
Antoine Makdessi 4e45d2da3b
Update ExceptionEvent.php 2020-11-13 13:20:22 +01:00
Christian Flothmann c72f85333a bug #38387 [Validator] prevent hash collisions caused by reused object hashes (fancyweb, xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] prevent hash collisions caused by reused object hashes

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

Commits
-------

8dd1a6e545 prevent hash collisions caused by reused object hashes
9645fa39ec [Validator][RecursiveContextualValidator] Prevent validated hash collisions
2020-11-13 10:30:24 +01:00
Christian Flothmann 3834d76e11 bug #38999 [DependencyInjection] autoconfigure behavior describing tags on decorators (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] autoconfigure behavior describing tags on decorators

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

Commits
-------

73a3b838b7 autoconfigure behavior describing tags on decorators
2020-11-13 10:27:22 +01:00
Christian Flothmann 8dd1a6e545 prevent hash collisions caused by reused object hashes 2020-11-13 10:14:12 +01:00
Christian Flothmann 73a3b838b7 autoconfigure behavior describing tags on decorators 2020-11-13 10:09:04 +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é 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
Nyholm 7b733d651d
[MimeType] Add missing alias for @mime_type 2020-11-10 15:45:35 +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 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 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 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
Jérémy Derussé 4fe0a6f2b9
Fix LDAP pagination 2020-11-07 21:18:28 +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
Alexander M. Turek 969da48c98 [DoctrineBridge] Fix DBAL deprecations in middlewares. 2020-11-07 15:21:55 +01:00
Fabien Potencier be8fd560e3 minor #39017 [ProxyManagerBridge] replace ProxyManager\Version by feature detection (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ProxyManagerBridge] replace ProxyManager\Version by feature detection

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

I'd like to get rid of this `Version` class, which is the source of so many issues with deps.
This won't remove the class from ocramius/proxy-manager, but that's a separate story that this change could enable in the end :)

Commits
-------

5f77aad6ca [ProxyManagerBridge] replace ProxyManager\Version by feature detection
2020-11-06 17:37:15 +01:00
Nicolas Grekas 5f77aad6ca [ProxyManagerBridge] replace ProxyManager\Version by feature detection 2020-11-06 15:18:27 +01:00
Alexander M. Turek 5e3338c1d7 minor #39009 [CI] Fix invalid Doctrine parameter syntax (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[CI] Fix invalid Doctrine parameter syntax

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

~~I cannot reproduce locally.. So Im trying to fix this with the help of the CI~~

I have reproduced locally. This fix will help.

```
❯ phpunit Tests/Transport/DoctrineIntegrationTest.php
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.

.E....                                                              6 / 6 (100%)

Time: 111 ms, Memory: 6.00 MB

There was 1 error:

1) Symfony\Component\Messenger\Bridge\Doctrine\Tests\Transport\DoctrineIntegrationTest::testSendWithDelay
Doctrine\DBAL\SQLParserUtilsException: Value for :body not found in params array. Params array key should be "body"

src/Symfony/Component/Messenger/Bridge/Doctrine/vendor/doctrine/dbal/src/SQLParserUtilsException.php:21
src/Symfony/Component/Messenger/Bridge/Doctrine/vendor/doctrine/dbal/src/SQLParserUtils.php:277
src/Symfony/Component/Messenger/Bridge/Doctrine/vendor/doctrine/dbal/src/SQLParserUtils.php:203
src/Symfony/Component/Messenger/Bridge/Doctrine/vendor/doctrine/dbal/src/Connection.php:1019
src/Symfony/Component/Messenger/Bridge/Doctrine/vendor/doctrine/dbal/src/Query/QueryBuilder.php:210
src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php:66

ERRORS!
Tests: 6, Assertions: 8, Errors: 1.
```

Apply patch:

```
❯ phpunit Tests/Transport/DoctrineIntegrationTest.php
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.

......                                                              6 / 6 (100%)

Time: 94 ms, Memory: 6.00 MB

OK (6 tests, 9 assertions)

```

Commits
-------

0ab3032c52 [CI] Fixed invalid doctrine parameter syntax
2020-11-05 22:19:20 +01:00
Nyholm 0ab3032c52
[CI] Fixed invalid doctrine parameter syntax 2020-11-05 21:54:48 +01:00
Robin Chalas 75f8ac1e9b bug #38991 [Console] Fix ANSI when stdErr is not a tty (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix ANSI when stdErr is not a tty

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

Taking the @wouterj 's comment into account (https://github.com/symfony/symfony/issues/38981#issuecomment-721915428)

This PR prevents using the same Formatter for stdOut and stdErr when possible.

When user send a custom formatter (or call `setFormatter`) the previous logic is kept.
Otherwise, symfony is asked to create the Formatter, and thus is able to clone the formatter.

In a future PR targeting 5.3, we could improve the constructor to let people inject 2 distinguished formatters

Commits
-------

f3a398b5af Fix ANSI when stdErr is not a tty
2020-11-05 16:22:05 +01:00
Nicolas Grekas 61b3872b65 bug #38980 [DependencyInjection] Fix circular reference with Factory + Lazy Iterrator (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix circular reference with Factory + Lazy Iterrator

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

The issue, occurs when a `factory` iterates over services (think tagged iterator) that also need the `factory`.
The PhpDumper is not able to detect the loop because the TaggedService iterator is flaged as "lazy" which is ignored in the loop detection. 2d7e0b02c6/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php (L474-L476)

See test case for a reproduce case.

This PR takes into account lazy services when computing loops.

I'm not sure this is the right thing to do /cc @nicolas-grekas .
A better solution could be to do this ONLY when the service is used as a factory?

Commits
-------

51ff060603 Fix circular referene with Factory and LazyIterator
2020-11-05 12:51:33 +01:00
Jérémy Derussé f3a398b5af
Fix ANSI when stdErr is not a tty 2020-11-05 10:51:39 +01:00
Nyholm 94818d2a22
minor #38995 [Security] Fix docblock (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Fix docblock

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

Commits
-------

60e506835a [Security] Fix docblock.
2020-11-05 09:37:17 +01:00
Alexander M. Turek 60e506835a [Security] Fix docblock. 2020-11-05 00:24:50 +01:00