Commit Graph

38590 Commits

Author SHA1 Message Date
Fabien Potencier
87a5135306 Fix CS 2020-07-23 08:37:54 +02:00
Fabien Potencier
564550bbf8 minor #37587 [WebProfileBundle] Readability update (shreypuranik)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

[WebProfileBundle] Readability update

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

Updating ContentSecurityPolicyHandler by moving array out of foreach loop for ease of readability.

Commits
-------

6a7685f315 Readability update
2020-07-23 08:36:58 +02:00
shreypuranik
6a7685f315 Readability update 2020-07-23 08:36:50 +02:00
Fabien Potencier
0eafc01686 bug #37607 Fix checks for phpunit releases on Composer 2 (colinodell)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix checks for phpunit releases on Composer 2

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

`simple-phpunit` has a core assumption that any version of PHPUnit without a stable release will only have one dev version returned by Composer.  Per https://github.com/symfony/symfony/issues/37601, it's possible for Composer 2 to list **more than one dev version**.  This breaks that assumption and therefore prevents the installation of 9.3.* ([which is needed for testing on PHP 8](https://github.com/sebastianbergmann/phpunit/pull/4374#issuecomment-657029594)).

The fix implemented here is to remove any versions containing `dev-` or `-dev` from the list of possible versions to see if any stable versions remain.

Commits
-------

