Commit Graph

45968 Commits

Author SHA1 Message Date
Nicolas Grekas 28c9463207 minor #35190 [PhpUnitBridge] Add test case for @expectedDeprecation annotation (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Add test case for @expectedDeprecation annotation

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

Useful twice because it also tests the fact that a test that expects a deprecation and that does not perform any assertion is not considered risky.

Commits
-------

dba1804f5d [PhpUnitBridge] Add test case for @expectedDeprecation annotation
2020-01-04 12:18:41 +01:00
Nicolas Grekas 4103c16c6a minor #35204 [Security-Guard] fix missing name tag in param docblock (jrushlow)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security-Guard] fix missing name tag in param docblock

Added missing $credentials name tag to @param for getPassword()
to resolve PHPStan error and comply with the docBlock spec.

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

Added `[name]` tag to `@param` dockBlock for `PasswordAuthenticatedInterface::getPassword()`  to comply with the docBlock "standard" and to eliminate PHPStan error's when analyzing `PasswordAuthenticatedInterface.php`

Commits
-------

555189ae2c [Security-Guard] fixed 35203 missing name tag in param docblock
2020-01-04 12:05:18 +01:00
Christian Flothmann 8d46f95f4c ensure to expect no validation for the right reasons 2020-01-04 10:13:45 +01:00
Jesse Rushlow 555189ae2c
[Security-Guard] fixed 35203 missing name tag in param docblock
Added missing $credentials name tag to @param for getPassword()
to resolve PHPStan error and comply with the docBlock spec.
2020-01-03 18:06:56 -05:00
Christian Flothmann c5b8190424 do not render preferred choices as selected 2020-01-03 19:24:56 +01:00
Nicolas Grekas 35c08ef395 [HttpClient] fix casting responses to PHP streams 2020-01-03 19:18:19 +01:00
Fabien Potencier 6832cee3dd bug #35184 [Mailer] Payload sent to Sendgrid doesn't include names (versgui)
This PR was merged into the 4.4 branch.

Discussion
----------

 [Mailer] Payload sent to Sendgrid doesn't include names

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

When we use the Sendgrid API to send an email, for fields like to, from, bcc... the endpoint expects to receive an associative array composed of an email address and a optionally a name.

