Commit Graph

38556 Commits

Author SHA1 Message Date
Nicolas Grekas 13982b5809 minor #37516 [Cache] Fix compat wth DBAL v3 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Fix compat wth DBAL v3

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

Follows https://github.com/doctrine/dbal/pull/4152

Commits
-------

d08524330a [Cache] Fix compat wth DBAL v3
2020-07-08 09:44:11 +02:00
Nicolas Grekas d08524330a [Cache] Fix compat wth DBAL v3 2020-07-08 09:40:56 +02:00
Nicolas Grekas c0181c7667 bug #37461 [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows (JasonStephensTAMU)
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows

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

Passes current Process unit tests.

On Windows systems, a new set of sf_proc_## files are generated in the system temp directory for each WindowsPipes object. These files are removed when the WindowsPipes object is destroyed.

This avoids receiving a permission denied error when attempting to write to sf_proc_## files between multiple sites running as different users, when the users do not have permissions to modify each others files.

Changes
- [Process] WindowsPipes always creates new sf_proc_## files in constructor
- [Process] WindowsPipes removes its sf_proc_## files in destructor

Commits
-------

220be89f5c [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
2020-07-06 15:15:39 +02:00
Jason Stephens 220be89f5c [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows 2020-07-06 15:15:13 +02:00
Nicolas Grekas 091fd5016d bug #37505 [Form] fix handling null as empty data (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix handling null as empty data

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

Commits
-------

b5aa55dab9 fix handling null as empty data
2020-07-06 15:09:26 +02:00
Christian Flothmann b5aa55dab9 fix handling null as empty data 2020-07-06 14:28:35 +02:00
Robin Chalas 4297897869 bug #37385 [Console] Fixes question input encoding on Windows (YaFou)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Fixes question input encoding on Windows

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| 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 #35842, Fix #36324, Fix #37495 and Fix #37278 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | no <!-- required for new features -->
<!--
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.
-->

To ask a question to a user, the [QuestionHelper](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Helper/QuestionHelper.php) use [`fgets`](https://www.php.net/manual/en/function.fgets.php). However, special characters are not supported on Windows with this function (like accents: `é`, `à`, `ö`). The solution is to set a special encoding with [`sapi_windows_cp_get`](https://www.php.net/manual/en/function.sapi-windows-cp-get).

> Before
```php
$stream = fopen('php://stdin', 'r');
$input = fgets($stream);
echo $input;

// input: "Bonjour à tous"
// output: 'Bonjour \ tous" or "Bonjour   tous"
```

> After
```php
// Check if the function exists because it only exists on Windows
if(function_exists('sapi_windows_cp_set')) {
    sapi_windows_cp_get(437);
}

$stream = fopen('php://stdin', 'r');
$input = fgets($stream);
echo $input;

// input: "Bonjour à tous"
// output: 'Bonjour à tous"
```

*Thanks to @bnjmnfnk for the solution 😉*

Commits
-------

4288df4f74 [Console] Fixes question input encoding on Windows
2020-07-06 10:57:31 +02:00
Fabien Potencier c6eb79a514 minor #37497 No need to create an issue when creating a PR (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

No need to create an issue when creating a PR

| 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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

No need to create an issue before creating a PR.

Commits
-------

b5b146de2c No need to create an issue when creating a PR
2020-07-06 09:04:10 +02:00
Fabien Potencier b5b146de2c No need to create an issue when creating a PR 2020-07-05 15:36:44 +02:00
Nicolas Grekas 9f6acd549c minor #37466 [Console] Do not check for "stty" using "exec" if that function is disabled (mvorisek)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Console] Do not check for "stty" using "exec" if that function is disabled

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

fixes https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5030

Commits
-------

02124b6b3b [Console] Do not check for "stty" using "exec" if that function is disabled
2020-07-01 19:13:59 +02:00
Michael Voříšek 02124b6b3b [Console] Do not check for "stty" using "exec" if that function is disabled 2020-07-01 19:13:52 +02:00
YaFou 4288df4f74
[Console] Fixes question input encoding on Windows 2020-07-01 11:10:10 +02:00
Nicolas Grekas 91f30e0b62 [Bridge/Twig] Relax tests 2020-06-30 19:58:38 +02:00
Nicolas Grekas 52ddce1a74 bug #37447 [Validator] fix validating lazy properties that evaluate to null (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] fix validating lazy properties that evaluate to null

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

Commits
-------

776daf28b4 fix validating lazy properties that evaluate to null
2020-06-30 19:35:43 +02:00
Nicolas Grekas 034be4415c bug #37464 [ErrorHandler] fix throwing from __toString() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[ErrorHandler] fix throwing from __toString()

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

Commits
-------

aeb4637341 [ErrorHandler] fix throwing from __toString()
2020-06-30 19:29:43 +02:00
Nicolas Grekas aeb4637341 [ErrorHandler] fix throwing from __toString() 2020-06-30 19:28:29 +02:00
Nicolas Grekas 801f4cd7ac minor #37458 Removed comments and requirements relative to php <5.5 (not supported anymore) (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

Removed comments and requirements relative to php <5.5 (not supported anymore)

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

---

There is also https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php#L270-L276 but I think we could let it in place (and this file does not exist on master)

Commits
-------

5c5ea7500e Removed comments and requirements relative to php <5.5 (not supported anymore)
2020-06-30 14:59:42 +02:00
Grégoire Pineau 5c5ea7500e Removed comments and requirements relative to php <5.5 (not supported anymore) 2020-06-30 14:50:28 +02:00
Christian Flothmann 776daf28b4 fix validating lazy properties that evaluate to null 2020-06-29 12:55:42 +02:00
Nicolas Grekas b344f6d7db Fix test that fails on old distros 2020-06-28 17:22:27 +02:00
Nicolas Grekas 6ef3fee863 bug #37291 [MimeType] Duplicated MimeType due to PHP Bug (juanmrad)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[MimeType] Duplicated MimeType due to PHP Bug

| 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 -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

## Issue:

Currently there is a PHP bug https://bugs.php.net/bug.php?id=77784 that is causing several MimeTypes to be given as duplicated:

```
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
```
Instead of:
```
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
```

This Patch will fix the Issues by checking if a returned MimeType is duplicated and return appropriate MimeType.

This patch should be reverted if the PHP Bug is ever fixed.

Commits
-------

7cb29c8b4b [MimeType] Duplicated MimeType due to PHP Bug
2020-06-28 16:49:48 +02:00
Juan Mrad 7cb29c8b4b [MimeType] Duplicated MimeType due to PHP Bug 2020-06-28 16:49:36 +02:00
Fabien Potencier 9566cff6e7 bug #37425 [Form] fix guessing form types for DateTime types (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix guessing form types for DateTime types

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

Commits
-------

9ba90bf1f8 fix guessing form types for DateTime types
2020-06-26 18:00:04 +02:00
Christian Flothmann 9ba90bf1f8 fix guessing form types for DateTime types 2020-06-26 14:15:21 +02:00
Fabien Potencier 9660e6b1e2 bug #37392 [Validator] fix handling typed properties as constraint options (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] fix handling typed properties as constraint options

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

Commits
-------

4a66a6098f fix handling typed properties as constraint options
2020-06-25 12:06:33 +02:00
Christian Flothmann 4a66a6098f fix handling typed properties as constraint options 2020-06-25 11:23:26 +02:00
Fabien Potencier 40152c37ce bug #37389 [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3" (YaFou)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| 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 #36068 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | no
<!--
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.
-->

`.mp3` files are more common than `.mpga` files.

Commits
-------

76a744ad91 [HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3"
2020-06-24 15:26:36 +02:00
Fabien Potencier 19668b2a75 bug #37383 [VarDumper] Support for cURL handler objects (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Support for cURL handler objects

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

Commits
-------

39c1a6373b [VarDumper] Support for cURL handler objects.
2020-06-24 10:40:29 +02:00
Robin Chalas 968bd0ffec Fixed typo in test name 2020-06-23 14:31:34 +02:00
YaFou 76a744ad91
[HttpFondation] Change file extension of "audio/mpeg" from "mpga" to "mp3" 2020-06-23 08:52:36 +02:00
Alexander M. Turek 39c1a6373b [VarDumper] Support for cURL handler objects. 2020-06-22 16:59:03 +02:00
Fabien Potencier 33c6766117 minor #37376 [DI][FrameworkBundle] Remove "whitelist" occurrences (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][FrameworkBundle] Remove "whitelist" occurrences

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

Commits
-------

12ab96ec9b [DI][FrameworkBundle] Remove whitelist occurrences
2020-06-22 13:34:12 +02:00
Robin Chalas 12ab96ec9b [DI][FrameworkBundle] Remove whitelist occurrences 2020-06-22 11:57:22 +02:00
Fabien Potencier 3aa7426ec2 minor #37372 Avoid accessibility errors on symfony web debug toolbar (alexander-schranz)
This PR was merged into the 3.4 branch.

Discussion
----------

Avoid accessibility errors on symfony web debug toolbar

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

When for example using the [axe](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd) to test the website for accessibility. Axe will fail because a div element without a role or a parent [landmark](https://www.w3.org/TR/wai-aria-practices/examples/landmarks/HTML5.html) is rendered. To avoid this errors I think we should define it as a specific region.

Commits
-------

223b405168 Avoid accessibility errors on debug toolbar
2020-06-22 10:10:20 +02:00
Nicolas Grekas 484dcbd682 minor #37375 Relax tests to unlock change on master (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Relax tests to unlock change on master

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

Required to make #37373 green.
Doesn't change any outcome.

Commits
-------

afe596e16a Relax tests to unlock change on master
2020-06-22 09:50:22 +02:00
Nicolas Grekas afe596e16a Relax tests to unlock change on master 2020-06-22 09:47:42 +02:00
Alexander Schranz 223b405168
Avoid accessibility errors on debug toolbar 2020-06-21 18:44:56 +02:00
Fabien Potencier cc145e2d9c bug #37345 [Form] collect all transformation failures (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] collect all transformation failures

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

Commits
-------

a9987ce341 collect all transformation failures
2020-06-20 09:14:20 +02:00
Christian Flothmann a9987ce341 collect all transformation failures 2020-06-19 08:23:51 +02:00
Nicolas Grekas e707967ea8 minor #37346 Added Unit tests for php 8 union types (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Added Unit tests for php 8 union types

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

The missing test cases for #37340.

Commits
-------

2ca8ecdb74 Added Unit tests for php 8 union types.
2020-06-18 22:40:01 +02:00
Alexander M. Turek 2ca8ecdb74 Added Unit tests for php 8 union types. 2020-06-18 22:30:22 +02:00
Nicolas Grekas 8bbbdbe745 Fix 2020-06-18 21:30:53 +02:00
Nicolas Grekas cf66f03337 bug #37340 [3.4] Fix support for PHP8 union types (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Fix support for PHP8 union types

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

This fixes fatal errors on PHP 8 once union types are used. Note that this doesn't provide support for union types, eg autowiring, serializer, etc will just skip them. If another behavior is desired, that'd be for the `5.x` branch.

With PHP 8 coming, calling the `getName()` on the object returned by `ReflectionParameter::getType()` or `ReflectionFunctionAbstract::getReturnType()` might fail. The reason is that these might return a [`ReflectionUnionType`](https://wiki.php.net/rfc/union_types_v2#reflection) now, which has no `getName()` method (same for `isBuiltin() btw.)

Commits
-------

e09372bcbf [3.4] Fix support for PHP8 union types
2020-06-18 19:34:15 +02:00
Nicolas Grekas e09372bcbf [3.4] Fix support for PHP8 union types 2020-06-18 19:32:39 +02:00
Nicolas Grekas 57251cdcdd bug #37275 [DI] tighten detection of local dirs to prevent false positives (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] tighten detection of local dirs to prevent false positives

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

Commits
-------

b746dd900c [DI] tighten detection of local dirs to prevent false positives
2020-06-18 19:13:26 +02:00
Nicolas Grekas 2290c62047 bug #37090 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option (kick-the-bucket)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

Currently the coloring of composer output is forced in some calls, forced not to be colored in one other call and left for auto in the others.

This change would make it uniform, depending on the --colors option of phpunit provided (or not provided) in the call

Commits
-------

968d6c4276 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option
2020-06-18 19:09:06 +02:00
kick-the-bucket 968d6c4276 [PhpUnitBridge] Streamline ansi/no-ansi of composer according to phpunit --colors option 2020-06-18 19:08:53 +02:00
Nicolas Grekas 907ffa0701 bug #36230 [VarDumper] Fix CliDumper coloration on light arrays (l-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Fix CliDumper coloration on light arrays

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

When `AbstractDumper::DUMP_LIGHT_ARRAY` is used with the `CliDumper`, the first line (opening bracket) is not colored. When an empty array is dumped (with or without  `AbstractDumper::DUMP_LIGHT_ARRAY`) the array is not colored too. This PR aims to fix that.

Commits
-------

7af3469771 [VarDumper] Fix CliDumper coloration
2020-06-18 18:42:48 +02:00
Nicolas Grekas c16bb52252 bug #37270 [FrameworkBundle] preserve dots in query-string when redirecting (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] preserve dots in query-string when redirecting

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

Commits
-------

fcc0e2c143 [FrameworkBundle] preserve dots in query-string when redirecting
2020-06-18 18:42:05 +02:00
Nicolas Grekas 13d5e180d2 minor #37343 [3.4] Small update in our internal terminology (Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Small update in our internal terminology

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

The part of #37128 that applies to 3.4.

Commits
-------

c143aacd81 [3.4] Small update in our internal terminology
2020-06-18 18:37:43 +02:00