Commit Graph

46706 Commits

Author SHA1 Message Date
Jakub Zalas d710c1b654
Execute docker dependent tests with github actions 2020-05-04 12:09:26 +01:00
Nicolas Grekas f8d3b0626a bug #36606 [Cache] Fixed not supported Redis eviction policies (SerheyDolgushev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Fixed not supported Redis eviction policies

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

**Steps to reproduce:**
1. Define the following redis service on SymfonyCloud:
```
rediscache:
    type: redis:5.0
    size: S
    configuration:
        maxmemory_policy: allkeys-lru
```
2. Deploy the change

**Expected result:**
No redis cache will be populated

**Actual result:**
Following exception is thrown:
```
[2020-04-28T05:35:58.440403-04:00] php.CRITICAL: Uncaught Error: Return value of Symfony\Component\Cache\Adapter\RedisTagAwareAdapter::doSave() must be of the type array, bool returned {"exception":"[object] (TypeError(code: 0): Return value of Symfony\\Component\\Cache\\Adapter\\RedisTagAwareAdapter::doSave() must be of the type array, bool returned at /app/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php:100)"} []
```

Commits
-------

3d6e942da5 [Cache] Fixed not supported Redis eviction policies
2020-04-30 19:47:27 +02:00
Fabien Potencier cd66cd57a0 bumped Symfony version to 4.4.9 2020-04-28 20:52:27 +02:00
Fabien Potencier 8e1c507fce
Merge pull request #36614 from fabpot/release-4.4.8
released v4.4.8
2020-04-28 20:48:03 +02:00
Fabien Potencier f7b9d93cb2 updated VERSION for 4.4.8 2020-04-28 20:47:42 +02:00
Fabien Potencier d408c55845 updated CHANGELOG for 4.4.8 2020-04-28 20:47:32 +02:00
Nicolas Grekas dfc4a71eac [Validator] fix merge 2020-04-28 20:23:58 +02:00
Nicolas Grekas 49b74baab4 Merge branch '3.4' into 4.4
* 3.4:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Form] apply automatically step=1 for datetime-local input
2020-04-28 19:55:16 +02:00
Fabien Potencier ad6f8608e9
Merge pull request #36612 from fabpot/release-3.4.40
released v3.4.40
2020-04-28 19:41:57 +02:00
Fabien Potencier f59e0e9c23 updated VERSION for 3.4.40 2020-04-28 19:41:38 +02:00
Fabien Potencier 1822b065d7 update CONTRIBUTORS for 3.4.40 2020-04-28 19:41:24 +02:00
Fabien Potencier 99080bdbe7 updated CHANGELOG for 3.4.40 2020-04-28 19:40:55 +02:00
Serhey Dolgushev 3d6e942da5 [Cache] Fixed not supported Redis eviction policies 2020-04-28 12:13:53 +01:00
Nicolas Grekas 1bc3ee798d bug #36536 [Cache] Allow invalidateTags calls to be traced by data collector (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Allow invalidateTags calls to be traced by data collector

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

`TraceableTagAwareAdapter` is not used in the fullstack framework since tag aware pools don't have the `cache.pool` tag (it's the decorated adapter that has it). This PR aims to use `TraceableTagAwareAdapter` when a pool is configured with `tags: true`

Commits
-------

28fdb3a879 Allow invalidateTags calls to be traced by data collector
2020-04-26 16:19:08 +02:00
Nicolas Grekas 048e6f3dd8 minor #36571 [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) (Lozik)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36533
| License       | MIT
| Doc PR        | none
<!--
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.
-->
This PR changes the label of the peak memory usage from `MB` into `MiB` in the time and memory panels of the web profiler, as discussed in #36533.

The changed file `Resources/views/Collector/time.html.twig` is completely updated by commit c9433b0090 for v4.3. So for correctly displaying the label in 4.4 (& 5.0), the file `Resources/views/Collector/time.js` needs to be updated.

Commits
-------

89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
2020-04-26 14:49:57 +02:00
Loïc Beurlet 89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) 2020-04-26 14:49:41 +02:00
Fabien Potencier 1889672a59 minor #36584 [Validator] add tests for the ConstraintViolationBuilder class (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add tests for the ConstraintViolationBuilder class

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

Commits
-------

fb3aaefbf2 add tests for the ConstraintViolationBuilder class
2020-04-26 12:56:11 +02:00
Christian Flothmann fb3aaefbf2 add tests for the ConstraintViolationBuilder class 2020-04-26 10:10:12 +02:00
Fabien Potencier e3dc5effa6 bug #36566 [PhpUnitBridge] Use COMPOSER_BINARY env var if available (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use COMPOSER_BINARY env var if available

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

Commits
-------

6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available
2020-04-25 14:18:34 +02:00
Fabien Potencier b3cdf5c989 minor #36568 [PhpUnitBridge] Improve dirname usage (Jean85)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Improve dirname usage

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36499
| License       | MIT

This is a very small performance improvement on top of #36539

Commits
-------

