Commit Graph

49720 Commits

Author SHA1 Message Date
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
Nicolas Grekas
5992bf04cf bug #37515 [PhpUnitBridge] Fix expectDeprecation() in isolation (alexpott)
This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[PhpUnitBridge] Fix expectDeprecation() in isolation

| 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 #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Tests like
```
    /**
     * Do not remove this test in the next major version.
     *
     * @group legacy
     * @runInSeparateProcess
     */
    public function testOneInIsolation()
    {
        $this->expectDeprecation('foo');
        @trigger_error('foo', E_USER_DEPRECATED);
    }
```
will fail due to:

```
Testing Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest
R                                                                   1 / 1 (100%)R

Time: 111 ms, Memory: 6.00 MB

There were 2 risky tests:

1) Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest::testOneInIsolation
This test did not perform any assertions

/Users/alex/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/ExpectDeprecationTraitTest.php:38

2) Symfony\Bridge\PhpUnit\Tests\ExpectDeprecationTraitTest::testOneInIsolation
This test did not perform any assertions

OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 0, Risky: 2.
```

Commits
-------

e7e2ee75d3 Expect deprecations in isolation
2020-07-09 10:06:55 +02:00
Alex Pott
e7e2ee75d3 Expect deprecations in isolation 2020-07-09 10:06:27 +02:00
Christian Flothmann
ab81cb4b6a Merge branch '3.4' into 4.4
* 3.4:
  clean up HHVM instructions
2020-07-08 19:40:58 +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
07c11399ae Merge branch '3.4' into 4.4
* 3.4:
  Fix PHP 8 deprecations
  ensure compatibility with PHP 8 stack traces
2020-07-08 19:09:45 +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
f07b187e6e Merge branch '5.0' into 5.1
* 5.0:
  [String] Added a help message when translation-contracts is not installed
  Add: ExcludeList usage for PHPUnit 9.4
  [Cache] Fix compat wth DBAL v3
  [String] throw when Alpine is used and translit fails
2020-07-08 10:27:49 +02:00
Nicolas Grekas
eae19f263a minor #37512 [String] Added a help message when translation-contracts is not installed (lyrixx)
This PR was submitted for the master branch but it was merged into the 5.0 branch instead.

Discussion
----------

[String] Added a help message when translation-contracts is not installed

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

Commits
-------

904fb1ae21 [String] Added a help message when translation-contracts is not installed
2020-07-08 10:26:32 +02:00
Grégoire Pineau
904fb1ae21 [String] Added a help message when translation-contracts is not installed 2020-07-08 10:26:26 +02:00
Nicolas Grekas
e8fb0d133e Merge branch '4.4' into 5.0
* 4.4:
  Add: ExcludeList usage for PHPUnit 9.4
  [Cache] Fix compat wth DBAL v3
2020-07-08 10:06:16 +02:00
Nicolas Grekas
ddf795390a Merge branch '3.4' into 4.4
* 3.4:
  [Cache] Fix compat wth DBAL v3
2020-07-08 10:03:32 +02:00
Nicolas Grekas
c702af419b bug #37513 [PhpUnitBridge] ExcludeList usage for PHPUnit 9.4 (gennadigennadigennadi)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] ExcludeList usage for PHPUnit 9.4

| Q             | A
| ------------- | ---
| Branch?       |  4.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       | #37344 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Added: ExcludeList usage for PHPUnit >= 9.3

Commits
-------

f59915d905 Add: ExcludeList usage for PHPUnit 9.4
2020-07-08 09:59:28 +02:00
Gennadi Janzen
f59915d905 Add: ExcludeList usage for PHPUnit 9.4 2020-07-08 09:59:12 +02:00
Nicolas Grekas
f70bcf646d bug #37514 [String] throw when Alpine is used and translit fails (nicolas-grekas)
This PR was merged into the 5.0 branch.

Discussion
----------

[String] throw when Alpine is used and translit fails

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

Commits
-------

98f5d50945 [String] throw when Alpine is used and translit fails
2020-07-08 09:56:31 +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
Guilliam Xavier
b3d0812976
Fix author for class CachePoolClearerCacheWarmer 2020-07-07 20:14:00 +02:00
Nicolas Grekas
98f5d50945 [String] throw when Alpine is used and translit fails 2020-07-07 19:07:07 +02:00
Nicolas Grekas
ce0a9d2f09 Merge branch '5.0' into 5.1
* 5.0:
  [Contracts] update changelog
2020-07-06 15:42:20 +02:00
Nicolas Grekas
d285042b48 Merge branch '4.4' into 5.0
* 4.4:
  [Contracts] update changelog
2020-07-06 15:41:15 +02:00
Nicolas Grekas
6c9a25cccc [Contracts] update changelog 2020-07-06 15:39:06 +02:00
Nicolas Grekas
361bf335e2 bug #37504 [Security\Http] Skip remember-me logout on empty token (chalasr)
This PR was merged into the 5.1 branch.

Discussion
----------

[Security\Http] Skip remember-me logout on empty token

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

Commits
-------

