Commit Graph

51389 Commits

Author SHA1 Message Date
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
Fabien Potencier
dc6e8d0ffc minor #38545 [Notifier][WebProfilerBundle] Add notifier profiler panel icon (jschaedl)
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Notifier][WebProfilerBundle] Add notifier profiler panel icon

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| 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        | 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 5.x.
-->

relates to #36479

Commits
-------

303096e5a1 [Notifier][WebProfilerBundle] Add notifier profiler panel icon
2020-10-13 13:57:12 +02:00
Jan Schädlich
303096e5a1 [Notifier][WebProfilerBundle] Add notifier profiler panel icon 2020-10-13 13:57:05 +02:00
Nicolas Grekas
5baa123aac Merge branch '5.1' into 5.x
* 5.1:
  [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:51 +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
f52f090230 feature #38532 [HttpClient] simplify retry mechanism around RetryStrategyInterface (nicolas-grekas)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpClient] simplify retry mechanism around RetryStrategyInterface

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

Replaces #38466

I feel like the mechanism behind RetryableHttpClient is too bloated for no pragmatic reasons.

I propose to merge RetryDeciderInterface and RetryBackoffInterface into one single RetryStrategyInterface.

Having two separate interfaces supports no real-world use case. The only implementations we provide are trivial, and they can be reused by extending the provided GenericRetryStrategy implementation if one really doesn't want to duplicate that.

The methods are also simplified by accepting an AsyncContext as argument. This makes the signatures shorter and allows accessing the "info" of the request (allowing to decide based on the IP of the host, etc).

/cc @jderusse

Commits
-------

544c3e8678 [HttpClient] simplify retry mechanism around RetryStrategyInterface
2020-10-13 10:09:30 +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
Nicolas Grekas
544c3e8678 [HttpClient] simplify retry mechanism around RetryStrategyInterface 2020-10-13 09:28:31 +02:00
Bernd Stellwag
2a370143a4 fix warning for preloading TranslatorTrait class 2020-10-13 07:04:30 +02:00
Fabien Potencier
ee3294e050 Merge branch '5.1' into 5.x
* 5.1:
  fix warning for preloading TranslatorTrait class
2020-10-13 06:59:45 +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
Nicolas Grekas
9c3a9282f1 Fix CS 2020-10-12 21:59:40 +02:00
Bernd Stellwag
0f167f6ed4 fix warning for preloading TranslatorTrait class 2020-10-12 21:56:01 +02:00
Fabien Potencier
ef1253b7c4 Fix tests 2020-10-12 20:55:37 +02:00
Fabien Potencier
14d0fcf162 bug #38528 [Security] Making login link signature_properties option required (weaverryan)
This PR was merged into the 5.x branch.

Discussion
----------

[Security] Making login link signature_properties option required

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes (for a 5.2 feature)
| New feature?  | no
| Deprecations? | no
| Tickets       | none
| License       | MIT
| Doc PR        | not needed

Hi!

My intention was always to force the user to set this option. Before this PR, you can simply leave this option off completely without a validation error. Thanks to Wouter for finding it.

Also: made some punctuation & capitalization consistent on info messages.

Cheers!

Commits
-------

f7bb954979 Making login link signature_properties option required
2020-10-12 20:49:27 +02:00
Fabien Potencier
a319090109 feature #38525 [Serializer] Enabled mapping configuration via attributes (derrabus)
This PR was merged into the 5.x branch.

Discussion
----------

[Serializer] Enabled mapping configuration via attributes

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

Let's use attributes for the serializer mapping configuration!

```php
class MyEntity
{
    #[Groups(['list', 'detail])]
    #[SerializedName('some-property')]
    public $someProperty;

    #[Ignore]
    public string $secret;
}
```

Commits
-------

cfb9986203 [Serializer] Enabled mapping configuration via attributes.
2020-10-12 20:19:00 +02:00
Fabien Potencier
1d9c7a9376 Fix composer.json 2020-10-12 20:08:13 +02:00
Fabien Potencier
4b6e656ae2 feature #38522 [Notifier ] Add Discord notifier (mpiot, connorhu)
This PR was merged into the 5.x branch.

Discussion
----------

[Notifier ] Add Discord notifier

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

It finish the PR #36475

Commits
-------

b9b20d782b Added Discord bridge notifier embeds and test
14790d8140 Add Discord bridge notifier
2020-10-12 20:07:37 +02:00
Karoly Gossler
b9b20d782b Added Discord bridge notifier embeds and test 2020-10-12 20:07:15 +02:00
Mathieu Piot
14790d8140 Add Discord bridge notifier 2020-10-12 20:07:15 +02:00
Fabien Potencier
88b158d989 bug #38477 [Form] fix ViolationMapper was always generating a localized label for each FormType (romaricdrigon)
This PR was merged into the 5.x branch.

Discussion
----------

[Form] fix ViolationMapper was always generating a localized label for each FormType

| Q             | A
| ------------- | ---
| Branch?       | 5.x (fix new behavior from 5.2)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        | /

Follow-up of #38435, with branch changed

**Explanation of the issue**

In Symfony 5.2, the `{{ label }}` placeholder can be used in constraint messages (-> introduced in commit 0d9f44235c)

However, the way it was coded is introducing a small side effect: now, every time there is validation error, `ViolationMapper` will ask the Form Type its `label`, and if not `false`, it will try to translate it.

**Why it is important/why it causes a BC break**

Since by default `AbstractType` does not have any `label`, it also introduces a minor BC break.
I will explain it with an example: in a project I work on, we check we don't have any missing translation. Sometimes we have violation errors bound to form ; then current code will get Form `label`, which in `null` in form type classes (which is quite usual I believe), so it will generate one, and pass that one to translator. And we see a lot on erroneous missing translations.

**Proposed fix**

This fix moves all this logic into a `if`, so `ViolationMapper` call the translator component only if `{{ label }}` placeholder is used in constraint error message.
On top of fixing BC, it has the benefit of lowering the performance cost for every violation when the feature is not used.

I added a test, as I believe the behavior should be guaranteed from now on.

Commits
-------

aee5571a71 [Form] fix ViolationMapper was always generating a localized label for each FormType
2020-10-12 20:01:17 +02:00
Fabien Potencier
19c550db7b bug #38529 [Mailer] Fix mailjet image embedding (Sandldan)
This PR was merged into the 5.x branch.

Discussion
----------

[Mailer] Fix mailjet image embedding

Filename is not enough to embed the image through cid, ContentID field
has to be set with the cid identifier used in the HTMLPart

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

Hello!

While switching from `Mandrill` to `Mailjet` I noticed that embedding images was not working properly, the `Content-ID` mime is not set properly without setting the `ContentID` key. With this change things will work as described in the [symfony documentation](https://symfony.com/doc/current/mailer.html#embedding-images)

[Mailjet reference](https://dev.mailjet.com/email/guides/send-api-v31/#send-with-attached-files)

Commits
-------

7ab772eeea [Mailer] Fix mailjet image embedding
2020-10-12 19:58:26 +02:00
Nicolas Grekas
444626bbfc Merge branch '5.1' into 5.x
* 5.1:
  [HttpClient] fix reading the body after a ClientException
  [HttpClient] fix tests and merge
2020-10-12 18:54:56 +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
c31015e456 [HttpClient] fix tests and merge 2020-10-12 17:16:53 +02:00
Andre Johnson
7ab772eeea
[Mailer] Fix mailjet image embedding
Filename is not enough to embed the image through cid, ContentID field
has to be set with the cid identifier used in the HTMLPart
2020-10-12 15:57:02 +02:00
Ryan Weaver
f7bb954979 Making login link signature_properties option required 2020-10-12 09:36:23 -04:00
Nicolas Grekas
8a70d35a5f Merge branch '5.1' into 5.x
* 5.1:
  [Validator] remove phpunit-bridge from dev deps
2020-10-12 14:57:48 +02:00
Nicolas Grekas
d83f806e5f [Validator] remove phpunit-bridge from dev deps 2020-10-12 14:57:15 +02:00
Alexander M. Turek
cfb9986203 [Serializer] Enabled mapping configuration via attributes. 2020-10-12 14:52:41 +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
6844cb8685 bug #38523 [HttpClient] Fix multiple timeout with multiple retry (jderusse)
This PR was merged into the 5.x branch.

Discussion
----------

[HttpClient] Fix multiple timeout with multiple retry

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        | /

Fix #38518 when retryied request also failed.

Commits
-------

79a9392468 Fix multiple timeou with multiple retry
2020-10-12 14:06:18 +02:00
Nicolas Grekas
e4024e80ed Merge branch '5.1' into 5.x
* 5.1:
  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
  Fix no collection in extract default value
  [PhpUnitBridge] fix running parallel tests with phpunit 9
  [VarDumper] fix truncating big arrays
2020-10-12 14:05:07 +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
Jérémy Derussé
79a9392468
Fix multiple timeou with multiple retry 2020-10-12 11:08:06 +02:00
Nicolas Grekas
177cd1abce Fix test for PHP 8 2020-10-12 10:22:47 +02:00