Commit Graph

54321 Commits

Author SHA1 Message Date
Fabien Potencier 5463d8fa74
Merge pull request #42264 from fabpot/release-5.2.12
released v5.2.12
2021-07-26 18:41:43 +02:00
Fabien Potencier 83014d1344 Update VERSION for 5.2.12 2021-07-26 18:41:24 +02:00
Fabien Potencier 44c34b7201 Update CHANGELOG for 5.2.12 2021-07-26 18:41:13 +02:00
Fabien Potencier 34a5dafcee Merge branch '4.4' into 5.2
* 4.4:
  Add missing validators translation
  Improve usage of twig ternary
  skip test
2021-07-26 18:33:12 +02:00
Fabien Potencier 38bbe02be0 minor #42233 [Console] mark as skip test testTraversableMultiselectAutocomplete for Windows (a1812)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] mark as skip test testTraversableMultiselectAutocomplete for Windows

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

I think that in tests we need to adhere to one style, if we skip tests with "stty", then this one needs to be skipped or unchecked from all the others.

```cmd
C:\symfony>C:\php\7.1.3\php.exe C:\symfony\phpunit --color=never --bootstrap C:\symfony\vendor\autoload.php --configuration C:\symfony\phpunit.xml.dist src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
#!/usr/bin/env php
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

Testing Symfony\Component\Console\Tests\Helper\QuestionHelperTest
....SSSSSSSSSSSS..................................SSF             53 / 53 (100%)

Time: 912 ms, Memory: 8.00 MB

There was 1 failure:

1) Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testTraversableMultiselectAutocomplete
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => 'FooBundle'
+    0 => 'AcmeDemoBundle'
+    1 => 'AsseticBundle'
 )

C:\symfony\src\Symfony\Component\Console\Tests\Helper\QuestionHelperTest.php:864

FAILURES!
Tests: 53, Assertions: 72, Failures: 1, Skipped: 14.
`

Commits
-------

6272c4b007 skip test
2021-07-25 17:27:59 +02:00
Nyholm a5752e0905
minor #42252 [Validator] Added missing translations for Croatian (hr) (HypeMC)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Added missing translations for Croatian (hr)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41816
| 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.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

Commits
-------

e218a31565 Add missing validators translation
2021-07-24 23:06:18 -07:00
HypeMC e218a31565 Add missing validators translation 2021-07-25 00:44:19 +02:00
Fabien Potencier cccf5d112e minor #42010 Improve usage of twig ternary (Seb33300)
This PR was merged into the 4.4 branch.

Discussion
----------

Improve usage of twig ternary

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

Remove useless `else` condition when using twig ternary:

> `{{ foo ? 'yes' }}` is the same as `{{ foo ? 'yes' : '' }}`

See: https://twig.symfony.com/doc/3.x/templates.html#other-operators

Commits
-------

4be962d323 Improve usage of twig ternary
2021-07-24 11:09:34 +02:00
Sébastien ALFAIATE 4be962d323 Improve usage of twig ternary 2021-07-24 11:08:30 +02:00
Nicolas Grekas 74d99ae05d minor #42247 [5.2] Add missing ``@return`` annotations (nicolas-grekas)
This PR was merged into the 5.2 branch.

Discussion
----------

[5.2] Add missing ``@return`` annotations

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

Same as #42246 for 5.2

Commits
-------

7c10e093b8 [5.2] Add missing ``@return`` annotations
2021-07-23 17:55:19 +02:00
Nicolas Grekas 05dadd7694 Merge branch '4.4' into 5.2
* 4.4:
  [4.4] Add missing `@return` annotations
  Handle lock with long key
2021-07-23 17:54:19 +02:00
Nicolas Grekas a925325869 minor #42246 [4.4] Add missing ``@return`` annotations (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[4.4] Add missing ``@return`` annotations

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

