Commit Graph

49397 Commits

Author SHA1 Message Date
Christian Flothmann 1d6d57d179 Add German expression language syntax constraint violation message 2021-07-16 14:15:14 +02:00
Christian Flothmann 290f76f867 minor #42152 fix LDAP command usage (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

fix LDAP command usage

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

Commits
-------

39c838c3ed fix LDAP command usage
2021-07-16 14:06:59 +02:00
Christian Flothmann 39c838c3ed fix LDAP command usage 2021-07-16 13:56:54 +02:00
Alexander M. Turek 76d41cd273 minor #42141 [Validator] Backport type fixes (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Backport type fixes

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

Backports from #42138.

Commits
-------

f9bb7ba074 [Validator] Backport type fixes
2021-07-15 23:35:37 +02:00
Alexander M. Turek f9bb7ba074 [Validator] Backport type fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-15 22:38:28 +02:00
Alexander M. Turek 6cd50ad0a0 bug #42112 [HttpFoundation] fix FileBag under PHP 8.1 (alexpott)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] fix FileBag under PHP 8.1

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

See https://php.watch/versions/8.1/$_FILES-full-path - in \Symfony\Component\HttpFoundation\FileBag::convertFileInformation() we check against a list of hardcoded keys. This logic breaks in PHP 8.1 because of the new key.

Commits
-------

dc3504989b [HttpFoundation] fix FileBag under PHP 8.1
2021-07-15 19:37:22 +02:00
Alex Pott dc3504989b [HttpFoundation] fix FileBag under PHP 8.1 2021-07-15 19:37:16 +02:00
Nicolas Grekas 6b2b7b983c bug #42131 [PhpUnitBridge] Fix composer resolution on Windows (Rainrider)
This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[PhpUnitBridge] Fix composer resolution on Windows

| Q             | A
| ------------- | ---
| Branch?       | 4.4 and next
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #42129
| License       | MIT
<!--
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
-->

This prepends the php executable to the resolved composer path even when `COMPOSER_BINARY` is set on Windows. Please see #42129 for description.

Commits
-------

746f83adbc Fix composer resolution on windows
2021-07-15 16:30:44 +02:00
Rainrider 746f83adbc Fix composer resolution on windows
Prepend the php executable to the resolved composer path
when `COMPOSER_BINARY` is set.
2021-07-15 16:30:38 +02:00
Alexander M. Turek a4992b01e8 minor #42132 [FrameworkBundle] Fix broken mock (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix broken mock

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

Backport from #42109. The mocked implementations of `getInheritData()` and `getName()` will currently return `null` which is something the real implementation would never do.

Commits
-------

6d2f428911 [FrameworkBundle] Fix broken mock
2021-07-15 16:09:11 +02:00
Alexander M. Turek 6d2f428911 [FrameworkBundle] Fix broken mock
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-15 15:09:03 +02:00
Alexander M. Turek f8b18ce90b minor #42110 [Form] Backport type fixes (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] 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

Backports from #42109

Commits
-------

289a7680ff [Form] Backport type fixes
2021-07-15 14:04:12 +02:00
Alexander M. Turek 289a7680ff [Form] Backport type fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-15 14:00:28 +02:00
Nicolas Grekas c9e4c33c0f bug #42097 [DependencyInjection] Support for intersection types (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Support for intersection types

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

Commits
-------

d28cf24258 [DependencyInjection] Support for intersection types
2021-07-15 13:47:34 +02:00
Nicolas Grekas 404a7cef24 minor #42113 [Finder] Fix iterator return types (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder] Fix iterator return types

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

This PR fixes deprecation warnings on PHP 8.1 related to missing return types of iterator implementations.

Commits
-------

2ede10d762 [Finder] Fix iterator return types
2021-07-15 13:43:23 +02:00
Alexander M. Turek 2ede10d762 [Finder] Fix iterator return types
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-15 12:39:41 +02:00
Nicolas Grekas b8cbb93caa [ErrorHandler] fix parsing `@return array<foo>` annotations 2021-07-15 11:09:11 +02:00
Nicolas Grekas 6c8114ad2a bug #42114 [HttpFoundation] Fix return types of SessionHandler::gc() (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Fix return types of SessionHandler::gc()

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

