Commit Graph

50432 Commits

Author SHA1 Message Date
Nicolas Grekas
d7afcf2dc5 Merge branch '4.4' into 5.1
* 4.4:
  Fix .github/build-packages.php
2020-10-13 15:25:16 +02:00
Nicolas Grekas
f086821a26 Merge branch '3.4' into 4.4
* 3.4:
  Fix .github/build-packages.php
2020-10-13 15:25:07 +02:00
Nicolas Grekas
84887f20e6 Fix .github/build-packages.php 2020-10-13 15:24:59 +02:00
Nicolas Grekas
1a0ea4d2f7 Merge branch '4.4' into 5.1
* 4.4:
  Fix branch-version
2020-10-13 15:21:37 +02:00
Nicolas Grekas
58f803f356 Merge branch '3.4' into 4.4
* 3.4:
  Fix branch-version
2020-10-13 15:20:53 +02:00
Nicolas Grekas
44a7e3e920 Fix branch-version 2020-10-13 15:20:16 +02:00
Nicolas Grekas
59db41386f Merge branch '4.4' into 5.1
* 4.4:
  Fix merge
2020-10-13 14:46:35 +02:00
Nicolas Grekas
1db73dfe02 Fix merge 2020-10-13 14:45:49 +02:00
Nicolas Grekas
e95f87d1c8 bug #38546 [String] fix "is too large" ValueError on PHP 8 (nicolas-grekas)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] fix "is too large" ValueError on PHP 8

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

Commits
-------

15c22c69e4 [String] fix "is too large" ValueError on PHP 8
2020-10-13 14:36:28 +02:00
Nicolas Grekas
23ab908213 Merge branch '4.4' into 5.1
* 4.4:
  Remove "version" from composer.json files, use "branch-version" instead
2020-10-13 14:35:38 +02:00
Nicolas Grekas
e953dd3e0d Merge branch '3.4' into 4.4
* 3.4:
  Remove "version" from composer.json files, use "branch-version" instead
2020-10-13 14:30:56 +02:00
Nicolas Grekas
56a7571bab minor #38460 Remove "version" from composer.json files, use "branch-version" instead (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove "version" from composer.json files, use "branch-version" instead

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

Waiting for confirmation from @Seldaek or @naderman

Commits
-------

f9ed6940fd Remove "version" from composer.json files, use "branch-version" instead
2020-10-13 14:24:32 +02:00
Nicolas Grekas
f9ed6940fd Remove "version" from composer.json files, use "branch-version" instead 2020-10-13 14:21:16 +02:00
Nicolas Grekas
15c22c69e4 [String] fix "is too large" ValueError on PHP 8 2020-10-13 14:06:13 +02:00
Nicolas Grekas
63288a6e2e Merge branch '4.4' into 5.1
* 4.4:
  [DI] fix dumping env vars
  [HttpClient] skip executing the multi handle when it's freed already
  [HttpClient] fix using freed curl resource at destruct time
  [HttpClient] shutdown verbose output from curl at destruction
  fix warning for preloading TranslatorTrait class
  [Typography] Remove unneeded description comments
2020-10-13 13:14:18 +02:00
Nicolas Grekas
d79912d3d2 Merge branch '3.4' into 4.4
* 3.4:
  [Typography] Remove unneeded description comments
2020-10-13 13:09:48 +02:00
Nicolas Grekas
75b3d179f9 bug #38544 [DI] fix dumping env vars (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix dumping env vars

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

