Commit Graph

43186 Commits

Author SHA1 Message Date
Nicolas Grekas
9e154e7728 fix merge 2019-08-26 10:55:16 +02:00
Nicolas Grekas
74b2802197 Merge branch '3.4' into 4.3
* 3.4: (21 commits)
  [SecurityBundle] fix return type declarations
  [BrowserKit] fix return type declarations
  [PropertyInfo] fix return type declarations
  [Bridge/Doctrine] fix return type declarations
  [Form] fix return type declarations
  [Console] fix return type declarations
  [Intl] fix return type declarations
  [Templating] fix return type declarations
  [DomCrawler] fix return type declarations
  [Validator] fix return type declarations
  [Process] fix return type declarations
  [Workflow] fix return type declarations
  [Cache] fix return type declarations
  [Serializer] fix return type declarations
  [Translation] fix return type declarations
  [DI] fix return type declarations
  [Config] fix return type declarations
  [HttpKernel] Fix return type declarations
  [Security] Fix return type declarations
  [Routing] Fix return type declarations
  ...
2019-08-26 10:26:39 +02:00
Nicolas Grekas
e9886e4e4c minor #33332 [3.4] Fix return types declarations (nicolas-grekas, derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[3.4] Fix return types declarations

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

This is the subset of #33236 that applies to branch 3.4.
This PR ensures return types are correctly declared, and adjust some implementations that return incorrect types.

Commits
-------

2ceb453ee5 [SecurityBundle] fix return type declarations
c1d7a88b57 [BrowserKit] fix return type declarations
07405e2c60 [PropertyInfo] fix return type declarations
5f3b4b616b [Bridge/Doctrine] fix return type declarations
8706f18ea8 [Form] fix return type declarations
a32a713045 [Console] fix return type declarations
523e9b9feb [Intl] fix return type declarations
73f504c94a [Templating] fix return type declarations
2b8ef1d6d7 [DomCrawler] fix return type declarations
2ea98bb4a1 [Validator] fix return type declarations
6af0c80342 [Process] fix return type declarations
28646c7f9b [Workflow] fix return type declarations
5f9aaa743c [Cache] fix return type declarations
5072cfc7f8 [Serializer] fix return type declarations
70feaa407e [Translation] fix return type declarations
ca1fad471e [DI] fix return type declarations
9c63be489e [Config] fix return type declarations
05fe553666 [HttpKernel] Fix return type declarations
e0d79f71ed [Security] Fix return type declarations
c1b7118d7c [Routing] Fix return type declarations
ef5ead0005 [HttpFoundation] fix return type declarations
2019-08-26 10:20:21 +02:00
Nicolas Grekas
2ceb453ee5 [SecurityBundle] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
c1d7a88b57 [BrowserKit] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
07405e2c60 [PropertyInfo] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
5f3b4b616b [Bridge/Doctrine] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
8706f18ea8 [Form] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
a32a713045 [Console] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
523e9b9feb [Intl] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
73f504c94a [Templating] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
2b8ef1d6d7 [DomCrawler] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
2ea98bb4a1 [Validator] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
6af0c80342 [Process] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
28646c7f9b [Workflow] fix return type declarations 2019-08-26 09:52:58 +02:00
Nicolas Grekas
5f9aaa743c [Cache] fix return type declarations 2019-08-26 09:52:58 +02:00
Alexander M. Turek
5072cfc7f8 [Serializer] fix return type declarations 2019-08-26 09:52:58 +02:00
Alexander M. Turek
70feaa407e [Translation] fix return type declarations 2019-08-26 09:52:58 +02:00
Alexander M. Turek
ca1fad471e [DI] fix return type declarations 2019-08-26 09:52:58 +02:00
Alexander M. Turek
9c63be489e [Config] fix return type declarations 2019-08-26 09:52:57 +02:00
Nicolas Grekas
05fe553666 [HttpKernel] Fix return type declarations 2019-08-26 09:50:50 +02:00
Alexander M. Turek
e0d79f71ed [Security] Fix return type declarations 2019-08-26 09:50:50 +02:00
Alexander M. Turek
c1b7118d7c [Routing] Fix return type declarations 2019-08-26 09:50:50 +02:00
Nicolas Grekas
ef5ead0005 [HttpFoundation] fix return type declarations 2019-08-26 09:50:50 +02:00
Fabien Potencier
aa81e2721a minor #33314 [DomCrawler] Fix @throws (dunglas)
This PR was merged into the 4.3 branch.

Discussion
----------

[DomCrawler] Fix @throws

| 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 | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

A `LogicException` is thrown, not a `RuntimeException`.

Commits
-------

a414c0323a [DomCrawler] Fix @throws
2019-08-25 09:01:30 +02:00
Kévin Dunglas
a414c0323a
[DomCrawler] Fix @throws 2019-08-24 00:39:04 +02:00
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
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