Commit Graph

47833 Commits

Author SHA1 Message Date
Fabien Potencier
d486f4ae45 minor #38187 [Form] Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR in BaseType (vladyslavstartsev)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR in BaseType

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

The purpose of this change is to find all usages of AbstractRendererEngine::CACHE_KEY_VAR. Currently, if you search for AbstractRendererEngine::CACHE_KEY_VAR you will see only access to it, i.e. (`$view->vars[AbstractRendererEngine::CACHE_KEY_VAR]`), but you can't find it in write level. With this pull request you can see where is was used for write.

Commits
-------

4fcb41c3ba Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR
2020-09-15 13:39:30 +02:00
Nicolas Grekas
13656916d1 minor #38191 [PhpUnitBridge] Fix error with ReflectionClass (sanmai)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix error with ReflectionClass

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

Introduced in #38094. Wish I know how I missed that.

Commits
-------

ed1bffeed7 [PhpUnitBridge] Fix error with ReflectionClass
2020-09-15 10:18:57 +02:00
SenTisso
d3f909bff3 [Console] work around disabled putenv() 2020-09-15 09:58:55 +02:00
Alexey Kopytko
ed1bffeed7
[PhpUnitBridge] Fix error with ReflectionClass 2020-09-15 16:51:47 +09:00
Nicolas Grekas
61c1175d05 bug #38173 [HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm (ybenhssaien)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm

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

If option is `auth_ntlm` an exception is thrown, `$alternatives` then is not used.

Commits
-------

ab1a96c999 [HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm
2020-09-15 09:11:04 +02:00
Youssef BENHSSAIEN
ab1a96c999 [HttpClient][HttpClientTrait] don't calculate alternatives if option is auth_ntlm 2020-09-15 09:10:35 +02:00
vladyslavstartsev
4fcb41c3ba
Change 'cache_key' to AbstractRendererEngine::CACHE_KEY_VAR
The purpose of this change is to find all usages of AbstractRendererEngine::CACHE_KEY_VAR. Currently, if you search for AbstractRendererEngine::CACHE_KEY_VAR you will see only access to it, i.e. (`$view->vars[AbstractRendererEngine::CACHE_KEY_VAR]`), but you can't find it in write level. With this pull request you can see where is was used for write.
2020-09-14 19:22:49 +03:00
Fabien Potencier
e368bb4517 minor #38186 [Messenger][minor ]Improve connection message readability (4.4) (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger][minor ]Improve connection message readability (4.4)

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

Same as #38185 but for 4.4.
I created 2 PR since bridges directory has moved in 5.1 (to ease merge)

Commits
-------

63bc620efa [Messenger] Improve error message readability
2020-09-14 17:00:55 +02:00
Laurent VOULLEMIER
63bc620efa [Messenger] Improve error message readability
Since slashes are escaped, vhosts are not very readable.
2020-09-14 16:48:28 +02:00
Fabien Potencier
ed3ab52fb7 minor #38103 Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3) (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3)

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

Our test suite on the 3.4 branch should be compatible with more recent versions of PHPUnit now. In order to make sure that it stays that way, I'm proposing to bump PHPUnit to 8.5 for the php 7.2 job and 9.3 for the php 7.3 and 7.4 jobs.

Commits
-------

ff47516ea0 Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3).
2020-09-14 09:43:32 +02:00
Alexander M. Turek
ff47516ea0 Upgrade PHPUnit to 8.5 (php 7.2) and 9.3 (php >= 7.3). 2020-09-14 08:11:19 +02:00
Fabien Potencier
cc8cee9111 minor #38172 [FrameworkBundle] fix filename being cleaned up at end of tests (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix filename being cleaned up at end of tests

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

Commits
-------

47a5a93e3e fix filename being cleaned up at end of tests
2020-09-13 15:38:16 +02:00
Christian Flothmann
47a5a93e3e fix filename being cleaned up at end of tests 2020-09-13 11:04:13 +02:00
Fabien Potencier
f2e7158bc0 Merge branch '3.4' into 4.4
* 3.4:
  [HttpFoundation] Skip the cookie_max_age fixture on PHP 8.
  add choice_translation_domain tests to prevent further regressions
  Update validators.tr.xlf
2020-09-13 07:00:26 +02:00
Fabien Potencier
71e80281fa minor #38163 [DoctrineBridge] add choice_translation_domain tests to prevent further regressions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DoctrineBridge] add choice_translation_domain tests to prevent further regressions

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #https://github.com/symfony/symfony/pull/37521#issuecomment-678247192
| License       | MIT
| Doc PR        |

Commits
-------

7775b3707b add choice_translation_domain tests to prevent further regressions
2020-09-13 06:55:19 +02:00
Fabien Potencier
efb255ce5c bug #38169 [PhpUnitBridge] Internal classes are not legacy (derrabus)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[PhpUnitBridge] Internal classes are not legacy

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

