Commit Graph

54184 Commits

Author SHA1 Message Date
Nicolas Grekas
0cc054ce1d Merge branch '4.4' into 5.2
* 4.4:
  Fix tests
  Fix minor typos
  [WebProfilerBundle] Fix the values of some CSS properties
  [Yaml] Fixed an exception message
  Fix ctype_digit deprecation
  Add a Special Case for Translating Choices in en_US_POSIX
2021-07-13 12:03:28 +02:00
Nicolas Grekas
5e80445955 bug #42068 Add a Special Case for Translating Choices in en_US_POSIX (chrisguitarguy)
This PR was merged into the 4.4 branch.

Discussion
----------

Add a Special Case for Translating Choices in en_US_POSIX

| 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 -->
| Tickets       | Fix https://github.com/symfony/symfony/issues/42036 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a <!-- required for new features -->

This adds a special case similar to `pt_BR` for handling `en_US_POSIX`
which is set as the default locale on some operating systems.

~Two tests here might be over the top, not sure.~

Not over the top! One of them caught the same issue in the translation component itself 🎉

Commits
-------

f0bb7a36c5 Add a Special Case for Translating Choices in en_US_POSIX
2021-07-13 12:01:39 +02:00
Nicolas Grekas
19fdcbaab5 bug #42074 Fix ctype_digit deprecation (alexpott)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix ctype_digit deprecation

| 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 -->
| 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 -->

Running the Yaml unit tests on PHP 8.1 built: Jul 12 2021 00:22:13 results in the following PHP Notices:
```
Testing /Users/alex/dev/symfony/src/Symfony/Component/Yaml/Tests
...............................................................  63 / 689 (  9%)
............................................................... 126 / 689 ( 18%)
............................................................... 189 / 689 ( 27%)
............................................................... 252 / 689 ( 36%)
............................................................... 315 / 689 ( 45%)
............................................................... 378 / 689 ( 54%)
............................................................... 441 / 689 ( 64%)
............................................................... 504 / 689 ( 73%)
............................................................... 567 / 689 ( 82%)
............................................................... 630 / 689 ( 91%)
...........................................................     689 / 689 (100%)

Time: 00:00.336, Memory: 20.00 MB

OK (689 tests, 984 assertions)

Unsilenced deprecation notices (131)

  109x: ctype_digit(): Argument of type int will be interpreted as string in the future
    53x in DumperTest::testSpecifications from Symfony\Component\Yaml\Tests
    21x in DumperTest::testInlineLevel from Symfony\Component\Yaml\Tests
    16x in InlineTest::testDump from Symfony\Component\Yaml\Tests
    7x in DumperTest::testDumpingArrayObjectInstancesWithNumericKeysInlined from Symfony\Component\Yaml\Tests
    7x in DumperTest::testDumpingArrayObjectInstancesWithNumericKeysRespectsInlineLevel from Symfony\Component\Yaml\Tests
    3x in DumperTest::testIndentationInConstructor from Symfony\Component\Yaml\Tests
    1x in DumperTest::testObjectSupportEnabled from Symfony\Component\Yaml\Tests
    1x in DumperTest::testObjectSupportDisabledButNoExceptions from Symfony\Component\Yaml\Tests

  22x: ctype_digit(): Argument of type float will be interpreted as string in the future
    15x in DumperTest::testSpecifications from Symfony\Component\Yaml\Tests
    6x in InlineTest::testDump from Symfony\Component\Yaml\Tests
    1x in InlineTest::testDumpNumericValueWithLocale from Symfony\Component\Yaml\Tests
```

Commits
-------

5c57324117 Fix ctype_digit deprecation
2021-07-13 11:59:24 +02:00
Nicolas Grekas
0a288bdcc6 minor #42080 [Yaml] Fixed an exception message (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] Fixed an exception message

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

I'd prefer to group tiny fixes like this in a single PR, but they are for different branches.

Commits
-------

7036f2f561 [Yaml] Fixed an exception message
2021-07-13 11:58:53 +02:00
Nicolas Grekas
7269a915f5 bug #42084 [WebProfilerBundle] Fix the values of some CSS properties (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Fix the values of some CSS properties

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