2bb3f08fba Fix checks for phpunit releases on Composer 2 (resolves #37601)
2020-07-23 08:28:10 +02:00
Tobias Schultze
e77ff454c8 minor #37592 [SCA] Minor fixes on tests (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[SCA] Minor fixes on tests

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

I mainly fixed misordered arguments in `assertEquals()`.

Commits
-------

b352ff08ad [SCA] Minor fixes on tests
2020-07-23 04:16:45 +02:00
Colin O'Dell
2bb3f08fba
Fix checks for phpunit releases on Composer 2 (resolves #37601) 2020-07-22 18:00:00 -04:00
Thomas Calvet
b352ff08ad [SCA] Minor fixes on tests 2020-07-16 11:41:49 +02:00
Nicolas Grekas
a397c490b0 bug #37562 [Cache] Use the default expiry when saving (not when creating) items (philipp-kolesnikov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Use the default expiry when saving (not when creating) items

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

This PR is for align expiration handling in ChainAdapter with ChainCache as proposed in #37263.

Commits
-------

49e9f3229c [Cache] Use the default expiry when saving (not when creating) items
2020-07-12 14:39:01 +02:00
Philipp Kolesnikov
49e9f3229c [Cache] Use the default expiry when saving (not when creating) items 2020-07-12 14:37:39 +02:00
Nicolas Grekas
adc79e3035 Fix typo 2020-07-12 13:20:43 +02:00
Nicolas Grekas
3ae61ec22c bug #37563 Fix DBAL deprecation (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix DBAL deprecation

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

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

Commits
-------

4273aedfae Fix DBAL deprecation
2020-07-12 12:25:53 +02:00
Nicolas Grekas
4273aedfae Fix DBAL deprecation 2020-07-12 12:21:23 +02:00
Nicolas Grekas
a56f6482a5 bug #37521 [Form] Fix ChoiceType translation domain (VincentLanglet)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] Fix ChoiceType translation domain

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

When using
```
->add('foo', ChoiceType::class, [
    'label'       => 'label',
    'translation_domain' => false,
    'choices'     => [
        'choice.no'  => false,
        'choice.yes' => true,
    ],
    'choice_translation_domain' => 'messages',
    'expanded'    => true,
    'required'    => false,
    'placeholder' => false,
]);
```

I discovered that the choices was not translated.

Seems like it's because the subForm is using the `translation_domain` instead of the `choice_translation_domain`.

Commits
-------

2effda79ea [Form] Fix ChoiceType translation domain
2020-07-12 11:52:47 +02:00
Vincent Langlet
2effda79ea [Form] Fix ChoiceType translation domain 2020-07-12 11:52:40 +02:00
Nicolas Grekas
ae91683ba4 minor #37552 [Form] sync translations from master (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] sync translations from master

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

Commits
-------

acea9be6d3 sync translations from master
2020-07-12 11:42:44 +02:00
Nicolas Grekas
d705b21def minor #37555 Add Tagalog translations for new form messages (ocrampete16)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

Add Tagalog translations for new form messages

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

This PR adds Tagalog translations for the new form messages @xabbuh added in https://github.com/symfony/symfony/pull/37552.

~~As I'm not aware of any Filipinos that regularly review Symfony pull requests, I'm going to ask my mother to proof-read this first before I remove the "WIP" label from the title. :)~~

Commits
-------

1809b7c5eb Add Tagalog translations for new form messages
2020-07-12 11:42:01 +02:00
Marco Petersen
1809b7c5eb Add Tagalog translations for new form messages 2020-07-12 11:41:55 +02:00
Nicolas Grekas
bff7dfc4df minor #37557 [Form] Add missing vietnamese translations (jschaedl)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] Add missing vietnamese 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       | - <!-- 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 -->
<!--
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
-------

68e2b34a9f [Form] Add missing vietnamese translations
2020-07-12 11:41:15 +02:00
Jan Schädlich
68e2b34a9f [Form] Add missing vietnamese translations 2020-07-12 11:41:09 +02:00
Christian Flothmann
acea9be6d3 sync translations from master 2020-07-10 16:23:16 +02:00
Fabien Potencier
2e7b9938c9 minor #37548 [Form] Add vietnamese translation for html5 color validation (jschaedl)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Add vietnamese translation for html5 color validation

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

89314b5992 add vietnamese translation for html5 color validation
2020-07-10 09:08:56 +02:00
Jan Schädlich
89314b5992 add vietnamese translation for html5 color validation 2020-07-10 08:36:00 +02:00
Nicolas Grekas
6bfdb92736 bug #37520 [Form] silently ignore uninitialized properties when mapping data to forms (ph-fritsche)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] silently ignore uninitialized properties when mapping data to forms

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

Commits
-------

b4616c810c silently ignore uninitialized properties when mapping data to forms
2020-07-09 18:41:59 +02:00
Nicolas Grekas
87e28f77b9 minor #37524 [Form] sync translations from master branch (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] sync translations from master branch

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

Commits
-------

d962202c5f sync translations from master branch
2020-07-09 18:41:07 +02:00
Nicolas Grekas
3a4303d303 cs fix 2020-07-09 18:40:43 +02:00
Christian Flothmann
f49e8b5071 minor #37536 [Form] add german translation of the html5 color validation (ABSAhmad)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] add german translation of the html5 color validation

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

Commits
-------

f41c03b8aa add german translation of the html5 color validation
2020-07-09 10:59:31 +02:00
Ahmad El-Bardan
f41c03b8aa add german translation of the html5 color validation 2020-07-09 10:22:35 +02:00
Christian Flothmann
d0428bae0a minor #37528 clean up HHVM instructions (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

clean up HHVM instructions

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

Commits
-------

81a4baf4ba clean up HHVM instructions
2020-07-08 19:38:59 +02:00
Nicolas Grekas
3db0684037 Fix PHP 8 deprecations 2020-07-08 19:07:26 +02:00
Nicolas Grekas
207b0b5996 bug #37526 [Cache][Config] ensure compatibility with PHP 8 stack traces (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache][Config] ensure compatibility with PHP 8 stack traces

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

Commits
-------

8ba34dafd3 ensure compatibility with PHP 8 stack traces
2020-07-08 18:59:51 +02:00
Christian Flothmann
8ba34dafd3 ensure compatibility with PHP 8 stack traces 2020-07-08 18:57:10 +02:00
Christian Flothmann
81a4baf4ba clean up HHVM instructions 2020-07-08 16:52:52 +02:00
Christian Flothmann
d962202c5f sync translations from master branch 2020-07-08 15:48:29 +02:00
Philipp Fritsche
b4616c810c silently ignore uninitialized properties when mapping data to forms 2020-07-08 12:40:29 +02:00
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