![Sendgrid doc extract](https://versgui.fr/files/sendgrid-api-sf.png)
https://sendgrid.com/docs/API_Reference/api_v3.html

Symfony sends only the email address, even when the name is provided. I changed the code to allow the bridge to send the name when it's provided.

I didn't fix it on 4.3 because Address doesn't manage names, and its constructor signature is not the same in 4.4.

Commits
-------

36eeba7a3a [Mailer] Fix addresses management in Sendgrid API payload
2020-01-03 16:59:18 +01:00
Thomas Calvet dba1804f5d [PhpUnitBridge] Add test case for @expectedDeprecation annotation 2020-01-03 12:33:57 +01:00
Thomas Calvet 50ba566c0b [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack 2020-01-03 11:53:28 +01:00
Guillaume Verstraete 36eeba7a3a [Mailer] Fix addresses management in Sendgrid API payload 2020-01-03 02:28:31 +01:00
Fabien Potencier e348513157 bug #35173 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API (vilius-g)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API

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

Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.

This also adds previously missing attachment names.

Commits
-------

7b1bbb6190 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
2020-01-02 19:35:45 +01:00
Fabien Potencier 08670cc85b bug #35172 [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name (vilius-g)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer][MailchimpBridge] Fix incorrect sender address when sender has name

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

This fixes the same problem as https://github.com/symfony/symfony/commit/6dbac13a07c23f321b04489b6a9773 but for HTTP transport.

I am also not sure that `from_email` parameter is needed here at all as it is optional for this API call.

Commits
-------

9e12a6dcda [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
2020-01-02 19:34:14 +01:00
Vilius Grigaliūnas 7b1bbb6190 [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
Previous code tries to pass attachments to API, but uses incorrect structure and as a result all attachments are missing when the email is sent.
2020-01-02 17:40:32 +02:00
Vilius Grigaliūnas 9e12a6dcda [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
This fixes the same problem as https://github.com/symfony/symfony/commit/6dbac13a07c23f321b04489b6a9773 but for HTTP transport.
2020-01-02 17:01:57 +02:00
Nicolas Grekas 234589a753 [HttpClient] fix capturing SSL certificates with NativeHttpClient 2020-01-02 11:45:17 +01:00
Jan Rosier 500a075673 Update year in license files 2020-01-01 15:47:03 +01:00
Christophe Meneses 5374d4f210 [TwigBridge][Form] Added missing help messages in form themes 2020-01-01 13:53:32 +01:00
Jan Rosier 0d7a8bdd0a Update year in license files 2020-01-01 12:51:43 +01:00
Jan Rosier 889a110e74 Update year in license files 2020-01-01 12:03:25 +01:00
Christian Flothmann c280a01724 fix version when "anonymous: lazy" was introduced 2020-01-01 10:41:58 +01:00
Nicolas Grekas 8e9aafc84f bug #35125 [Translator] fix performance issue in MessageCatalogue and catalogue operations (ArtemBrovko)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] fix performance issue in MessageCatalogue and catalogue operations

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

In our project we use lots of catalogue operations during importing of translations to our system and we ran into performance issue. Code profiler showed lots or `array_replace` calls in  [MessageCatalogue::add](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L128) method. This method is actually called by [MessageCatalogue::set](https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/MessageCatalogue.php#L70), which is quite an overkill, because `MessageCatalogue::set` is meant to set only one translation at a time. Method was reworked. `MergeOperation` and `TargetOperation` was reworked as well to use this improved `MessageCatalogue::set` method instead of constructing array with only one translation and passing it to `MessageCatalogue::add` method.

Table shows execution time before and after

|  | Time in seconds (avg. of 10 executions)
----------- | ------
Before | 50
After | 8

Looks like 4.* and 5.* versions can also be improved by the same changes.
<!--
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/roadmap):
 - 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
-------

5179af4796 [Translator] Performance improvement in MessageCatalogue and catalogue operations.
2019-12-31 15:31:48 +01:00
Nicolas Grekas 3415224479 minor #35132 [DebugBundle] Make RemoveWebServerBundleLoggerPass internal (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[DebugBundle] Make RemoveWebServerBundleLoggerPass internal

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
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/roadmap):
 - 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
-------

86afefed3b [DebugBundle] Make RemoveWebServerBundleLoggerPass internal
2019-12-31 15:28:17 +01:00
Nicolas Grekas c9767520d5 minor #35141 [Console][FormatterHelper] Use helper strlen statically and remove duplicated code (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console][FormatterHelper] Use helper strlen statically and remove duplicated code

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

All those helpers methods are static and are accessed with `self::` everywhere else. They are not an extension point.

Commits
-------

f0d227db2f [Console][FormatterHelper] Use helper strlen statically and remove duplicated code
2019-12-31 15:27:06 +01:00
Nicolas Grekas 3a51e0143a minor #35148 [HttpClient] fix typo (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix typo

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

Commits
-------

3a25878e98 [HttpClient] fix typo
2019-12-31 15:25:38 +01:00
Nicolas Grekas 3a25878e98 [HttpClient] fix typo 2019-12-30 18:19:47 +01:00
Thomas Calvet f0d227db2f [Console][FormatterHelper] Use helper strlen statically and remove duplicated code 2019-12-29 18:51:53 +01:00
Thomas Calvet cd40bb8604 [Routing] Fix i18n routing when the url contains the locale 2019-12-29 11:48:40 +01:00
Jaapio bad07ec557
Fix BC issue in phpDoc Reflection library
The used phpDocumentor library DocBlockReflection contained an BC break
that broke this component. The patch was applied in the recent released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also `\RuntimeExpception` needs to be catched.

The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more populair generics notation for arrays.
2019-12-28 22:02:19 +01:00
Robin Chalas 86afefed3b [DebugBundle] Make RemoveWebServerBundleLoggerPass internal 2019-12-28 19:58:08 +01:00
Nicolas Grekas 47f7cdc848 Merge branch '4.3' into 4.4
* 4.3:
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-28 16:00:14 +01:00
Artem Brovko 5179af4796 [Translator] Performance improvement in MessageCatalogue and catalogue operations. 2019-12-28 16:59:49 +02:00
Nicolas Grekas f3d8fd2521 bug #35120 [HttpClient] fix scheduling pending NativeResponse (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fix scheduling pending NativeResponse

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

There must be one pending list per `ResponseStream` instance.
Currently, we start unrelated responses and this can lead to broken iterators when the unrelated response throws because it is a 3/4/5xx.

Commits
-------

a90a6c9c48 [HttpClient] fix scheduling pending NativeResponse
2019-12-28 15:54:06 +01:00
Nicolas Grekas b6403d88c2 bug #35117 [Cache] do not overwrite variable value (xabbuh)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] do not overwrite variable value

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

Commits
-------

e379dbbf21 do not overwrite variable value
2019-12-28 15:53:10 +01:00
Nicolas Grekas 9876de2a28 bug #35113 [VarDumper] Fix "Undefined index: argv" when using CliContextProvider (xepozz)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead.

Discussion
----------

[VarDumper] Fix "Undefined index: argv" when using CliContextProvider

| Q             | A
| ------------- | ---
| Branch?       | 4.1, 4.2, 4.3, 4.4 or 5.0<!-- 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 #35084
| License       | MIT
<!--
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/roadmap):
 - 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
-------

340bb145d9 Fixed #35084
2019-12-28 15:52:21 +01:00
Dmitriy Derepko 340bb145d9 Fixed #35084 2019-12-28 15:52:14 +01:00
Nicolas Grekas af4f99f52b Merge branch '3.4' into 4.3
* 3.4:
  Add missing use statement
  [Profiler] wording
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
2019-12-28 15:48:01 +01:00
Nicolas Grekas 7aba9cf753 minor #35122 [Translation] Add missing use statement (odolbeau)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] Add missing use statement

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

Add missing use for `Data` class used in PHPDoc
https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php#L64

Commits
-------

6fd266dba6 Add missing use statement
2019-12-28 14:49:39 +01:00
Olivier Dolbeau 6fd266dba6 Add missing use statement 2019-12-27 12:18:21 +01:00
Nicolas Grekas a90a6c9c48 [HttpClient] fix scheduling pending NativeResponse 2019-12-27 12:01:41 +01:00
Fabien Potencier 63dd7a310f bug #34673 Migrate server:log command away from WebServerBundle (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

Migrate server:log command away from WebServerBundle

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

Duplicate ServerLogCommand in MonologBridge (currently in deprecated WebServerBundle) which does not have alternative in `symfony` bin.

Targeted 4.4 in order to provide a migration path to users.

Commits
-------

3bfa8dbb18 Migrate server:log command away from WebServerBundle
2019-12-27 10:06:25 +01:00
Christian Flothmann e379dbbf21 do not overwrite variable value 2019-12-27 10:03:19 +01:00
Fabien Potencier cee47cec05 bug #35103 [Translation] Use `locale_parse` for computing fallback locales (alanpoulain)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translation] Use `locale_parse` for computing fallback locales

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

As done in this PR https://github.com/symfony/symfony/pull/24157 for the `Intl` component, the `Translation` component should use `locale_parse` as well when available.

It will allow to manage [BCP 47](https://tools.ietf.org/html/bcp47) locales, which is why it is considered a bugfix ([locale_set_default](https://www.php.net/manual/en/locale.setdefault.php) is using BCP 47 compliant locale).

As done with the forementioned PR, there is also a fallback to make it work with `-`.

Sadly, I think it will create some conflicts when merging it upstream since the modified code has changed little by little.

Commits
-------

3657c0e664 Use locale_parse for computing fallback locales
2019-12-27 09:11:50 +01:00
Fabien Potencier be40f32798 minor #35016 [Profiler] wording (noniagriconomie)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #35016).

Discussion
----------

[Profiler] wording

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

Small wording improvement

Commits
-------

e7c9a28a03 [Profiler] wording
2019-12-27 08:51:10 +01:00
noniagriconomie e7c9a28a03 [Profiler] wording 2019-12-27 08:51:03 +01:00
Robin Chalas fd81bb8137 bug #35060 [Security] Fix missing defaults for auto-migrating encoders (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Fix missing defaults for auto-migrating encoders

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

Commits
-------

665ef06013 [Security] Fix missing defaults for auto-migrating encoders
2019-12-26 20:28:20 +01:00
Nicolas Grekas aac9ca2a88 bug #35067 [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable

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

Commits
-------

d6a7fbfbc3 [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
2019-12-26 09:58:10 +01:00
Nicolas Grekas 8855082ffd minor #35106 Use spaces correctly to display options in DebugCommand (ruudk)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead.

Discussion
----------

Use spaces correctly to display options in DebugCommand

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

Messenger ships with a DebugCommand. It doesn't properly place spaces for every option.

```diff
- handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1,  option2=2)
+ handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2)
```

Commits
-------

1c92e9e2f1 Use spaces correctly to display options in DebugCommand
2019-12-26 09:30:00 +01:00
Ruud Kamphuis 1c92e9e2f1 Use spaces correctly to display options in DebugCommand 2019-12-26 09:29:54 +01:00
Nicolas Grekas d6a3138a40 minor #35075 X-Accel Nginx URL updated (shahariaazam)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead.

Discussion
----------

X-Accel Nginx URL updated

Obsolete URL has been updated

Commits
-------

4557221597 X-Accel Nginx URL updated
2019-12-26 09:05:47 +01:00
Shaharia Azam 4557221597 X-Accel Nginx URL updated
Obsolete URL has been updated
2019-12-26 09:05:33 +01:00