You can check the valid values of these properties at:

* https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
* https://developer.mozilla.org/en-US/docs/Web/CSS/min-height

Commits
-------

e335c28d44 [WebProfilerBundle] Fix the values of some CSS properties
2021-07-13 11:57:06 +02:00
Nicolas Grekas
02c30eac47 minor #42085 Fix minor typos (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix minor typos

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

Commits
-------

bed9cd9176 Fix minor typos
2021-07-13 11:56:25 +02:00
Nicolas Grekas
becf11aa14 Fix tests 2021-07-13 11:55:30 +02:00
Javier Eguiluz
bed9cd9176 Fix minor typos 2021-07-13 11:47:43 +02:00
Nicolas Grekas
8c75b86a0c Merge branch '4.4' into 5.2
* 4.4:
  [Contracts] Add missing `@return` annotations
  [FrameworkBundle] Fixed file operations in Sodium vault seal
2021-07-13 11:34:55 +02:00
Nicolas Grekas
bafecf2b49 [Contracts] Add missing @return annotations 2021-07-13 11:33:53 +02:00
Javier Eguiluz
e335c28d44 [WebProfilerBundle] Fix the values of some CSS properties 2021-07-13 11:24:46 +02:00
Javier Eguiluz
7036f2f561
[Yaml] Fixed an exception message 2021-07-13 10:50:48 +02:00
Robin Chalas
a0496bd748
bug #42079 [FrameworkBundle] Fixed file operations in Sodium vault seal (javiereguiluz)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fixed file operations in Sodium vault seal

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

Commits
-------

e31f8c52db [FrameworkBundle] Fixed file operations in Sodium vault seal
2021-07-13 10:02:45 +02:00
Javier Eguiluz
e31f8c52db [FrameworkBundle] Fixed file operations in Sodium vault seal 2021-07-13 09:55:49 +02:00
Robin Chalas
6c2649961b
bug #42067 [Messenger] [Redis] Make auth option works (welcoMattic)
This PR was submitted for the 5.3 branch but it was squashed and merged into the 5.2 branch instead.

Discussion
----------

[Messenger] [Redis] Make `auth` option works

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

Considering this configuration:

```yaml
framework:
    messenger:
        transports:
            queue:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    stream: 'cms'
                    delete_after_ack: false
                    auth: 'pa$$word'
                    serializer: !php/const Redis::SERIALIZER_JSON
```

It results to this error:

```
In Connection.php line 510:

  NOAUTH Authentication required.
```

Because the `auth` option was never read from the options, only from the parsed DSN.

This fix allows users to use `auth` option from the configuration.

I target 5.3, as 5.2 is going to be unmaintained at the end of July

Commits
-------

7dfdd383c9 [Messenger] [Redis] Make `auth` option works
2021-07-13 09:25:01 +02:00
Mathieu Santostefano
7dfdd383c9
[Messenger] [Redis] Make auth option works 2021-07-13 09:24:55 +02:00
Alex Pott
5c57324117
Fix ctype_digit deprecation 2021-07-12 21:04:52 +01:00
Christopher Davis
f0bb7a36c5 Add a Special Case for Translating Choices in en_US_POSIX
See https://github.com/symfony/symfony/issues/42036

This adds a special case similar to `pt_BR` for handling `en_US_POSIX`
which is set as the default locale on some operating systems (Alpine
Linux, for instance).
2021-07-12 09:42:27 -05:00
Nicolas Grekas
da1a33e4b5 minor #41650 [FrameworkBundle] Make AbstractDataCollector extend DataCollector to reduce boilerplate (IonBazan)
This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] Make AbstractDataCollector extend DataCollector to reduce boilerplate

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  |  no
| Deprecations? | no
| Tickets       | Partially fixes #41577 (part 1)
| License       | MIT