e721cfd65c Improve dirname usage
2020-04-25 14:02:39 +02:00
Alessandro Lai e721cfd65c
Improve dirname usage 2020-04-24 16:08:51 +02:00
Thomas Calvet 6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available 2020-04-24 14:56:41 +02:00
Laurent VOULLEMIER 28fdb3a879 Allow invalidateTags calls to be traced by data collector 2020-04-24 13:56:40 +02:00
Fabien Potencier fe5eacd3a2 bug #36560 [YAML] escape DEL(\x7f) (sdkawata)
This PR was merged into the 3.4 branch.

Discussion
----------

[YAML] escape DEL(\x7f)

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

Commits
-------

734d97bdcc [YAML] escape DEL(\x7f)
2020-04-24 12:37:21 +02:00
sdkawata 734d97bdcc [YAML] escape DEL(\x7f) 2020-04-24 19:16:04 +09:00
Fabien Potencier 719bb15c38 bug #36539 [PhpUnitBridge] fix compatibility with phpunit 9 (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] fix compatibility with phpunit 9

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

See related issue

Commits
-------

e27ed28bae fix compatibility with phpunit 9
2020-04-24 10:28:23 +02:00
Fabien Potencier 259f523010 bug #36555 [Cache] skip APCu in chains when the backend is disabled (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] skip APCu in chains when the backend is disabled

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

I think this should do it.

Commits
-------

5a7208481d [Cache] skip APCu in chains when the backend is disabled
2020-04-24 10:25:10 +02:00
Massimiliano Arione e27ed28bae
fix compatibility with phpunit 9 2020-04-24 09:55:53 +02:00
Nicolas Grekas 5a7208481d [Cache] skip APCu in chains when the backend is disabled 2020-04-23 23:50:38 +02:00
Nicolas Grekas ea69f77b70 bug #36523 [Form] apply automatically step=1 for datetime-local input (ottaviano)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] apply automatically step=1 for datetime-local input

| 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       | ~
| License       | MIT
| Doc PR        |