Forgotten in #35029
For 4.4 to reduce merge conflicts (it doesn't allow the new chars in 4.4 anyway, #35029 is still needed)

Commits
-------

746a8d1a09 [DI] fix dumping env vars
2020-10-13 13:09:41 +02:00
Nicolas Grekas
746a8d1a09 [DI] fix dumping env vars 2020-10-13 11:53:00 +02:00
Nicolas Grekas
a580688ee5 [HttpClient] skip executing the multi handle when it's freed already 2020-10-13 10:06:18 +02:00
Nicolas Grekas
4f8384829c [HttpClient] fix using freed curl resource at destruct time 2020-10-13 09:54:33 +02:00
Nicolas Grekas
a279d22d25 [HttpClient] shutdown verbose output from curl at destruction 2020-10-13 09:44:15 +02:00
Bernd Stellwag
2a370143a4 fix warning for preloading TranslatorTrait class 2020-10-13 07:04:30 +02:00
Fabien Potencier
5b9ccde1e0 bug #38533 [TwigBridge] Fix preload hint and remove "unlinked class class@anonymous" warning (burned42)
This PR was merged into the 5.1 branch.

Discussion
----------

[TwigBridge] Fix preload hint and remove "unlinked class class@anonymous" warning

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

This should fix the preload warning mentioned in https://github.com/symfony/symfony/issues/38197 by applying the fix as suggested by @nicolas-grekas:

```
PHP Warning:  Can't preload unlinked class class@anonymous: Unknown trait Symfony\\Contracts\\Translation\\TranslatorTrait in /var/www/html/vendor/symfony/twig-bridge/Extension/TranslationExtension.php on line 50
```

Commits
-------

0f167f6ed4 fix warning for preloading TranslatorTrait class
2020-10-13 06:57:42 +02:00
Bernd Stellwag
0f167f6ed4 fix warning for preloading TranslatorTrait class 2020-10-12 21:56:01 +02:00
Nicolas Grekas
b9e76b2bd9 Merge branch '4.4' into 5.1
* 4.4:
  [HttpClient] fix reading the body after a ClientException
2020-10-12 18:39:05 +02:00
Nicolas Grekas
36d382e266 bug #38530 [HttpClient] fix reading the body after a ClientException (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix reading the body after a ClientException

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

#38508 wasn't enough to fix the issue.

Commits
-------

0159a39709 [HttpClient] fix reading the body after a ClientException
2020-10-12 18:37:39 +02:00
Nicolas Grekas
0159a39709 [HttpClient] fix reading the body after a ClientException 2020-10-12 18:35:20 +02:00
Nicolas Grekas
481a2917c1 [HttpClient] fix tests and merge 2020-10-12 17:25:56 +02:00
Nicolas Grekas
d83f806e5f [Validator] remove phpunit-bridge from dev deps 2020-10-12 14:57:15 +02:00
Fabien Potencier
f3e496f56f minor #38521 [Typography] Fix SerializerAwareInterface description (idetox)
This PR was submitted for the 5.x branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Typography] Fix SerializerAwareInterface description

| Q             | A
| ------------- | ---
| Branch?       | 5.x<!-- see below -->
| Bug fix?      | no
| New feature?  | no
| Deprecations? |no
| Tickets       |  -
| License       | MIT

Removed some unneeded comments in Serializer / Normalizer / Encoder directory

Commits
-------

