Commit Graph

43362 Commits

Author SHA1 Message Date
Nicolas Grekas
94bd4023eb Merge branch '3.4' into 4.3
* 3.4:
  Fix mocks for ImmutableEventDispatcher.
2019-08-23 13:09:44 +02:00
Nicolas Grekas
1f7250139f minor #33299 [EventDispatcher] Fix mocks for ImmutableEventDispatcher (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Fix mocks for ImmutableEventDispatcher

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33228
| License       | MIT
| Doc PR        | N/A

Backport from #33248. This PR fixes mocks that return values that are incompatible with the annotated return type.

Commits
-------

874aaea75f Fix mocks for ImmutableEventDispatcher.
2019-08-23 12:00:53 +02:00
Alexander M. Turek
874aaea75f Fix mocks for ImmutableEventDispatcher. 2019-08-23 10:05:57 +02:00
tien.xuan.vo
5c1f3a2414 [Messenger] Stop worker when it should stop 2019-08-23 13:45:45 +07:00
Nicolas Grekas
aeba22c4ad Merge branch '3.4' into 4.3
* 3.4:
  Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
  [Form][PropertyPathMapper] Avoid extra call to get config
2019-08-22 18:29:54 +02:00
Nicolas Grekas
1d7114957b Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
This reverts commit fea98a8473, reversing
changes made to bd498f2503.
2019-08-22 18:27:00 +02:00
Nicolas Grekas
e91ae8bdad minor #33287 [HttpKernel] remove unused fixtures (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] remove unused fixtures

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

those are remnants of bundle inheritance that has been removed in sf 4

Commits
-------

5ffec16396 [HttpKernel] remove unused fixtures
2019-08-22 18:25:57 +02:00
Nicolas Grekas
118dfa03b9 minor #33291 [Form][PropertyPathMapper] Avoid extra call to get config (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form][PropertyPathMapper] Avoid extra call to get config

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

3e2aada2d8 [Form][PropertyPathMapper] Avoid extra call to get config
2019-08-22 18:22:06 +02:00
Nicolas Grekas
0a25ccab8e fix deps=low 2019-08-22 10:16:11 +02:00
Nicolas Grekas
3979caf6ab Merge branch '3.4' into 4.3
* 3.4:
  Use PHP 7.4 on deps=low
2019-08-22 09:51:06 +02:00
Nicolas Grekas
26be947a86 minor #33288 Use PHP 7.4 on deps=low (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Use PHP 7.4 on deps=low

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Having a job on PHP 7.4 will allow using return type covariance as described in #33236

Commits
-------

21b87024f0 Use PHP 7.4 on deps=low
2019-08-22 09:44:36 +02:00
Nicolas Grekas
35673b87e0 bug #33292 [VarExporter] fix support for PHP 7.4 (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[VarExporter] fix support for PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32844
| License       | MIT
| Doc PR        | -

Commits
-------

1a036dc9ff [VarExporter] fix support for PHP 7.4
2019-08-22 09:43:47 +02:00
Nicolas Grekas
1a036dc9ff [VarExporter] fix support for PHP 7.4 2019-08-22 09:33:08 +02:00
Thomas Calvet
3e2aada2d8 [Form][PropertyPathMapper] Avoid extra call to get config 2019-08-22 09:15:31 +02:00
Nicolas Grekas
21b87024f0 Use PHP 7.4 on deps=low 2019-08-22 08:53:14 +02:00
Tobias Schultze
5ffec16396 [HttpKernel] remove unused fixtures
those are remnants of bundle inheritance that has been removed in sf 4
2019-08-21 20:13:34 +02:00
Nicolas Grekas
dd153d8dce bug #33282 [HttpKernel] Do not extend the new SF 4.3 ControllerEvent so we can make it final (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Do not extend the new SF 4.3 ControllerEvent so we can make it final

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | unlikely
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

See https://github.com/symfony/symfony/pull/33152#discussion_r313846346
Remember the ControllerEvent is new in SF 4.3 so we just go back to what it was before 4.3

Commits
-------

00140b6a7c Do not extend the new SF 4.3 ControllerEvent so we can make it final
2019-08-21 16:59:28 +02:00
Nicolas Grekas
72eaff8893 Merge branch '3.4' into 4.3
* 3.4:
  Backported return type violation bugfixes.
2019-08-21 16:58:38 +02:00
Nicolas Grekas
622ce1d0f4 minor #33281 Backported return type violation bugfixes (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Backported return type violation bugfixes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33228
| License       | MIT
| Doc PR        | N/A

Fixed some doc blocks and broken return values discovered while working on #33279.

Commits
-------