551f9418a3 [Security\Http] Skip remember-me logout on empty token
2020-07-06 15:25:09 +02:00
Nicolas Grekas
7da6d710cf Merge branch '5.0' into 5.1
* 5.0:
  minor #37121 [Contracts] Add missing "extra.thanks" entries in composer.json (nicolas-grekas)
  [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
  fix handling null as empty data
  No need to create an issue when creating a PR
  Use ">=" for the "php" requirement
  [HttpClient] Fix promise behavior in HttplugClient
  [Console] Fixes question input encoding on Windows
2020-07-06 15:23:11 +02:00
Nicolas Grekas
564af6436a Merge branch '4.4' into 5.0
* 4.4:
  minor #37121 [Contracts] Add missing "extra.thanks" entries in composer.json (nicolas-grekas)
  [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
  fix handling null as empty data
  No need to create an issue when creating a PR
  [Console] Fixes question input encoding on Windows
2020-07-06 15:22:03 +02:00
Nicolas Grekas
eb9aa24cc3 minor #37121 [Contracts] Add missing "extra.thanks" entries in composer.json (nicolas-grekas)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Contracts] Add missing "extra.thanks" entries in composer.json

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

Something we forgot and that might help give some more visibility to symfony/contracts.

Commits
-------

bd04f0cce6 [Contracts] Add missing "extra.thanks" entries in composer.json
2020-07-06 15:19:58 +02:00
Nicolas Grekas
2f65991a9d Merge branch '3.4' into 4.4
* 3.4:
  [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows
  fix handling null as empty data
  No need to create an issue when creating a PR
  [Console] Fixes question input encoding on Windows
2020-07-06 15:18:39 +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
551f9418a3 [Security\Http] Skip remember-me logout on empty token 2020-07-06 12:10:25 +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
309b06201a bug #37499 [Form] Missing return in loadValuesForChoices method (yceruto)
This PR was merged into the 5.1 branch.

Discussion
----------

[Form] Missing return in loadValuesForChoices method

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

Commits
-------

6075debead Missing return in loadValuesForChoices method
2020-07-06 08:32:18 +02:00
Yonel Ceruto
6075debead Missing return in loadValuesForChoices method 2020-07-05 20:50:18 -04:00
Fabien Potencier
b5b146de2c No need to create an issue when creating a PR 2020-07-05 15:36:44 +02:00
Nicolas Grekas
085e66cfc2 Merge branch '4.4' into 5.0
* 4.4:
  Use ">=" for the "php" requirement
  [HttpClient] Fix promise behavior in HttplugClient
2020-07-05 11:43:09 +02:00
Nicolas Grekas
3b1e34bdb6 minor #37494 Use ">=" for the "php" requirement (alexpott)
This PR was merged into the 4.4 branch.

Discussion
----------

Use ">=" for the "php" requirement

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | kinda - prevents projects from installing on PHP 8.0 unnecessarily.
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Making the same change as f8aa0873cf but for a couple of places where it seems to have been missed.

Commits
-------

4a360766cc Use ">=" for the "php" requirement
2020-07-05 11:39:43 +02:00
Alex Pott
4a360766cc Use ">=" for the "php" requirement 2020-07-05 11:39:30 +02:00
Nicolas Grekas
32707260f9 bug #37491 [HttpClient] Fix promise behavior in HttplugClient (brentybh)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix promise behavior in HttplugClient

| Q             | A
| ------------- | ---
| Branch?       | 4.4 & up <!-- 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 #37488 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- 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.
-->

## The Problem
Promises have 2 important methods: `then` and `wait`.
To implement Httplug's promise interface, we built `HttplugPromise` on top of Guzzle promise.
However, when an error occurred (Httplug `NetworkException` thrown) while init the request/before actually sending the request,
`HttplugClient::sendAsyncRequest` will return a `Http\Promise\RejectedPromise`, which is a dummy implementation.

If the `then` callable returns a promise-like object, `Http\Promise\RejectedPromise` will treat it as plain value.
Guzzle promise will try to resolve the promise-like value, which is an object that has `then` method on it.

bbf3b200bc/src/Promise.php (L116)

To fix this, I edited `src/Symfony/Component/HttpClient/HttplugClient.php`.

Next, let me explain why to edit `src/Symfony/Component/HttpClient/Response/HttplugPromise.php`.
After the previous fix, when a Guzzle promise returned by the `then` callable, things will work.
However, If I return a `HttplugPromiseInterface`, it doesn't work, because Guzzle promise `wait` the return value (result)
only if it's a Guzzle promise.

bbf3b200bc/src/Promise.php (L63)

To fix this, I referenced the `wait` code of Guzzle promise and edited our `HttplugPromise`.

## How this fix make sense

So, why to return a promise from the `then` callable?
This let us change the promise chain according to current promise's result (fulfilled/rejected).

For example, we can retry an HTTP request if it failed.
Please take a look at my test code.

Commits
-------

147b6adc39 [HttpClient] Fix promise behavior in HttplugClient
2020-07-04 11:37:25 +02:00
Bohan Yang
147b6adc39 [HttpClient] Fix promise behavior in HttplugClient 2020-07-04 11:37:14 +02:00
Nicolas Grekas
5de5b7d82e Merge branch '5.0' into 5.1
* 5.0:
  [Console] fix reading from STDIN
2020-07-04 11:30:46 +02:00
Nicolas Grekas
c2c4d4dc12 Merge branch '4.4' into 5.0
* 4.4:
  [Console] fix reading from STDIN
2020-07-04 11:30:38 +02:00