This PR makes `AbstractDataCollector` extend the base `DataCollector` in order to make it even easier to create the data collectors. Currently, developers must implement `__sleep()`, `__wakeup()`, `cloneVar()` etc on their own if they want to use `AbstractDataCollector` instead of the good old `DataCollector` which makes the "boilerplate" even bigger than just adding the `getName()`, `reset()` and `getTemplate()`, making this class less useful than the old one.

Commits
-------

c8ec05d424 make AbstractDataCollector extend DataCollector to reduce boilerplate
2021-07-12 14:57:48 +02:00
Nicolas Grekas
17b0187fab Merge branch '4.4' into 5.2
* 4.4:
  [DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively
  do not render the same label id attribute twice
2021-07-12 14:57:05 +02:00
Nicolas Grekas
7253299169 bug #42054 [DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively

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

This PR fixes a DX issue with the default recipe: right now, the mapping type has to be explicitly defined. This forces [the default recipe](https://github.com/symfony/recipes/blob/master/doctrine/doctrine-bundle/2.4/config/packages/doctrine.yaml#L15) to stick to "annotation", while the world is moving to "attribute".

Commits
-------

f06f85fbd8 [DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively
2021-07-12 14:50:16 +02:00
Nicolas Grekas
d432821bf6 minor #42065 [Messenger] clarify RedisStore::evaluate() (nicolas-grekas)
This PR was merged into the 5.2 branch.

Discussion
----------

[Messenger] clarify RedisStore::evaluate()

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

Commits
-------

450d33ff3b [Cache] clarify RedisStore::evaluate()
2021-07-12 14:35:28 +02:00
Nicolas Grekas
450d33ff3b [Cache] clarify RedisStore::evaluate() 2021-07-12 12:42:37 +02:00
Nicolas Grekas
18646891a3 bug #42059 [Messenger] Fixed BC layer for RedeliveryStamp (Nyholm)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Messenger] Fixed BC layer for RedeliveryStamp

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | Related to https://github.com/symfony/symfony/pull/41319#discussion_r640725265
| License       | MIT
| Doc PR        | n/a

In Symfony 6, the second argument to RedeliveryStamp's constructor will be a DateTimeInterface. We should already allow people to instantiate this object with the Symfony 6 way.

Commits
-------

ac3c4d7429 [Messenger] Fixed BC layer for RedeliveryStamp
2021-07-11 20:11:46 +02:00
Nyholm
ac3c4d7429 [Messenger] Fixed BC layer for RedeliveryStamp 2021-07-11 20:11:25 +02:00
Nicolas Grekas
f06f85fbd8 [DoctrineBridge] fix setting default mapping type to attribute/annotation on php 8/7 respectively 2021-07-11 11:02:49 +02:00
Fabien Potencier
7385bc88d4 bug #42049 [TwigBridge] do not render the same label id attribute twice (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] do not render the same label id attribute twice

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

Commits
-------

ceee81e33d do not render the same label id attribute twice
2021-07-10 18:05:06 +02:00
Christian Flothmann
ceee81e33d do not render the same label id attribute twice 2021-07-10 14:16:00 +02:00
Christian Flothmann
79cd966525 Merge branch '4.4' into 5.2
* 4.4:
  clean up remaining event mocks
2021-07-10 10:55:45 +02:00
Nicolas Grekas
fa182e613a minor #42047 clean up remaining event mocks (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

clean up remaining event mocks

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

Commits
-------

f09bd17ba1 clean up remaining event mocks
2021-07-10 10:50:50 +02:00
Christian Flothmann
f09bd17ba1 clean up remaining event mocks 2021-07-10 10:41:57 +02:00
Christian Flothmann
3e148e843c Merge branch '4.4' into 5.2
* 4.4:
  do not mock the Request class
  do not mock event classes
  recover from failed deserializations
  [ErrorHandle] Remove a link from the exception page
  [Validator] Added Ukrainian translations
  [GHA] Clarify some bits in the deps=high script
2021-07-10 10:11:29 +02:00
Nicolas Grekas
120f3d6a73 minor #42043 do not mock the Request class (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

do not mock the Request class

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

Commits
-------

968809c2f1 do not mock the Request class
2021-07-09 17:04:35 +02:00
Christian Flothmann
968809c2f1 do not mock the Request class 2021-07-09 16:49:07 +02:00
Nicolas Grekas
068429ed3c bug #42032 [HttpKernel] recover from failed deserializations (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] recover from failed deserializations

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

Commits
-------

d10b3a63e5 recover from failed deserializations
2021-07-09 15:41:39 +02:00
Nicolas Grekas
305e2105cc minor #42040 do not mock event classes (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

do not mock event classes

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

Commits
-------

8da1969afc do not mock event classes
2021-07-09 15:36:43 +02:00
Christian Flothmann
8da1969afc do not mock event classes 2021-07-09 13:17:08 +02:00
Titouan Galopin
9fdc06bf72 bug #42035 [Messenger] Fix use_notify default value for PostgreSqlConnection (tgalopin)
This PR was merged into the 5.2 branch.

Discussion
----------

[Messenger] Fix use_notify default value for PostgreSqlConnection

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

I tried to use the use_notify in my DSN with Doctrine and stumbled upon an error. I investigated and from what I see, the option isn't allowed in a DSN due to this line missing in the PostgreSqlConnection class.

Commits
-------

b2aad4f666 Fix use_notify default value for PostgreSqlConnection
2021-07-09 10:41:40 +02:00
Titouan Galopin
b2aad4f666
Fix use_notify default value for PostgreSqlConnection 2021-07-08 19:33:14 +02:00
Christian Flothmann
d10b3a63e5 recover from failed deserializations 2021-07-08 13:32:35 +02:00
Fabien Potencier
09814d5548 minor #42007 [GHA] Clarify some bits in the deps=high script (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[GHA] Clarify some bits in the deps=high script

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

I had some difficulty understanding how flipped tests worked. Luckily, `@nicolas`-grekas was available to answer some questions. However, I'm sure that I've forgotten the logic in about a week time, so I think it's worth clarifying the code a bit (but feel free to close if it's just me).

Commits
-------

ff08dcaca6 [GHA] Clarify some bits in the deps=high script
2021-07-08 11:16:39 +02:00
Fabien Potencier
57e3c5f9dc minor #42028 [ErrorHandle] Remove a link from the exception page (javiereguiluz)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[ErrorHandle] Remove a link from the exception page

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

This link is causing lots of confusion to some people, who think that we provide free support for open source Symfony projects. That's why we've decided to remove this link. Thanks!

Commits
-------

387254ff5a [ErrorHandle] Remove a link from the exception page
2021-07-08 11:10:22 +02:00
Javier Eguiluz
387254ff5a [ErrorHandle] Remove a link from the exception page 2021-07-08 11:10:16 +02:00
Fabien Potencier
92a086c31c minor #42027 [Validator] Added Ukrainian translations (andrii-bodnar)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Added Ukrainian translations

| 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       | Fix #41838 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

Added some missing Ukrainian translations.

Commits
-------

b3c28ca02c [Validator] Added Ukrainian translations
2021-07-08 10:35:09 +02:00
Andrii Bodnar
b3c28ca02c [Validator] Added Ukrainian translations 2021-07-08 11:30:06 +03:00
Alexander M. Turek
3804ad3fd5 Merge branch '4.4' into 5.2
* 4.4:
  [DomCrawler] Backport type fixes
2021-07-07 19:13:48 +01:00
Alexander M. Turek
38cb35ab07 minor #42018 [DomCrawler] Backport type fixes (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DomCrawler] Backport type fixes

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

Discovered while working on #41981.

Commits
-------

6996988fe5 [DomCrawler] Backport type fixes
2021-07-07 19:13:11 +01:00
Alexander M. Turek
6996988fe5 [DomCrawler] Backport type fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-07 16:41:18 +01:00
Nicolas Grekas
ed71ab1890 Merge branch '4.4' into 5.2
* 4.4:
  [ExpressionLanguage] Fix test case
2021-07-07 15:22:12 +02:00
Nicolas Grekas
45411891f2 [ExpressionLanguage] Fix test case 2021-07-07 15:22:05 +02:00