8877a013d7 Backported return type violation bugfixes.
2019-08-21 16:56:53 +02:00
Fabien Potencier
46b944f9a7 bug #33278 [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo (remove the line telling that these assertions aren't compatible with Panther)

Backport of essential fixes provided by https://github.com/symfony/symfony/pull/32207. It allows most assertions to work with Panther even when using Symfony 4.3.

Commits
-------

2316dc36fb [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
2019-08-21 16:44:34 +02:00
Tobias Schultze
00140b6a7c Do not extend the new SF 4.3 ControllerEvent so we can make it final 2019-08-21 16:40:57 +02:00
Alexander M. Turek
8877a013d7 Backported return type violation bugfixes. 2019-08-21 16:37:38 +02:00
Kévin Dunglas
2316dc36fb
[FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther 2019-08-21 14:46:38 +02:00
Fabien Potencier
58439e3166 bug #33216 [Mime] Trim and remove line breaks from NamedAddress name arg (maldoinc)
This PR was squashed before being merged into the 4.3 branch (closes #33216).

Discussion
----------

[Mime] Trim and remove line breaks from NamedAddress name arg

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | YES
| New feature?  | NO
| BC breaks?    | NO     <!-- see https://symfony.com/bc -->
| Deprecations? | NO <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | YES    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This patch trims the name argument of named address in order to avoid some cases where the name is a non-empty input consisting of whitespace and line breaks which would lead to forming of addresses such as `" " <mail@example.org>` <sup>1</sup>

---

In a large Symfony codebase that deals with sending large volumes of email we encountered an issue after the Mailer was changed from PHPMailer to the Symfony Mailer component.

The issue: Some emails would not render correctly as either plaintext or html but instead the original email source with headers and quoted-printable content would render in clients such as MS Outlook 2003, later versions of Outlook and other clients do not seem affected.

After some investigation we found that the error came from a line that looked like this: `$message->addTo(new NamedAddress($contact->getEmailCanonical(), $contact->getFullName()))`.

The `getFullName` method simply concated the first/last name with a space in between. For contacts without either, this resulted in representation 1. This causes MS Outlook 2003 (potentially Outlook 2000 as well but this was not tested) to malfunction and completely fail to render the email.

This patch aims to fix the aforementioned issue.

Commits
-------

e491e3a594 [Mime] Trim and remove line breaks from NamedAddress name arg
2019-08-21 10:46:47 +02:00
Emirald Mateli
e491e3a594 [Mime] Trim and remove line breaks from NamedAddress name arg 2019-08-21 10:46:37 +02:00
Nicolas Grekas
7a0787c8bd Merge branch '3.4' into 4.3
* 3.4:
  More docblock fixes
2019-08-20 23:02:25 +02:00
Nicolas Grekas
50a3d64729 minor #33262 More docblock fixes (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

More docblock fixes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Found while working on #33259

Commits
-------

9b78d53d0d More docblock fixes
2019-08-20 23:00:23 +02:00
Nicolas Grekas
9b78d53d0d More docblock fixes 2019-08-20 22:53:36 +02:00
Nicolas Grekas
4bffa04271 fix test 2019-08-20 16:56:01 +02:00
Nicolas Grekas
5ec6ff378b cs fix 2019-08-20 16:41:44 +02:00
Nicolas Grekas
cfb218456c minor #33254 Fix inconsistent return points (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix inconsistent return points

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17201 in preparation for #33228
| License       | MIT
| Doc PR        | N/A

That's #33252 on the 4.3 branch.

Commits
-------

c26c53596e Fix inconsistent return points.
2019-08-20 16:28:49 +02:00
Alexander M. Turek
c26c53596e Fix inconsistent return points. 2019-08-20 16:27:59 +02:00
Nicolas Grekas
c1e0c1b05f minor #33108 Revert "bug #33092 [DependencyInjection] Improve an exception message" (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

Revert "bug #33092 [DependencyInjection] Improve an exception message"

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As reminded by @ro0NL in https://github.com/symfony/symfony/pull/33092#issuecomment-520138148, it looks like we forgot that `CheckDefinitionValidityPass` already checks and suggests for leading slashes.

Why didn't you get the exception from `CheckDefinitionValidityPass` @fabpot?

Commits
-------

ed590ca16b Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
2019-08-20 16:12:03 +02:00
Nicolas Grekas
c3ccd2aee5 bug #33124 [Config] Add handling for ignored keys in ArrayNode::mergeValues. (Alexandre Parent)
This PR was squashed before being merged into the 4.3 branch (closes #33124).

Discussion
----------

[Config] Add handling for ignored keys in ArrayNode::mergeValues.

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33101
| License       | MIT
| Doc PR        | N/A

Fix case where normalized data accepting and keeping ignored keys is rejected during merge.

Commits
-------

311e1c4e9e [Config] Add handling for ignored keys in ArrayNode::mergeValues.
2019-08-20 16:11:21 +02:00
Alexandre Parent
311e1c4e9e [Config] Add handling for ignored keys in ArrayNode::mergeValues. 2019-08-20 16:11:15 +02:00
Nicolas Grekas
aefbc93a07 Merge branch '3.4' into 4.3
* 3.4:
  Fix inconsistent return points.
  [Security/Core] UserInterface::getPassword() can return null
  [Router] Fix TraceableUrlMatcher behaviour with trailing slash
2019-08-20 16:07:54 +02:00
Nicolas Grekas
9672f4c98f bug #33244 [Router] Fix TraceableUrlMatcher behaviour with trailing slash (Xavier Leune)
This PR was merged into the 3.4 branch.

Discussion
----------

[Router] Fix TraceableUrlMatcher behaviour with trailing slash

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32149
| 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):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->
This pull requests fixes the bug #32149. This issue was about TraceableUrlMatcher having a wrong behaviour regarding trailing slashes (according to UrlMatcher and documentation).

With this pull requests, the test class TraceableUrlMatcherTest now extends UrlMatcherTest, to prevent such behaviour digression.

Thanks @nicolas-grekas for his feedback on the issue #32149

Commits
-------

fd1cb443fd [Router] Fix TraceableUrlMatcher behaviour with trailing slash
2019-08-20 15:36:35 +02:00
Nicolas Grekas
727d431bf2 minor #33257 [Security/Core] UserInterface::getPassword() can return null (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] UserInterface::getPassword() can return null

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Our very own `User` class can return null already.

Commits
-------

00d7f8cde7 [Security/Core] UserInterface::getPassword() can return null
2019-08-20 15:35:21 +02:00
Nicolas Grekas
8069b58299 minor #33252 Fix inconsistent return points (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix inconsistent return points

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17201 in preparation for #33228
| License       | MIT
| Doc PR        | N/A

Inconsistent return points in methods prevent adding return types. I thought, I'll give it a try and fix them. After this PR, PhpStorm's inspection still finds 39 issues, but as far as I can tell, they're either false positives or fixture code.

Commits
-------

f5b6ee9de1 Fix inconsistent return points.
2019-08-20 15:34:30 +02:00
Alexander M. Turek
f5b6ee9de1 Fix inconsistent return points. 2019-08-20 15:31:17 +02:00
Nicolas Grekas
00d7f8cde7 [Security/Core] UserInterface::getPassword() can return null 2019-08-20 15:10:28 +02:00
Nicolas Grekas
2c1f349602 Merge branch '3.4' into 4.3
* 3.4:
  cs fix
  [HttpKernel] Remove outdated docblock comment
2019-08-20 14:49:02 +02:00
Nicolas Grekas
55a484dc20 cs fix 2019-08-20 14:35:37 +02:00
Nicolas Grekas
974b77e781 cs fix 2019-08-20 13:59:54 +02:00
Xavier Leune
fd1cb443fd [Router] Fix TraceableUrlMatcher behaviour with trailing slash 2019-08-19 17:56:40 +02:00
Fabien Potencier
3aceb6d3a2 bug #33232 Fix handling for session parameters (vkhramtsov)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix handling for session parameters

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

b8c9e40980 Fix handling for session parameters
2019-08-19 14:41:34 +02:00
Fabien Potencier
ef0119a2d4 minor #33238 [HttpKernel] Remove outdated docblock comment (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Remove outdated docblock comment

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Convention is deprecated since 3.4.

Commits
-------

841c0b041f [HttpKernel] Remove outdated docblock comment
2019-08-19 14:17:06 +02:00
Robin Chalas
841c0b041f [HttpKernel] Remove outdated docblock comment 2019-08-19 13:48:36 +02:00
Nicolas Grekas
3aa4537ef8 Merge branch '3.4' into 4.3
* 3.4:
  [Routing] Add a param annotation for $annot.
  [DI] fix docblock
  Add missing translations for Armenian locale
  [Process] Doc block backport.
  Fix some docblocks.
2019-08-19 13:14:47 +02:00
Nicolas Grekas
ca2869bdba minor #33234 [Routing] Add a param annotation for $annot (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Add a param annotation for $annot

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

This PR addresses https://github.com/symfony/symfony/pull/33191/files#r314998032

Commits
-------

5d26f4c72e [Routing] Add a param annotation for $annot.
2019-08-19 13:02:21 +02:00