This change works around the issue that we can observe in the failed Travis build of #38103.

We must not call PHPUnit's internal `Test::getGroups()` method with a built-in class, otherwise we will run into a TypeError. This won't be fixed on PHPUnit's side, so we need to prevent that call. Our DeprecationErrorHander might run into this case if a deprecation is triggered while autoloading a class.

And forgive me, I've had a really hard time trying to craft a test case for that. 🙈

Commits
-------

7d55e0c065 Internal classes are not legacy.
2020-09-13 06:54:39 +02:00
Fabien Potencier
3825542c02 minor #38168 [HttpFoundation] Skip the cookie_max_age fixture on PHP 8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Skip the cookie_max_age fixture on PHP 8

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

This PR suggest to skip a certain integration test on php 8. The integration test in question triggers a warning by setting a way too high expiration date when calling `setcookie()`. Apparently, this warning has been upgraded to a fatal error on php 8.

Since the integration test is run in a separate process, we might as well adjust the expectation of that test case, but I don't really see the point in asserting fatal error behavior, to be honest.

Commits
-------

d6d9b2927d [HttpFoundation] Skip the cookie_max_age fixture on PHP 8.
2020-09-13 06:52:13 +02:00
Alexander M. Turek
7d55e0c065 Internal classes are not legacy. 2020-09-12 23:46:40 +02:00
Alexander M. Turek
d6d9b2927d [HttpFoundation] Skip the cookie_max_age fixture on PHP 8. 2020-09-12 22:41:00 +02:00
Christian Flothmann
7775b3707b add choice_translation_domain tests to prevent further regressions 2020-09-12 15:01:37 +02:00
Fabien Potencier
4b3015ff5f minor #38159 Update validators.tr.xlf (appaydin)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

Update validators.tr.xlf

Turkish Spelling error corrected.

| Q             | A
| ------------- | ---
| Branch?       | 4.4 5.1 <!-- 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       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
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.
-->

Commits
-------

f346eccb60 Update validators.tr.xlf
2020-09-11 17:36:44 +02:00
Ramazan
f346eccb60 Update validators.tr.xlf
Turkish Spelling error corrected.
2020-09-11 17:36:36 +02:00
Nicolas Grekas
25941ffe73 [Cache] fix previous PR 2020-09-11 13:46:01 +02:00
Nicolas Grekas
ac188871c2 bug #38156 [Cache] fix ProxyAdapter not persisting items with infinite expiration (dmaicher)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] fix ProxyAdapter not persisting items with infinite expiration

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

Commits
-------

d3af877022 [Cache] fix ProxyAdapter not persisting items with infinite expiration
2020-09-11 13:34:06 +02:00
Nicolas Grekas
77530a9b75 Merge remote-tracking branch 'origin/3.4' into 4.4
* origin/3.4:
  add mising sr (latn & cyrl) translations
  allow consumers to mock all methods
2020-09-11 13:33:24 +02:00
Fabien Potencier
899d60c24c minor #38157 [Validator] Add missing Serbian (sr_Latn & sr_Cyrl) translations (tambait)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing Serbian (sr_Latn & sr_Cyrl) translations

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| 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.
-->

Commits
-------

e927c7cf69 add mising sr (latn & cyrl) translations
2020-09-11 11:38:00 +02:00
ivan
e927c7cf69 add mising sr (latn & cyrl) translations 2020-09-11 11:15:49 +02:00
David Maicher
d3af877022 [Cache] fix ProxyAdapter not persisting items with infinite expiration 2020-09-11 11:01:32 +02:00
Nicolas Grekas
0383e53e5c bug #38148 [HttpClient] fail properly when the server replies with HTTP/0.9 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fail properly when the server replies with HTTP/0.9

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

Commits
-------

96759af1da [HttpClient] fail properly when the server replies with HTTP/0.9
2020-09-11 09:06:13 +02:00
Nicolas Grekas
96759af1da [HttpClient] fail properly when the server replies with HTTP/0.9 2020-09-11 08:30:42 +02:00
Fabien Potencier
1b5f996378 Fix CS 2020-09-11 07:50:30 +02:00
Fabien Potencier
0f704c947d bug #38131 [Validator] allow consumers to mock all methods (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] allow consumers to mock all methods

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

Commits
-------

3227303dab allow consumers to mock all methods
2020-09-10 19:02:04 +02:00
Fabien Potencier
44dd80f3fd bug #38139 [DI] dump OS-indepent paths in the compiled container (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] dump OS-indepent paths in the compiled container

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

This allows compiling on Windows and running on Linux (Docker).

Commits
-------

4dcf9e7d13 [DI] dump OS-indepent paths in the compiled container
2020-09-10 18:59:53 +02:00
Nicolas Grekas
e8dc35dc2d bug #38126 [Cache] Limit cache version character range (lstrojny)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Limit cache version character range

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

Follow up for https://github.com/symfony/symfony/pull/38108