`SessionHandler::gc()` should return the number of garbage-collected sessions. We often return `true` which violates that contract.

Commits
-------

1261a4139d [HttpFoundation] Fix return types of SessionHandler::gc()
2021-07-15 10:23:19 +02:00
Nicolas Grekas b1fbd1b8f1 bug #42099 [VarDumper] Support for intersection types (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Support for intersection types

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

Commits
-------

3cf105766a [VarDumper] Support for intersection types
2021-07-15 09:45:25 +02:00
Alexander M. Turek 1261a4139d [HttpFoundation] Fix return types of SessionHandler::gc()
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-15 02:12:10 +02:00
Tobias Schultze e5c96c4051 bug #42011 [Cache] Support decorated Dbal drivers in PdoAdapter (Jeroeny)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Support decorated Dbal drivers in PdoAdapter

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

Doctrine v3 supports middleware for Drivers. Upon creating the Connection, `middleware->wrap(Driver): Driver` [is called](https://github.com/doctrine/dbal/blob/3.1.x/src/DriverManager.php#L210), in which the middleware can wrap/decorate the Driver class. So that it can perform tracing [for example](https://github.com/getsentry/sentry-symfony/blob/master/src/Tracing/Doctrine/DBAL/TracingDriverMiddleware.php#L37).

When this happens, the Driver class inside the Connection is no longer one of Doctrine's well known Driver classes. The `PdoAdapter ` uses this class to determine the database platform. Which breaks once the Driver is decorated and no longer one of the classes [listed](https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/Cache/Adapter/PdoAdapter.php#L452) in the `PdoAdapter`.

Since Dbal exposes this middleware as a feature, I think it would be nice for the `PdoAdapter` to support this.

To solve this, the `getDatabasePlatform` can be used. This returns a `Doctrine\DBAL\Platforms\AbstractPlatform` which defines the abstract method `getName`. This returns a value very similar to the list in the `PdoAdapter`. The names don't match exactly, so therefor a small mapping is done to get right the name used in the adapter. As far as a I know, there'd be no other implications with this change.

Related: https://github.com/getsentry/sentry-symfony/issues/530

Commits
-------

58d74e30be [Cache] Support decorated Dbal drivers in PdoAdapter
2021-07-14 22:18:05 +02:00
Jeroeny 58d74e30be [Cache] Support decorated Dbal drivers in PdoAdapter 2021-07-14 22:17:56 +02:00
Alexander M. Turek 93270312d8 minor #41995 [EventDispatcher] Declare return type of `getSubscribedEvents()` (Warxcell)
This PR was merged into the 4.4 branch.

Discussion
----------

[EventDispatcher] Declare return type of `getSubscribedEvents()`

Fixes

Method getSubscribedEvents() return type has no value type specified in iterable type array.
💡 See: https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type

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

Commits
-------

9ba0a9118a Declare returned type.
2021-07-14 18:34:33 +02:00
Alexander M. Turek d28cf24258 [DependencyInjection] Support for intersection types
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-14 18:24:03 +02:00
Alexander M. Turek b16891ea39 minor #42092 [Workflow] qa: add missing type-hints to workflow `Transition` (boesing)
This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Workflow] qa: add missing type-hints to workflow `Transition`

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

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

Hey there, I am using the `Workflow` component and realized that `Transition` lacks method type-hints. I've added a PHPDoc to reflect the return types.

If this is considered a bug fix, I can rebase against 5.3. If anything else is missing, please let me know.

Commits
-------

660037858f qa: add missing type-hints to workflow `Transition`
2021-07-14 17:19:28 +02:00
Maximilian Bösing 660037858f qa: add missing type-hints to workflow `Transition`
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-07-14 17:19:21 +02:00
Alexander M. Turek 3cf105766a [VarDumper] Support for intersection types
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-14 16:06:50 +02:00
Nicolas Grekas 3b21091cce fix tests 2021-07-13 13:42:35 +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 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
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 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 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
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
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