These annotations are needed to notify that the return is going to change because a parent class/interface is already advertising that (eg using PHP 8.1's tentative return types).

We should add the `#[ReturnTypeWillChange]` attribute on many of those methods, but `DebugClassLoader` is not ready to do it yet.

Commits
-------

3c578b1794 [4.4] Add missing ``@return`` annotations
2021-07-23 17:52:51 +02:00
Nicolas Grekas 7c10e093b8 [5.2] Add missing `@return` annotations 2021-07-23 17:47:41 +02:00
Nicolas Grekas 3c578b1794 [4.4] Add missing `@return` annotations 2021-07-23 17:41:52 +02:00
Fabien Potencier a0d0c22a9e bug #42212 [Lock] Handle lock with long key (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Handle lock with long key

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

When lock key is very long, the generated file exceeded the maximum length supported by the system, leading to an exception
`fopen(/tmp/sf.username_xxxxxxxx[...].d3rUs2a.lock): Failed to open stream: File name too long`

Commits
-------

f82682424e Handle lock with long key
2021-07-23 08:00:10 +02:00
Jérémy Derussé f82682424e
Handle lock with long key 2021-07-22 11:11:37 +02:00
Roman Martinuk 6272c4b007 skip test 2021-07-22 11:29:31 +03:00
Nicolas Grekas db1cc9949f minor #42228 [Lock] recommend createIndex over ensureIndex (kralos)
This PR was merged into the 5.2 branch.

Discussion
----------

[Lock] recommend createIndex over ensureIndex

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no - kinda (phpdoc only fix)
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #42227
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15547

Updated PHPDoc to recommend using `createIndex` instead of `ensureIndex`. `ensureIndex` was deprecated in `mongodb 3.0.0` and removed in `mongodb 5.0.0`

Commits
-------

4f8d8ee85d #42227 update phpdoc to recommend createIndex over ensureIndex
2021-07-22 10:11:35 +02:00
Nicolas Grekas 20d1a07807 Merge branch '4.4' into 5.2
* 4.4:
  [ErrorHandler][Debug] Do not use the php80 polyfill
  #42229 update phpdoc to recommend createIndex over ensureIndex
2021-07-22 09:44:37 +02:00
Nicolas Grekas a7642f738a minor #42230 [HttpFoundation] update phpdoc to recommend createIndex over ensureIndex (kralos)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] update phpdoc to recommend createIndex over ensureIndex

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no - kinda (phpdoc only fix)
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #42229
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15548

Updated PHPDoc to recommend using `createIndex` instead of `ensureIndex`. `ensureIndex` was deprecated in `mongodb 3.0.0` and removed in `mongodb 5.0.0`

Commits
-------

05d8ca1046 #42229 update phpdoc to recommend createIndex over ensureIndex
2021-07-22 09:31:22 +02:00
Nicolas Grekas 8c8436535e bug #42223 [Debug][ErrorHandler] Do not use the php80 polyfill (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug][ErrorHandler] Do not use the php80 polyfill

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

Commits
-------

dd6bb2c367 [ErrorHandler][Debug] Do not use the php80 polyfill
2021-07-22 09:27:37 +02:00
Nicolas Grekas dd6bb2c367 [ErrorHandler][Debug] Do not use the php80 polyfill 2021-07-22 09:21:39 +02:00
Joe Bennett 05d8ca1046 #42229 update phpdoc to recommend createIndex over ensureIndex 2021-07-22 15:32:47 +10:00
Joe Bennett 4f8d8ee85d #42227 update phpdoc to recommend createIndex over ensureIndex 2021-07-22 15:27:45 +10:00
Nicolas Grekas 6a7273f3e2 Merge branch '4.4' into 5.2
* 4.4:
  Fix typo
2021-07-21 16:48:30 +02:00
Nicolas Grekas 855232fff0 Fix typo 2021-07-21 16:47:00 +02:00
Nicolas Grekas 4dd5f7bc75 Merge branch '4.4' into 5.2
* 4.4:
  hotfix
2021-07-21 15:21:32 +02:00
Nicolas Grekas a8324c86fa hotfix 2021-07-21 15:21:16 +02:00
Nicolas Grekas 5244d54a16 Merge branch '4.4' into 5.2
* 4.4:
  Fix usage of str_contains()
  fix intersection types in tests
2021-07-21 15:17:02 +02:00
Nicolas Grekas babb1fefef minor #42220 fix intersection types in tests (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

fix intersection types in tests

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

Commits
-------

e5d5e9967f fix intersection types in tests
2021-07-21 15:12:00 +02:00
Nicolas Grekas 86783dcc32 Fix usage of str_contains() 2021-07-21 15:10:57 +02:00
Tobias Schultze e5d5e9967f fix intersection types in tests 2021-07-21 15:02:15 +02:00
Nicolas Grekas 6d1f8c8c2b Merge branch '4.4' into 5.2
* 4.4:
  Leverage str_contains/str_starts_with
  Leverage str_ends_with
2021-07-21 14:38:00 +02:00
Nicolas Grekas c7dc7f8240 minor #41576 Leverage str_contains/str_starts_with (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Leverage str_contains/str_starts_with

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

I'd like to use `str_contains()` and `str_starts_with()` whenever possible. On PHP 8, this is a native function and for all earlier versions, we can maintain the most efficient way to perform those operations in the polyfill package. And apart from that, I find the new functions more intuitive than the `strpos()` expressions I'm replacing here.

All code changes in this PR were automated, see FriendsOfPHP/PHP-CS-Fixer#5754

Of course, this is more than just a CS change. If you don't feel comfortable merging this change into 4.4, I can easily redo the PR for 5.4.

Commits
-------

e585b26730 Leverage str_contains/str_starts_with
2021-07-21 14:20:00 +02:00
Alexander M. Turek e585b26730 Leverage str_contains/str_starts_with
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-21 14:19:41 +02:00
Nicolas Grekas a5675d3599 minor #41973 Leverage str_ends_with (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

Leverage str_ends_with

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

added the php80 polyfill to requirements when necessary. some components already had the requirement anyway.
Related to #41576

Commits
-------

9d807298be Leverage str_ends_with
2021-07-21 14:12:37 +02:00
Tobias Schultze 9d807298be Leverage str_ends_with
added the php80 polyfill to requirements when necessary
2021-07-21 13:57:04 +02:00
Nicolas Grekas 3d8feb86ed Merge branch '4.4' into 5.2
* 4.4:
  Fix intersection types on tests
  [Console] fix table setHeaderTitle without headers
2021-07-21 13:53:35 +02:00
Nicolas Grekas 29277c9dc4 minor #42216 Fix intersection types on tests (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix intersection types on tests

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

Commits
-------

8c11c16fda Fix intersection types on tests
2021-07-21 13:52:46 +02:00
Nicolas Grekas 8c11c16fda Fix intersection types on tests 2021-07-21 13:47:49 +02:00
Robin Chalas 24a993afb2
bug #42207 [Console] fix table setHeaderTitle without headers (a1812)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Console] fix table setHeaderTitle without headers

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

fix bug

Commits
-------

e4a0c5d556 [Console] fix table setHeaderTitle without headers
2021-07-21 12:02:32 +02:00
Roman Martinuk e4a0c5d556
[Console] fix table setHeaderTitle without headers 2021-07-21 12:02:26 +02:00
Nicolas Grekas f3763c8cc1 Merge branch '4.4' into 5.2
* 4.4:
  [Mailer] better handling of HttpClient's DecodingExceptionInterface
  phpdoc fixes
  Fixes missing translations for Dutch (nl)
  [Security][Validator] Add missing Persian translations (fa)
  [Mailer] Make sure Http TransportException is not leaking
  * wrong trans-unit ids
  [Translator] fix fallback to Locale::getDefault()
2021-07-21 11:14:20 +02:00
Nicolas Grekas 154f7e9839 [Mailer] better handling of HttpClient's DecodingExceptionInterface 2021-07-21 10:56:39 +02:00
Nicolas Grekas 2c3af6220d minor #42210 phpdoc fixes (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

phpdoc fixes

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

Commits
-------

e1730f411a phpdoc fixes
2021-07-21 10:40:59 +02:00
Nicolas Grekas e1730f411a phpdoc fixes 2021-07-21 10:35:38 +02:00
Fabien Potencier 45015b968d bug #42130 [Translation] fix fallback to Locale::getDefault() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] fix fallback to Locale::getDefault()

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

Replaces #42128 and #38230

Provides consistent behavior with `TranslatorTrait::getLocale()`.

Commits
-------

20120a3df4 [Translator] fix fallback to Locale::getDefault()
2021-07-20 15:59:03 +02:00
Fabien Potencier dd43b32018 minor #42189 Fixes missing translations for Dutch (nl) (rvanlaak)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Fixes missing translations for Dutch (nl)

| 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 -->
| Tickets       | Fix #41818 <!-- 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 -->

Fixes missing translations for Dutch (nl)

Related to #38710

The Fabbot check is a false-positive

Commits
-------

456bcdaaa0 Fixes missing translations for Dutch (nl)
2021-07-20 13:58:02 +02:00
Richard van Laak 456bcdaaa0 Fixes missing translations for Dutch (nl) 2021-07-20 13:57:58 +02:00
Nicolas Grekas 3413e230e2 bug #42184 [Mailer] Make sure Http TransportException is not leaking (Nyholm)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Make sure Http TransportException is not leaking

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

We dont want the mailer to throw exceptions from the http-client component. This will make sure to catch such exceptions and rethrow the proper HttpTransportException from the Mailer component.

Commits
-------

1681bc1cce [Mailer] Make sure Http TransportException is not leaking
2021-07-20 13:53:08 +02:00