Commit Graph

38556 Commits

Author SHA1 Message Date
Fabien Potencier
a3c460fdcb minor #37004 [Form] Update Hungarian translations (1ed)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Update Hungarian translations

| Q             | A
| ------------- | ---
| Branch?       |  3.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        | -
<!--
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
-------

1614595424 Update Hungarian translations
2020-05-30 09:18:49 +02:00
Robin Chalas
5d93b61278 [Console] Fix QuestionHelper::disableStty() 2020-05-29 16:49:42 +02:00
Christian Flothmann
b819d94d14 validate subforms in all validation groups 2020-05-29 11:57:12 +02:00
Gábor Egyed
1614595424
Update Hungarian translations 2020-05-29 09:47:21 +02:00
Fabien Potencier
b7cd22cbc0 bug #37000 Add meaningful message when using ProcessHelper and Process is not installed (l-vo)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

Add meaningful message when using ProcessHelper and Process is not installed

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

When using the process helper without the `Process` component, a php fatal error is triggered (`PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Process\Process' not found`). This PR adds a meaningful exception; allowing to display a console error message instead of a raw php fatal error.

Commits
-------

3ab76e40ff Add meaningful message when Process is not installed (ProcessHelper)
2020-05-29 05:22:53 +02:00
Laurent VOULLEMIER
3ab76e40ff Add meaningful message when Process is not installed (ProcessHelper) 2020-05-29 05:22:46 +02:00
Alexander M. Turek
03b4e98630 [PropertyAccess] Fix TypeError parsing again. 2020-05-29 02:04:36 +02:00
Fabien Potencier
03cad5a750 minor #36980 [Form] add missing Czech validators translation (mhujer)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] add missing Czech validators translation

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

Commits
-------

afdda5d764 [Form] add missing Czech validators translation
2020-05-28 21:20:09 +02:00
Martin Hujer
afdda5d764 [Form] add missing Czech validators translation 2020-05-28 10:39:10 +02:00
Fabien Potencier
8861ee18a2 minor #36979 [Validator] Add missing translations for cs locale (Czech) (mhujer)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add missing translations for cs locale (Czech)

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

Is it enough to submit this only against 3.4 to have it included also in 5.1 version?

Commits
-------

3d18c1c185 [Validator] add missing Czech translations
2020-05-28 10:15:44 +02:00
Nicolas Grekas
e1e314d257 bug #36987 Handle fetch mode deprecation of DBAL 2.11. (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Handle fetch mode deprecation of DBAL 2.11.

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

See doctrine/dbal#4019

DBAL has deprecated PDO-style fetch modes in favor of more explicit methods.

Commits
-------

ed518551e1 Handle fetch mode deprecation of DBAL 2.11.
2020-05-28 10:12:42 +02:00
Alexander M. Turek
ed518551e1 Handle fetch mode deprecation of DBAL 2.11. 2020-05-28 09:55:04 +02:00
Martin Hujer
3d18c1c185 [Validator] add missing Czech translations 2020-05-27 12:08:15 +02:00
Robin Chalas
ce61bb0750 bug #36974 [Security] Fixed handling of CSRF logout error (wouterj)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Fixed handling of CSRF logout error

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

8 years ago, a typo was made while refactoring the `ExceptionListener`, loosing this logic (46071f3238). I think we should fix it.

The `LogoutException` is a very generic name for something only used when the CSRF token is invalid. Should we match the exception message to make sure only this CSRF error is transformed into 403? I didn't yet do it because any usage of `LogoutException` would have resulted in 500, which always is worse than 403.

Commits
-------

50348f2eb7 Fixed handling of CSRF logout error
2020-05-26 17:59:18 +02:00
Wouter de Jong
50348f2eb7 Fixed handling of CSRF logout error 2020-05-26 17:30:38 +02:00
Fabien Potencier
4f40da5809 minor #36946 [FrameworkBundle] Removed detection of Serializer < 3.2 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Removed detection of Serializer < 3.2

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

The test that is changed here contains detection logic for Serializer versions prior 3.2. However, accoring to FrameworkBundle's composer.json, we need at least Serializer 3.3, so that logic is obsolete.

I came across this piece of code because on the 5.1 branch, this test is actually skipped because the `use` statement for `CacheClassMetadataFactory` is missing there.

Commits
-------

9badd71687 [FrameworkBundle] Removed detection of Serializer < 3.2
2020-05-25 08:17:20 +02:00
Fabien Potencier
b6c43b6c72 minor #36942 Update pull request template for 5.1 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Update pull request template for 5.1

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

