Commit Graph

48398 Commits

Author SHA1 Message Date
Bernd Stellwag
2a370143a4 fix warning for preloading TranslatorTrait class 2020-10-13 07:04:30 +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
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
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
c4aeb6fd80 bug #38442 [VarDumper] fix truncating big arrays (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix truncating big arrays

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

Commits
-------

a8b986e35e [VarDumper] fix truncating big arrays
2020-10-07 07:50:22 +02:00
Fabien Potencier
9ffad84e46 minor #38450 [Form] [Validator] added pt_BR translations (cenoura)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Form] [Validator] added pt_BR translations

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

Added missing pt_BR translations to Form and Validator components.

Commits
-------

4bede2824c [Form] [Validator] added pt_BR translations
2020-10-07 07:46:14 +02:00
Guilherme Augusto Henschel
4bede2824c [Form] [Validator] added pt_BR translations 2020-10-07 07:46:06 +02:00
Fabien Potencier
e599d80d65 minor #38441 Estonian update (Sheitak)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

Estonian update

| Q             | A
| ------------- | ---
| Branch ?       | 3.4 for bug fixes
| Bug fix ?      | yes
| New feature ?  | no
| Deprecations ? | no
| Tickets       | Fix #30160
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
- Update `validators.et.xlf` in `src/Symfony/Component/Validator/Resources/translations/validators.et.xlf`
- Id 73 (line 281) to Id 94 (line 385)
-->

Commits
-------

96499920a2 Estonian update
2020-10-07 07:43:11 +02:00
Sheitak
96499920a2 Estonian update 2020-10-07 07:43:03 +02:00
Nicolas Grekas
6b13ffaef2 [PhpUnitBridge] fix running parallel tests with phpunit 9 2020-10-06 19:33:55 +02:00
Nicolas Grekas
a8b986e35e [VarDumper] fix truncating big arrays 2020-10-06 18:42:49 +02:00
Nicolas Grekas
6d5a803624 [gha] Fix leftover 2020-10-06 18:09:33 +02:00
Nicolas Grekas
55396f90a3 Merge branch '3.4' into 4.4
* 3.4:
  Update versions in composer.json
2020-10-06 17:45:41 +02:00
Nicolas Grekas
3ca2d806b0 minor #38439 Update versions in composer.json (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Update versions in composer.json

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

Should make the CI green.

Commits
-------

8f714a2fd6 Update versions in composer.json
2020-10-06 17:41:25 +02:00
Nicolas Grekas
8f714a2fd6 Update versions in composer.json 2020-10-06 17:25:25 +02:00
Fabien Potencier
87f328428e bug #38433 [Mime] Fix serialization of RawMessage (gilbertsoft)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Mime] Fix serialization of RawMessage

| 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       | Fix #38430, Related #33394 <!-- 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 -->

The serialization of RawMessage is currently broken if using a generator for message like done by `Symfony\Component\Mailer\SentMessage` see 5f1c3a7972/src/Symfony/Component/Mailer/SentMessage.php (L45)
This patch converts the message to a string so further serialization can be done.

This patch probably also solves #33394.

<!--
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 5.x.
-->

Commits
-------

fd99eb26d8 [Mime] Fix serialization of RawMessage
2020-10-06 16:40:04 +02:00
Gilbertsoft
fd99eb26d8 [Mime] Fix serialization of RawMessage 2020-10-06 16:40:02 +02:00
Nicolas Grekas
2f7751f0df fix merge 2020-10-06 13:56:58 +02:00
Nicolas Grekas
0c3447f94c Merge branch '3.4' into 4.4
* 3.4:
  [appveyor] fix checking for the .x branch
2020-10-06 13:43:00 +02:00
Nicolas Grekas
f4a1885b8d [appveyor] fix checking for the .x branch 2020-10-06 13:42:19 +02:00
Nicolas Grekas
e553f424d0 Merge branch '3.4' into 4.4
* 3.4:
  Remove "branch-alias", populate "version"
2020-10-06 13:41:17 +02:00
Nicolas Grekas
b715f462b3 minor #38431 Remove "branch-alias", populate "version" (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove "branch-alias", populate "version"

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

Commits
-------

9d40c796c4 Remove "branch-alias", populate "version"
2020-10-06 13:32:04 +02:00
Nicolas Grekas
9d40c796c4 Remove "branch-alias", populate "version" 2020-10-06 13:22:52 +02:00
Fabien Potencier
b47ba231ef Merge branch '3.4' into 4.4
* 3.4:
  Move to the new default 5.x branch
  Use PHPUnit 9.4 to run the test suite.
  Fix type annotation
2020-10-06 10:07:23 +02:00
Fabien Potencier
40dc7e6278 minor #38425 Move to the new default 5.x branch (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Move to the new default 5.x branch

| 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 #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

25e5fa6611 Move to the new default 5.x branch
2020-10-06 10:06:52 +02:00
Fabien Potencier
25e5fa6611 Move to the new default 5.x branch 2020-10-06 10:06:05 +02:00
Fabien Potencier
3f2af74158 minor #38411 Use PHPUnit 9.4 to run the test suite (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Use PHPUnit 9.4 to run the test suite

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

Commits
-------

de6a852b46 Use PHPUnit 9.4 to run the test suite.
2020-10-05 08:28:29 +02:00
Alexander M. Turek
de6a852b46 Use PHPUnit 9.4 to run the test suite. 2020-10-04 22:06:12 +02:00
Fabien Potencier
a60c0af953 minor #38408 Fix type annotation in ExpressionLanguage\Token (m-vo)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix type annotation in ExpressionLanguage\Token

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

The expected argument `$type` should be a string - the strict comparison would always fail with the current annotated types (`array|int`).

See the constructor + constants for reference:
7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L33)

7db7dcc431/src/Symfony/Component/ExpressionLanguage/Token.php (L25-L30)

Commits
-------

bfde15b728 Fix type annotation
2020-10-04 18:40:24 +02:00
Fabien Potencier
20969e604b Merge branch '3.4' into 4.4
* 3.4:
  Change test
2020-10-04 18:35:43 +02:00
Fabien Potencier
bfcf65f61c Change test 2020-10-04 18:34:28 +02:00
Fabien Potencier
619509e3c3 minor #38409 [Stopwatch] Added example to the README (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

[Stopwatch] Added example to the README

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/14333

Commits
-------

e2461c90d2 Added Stopwatch example to the README
2020-10-04 17:43:30 +02:00