this PR just reapplies the same fix from `TimeType` (https://github.com/symfony/symfony/pull/10777 thanks @tucksaun) to `DateTimeType`.

### before:
```php
'widget' => 'single_text',
'with_seconds' => true,
```
![image](https://user-images.githubusercontent.com/4582866/79972699-a5369500-8496-11ea-8272-d43b68ff49b5.png)

### after:
```php
'widget' => 'single_text',
'with_seconds' => true,
```
![image](https://user-images.githubusercontent.com/4582866/79972801-cbf4cb80-8496-11ea-9af5-b193445b1f1d.png)

Commits
-------

3c24cfecdd [Form] apply automatically step=1 for datetime-local input
2020-04-23 22:22:05 +02:00
Nicolas Grekas 2d7b0b8dad bug #36519 [FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias

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

Imagine that `FooInterface` is an alias, but it is deprecated and so has a `class_alias` to `BarInterface`. Currently, `debug:autowiring` will actually print that's the autowiring alias is `BarInterface`, despite there being no such id in the container.

@nicolas-grekas originally (on purpose) made the 2nd argument to `Descriptor::getClassDescription()` be passed by reference *for* this exact feature - 56aab09b01 - but I can't figure out why. This change (which effectively removes the by-reference modifying) made no existing tests fail.

Discovered this because the whole deprecated`Doctrine\Common\Persistence\ManagerRegistry` vs newer `Doctrine\Persistence\ManagerRegistry` causes the issue.

Thanks!

Commits
-------

d34b437ce0 Fixing a bug where class_alias would cause incorrect items in debug:autowiring
2020-04-23 22:17:53 +02:00
Fabien Potencier bbbf80f60b minor #36546 [Mailer] Add a comment to avoid more wrong PRs on this piece of code (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add a comment to avoid more wrong PRs on this piece of code

| Q             | A
| ------------- | ---
| Branch?       | 4.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       | Numerous bogus PRs <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

444e616f6b [Mailer] Add a comment to avoid more wrong PRs on this piece of code
2020-04-23 14:42:49 +02:00
Fabien Potencier 444e616f6b [Mailer] Add a comment to avoid more wrong PRs on this piece of code 2020-04-23 14:41:43 +02:00
Dimitri Gritsajuk 3c24cfecdd [Form] apply automatically step=1 for datetime-local input 2020-04-22 12:34:32 +02:00
Nicolas Grekas 119ba3b742 bug #36454 [DependencyInjection][ServiceSubscriber] Support late aliases (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][ServiceSubscriber] Support late aliases

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

A service subscriber that references a service that is aliased after optimization passes (after ResolveReferencesToAliasesPass technically) end up being dumped with the real service and not the alias.

I would consider it a bug but @nicolas-grekas told me it's a feature for him, this is why I'm submitting this on master.

@nicolas-grekas, feel free to close this one and open with your solution since you definitely know the subject better.

Commits
-------

24150370c3 [DependencyInjection][ServiceSubscriber] Support late aliases
2020-04-21 23:46:25 +02:00
Nicolas Grekas 15d2b77632 fix merge 2020-04-21 23:19:23 +02:00
Nicolas Grekas 0ed6cfd412 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Fix session.attribute_bag service definition
  Update LdapBindAuthenticationProvider.php
2020-04-21 23:01:55 +02:00
Nicolas Grekas 08ded7fed6 bug #36498 [Security/Core] fix escape for username in LdapBindAuthenticationProvider.php (stoccc)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] fix escape for username in LdapBindAuthenticationProvider.php

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

I think that when we call `ldap_search()` as definitely it will do the `$this->ldap->query()` call, the proper filter applied should be `LdapInterface::ESCAPE_FILTER` as documented in
https://www.php.net/manual/en/function.ldap-escape.php while `LdapInterface::ESCAPE_DN` should be used for `dn` only

This simple change should fix, I'm sorry if I'm wrong.

Commits
-------

4bda68a9a2 Update LdapBindAuthenticationProvider.php
2020-04-21 22:51:56 +02:00
Nicolas Grekas 6642f09053 bug #36506 [FrameworkBundle] Fix session.attribute_bag service definition (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix session.attribute_bag service definition

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

It looks like in https://github.com/symfony/symfony/pull/36063, the fact the the `getAttributeBag` method is private was forgotten. It cannot be used as the factory method. I guess we can make it public. Should it maybe marked `@internal`?

Commits
-------

76072c6424 [FrameworkBundle] Fix session.attribute_bag service definition
2020-04-21 22:46:18 +02:00
Nicolas Grekas 60245d94aa bug #36500 [Routing][PrefixTrait] Add the _locale requirement (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing][PrefixTrait] Add the _locale requirement

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

Commits
-------

9fd62f79fb [Routing] Add missing _locale requirements
2020-04-21 21:59:53 +02:00
Ryan Weaver d34b437ce0 Fixing a bug where class_alias would cause incorrect items in debug:autowiring 2020-04-21 14:42:49 -04:00
Fabien Potencier 2a92dd3728 minor #36504 [Routing] Remove unused properties from the Route annotation (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Remove unused properties from the Route annotation

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

From what I see those properties are totally unused.

Commits
-------

9ac1c76fd5 [Routing] Remove unused properties from the Route annotation
2020-04-21 15:21:27 +02:00
Thomas Calvet 76072c6424 [FrameworkBundle] Fix session.attribute_bag service definition 2020-04-20 18:42:48 +02:00
Thomas Calvet 9ac1c76fd5 [Routing] Remove unused properties from the Route annotation 2020-04-20 16:41:27 +02:00
Thomas Calvet 9fd62f79fb [Routing] Add missing _locale requirements
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
2020-04-20 14:17:53 +02:00
stoccc 4bda68a9a2
Update LdapBindAuthenticationProvider.php 2020-04-19 23:34:01 +02:00
Nicolas Grekas 95becc4078 bug #36457 [Cache] CacheItem with tag is never a hit after expired (alexander-schranz, nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] CacheItem with tag is never a hit after expired

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes/no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36458
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

It seems like a tag cacheItem is never a hit again. Not sure how fix this but the cache component is really hard to debug 🙈 .

It need to be somewhere generally as all TagAware caches are effected:

```
1) Symfony\Component\Cache\Tests\Adapter\FilesystemTagAwareAdapterTest::testRefreshAfterExpires

Failed asserting that false is true.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:194

2) Symfony\Component\Cache\Tests\Adapter\PredisTagAwareClusterAdapterTest::testRefreshAfterExpires

Failed asserting that true is false.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:183

3) Symfony\Component\Cache\Tests\Adapter\RedisTagAwareAdapterTest::testRefreshAfterExpires

Failed asserting that true is false.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:183

4) Symfony\Component\Cache\Tests\Adapter\RedisTagAwareClusterAdapterTest::testRefreshAfterExpires

Failed asserting that true is false.

/home/travis/build/symfony/symfony/src/Symfony/Component/Cache/Tests/Traits/TagAwareTestTrait.php:183
```

Commits
-------

d082eca7dd Add reproducer to for hit after update expire cacheItem
f815b011c3 [Cache] fix FilesystemTagAwareAdapter failing when a tag link preexists
2020-04-19 21:54:45 +02:00
Nicolas Grekas e0e3cf634e Merge branch '3.4' into 4.4
* 3.4:
  [HttpFoundation] workaround PHP bug in the session module
2020-04-18 22:40:08 +02:00
Nicolas Grekas 62565a1b66 bug #36490 [HttpFoundation] workaround PHP bug in the session module (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] workaround PHP bug in the session module

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

Current tests fail after https://github.com/php/php-src/pull/5305
Which itself is a patch for a bug in the session module.

This PR works around the issue in older versions of PHP and fixes the tests.

Commits
-------

0cbca19edc [HttpFoundation] workaround PHP bug in the session module
2020-04-18 22:39:13 +02:00
Nicolas Grekas 0cbca19edc [HttpFoundation] workaround PHP bug in the session module 2020-04-18 22:23:17 +02:00