Commits
-------

d4b598c789 Update pull request template for 5.1.
2020-05-25 08:16:18 +02:00
Alexander M. Turek
9badd71687 [FrameworkBundle] Removed detection of Serializer < 3.2 2020-05-24 17:32:05 +02:00
Alexander M. Turek
d4b598c789
Update pull request template for 5.1. 2020-05-24 14:21:57 +02:00
Nicolas Grekas
c08d8d116c minor #36934 [travis] display deprecations in nightly jobs (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[travis] display deprecations in nightly jobs

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

Commits
-------

83a34a84ab [travis] display deprecations in nightly jobs
2020-05-24 10:57:17 +02:00
Nicolas Grekas
83a34a84ab [travis] display deprecations in nightly jobs 2020-05-24 10:55:27 +02:00
Nicolas Grekas
acbaf0020f minor #36932 Enable APCu for the php 8 build (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Enable APCu for the php 8 build

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

This PR enables APCu for the php 8 build on Travis.

Since the latest version release on PECL produces a lot of runtime warnings, I'm pulling the latest master commit from github.

Commits
-------

e3e1558a0b Enable APCu for the php 8 build.
2020-05-23 23:40:17 +02:00
Alexander M. Turek
e3e1558a0b Enable APCu for the php 8 build. 2020-05-23 23:26:28 +02:00
Nicolas Grekas
5ebcd26f06 [HttpKernel] fix test 2020-05-23 19:37:50 +02:00
Nicolas Grekas
d6902039c4 minor #36930 Make PHP 8 green on Travis (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Make PHP 8 green on Travis

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

See #36872 for preparatory work and remaining steps.

Commits
-------

571d46cf01 Make PHP 8 green on Travis
2020-05-23 19:17:25 +02:00
Nicolas Grekas
571d46cf01 Make PHP 8 green on Travis 2020-05-23 19:05:51 +02:00
Nicolas Grekas
896b69c907 Revert "[Cache] allow DBAL v3"
This reverts commit d12b3b6a72.
2020-05-23 18:25:19 +02:00
Nicolas Grekas
ca695e55e8 [Serializer] minor cleanup 2020-05-23 14:46:57 +02:00
Nicolas Grekas
232725243b Run PHP 8 as 7.4.99 2020-05-23 14:14:15 +02:00
Nicolas Grekas
c4ac3c19c6 bug #36920 [VarDumper] fix PHP 8 support (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix PHP 8 support

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

/cc @derrabus FYI

Commits
-------

9bc1ab62cf [VarDumper] fix PHP 8 support
2020-05-23 14:06:05 +02:00
Nicolas Grekas
9bc1ab62cf [VarDumper] fix PHP 8 support 2020-05-23 14:00:17 +02:00
Nicolas Grekas
6e368f136f bug #36917 [Cache] Accessing undefined constants raises an Error in php8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Accessing undefined constants raises an Error in php8

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

Calling `constant()` for an undefined constant will raise an `Error` on php 8. This PR adjust the Memcached tests to this new behavior.

Commits
-------

49fd0efb12 [Cache] Accessing undefined constants raises an Error in php8
2020-05-23 13:35:31 +02:00
Nicolas Grekas
ee9aa2d568 minor #36919 Add php 8 to travis (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Add php 8 to travis

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

This PR adds an extra php 8 job to travis that is allowed to fail. This will allow us to monitor the remaining work.

* I did not include APCu because loading the extension would clutter our log with warnings. We might fix this by compiling APCu from master though.
* I did not manage to compile `ext-redis` and `ext-mongodb`.
* But hey, `ext-memcached` works!

Commits
-------

08084f370d Add php 8 to travis.
2020-05-23 13:31:06 +02:00
Alexander M. Turek
08084f370d Add php 8 to travis. 2020-05-23 12:01:17 +02:00
Alexander M. Turek
49fd0efb12 [Cache] Accessing undefined constants raises an Error in php8 2020-05-23 11:57:43 +02:00
Nicolas Grekas
d12b3b6a72 [Cache] allow DBAL v3 2020-05-23 11:12:58 +02:00
Nicolas Grekas
2799d559f3 minor #36895 Skip Doctrine DBAL on php 8 until we have a compatible version (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Skip Doctrine DBAL on php 8 until we have a compatible version

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

This PR skips all tests on php 8 that would trigger an autoload on DBAL's `PDOConnection`. Those tests would exit with a fatal error because of incompatible method signatures (see doctrine/dbal#3791) and until we can test against a compatible version of DBAL, there's (at least from my point of view) nothing we can do about it. Once this issue is resolved, we can revert this change.