With current HEAD in 4.4, this will fail eventually: `simple-phpunit --repeat 1000 --stop-on-failure --filter "testGetMultiple$" src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.php`

After this PR it will no longer fail

@nicolas-grekas

Commits
-------

15c21db856 [Cache] Limit cache version character range
2020-09-10 18:48:32 +02:00
Lars Strojny
15c21db856 [Cache] Limit cache version character range 2020-09-10 18:47:22 +02:00
Nicolas Grekas
b4d737f9c3 minor #38143 [FrameworkBundle] fix tests (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] fix tests

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

Commits
-------

34dbb4e118 fix tests
2020-09-10 15:21:18 +02:00
Christian Flothmann
34dbb4e118 fix tests 2020-09-10 15:17:34 +02:00
Fabien Potencier
cfec631620 bug #38142 [FrameworkBundle] adopt src/.preload.php (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] adopt src/.preload.php

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

The leading dot prevents PSR-4 discovery from considering the file.

Commits
-------

f4c47ebefa [FrameworkBundle] adopt src/.preload.php
2020-09-10 14:32:12 +02:00
Nicolas Grekas
f4c47ebefa [FrameworkBundle] adopt src/.preload.php 2020-09-10 14:29:02 +02:00
Nicolas Grekas
4dcf9e7d13 [DI] dump OS-indepent paths in the compiled container 2020-09-10 12:08:39 +02:00
Christian Flothmann
3227303dab allow consumers to mock all methods 2020-09-09 19:04:53 +02:00
Nicolas Grekas
afd4027c11 bug #38108 [Cache] Fix key encoding issue in Memcached adapter (lstrojny)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Fix key encoding issue in Memcached adapter

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | n.A.
| License       | MIT
| Doc PR        | Fix double encoding in memcached which lead to overlong keys being generated

Because the memcached adapter uses `rawurlencode()` to encode each and every key, keys will sometimes be too long and therefore hit the memcached limit of 250 bytes. This happens when the key is small enough to be below 250 when passed to `AbstractAdapterTrait::getId()` and is then blown up over the 250 bytes limit in memcached adapter without validating the length again.

Looking through the code, it seems that the double encoding is wholly unnecessary assuming if one makes sure the namespace is properly encoded. This PR therefore removes the double encoding and instead uses rawurlencode on the namespace (which is in turn properly accounted for when calculating whether or not we are over the ID limit).

Commits
-------

23bf9be8ce [Cache] Fix key encoding issue in Memcached adapter
2020-09-09 11:22:51 +02:00
Lars Strojny
23bf9be8ce [Cache] Fix key encoding issue in Memcached adapter 2020-09-09 11:22:35 +02:00
Nicolas Grekas
9bb80841ed bug #38122 [HttpClient] Fix Array to string conversion notice when parsing JSON error body with non-scalar detail property (emarref)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix Array to string conversion notice when parsing JSON error body with non-scalar detail property

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

An earlier commit added the ability to detect common API formats and extract a useful error message from the error response payload. To achieve this, if a `title` and `detail` property are found in the error response, the response is considered to be in a known format (RFC 7807) and these values are concatenated to form a helpful error message.

However, when either `title` or `detail` property are present, but the document is not intended to follow the RFC semantics, if the properties are not scalar (e.g. if the detail property is an array of field validation violations) then the concatenation of the strings causes a notice to be raised.

This pull request checks that the `title` and `detail` properties are scalar before attempting to concatenate them. If they are not, no enhanced error message is provided.

Commits
-------

76fa884319 [HttpClient] Fix Array to string conversion notice when parsing JSON error body with non-scalar detail property
2020-09-09 11:17:46 +02:00
Malcolm Fell
76fa884319 [HttpClient] Fix Array to string conversion notice when parsing JSON error body with non-scalar detail property 2020-09-09 11:17:34 +02:00
Christian Flothmann
0ed20be407 Merge branch '3.4' into 4.4
* 3.4:
  [Intl] promote warnings to value errors on PHP 8
  Fix CS
  DateTime validator support for trailing data
2020-09-09 10:00:22 +02:00
Christian Flothmann
81b954b753 minor #38120 [Intl] promote warnings to value errors on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] promote warnings to value errors on PHP 8

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

Commits
-------

82d9d41d57 [Intl] promote warnings to value errors on PHP 8
2020-09-09 09:59:57 +02:00
Christian Flothmann
82d9d41d57 [Intl] promote warnings to value errors on PHP 8 2020-09-09 09:45:25 +02:00
Fabien Potencier
799624b6f1 Fix CS 2020-09-09 07:35:36 +02:00
Fabien Potencier
1e52146339 bug #37097 DateTime validator support for trailing data (stefankleff)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

DateTime validator support for trailing data

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

Commits
-------

27f6e28f5b DateTime validator support for trailing data
2020-09-09 07:34:53 +02:00