Commit Graph

49225 Commits

Author SHA1 Message Date
Nicolas Grekas
cc7d1264c8 bug #40645 [FrameworkBundle] Dont store cache misses on warmup (Nyholm)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Dont store cache misses on warmup

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

When we are warming the annotation cache, we are reading all annotation into an `ArrayAdapter`. When we are done we move the values to a `PhpArrayAdapter` to store them in a file.

@Seldaek [found out](https://github.com/symfony/symfony/issues/38694#issuecomment-810501066) that when you are using a custom constraint with a `Symfony\Component\Validator\Constraints\Callback`, there is a strange error like:

> Can use "yield from" only with arrays and Traversables

That is because the `Closure` in the `Symfony\Component\Validator\Constraints\Callback` cannot be serialised and saved to cache. But since the `ArrayAdapter` is also [storing misses as null](https://github.com/symfony/symfony/pull/35362), the null values are understood as real values.

When all values are moved to the `PhpArrayAdapter` and we ask the cache for a value (via Doctrine's `CacheProvider`), it will return `null` as a value instead of `false` as a cache miss. And `null` is not something one could "yield from".

Commits
-------

27a22b34af [FrameworkBundle] Dont store cache misses on warmup
2021-04-01 12:17:55 +02:00
Nyholm
27a22b34af [FrameworkBundle] Dont store cache misses on warmup 2021-04-01 12:17:49 +02:00
Nicolas Grekas
882f845c6b minor #40649 [FrameworkBundle] Remove author comments for configuration and extension (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Remove author comments for configuration and extension

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

I really don't want to step on anyones toes. I'm also super grateful for all the time, effort and energy these contributors (and everybody else) have given to Symfony.

The `@author` tags should represent "who knows the most about this class" or to give the original author some kind of credit (more visible than `git blame`).

The FrameworkBundle's `Configuration` and `FrameworkExtension` classes are a bit special. Fist because they are well known by most recurring contributors. They are also thousands of lines long and many many users have added a line or two. The `FrameworkExtension` have over 50 people that currently authored more than 5 lines. The named authors combined have about that 12% and 25% in `Configuration` and `FrameworkExtension` respectively.

I do like the `@author` tag, but for the reasons above, I don't think they make sense for these classes.

Commits
-------

f19d72aa07 [FrameworkBundle] Remove author comments for configuration and extension
2021-04-01 10:46:32 +02:00
Nyholm
ac54ad750b
minor #40650 [Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc (guilliamxavier)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc

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

The original issue was #5307 (`match=false` not handled in `getHtmlPattern()`).
Then #5382 patched it to return null (rather than an incorrect result) and inserted a statement and a "todo" in the phpDoc.
Later (but still years ago) #12235 properly implemented pattern inversion, but only removed the "todo"; this PR removes the statement.

Commits
-------

3bdf8d7238 [Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc
2021-04-01 09:42:19 +02:00
Nyholm
990b51ba0a
bug #40629 [DependencyInjection] Fix "url" env var processor behavior when the url has no path (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix "url" env var processor behavior when the url has no path

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

Before:
```yaml
MY_URL_ENV_VAR=http://symfony.com
%env(key:path:url:MY_URL_ENV_VAR)% --> false
```

After:
```yaml
MY_URL_ENV_VAR=http://symfony.com
%env(key:path:url:MY_URL_ENV_VAR)% --> null
```

Returning `false` for the path prevents me from using the `default` env var processor that is triggered only for `''` and `null`.
(`%env(default:my_fallback_param:key:path:url:MY_URL_ENV_VAR)%`)

BTW, with PHP 8, it actually works because `substr(null, 1)` behavior changed (see https://3v4l.org/oHf6l).

Commits
-------

2876cf9cc6 [DependencyInjection] Fix "url" env var processor behavior when the url has no path
2021-03-31 21:58:59 +02:00
Nyholm
2ceb35a805
bug #40655 [Cache] skip storing failure-to-save as misses in ArrayAdapter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] skip storing failure-to-save as misses in ArrayAdapter

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

In addition to #40645

Commits
-------

ba6698795c [Cache] skip storing failure-to-save as misses in ArrayAdapter
2021-03-31 21:20:27 +02:00
Nicolas Grekas
ba6698795c [Cache] skip storing failure-to-save as misses in ArrayAdapter 2021-03-31 17:30:10 +02:00
Guilliam Xavier
3bdf8d7238
[Validator] Delete obsolete statement in Regex::getHtmlPattern() phpDoc 2021-03-31 11:00:59 +02:00
Nyholm
f19d72aa07
[FrameworkBundle] Remove author comments for configuration and extension 2021-03-31 10:59:36 +02:00
Robin Chalas
e16be83f91 bug #40522 [Serializer] Allow AbstractNormalizer to use null for non-optional nullable constructor parameters without default value (Pierre Rineau)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Allow AbstractNormalizer to use null for non-optional nullable constructor parameters without default value

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

Serializer component AbstractNormalizer attemps to guess constructor parameters, and falls back using default values when possible. Yet, it misses one use case: nullable non-optional parameter with value not being present in incoming input, case in which null is a valid value, not the default one, yet still valid.

This PR introduce a two-line fix that forcefully set null as value for missing from input non-optional nullable constructor parameters values.

Commits
-------

d29e433ae8 [Serializer] AbstractNormalizer force null for non-optional nullable constructor parameter denormalization when not present in input
2021-03-30 00:36:11 +02:00
Robin Chalas
5dad871833 bug #40595 add missing queue_name to find(id) in doctrine messenger transport (monteiro)
This PR was merged into the 4.4 branch.

Discussion
----------

add missing queue_name to find(id) in doctrine messenger transport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

This bug was noticed by @weaverryan when reviewing the PR: https://github.com/symfony/symfony/pull/38468 related to multiple failure transports.

Commits
-------

bb26a92826 add missing queue_name to find(id) in doctrine messenger transport
2021-03-30 00:15:30 +02:00
Thomas Calvet
2876cf9cc6 [DependencyInjection] Fix "url" env var processor behavior when the url has no path 2021-03-29 15:11:05 +02:00
Nyholm
68276562c3
Fixed support for nodes not extending BaseNode 2021-03-29 12:55:05 +02:00
Fabien Potencier
09fe7333bb Bump Symfony version to 4.4.22 2021-03-29 07:15:29 +02:00
Fabien Potencier
0139b7a745
Merge pull request #40616 from fabpot/release-4.4.21
released v4.4.21
2021-03-29 07:11:20 +02:00
Fabien Potencier
c990794868 Update VERSION for 4.4.21 2021-03-29 07:11:04 +02:00
Fabien Potencier
be1805450e Update CONTRIBUTORS for 4.4.21 2021-03-29 07:10:41 +02:00
Fabien Potencier
58b03fbae3 Update CHANGELOG for 4.4.21 2021-03-29 07:10:17 +02:00
Nyholm
77870a5cec
minor #40608 [Filesystem] Fix dumpFile() method call (sebpacz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem] Fix dumpFile() method call

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

The dumpFile() method in the Filesystem component takes two arguments (filename and content). I found a test with the third argument set to null.

Commits
-------

2b33d4af65 [Filesystem] Fix dumpFile() method call
2021-03-28 14:06:57 +02:00
sebpacz
2b33d4af65 [Filesystem] Fix dumpFile() method call 2021-03-28 11:59:32 +02:00
Christian Flothmann
1a2729199f minor #40606 [Form] skip intl dependent tests if the extension is missing (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] skip intl dependent tests if the extension is missing

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

Commits
-------

71da904de0 skip intl dependent tests if the extension is missing
2021-03-28 11:36:00 +02:00
Christian Flothmann
71da904de0 skip intl dependent tests if the extension is missing 2021-03-28 10:05:52 +02:00
Fabien Potencier
5666a45a02 bug #40598 [Form] error if the input string couldn't be parsed as a date (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] error if the input string couldn't be parsed as a date

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

When the Intl polyfill is used instead of the PHP intl extension, the
intl_get_error_code() function always returns 0 no matter if the input
string could be parsed.

Commits
-------

5ce5300da3 error if the input string couldn't be parsed as a date
2021-03-28 08:36:08 +02:00
Fabien Potencier
9889c492d7 bug #40587 [HttpClient] fix using stream_copy_to_stream() with responses cast to php streams (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix using stream_copy_to_stream() with responses cast to php streams

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

Commits
-------

cf1404a30b [HttpClient] fix using stream_copy_to_stream() with responses cast to php streams
2021-03-28 08:32:58 +02:00
Nyholm
0d99f93eaf
minor #40599 [VarDumper] make DateCaster tests timezone-agnostic (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] make DateCaster tests timezone-agnostic

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

Commits
-------

bfef4546d3 make DateCaster tests timezone-agnostic
2021-03-27 22:10:44 +01:00
Christian Flothmann
bfef4546d3 make DateCaster tests timezone-agnostic 2021-03-27 20:49:03 +01:00
Christian Flothmann
5ce5300da3 error if the input string couldn't be parsed as a date
When the Intl polyfill is used instead of the PHP intl extension, the
intl_get_error_code() function always returns 0 no matter if the input
string could be parsed.
2021-03-27 18:05:23 +01:00
Christian Flothmann
d0875a9287 bug #40510 [Form] IntegerType: Always use en for IntegerToLocalizedStringTransformer (Warxcell)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] IntegerType: Always use en for IntegerToLocalizedStringTransformer

Fixes #40456

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

Commits
-------

83b836dbc9 IntegerType: Always use en for IntegerToLocalizedStringTransformer Fixes #40456
2021-03-26 15:31:20 +01:00
Hugo Monteiro
bb26a92826 add missing queue_name to find(id) in doctrine messenger transport 2021-03-26 11:56:19 +00:00
Warxcell
83b836dbc9 IntegerType: Always use en for IntegerToLocalizedStringTransformer
Fixes #40456
2021-03-26 12:41:55 +02:00
Robin Chalas
ffc34fa33c bug #40593 Uses the correct assignment action for console options depending if they are short or long (topikito)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Uses the correct assignment action for console options depending if they are short or long

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

Checks if the option is short or long, and assigns the corresponding "glue" for the assignment.

Commits
-------

d0a3c538f4 Uses the correct assignment action for console options depending if they are short or long
2021-03-26 10:23:36 +01:00
Roberto Nygaard
d0a3c538f4 Uses the correct assignment action for console options depending if they are short or long 2021-03-26 10:23:24 +01:00
Nyholm
a863e2fe8d
bug #40535 [HttpKernel] ConfigDataCollector to return known data without the need of a Kernel (topikito)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpKernel] ConfigDataCollector to return known data without the need of a Kernel

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

Sets `$this->data` with information that can be known without the need of a `Kernel`.

Commits
-------

d919f2ce83 [HttpKernel] ConfigDataCollector to return known data without the need of a Kernel
2021-03-25 19:50:57 +01:00
Roberto Nygaard
d919f2ce83
[HttpKernel] ConfigDataCollector to return known data without the need of a Kernel 2021-03-25 19:50:37 +01:00
Nicolas Grekas
cf1404a30b [HttpClient] fix using stream_copy_to_stream() with responses cast to php streams 2021-03-25 18:52:07 +01:00
Nicolas Grekas
16f3fc1e55 minor #40568 Fix Trying to clone an uncloneable object of class (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix Trying to clone an uncloneable object of class

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

Since `ext-redis: 5.3..3`, the `\Redis` class is not cloneable anymore (https://github.com/phpredis/phpredis/commit/cd05a344).
PHPUnit 7.5 (used byt PHP 7.1) clones objects provided by the dataprovier, when they are cloneable.
To check if an object is cloneable, it use the `Reflexion::isCloneable` method and check if the `__clone` method is public.

The issue is, the Class generated by `createMock` is cloneable, which leads to an exception such as:
> Trying to clone an uncloneable object of class Mock_Redis_b2f171b3

This PR fake replaces the mock by a real instance of the class.

Commits
-------

f67dab95e2 FIx Trying to clone an uncloneable object of class
2021-03-24 09:42:51 +01:00
Jérémy Derussé
f67dab95e2
FIx Trying to clone an uncloneable object of class 2021-03-24 09:30:27 +01:00
Nicolas Grekas
55637fb409 minor #40559 [travis] remove cache of composer.lock for deps=low (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[travis] remove cache of composer.lock for deps=low

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

Let's hope that Composer 2 made this fast enough. Maintaining this script might not be worth it anymore.

Reverts #28146

Commits
-------

9ba015d236 [travis] remove cache of composer.lock for deps=low
2021-03-23 22:05:01 +01:00
Nicolas Grekas
d158d22b5c minor #40560 [Filesystem] Fix comment with typo (sebpacz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem] Fix comment with typo

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

Commits
-------

96a05daf7e Fix comment with typo
2021-03-23 22:03:03 +01:00
Nicolas Grekas
9ba015d236 [travis] remove cache of composer.lock for deps=low 2021-03-23 21:57:14 +01:00
sebpacz
96a05daf7e Fix comment with typo 2021-03-23 21:55:00 +01:00
Nicolas Grekas
cdc1087943 minor #40558 [PhpUnitBridge] fix reported class when deprecated method is static (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] fix reported class when deprecated method is static

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

Commits
-------

aa80df609f fix reported class when deprecated method is static
2021-03-23 21:41:31 +01:00
Christian Flothmann
aa80df609f fix reported class when deprecated method is static 2021-03-23 21:33:06 +01:00
Nicolas Grekas
3d1c59ae7f minor #40557 [travis] use packagist API v2 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[travis] use packagist API v2

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

Commits
-------

af43ca080b [travis] use packagist API v2
2021-03-23 20:33:33 +01:00
Nicolas Grekas
af43ca080b [travis] use packagist API v2 2021-03-23 20:31:36 +01:00
Nicolas Grekas
1665555dd5 bug #40552 [Translation] Fix update existing key with existing +int-icu domain (Alexis)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] Fix update existing key with existing +int-icu domain

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

Using php-translation webui interface, I was trying to update an existing +int-icu domain but a regular domain was created and the existing key wasn't updated. Looks like in the method I modified, we should have been looking for a potential domain+intl-icu domain and try update it first

Commits
-------

2a196ca0dc [translation] Fix update existing key with existing +int-icu domain
2021-03-23 17:25:13 +01:00
Alexis
2a196ca0dc [translation] Fix update existing key with existing +int-icu domain 2021-03-23 17:25:01 +01:00
Robin Chalas
2c99518454 minor #40553 [Contracts] Fix branch name in README.md links (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Contracts] Fix branch name in README.md links

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

Commits
-------

c5c47f11a4 [Contracts] Fix branch name in README.md links
2021-03-23 17:08:21 +01:00
Robin Chalas
c5c47f11a4 [Contracts] Fix branch name in README.md links 2021-03-23 16:25:38 +01:00
Nicolas Grekas
9a8e2c2625 bug #40537 [Security] Handle properly 'auto' option for remember me cookie security (fliespl)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Handle properly 'auto' option for remember me cookie security

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

Manually setting remember_me cookie secure as auto is still is being set as secure one even if used over http.

This PR fixes this behaviour by converting auto to null prior setting it up for service.

Commits
-------

2bcf69c071 [Security] Handle properly 'auto' option for remember me cookie security
2021-03-23 13:31:44 +01:00