48e6976ac8 [Typography] Remove unneeded description comments
2020-10-12 14:32:48 +02:00
idetox
48e6976ac8 [Typography] Remove unneeded description comments 2020-10-12 14:32:39 +02:00
Nicolas Grekas
a1616a76eb Merge branch '4.4' into 5.1
* 4.4:
  Disable the PhpUnit bridge when testing it
  [PropertyInfo] Support for the mixed type.
  Don't unset the inflate resource on close as it might still be needed
  [HttpClient] Fix CurlHttpClient memory leak
  [Form] Add Bosnian (bs) validators translation
  [Form] Add missing Serbian (latn & cyrl) validators translation
  [Cache] skip igbinary < 3.1.6
  [Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3
  [Form] [Validator] added pt_BR translations
  Estonian update
  [PhpUnitBridge] fix running parallel tests with phpunit 9
  [VarDumper] fix truncating big arrays
2020-10-12 13:21:05 +02:00
Nicolas Grekas
6000e51629 Merge branch '3.4' into 4.4
* 3.4:
  Disable the PhpUnit bridge when testing it
  [PropertyInfo] Support for the mixed type.
  [Form] Add Bosnian (bs) validators translation
  [Form] Add missing Serbian (latn & cyrl) validators translation
  [Form] [Validator] added pt_BR translations
  Estonian update
  [PhpUnitBridge] fix running parallel tests with phpunit 9
  [VarDumper] fix truncating big arrays
2020-10-12 13:11:24 +02:00
Nicolas Grekas
b45f002932 Disable the PhpUnit bridge when testing it 2020-10-12 12:52:41 +02:00
Nicolas Grekas
a8479e8b31 minor #38508 [HttpClient] Content doesn't get decoded when fetched from an exception (HypeMC)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Content doesn't get decoded when fetched from an exception

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

My previous PR #38493 created a new bug, the content doesn't get decoded when fetched from an exception because the inflate resource gets unset:

```php
<?php

use Symfony\Component\HttpClient\CurlHttpClient;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;

include __DIR__.'/symfony/vendor/autoload.php';

$client = new CurlHttpClient();

try {
    $client->request('GET', 'http://example.com/404');
} catch (ClientExceptionInterface $exception) {
    echo $exception->getResponse()->getContent(false);
}
```

I've removed the part where the resource gets unset since it still might be used at some point.

The test is implementation independent so I believe it should go in contracts, please correct me if I wrong. Also, I was unable to find a way to do the test without adding a new endpoint this time, any suggestions would be appreciated.

Commits
-------

8fa4f85013 Don't unset the inflate resource on close as it might still be needed
2020-10-11 10:48:16 +02:00
Fabien Potencier
7173d6c9bb bug #38510 [PropertyInfo] Support for the mixed type (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] Support for the mixed type

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

In php 8, `mixed` is [a valid type declaration](https://wiki.php.net/rfc/mixed_type_v2).

Running the following script on php 8…

```
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;

class MyClass
{
    public function getA(): mixed {}
}

$reflection = new ReflectionExtractor();
$reflection->getTypes(MyClass::class, 'a');
```

… causes a fatal error:

```
PHP Fatal error:  Uncaught InvalidArgumentException: "mixed" is not a valid PHP type. in /path/to/symfony/src/Symfony/Component/PropertyInfo/Type.php:70
```

This PR should fix the issue.

Commits
-------

1a3b538e16 [PropertyInfo] Support for the mixed type.
2020-10-11 07:55:53 +02:00
Alexander M. Turek
1a3b538e16 [PropertyInfo] Support for the mixed type. 2020-10-11 00:15:38 +02:00
HypeMC
8fa4f85013 Don't unset the inflate resource on close as it might still be needed 2020-10-10 18:24:13 +02:00
Fabien Potencier
1cef665f49 bug #38493 [HttpClient] Fix CurlHttpClient memory leak (HypeMC)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpClient] Fix CurlHttpClient memory leak

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

Commits
-------

aeb4ddf316 [HttpClient] Fix CurlHttpClient memory leak
2020-10-10 09:23:21 +02:00
HypeMC
aeb4ddf316 [HttpClient] Fix CurlHttpClient memory leak 2020-10-10 09:23:15 +02:00
Fabien Potencier
b95ad419f8 minor #38481 [Form] Add Bosnian (bs) validators translation (tambait)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] Add Bosnian (bs) validators translation

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

Commits
-------

bd80b1e08d [Form] Add Bosnian (bs) validators translation
2020-10-09 08:39:07 +02:00
ivan
bd80b1e08d [Form] Add Bosnian (bs) validators translation 2020-10-09 08:39:00 +02:00
Fabien Potencier
4beb659fdc minor #38491 [Form] Add missing Serbian (latn & cyrl) validators translation (tambait)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] Add missing Serbian (latn & cyrl) validators translation

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

Commits
-------

80bcd0ee20 [Form] Add missing Serbian (latn & cyrl) validators translation
2020-10-09 08:37:56 +02:00
ivan
80bcd0ee20 [Form] Add missing Serbian (latn & cyrl) validators translation 2020-10-09 08:37:47 +02:00
Nicolas Grekas
744e245371 bug #38456 [Cache] skip igbinary < 3.1.6 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] skip igbinary < 3.1.6

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

v3.1.6 will embed https://github.com/igbinary/igbinary/pull/289

Commits
-------

065474c94f [Cache] skip igbinary < 3.1.6
2020-10-07 11:31:50 +02:00
Nicolas Grekas
065474c94f [Cache] skip igbinary < 3.1.6 2020-10-07 11:30:25 +02:00
Nicolas Grekas
45cad64255 bug #38392 [Ldap] Bypass the use of ldap_control_paged_result on PHP >= 7.3 (lucasaba)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3

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

As stated on #38352 [ldap_control_paged_result](https://www.php.net/manual/en/function.ldap-control-paged-result.php) and [ldap_control_paged_result_response](https://www.php.net/manual/en/function.ldap-control-paged-result-response.php) have been deprecated since PHP 7.4 and will be removed on PHP 8.0.

With this fix, Query uses serverctrls to handle LDAP results pagination.

Since `serverctrls` where introduced in PHP 7.3 and they are the only way to circumvent the usage of `ldap_control_paged_result`, I've added a new Query class implementation which uses `serverctrls` to control pagination.

To do so I've also had to update the LDAP Adapter in order to use the new class if PHP version 7.3 or greater are found

Commits
-------

d332b30526 [Ldap] Bypass the use of `ldap_control_paged_result` on PHP >= 7.3
2020-10-07 10:55:20 +02:00
Luca Saba
d332b30526 [Ldap] Bypass the use of ldap_control_paged_result on PHP >= 7.3 2020-10-07 10:55:12 +02:00
Fabien Potencier
27c22602d6 bug #38444 [PhpUnitBridge] fix running parallel tests with phpunit 9 (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] fix running parallel tests with phpunit 9

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

Commits
-------

6b13ffaef2 [PhpUnitBridge] fix running parallel tests with phpunit 9
2020-10-07 07:54:18 +02:00
Fabien Potencier
392f2e0ba2 bug #38446 [PropertyInfo] Extract from default value doesn't set collection boolean (Korbeil)
This PR was merged into the 5.1 branch.

Discussion
----------

[PropertyInfo] Extract from default value doesn't set collection boolean

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

This PR will fix the issue by checking if the type is an array or not and setting the collection boolean based on this check.

Commits
-------

33d37e56ba Fix no collection in extract default value
2020-10-07 07:53:03 +02:00