This PR was merged into the 5.2-dev branch.
Discussion
----------
Bump Doctrine DBAL to 2.10+
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | n/a
Bump Doctrine DBAL to 2.10 and remove obsolete code.
Commits
-------
4fe2b4d1d5 Bump min Doctrine DBAL requirement to 2.10
This PR was merged into the 3.4 branch.
Discussion
----------
UploadedFile minor fixes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | none <!-- prefix each issue number with "Fix #", if any -->
| License | MIT
| Doc PR | no
According to the [constructor assignments](cb7e78c809/src/Symfony/Component/HttpFoundation/File/UploadedFile.php (L60)), properties `$originalName` and `$mimeType` are never null in `UploadedFile`, so `getClientOriginalName()` and `getClientMimeType()` always return `string`. Also `$test` does not need a default value because it's always set in the constructor.
Commits
-------
eb8d626c27 Properties $originalName and $mimeType are never null in UploadedFile
This PR was submitted for the master branch but it was merged into the 5.1 branch instead.
Discussion
----------
[Form] don't add the inputmode attribute on fields whose type is the same
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/pull/34986
| License | MIT
These is no need to add the `inputmode` attribute on fields whose `type` is the same.
From https://html.spec.whatwg.org/multipage/interaction.html#attr-inputmode
> When inputmode is unspecified (or is in a state not supported by the user agent), the user agent should determine the default virtual keyboard to be shown. Contextual information such as the input type or pattern attributes should be used to determine which type of virtual keyboard should be presented to the user.
From https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
> **tel**
> Inputs that *require* a telephone number should typically use `<input type="tel">` instead.
> **search**
> Inputs that *require* a search query should typically use `<input type="search">` instead.
> **email**
> Inputs that *require* email addresses should typically use `<input type="email">` instead.
As such there is no point in adding `inputmode` for those types.
Symfony’s `UrlType` uses `inputmode` **only** when the `type` has to be `text` because the `default_protocol` option is set.
Commits
-------
d933fa136f Revert https://github.com/symfony/symfony/pull/34986
This PR was submitted for the master branch but it was merged into the 5.1 branch instead.
Discussion
----------
[Validator] Make ExpressionLanguageSyntax validator usable with annotation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | NA
| License | MIT
| Doc PR | NA
When using the new on an entity ExpressionLanguageSyntax (basicaly copy/pasted the sample from https://symfony.com/blog/new-in-symfony-5-1-expressionlanguage-validator), I face a first error:
> Constraint validator "" does not exist or is not enabled. Check the "validatedBy" method in your constraint class "Symfony\Component\Validator\Constraints\ExpressionLanguageSyntax".
indeed, the `service` is [need to generate a valide alias](430b884570/src/Symfony/Component/Validator/Constraints/ExpressionLanguageSyntax.php (L38-L41))
Which looks weird for a Constraint
This PR makes the ExpressionLanguage dependency optionnal in `ExpressionLanguageSyntaxValidator`, and removes the `service` than is not needed anyore
Commits
-------
a010a87373 Make ExpressionLanguageSyntax validator usable with annotation
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Fix call to ReflectionProperty::getValue() for static properties
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
When we call `ReflectionProperty::getValue()` for a static property, we don't need to pass any arguments. The code that was fixed here raised a `TypeError` on php 8 because the argument has to be an object now.
Commits
-------
d4045897d6 [Intl] Fix call to ReflectionProperty::getValue() for static properties.
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Removed implicit cast of ReflectionProperty to string
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
PHP 8 does not allow casting `ReflectionProperty` instances to string anymore.
Commits
-------
8adbadede7 [Config] Removed implicit cast of ReflectionProperty to string.
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Undefined variables raise a warning in php 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
`ErrorHandlerTest` executes code with undefined variables to test how the error handler handles the triggered errors. In php 8.0, the severity and error message for this class of errors has been changed. I've adjusted the test accordingly.
Commits
-------
1d20b514f2 [Debug] Undefined variables raise a warning in php 8.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Prevent calling method_exists() with non-string values
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #36872
| License | MIT
| Doc PR | N/A
On php 8, `method_exists()` will raise a `TypeError` if the first argument is neither an object or string. We do have a test case that calls the `ControllerResolver` with integer `1` as `$controller`. This test should work as expected again on php 8.
Commits
-------
1bbfdcbb8d [HttpKernel] Prevent calling method_exists() with non-string values.
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] Fixed check for allowed options in AwsSqs configuration
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
Before this fix it was unavailable to create Connection with access_key and secret_key in options, because they were added to $clientConfiguration var, and check for extra options was against $configuration var. Which lead to exception.
The idea is to check input options against self::DEFAULT_OPTIONS (which contains all available options)
Commits
-------
fb1967210e [Messenger] Fixed check for allowed options in AwsSqs configuration
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] Add suggestion for Amazon SQS transport and make check more readable
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Copy-paste of https://github.com/symfony/symfony/pull/36890
Commits
-------
de7f3fceec [Messenger] Add suggestion for Amazon SQS transport and make check more readable
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Skip test that would trigger a fatal error 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 skips a test of `DebugClassLoader`. The test uses incompatible method signatures in class inheritance to provoke a php warning that should be handled by the debug class loader. On php 8 however, this error is not recoverable anymore, so the tested logic will be obsolete there.
Commits
-------
573d0dd493 [Debug] Skip test that would trigger a fatal error on php 8.
* 5.1:
[PhpUnitBridge] fix leftover
[PhpUnitBridge] fix installing under PHP >= 8
Use ">=" for the "php" requirement
bump icu 67.1
[DI] Remove preload primitive types
[Validator] Add missing translations of nn locale
[HttpKernel] Fix that the `Store` would not save responses with the X-Content-Digest header present
[Intl] bump icu 67.1
[Validator] allow passing a validator to Validation::createCallable()
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] fix installing under PHP >= 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
[As experimented on Twig](b952011f95), using `simple-phpunit` is not simple enough when testing with PHP 8.
This PR fixes the issue so that we could remove these lines in Twig.
On 3.4 since supporting new versions of PHP is a bugfix according to our policies.
Commits
-------
5aa25ceb41 [PhpUnitBridge] fix installing under PHP >= 8