Commits
-------

1090738264 Skip Doctrine DBAL on php 8 until we have a compatible version.
2020-05-23 10:29:15 +02:00
Alexander M. Turek
1090738264 Skip Doctrine DBAL on php 8 until we have a compatible version. 2020-05-23 10:20:35 +02:00
Nicolas Grekas
410b6214ea bug #36891 Address deprecation of ReflectionType::getClass() (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Address deprecation of ReflectionType::getClass()

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

Calling `ReflectionType::getClass()` will trigger a deprecation warning on php 8. This PR switches to `getType()` if available.

Commits
-------

53b1677a4e Address deprecation of ReflectionType::getClass().
2020-05-23 09:35:15 +02:00
Nicolas Grekas
fb91dc24eb bug #36899 [VarDumper] ReflectionFunction::isDisabled() is deprecated (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] ReflectionFunction::isDisabled() is deprecated

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

See php/php-src#5473. Calling `ReflectionFunction::isDisabled()` is pointless on php 8 and doing so triggers a deprecation warning.

Someone who is more familiar with that component might want to have a second look on this PR. I'm not really sure if this is the right way to fix the issue.

Commits
-------

1da347e5ba [VarDumper] ReflectionFunction::isDisabled() is deprecated.
2020-05-23 09:34:32 +02:00
Nicolas Grekas
42692d625d bug #36905 [Validator] Catch expected ValueError (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Catch expected ValueError

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

`mb_check_encoding()` raises a `ValueError` on php 8 if an invalid encoding was passed. The validator that was patched here is expected to fail gracefully in that situation. This PR restores that behavior under php 8.

Maybe we can reconsider this behavior for Symfony 5.2. It feels a bit odd to me because we swallow a potential misconfiguration of the validator.

Commits
-------

8f3f67f82a [Validator] Catch expected ValueError.
2020-05-23 09:32:18 +02:00
Nicolas Grekas
475a715ca8 bug #36906 [DomCrawler] Catch expected ValueError (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[DomCrawler] Catch expected ValueError

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

`mb_convert_encoding()` raises a `ValueError` on php 8 if an unknown character set is passed. This causes trouble with the whole test suite because the temporary error handler is not deregistered in that case.

Since the previously raised warning was actively ignored by that error handler, I'm now ignoring the `ValueError` as well. Also, I've wrapped the `restore_error_handler()` call into a `finally` statement to make the whole construct a bit more robust.

Commits
-------

b1db13728b [DomCrawler] Catch expected ValueError.
2020-05-23 09:10:53 +02:00
Alexander M. Turek
b1db13728b [DomCrawler] Catch expected ValueError. 2020-05-22 21:35:43 +02:00
Alexander M. Turek
8f3f67f82a [Validator] Catch expected ValueError. 2020-05-22 20:52:50 +02:00
Alexander M. Turek
1da347e5ba [VarDumper] ReflectionFunction::isDisabled() is deprecated. 2020-05-22 20:50:36 +02:00
Nicolas Grekas
e220e7cc01 bug #36904 [PropertyAccess] Parse php 8 TypeErrors correctly (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyAccess] Parse php 8 TypeErrors correctly

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

The wording of `TypeError` messages has changed in php 8. Since `PropertyAccessor` parses those messages, the logic needed some adjustments.

Commits
-------

7100c3ce1b [PropertyAccess] Parse php 8 TypeErrors correctly.
2020-05-22 20:33:39 +02:00
Nicolas Grekas
4e191688fe minor #36898 [Debug] php 8 does not pass $context to error handlers (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] php 8 does not pass $context to error handlers

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

php 8 will call error handlers without the optional `$context` parameter. Thus, error handlers that make that parameter mandatory will break.

Commits
-------

593897c9e1 [Debug] php 8 does not pass $context to error handlers.
2020-05-22 20:25:20 +02:00
Fabien Potencier
2468314e94 minor #36837 UploadedFile minor fixes (vudaltsov)
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
2020-05-22 19:19:03 +02:00
Fabien Potencier
14ffc0231f minor #36902 [Intl] Fix call to ReflectionProperty::getValue() for static properties (derrabus)
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.
2020-05-22 19:06:23 +02:00
Fabien Potencier
77a826c8b7 bug #36896 [Config] Removed implicit cast of ReflectionProperty to string (derrabus)
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.
2020-05-22 19:04:16 +02:00