Commit Graph

35871 Commits

Author SHA1 Message Date
Fabien Potencier
8c2e128a1a feature #33091 [Mime] Add Address::fromString (gisostallenberg)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Add Address::fromString

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33086
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/12128

This will allow to create a Address from a string such as 'Name <name@example.com>'
Example:
```php
$address = Address::fromString("Name <name@example.com>");
```

Commits
-------

75ea8d0d67 Add Address::fromString
2019-08-22 11:13:11 +02:00
Giso Stallenberg
75ea8d0d67 Add Address::fromString
This will allow to create an Address from a string such as 'Name <name@example.com>'
2019-08-22 11:10:30 +02:00
Grégoire Pineau
9535f9e8d6 [DomCrawler] Added Crawler::matches(), ::closest(), ::outerHtml() 2019-08-22 10:52:44 +02:00
Nicolas Grekas
1981f06c88 Merge branch '4.3' into 4.4
* 4.3:
  fix deps=low
  [VarExporter] fix support for PHP 7.4
  Use PHP 7.4 on deps=low
2019-08-22 10:37:03 +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
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
153e081119 ws fix 2019-08-21 17:53:07 +02:00
Nicolas Grekas
f2e2df6a0c feature #33152 Mark all dispatched event classes as final (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

Mark all dispatched event classes as final

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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 |
| License       | MIT
| Doc PR        |

I think we should mark all our Event classes as final. There is no point in people extending them as the libraries that use the event, will only dispatch this event. So extending events in user-land achieves nothing as the subclasses won't be dispatched.
I'm not talking about the base events that are meant to be extended like KernelEvent, but the leaf events like ExceptionEvent, ResponseEvent etc.
Then we can also make them real final in 5.0 as the events are value objects that should not be mocked.

Commits
-------

4bb38eec89 Mark all dispatched event classes as final
2019-08-21 17:50:31 +02:00
Nicolas Grekas
2fff132cbb typo 2019-08-21 17:39:13 +02:00
Tobias Schultze
4bb38eec89 Mark all dispatched event classes as final 2019-08-21 17:17:54 +02:00
Alexander M. Turek
c39fd9c973 Fixed tests on the Security and Form components 2019-08-21 17:17:31 +02:00
Nicolas Grekas
fc186bb78f Add return types to tests and final|internal|private methods 2019-08-21 17:14:41 +02:00
Nicolas Grekas
8d8d3d4d40 minor #33280 fix deprecated call to setLocale with null (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

fix deprecated call to setLocale with null

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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        |

Fix a potentially invalid call since #33272

Commits
-------

26f9afe8d1 fix deprecated call to setLocale with null
2019-08-21 17:06:06 +02:00
Nicolas Grekas
f499083f78 feature #33258 [HttpKernel] deprecate global dir to load resources from (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] deprecate global dir to load resources from

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

Replaces #31958

Here two example deprecations by adding files in the deprecated locations:
```
Overwriting the resource "@AcmeBundle/Resources/config/routing.yaml" with "/vagrant/src/Resources/AcmeBundle/config/routing.yaml" is deprecated since Symfony 4.4 and will be removed in 5.0.
Loading the file "foobar.yaml" from the global resource directory "/vagrant/src" is deprecated since Symfony 4.4 and will be removed in 5.0.
```

Commits
-------

aa82566f76 [HttpKernel] deprecate global dir to load resources from
2019-08-21 17:04:54 +02:00
Nicolas Grekas
2984ab7e4e Merge branch '4.3' into 4.4
* 4.3:
  Do not extend the new SF 4.3 ControllerEvent so we can make it final
  Backported return type violation bugfixes.
  [FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
2019-08-21 17:03:51 +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
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
Tobias Schultze
26f9afe8d1 fix deprecated call to setLocale with null 2019-08-21 15:33:13 +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
c9c3d667de bug #33273 Removed calls to Twig\Environment::loadTemplate() (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Removed calls to Twig\Environment::loadTemplate()

| Q             | A
| ------------- | ---
| Branch?       | 4.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 prepares #33039. Twig 3 does not have the `loadTemplate()` anymore, so this PR replaces calls to that method.

Commits
-------

ea9e375b0b Removed calls to Twig\Environment::loadTemplate().
2019-08-21 13:50:41 +02:00
Alexander M. Turek
ea9e375b0b Removed calls to Twig\Environment::loadTemplate(). 2019-08-21 13:24:25 +02:00
Nicolas Grekas
9475b2e82d bug #33275 [Intl] make polyfill classes abstract, fix edge case (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] make polyfill classes abstract, fix edge case

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

While working on return types, I keep stumbling on those classes that are `@internal`, but for which we must not add return types, because they're polyfills and are extended by stubs found in the `Resources` folder of the component.

Making the polyfills abstract fixes the linting issue.
This made me discover we have a glitch in the `getPattern()` implementation, that makes our version diverge from intl's. Fixed here too.

On 4.4 because let's not disrupt 3.4.

Commits
-------

c757b95aed [Intl] make polyfill classes abstract, fix edge case
2019-08-21 12:59:41 +02:00
Fabien Potencier
7046cac7f6 feature #33272 [Translation] deprecate support for null locales (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] deprecate support for null locales

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

Commits
-------

e6b6a9d33a deprecate support for null locales
2019-08-21 12:12:17 +02:00
Nicolas Grekas
c757b95aed [Intl] make polyfill classes abstract, fix edge case 2019-08-21 12:11:32 +02:00
Fabien Potencier
7aedfe7079 Merge branch '4.3' into 4.4
* 4.3:
  [Mime] Trim and remove line breaks from NamedAddress name arg
2019-08-21 10:50:18 +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
Fabien Potencier
451daa0b06 feature #33269 [TwigBridge] Mark all classes extending twig as @final (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[TwigBridge] Mark all classes extending twig as @final

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes-ish
| 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 | refs #33039
| License       | MIT
| Doc PR        | n/a

Classes defining extensions/nodes/node visitors/token parsers should not be changed. They should be final.

That would also help with Twig 3.0 which introduces type hints (including return types).

Commits
-------

d657459a5f [TwigBridge] Mark all classes extending twig as @final
2019-08-21 10:34:41 +02:00
Christian Flothmann
e6b6a9d33a deprecate support for null locales 2019-08-21 10:16:47 +02:00
Fabien Potencier
d657459a5f [TwigBridge] Mark all classes extending twig as @final 2019-08-21 09:28:19 +02:00
Fabien Potencier
eb7d74e6c5 [Mime] Remove NamedAddress 2019-08-21 09:13:01 +02:00
Fabien Potencier
5a753b1428 minor #33245 [Messenger] remove patch release BC layer of durable and expiring delay (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] remove patch release BC layer of durable and expiring delay

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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 |
| License       | MIT
| Doc PR        |

Removes the small BC layer of #33127 from 4.3 in 4.4

Commits
-------

d5aaf44529 [Messenger] remove patch release BC layer of durable and expiring delay
2019-08-21 07:11:00 +02:00
Tobias Schultze
aa82566f76 [HttpKernel] deprecate global dir to load resources from 2019-08-21 00:57:10 +02:00
Nicolas Grekas
22319a9935 minor #33264 [4.4] Add return types on internal|final|private methods (bis) (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[4.4] Add return types on internal|final|private methods (bis)

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

`: self` is used for final methods only. I'd have preferred using `: object` but that's not possible on PHP 7.1

Commits
-------

23faee406f [4.4] Add return types on internal|final|private methods (bis)
2019-08-20 23:39:47 +02:00
Nicolas Grekas
23faee406f [4.4] Add return types on internal|final|private methods (bis) 2019-08-20 23:22:06 +02:00
Nicolas Grekas
7eb5feec51 minor #33261 Add types to routing and DI configuration traits. (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Add types to routing and DI configuration traits.

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | I don't think so.
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32179, #33228
| License       | MIT
| Doc PR        | N/A

This PR backports the type declarations added to the configurator traits of the Routing and DI components. These traits expose only final methods, so it should be pretty safe to add return types to them.

The only scenario I could make up where this change will break something is if a trait is used to override a method: https://3v4l.org/EAsk8 But I doubt that those traits are used that way.

On master, we've used the `object` return type for the fluent methods. That type is not available on 4.4 where we have to support php 7.1. I'm using `self` instead. Since the methods are final and thus cannot be overridden, I believe that we shouldn't run into covariance issues here, so `self` should be safe.

Commits
-------

1ca30c97e6 Add types to roting and DI configuration traits.
2019-08-20 23:07:54 +02:00
Nicolas Grekas
543e4013d0 bug #33263 [Ldap] Add missing LdapUser::setPassword() (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Add missing LdapUser::setPassword()

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

Required for password migrations.

Commits
-------

08dd4f3ae1 [Ldap] Add missing LdapUser::setPassword()
2019-08-20 23:06:27 +02:00
Nicolas Grekas
af6cf3140d Merge branch '4.3' into 4.4
* 4.3:
  More docblock fixes
  fix test
2019-08-20 23:03:47 +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
Robin Chalas
08dd4f3ae1 [Ldap] Add missing LdapUser::setPassword() 2019-08-20 22:58:33 +02:00
Nicolas Grekas
9b78d53d0d More docblock fixes 2019-08-20 22:53:36 +02:00
Alexander M. Turek
1ca30c97e6 Add types to roting and DI configuration traits. 2019-08-20 21:45:11 +02:00
Fabien Potencier
b7954640e3 bug #33260 [ErrorHandler] Registering basic exception handler to handle early failures (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Registering basic exception handler to handle early failures

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

This behavior was previously handled by the removed `ExceptionHandler` class in https://github.com/symfony/symfony/pull/32637.

As this method is mainly called during Kernel boot, where nothing is yet available, the Response content is always HTML. Otherwise, If all goes well on booting, this exception handler will be replaced in `DebugHandlersListener` class:
8073b8abfb/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php (L139)

where the advanced exception handler mechanism is activated.

Commits
-------

a2077a2369 Registers basic exception handler to handle early failures
2019-08-20 21:09:10 +02:00
Yonel Ceruto
a2077a2369 Registers basic exception handler to handle early failures 2019-08-20 14:56:58 -04:00
Nicolas Grekas
8073b8abfb some backports from master 2019-08-20 18:35:28 +02:00
Nicolas Grekas
32116184d7 Add return types to internal|final|private methods 2019-08-20 17:32:53 +02:00
Nicolas Grekas
4bffa04271 fix test 2019-08-20 16:56:01 +02:00
Nicolas Grekas
b253f25933 feature #33169 [HttpFoundation] Precalculate session expiry timestamp (azjezz)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Precalculate session expiry timestamp

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #13955, #21423, #14625
| License       | MIT

Continued work from the original PR #21423 / #21857

Commits
-------

066000afa2 [HttpFoundation] Precalculate session expiry timestamp
2019-08-20 16:51:07 +02:00
Nicolas Grekas
225bf41e3b Merge branch '4.3' into 4.4
* 4.3:
  cs fix
  Fix inconsistent return points.
  [Config] Add handling for ignored keys in ArrayNode::mergeValues.
  Fix inconsistent return points.
  [Security/Core] UserInterface::getPassword() can return null
  [Router] Fix TraceableUrlMatcher behaviour with trailing slash
  Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
2019-08-20 16:44:19 +02:00
Nicolas Grekas
5ec6ff378b cs fix 2019-08-20 16:41:44 +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
a2ef397ea3 Merge branch '4.3' into 4.4
* 4.3:
  cs fix
  cs fix
  [HttpKernel] Remove outdated docblock comment
  Fix handling for session parameters
2019-08-20 14:49:24 +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
Andreas Braun
b78c5cb1a6
Fix missing exporter in PHPUnit constraint poylfill 2019-08-20 12:03:00 +02:00
Karoly Gossler
0e7bf6fb52 added Process::getLastOutputTime() method 2019-08-20 11:16:47 +02:00
Nicolas Grekas
a9ace36389 bug #33241 [Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+ (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+

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

Commits
-------

1f4ca61408 [Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+
2019-08-19 21:49:26 +02:00
Tobias Schultze
d5aaf44529 [Messenger] remove patch release BC layer of durable and expiring delay 2019-08-19 20:02:16 +02:00
Fabien Potencier
b681e935ad minor #33242 [DI] add return-types to generated containers (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] add return-types to generated containers

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

A chunk of #33236 ready for 4.4

Commits
-------

917091955c [DI] add return-types to generated containers
2019-08-19 17:58:03 +02:00
Fabien Potencier
c098374d21 bug #33239 [Ldap] Make LdapUser implement EquatableInterface (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Ldap] Make LdapUser implement EquatableInterface

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

Bugfix because it is required for password migrations https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Ldap/Security/LdapUserProvider.php#L128

Commits
-------

ae255095ea [Ldap] Make LdapUser implement EquatableInterface
2019-08-19 17:56:55 +02:00
Xavier Leune
fd1cb443fd [Router] Fix TraceableUrlMatcher behaviour with trailing slash 2019-08-19 17:56:40 +02:00
Grégoire Pineau
1f4ca61408 [Monolog] Fixed ElasticsearchLogstashHandler with monolog 2+ 2019-08-19 17:50:03 +02:00
Nicolas Grekas
917091955c [DI] add return-types to generated containers 2019-08-19 16:04:49 +02:00
Mdewet
7d1fefe8b8 Typo - Fix bad classnames in Exceptions docblocks 2019-08-19 15:54:22 +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
Robin Chalas
ae255095ea [Ldap] Make LdapUser implement EquatableInterface 2019-08-19 14:33:50 +02:00
Fabien Potencier
ce372672d0 feature #33237 [Mailer] Remove the auth mode DSN option and support in the eSMTP transport (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Remove the auth mode DSN option and support in the eSMTP transport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes     <!-- 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
| License       | MIT
| Doc PR        | -

The authentication mode can be automatically negotiated between the Mailer and the SMTP server. There is an option to force it to a given auth mode, but I don't see any valid use case. So, let's remove that feature.

Commits
-------

34cbda53c4 [Mailer] removed the auth mode DSN option and support in the eSMTP transport
2019-08-19 14:19:32 +02:00
Robin Chalas
841c0b041f [HttpKernel] Remove outdated docblock comment 2019-08-19 13:48:36 +02:00
Nicolas Grekas
034c06e181 [Mailer] conflict with symfony/sendgrid-mailer < 4.4 2019-08-19 13:44:21 +02:00
Nicolas Grekas
a0c1570915 [Mailer] fix tests 2019-08-19 13:34:47 +02:00
Nicolas Grekas
3cd20c993d Merge branch '4.3' into 4.4
* 4.3:
  [Routing] Add a param annotation for $annot.
  [DI] fix docblock
  [Console] fix docblock
  Add missing translations for Armenian locale
  [Process] Added missing return type.
  [Process] Doc block backport.
  Added doc block for Registry::supports().
  [Cache] Fix predis test
  Don't duplicate addresses in Sendgrid Transport
  Remove unnecessary statement
  Fix some docblocks.
  [Messenger] make delay exchange and queues durable like the normal ones by default
  Cancel delayed message if handler fails
  Added tests for #32370
2019-08-19 13:17:23 +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
Fabien Potencier
34cbda53c4 [Mailer] removed the auth mode DSN option and support in the eSMTP transport 2019-08-19 13:04:31 +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
Fabien Potencier
5b8c4676d0 [Mailer] simplified the way TLS/SSL/StartTls work 2019-08-19 11:19:02 +02:00
azjezz
066000afa2 [HttpFoundation] Precalculate session expiry timestamp
Co-authored-by: Benjamin Cremer <b.cremer@shopware.com>
Co-authored-by: Rob Frawley 2nd <rmf@src.run>
2019-08-19 10:02:10 +01:00
Alexander M. Turek
5d26f4c72e [Routing] Add a param annotation for $annot. 2019-08-19 11:00:11 +02:00
Vladimir Khramtsov
b8c9e40980 Fix handling for session parameters 2019-08-19 10:16:53 +03:00
Nicolas Grekas
a8842072a5 [DI] fix docblock 2019-08-18 22:04:16 +02:00
Nicolas Grekas
2ae6e0c14e [Console] fix docblock 2019-08-18 21:32:16 +02:00
Fabien Potencier
bc79cfe003 feature #32360 [Monolog] Added ElasticsearchLogstashHandler (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Monolog] Added ElasticsearchLogstashHandler

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

This PR was initially [submitted on Monolog](https://github.com/Seldaek/monolog/pull/1334).
It has been refused , but Jordi suggested to add it to the symfony bridge. So here we go :)

---

ATM, there are few options to push log to Elastic Stack in order to play with them:

* install logstash and use a Gelf handler. It works but you have to install logstash and configure it. Not an easy task. More over, it need an extra PHP package
* use the ES handler: It does not play well with context and extra: Kibana is not able to filter on nested object. And this handler is tightly coupled to the ElasticaFormatter formater. More over, it need an extra PHP package
* use something to parse file logs. This is really a bad idea since it involves a parsing... More over a daemon is needed to do that (file beat / logstash / you name it)

This is why I'm introducing a new Handler.

* There is not need to install anything (expect ES, of course)
* It play very well with Kibana, as it uses the Logstash format
* It requires symfony/http-client, but in a modern PHP application (SF 4.3) this dependency is already present
* It slow down a bit the application since it trigger an HTTP request for each logs. But symfony/http-client is non-blocking. If you want to use it in production, I recommend to wrap this handler in a buffer handler or a cross-finger handle to have only one HTTP call.

---

Some performance consideration en a prod env with a buffer handler + this one

* with push to ES: https://blackfire.io/profiles/f94ccf35-9f9d-4df1-bfc5-7fa75a535628/graph
* with push to ES commented: https://blackfire.io/profiles/6b66bc18-6b90-4341-963f-797f7a7a689c/graph

As you can see, as requests are made synchronously, there is no penalty on `AppKernel::Handler()` 😍! But the PHP worker has more work to do, and it's busy much more time (about X2)

I explained everything in the PHP Doc Block

---

This is what you can expect **out of the box**
![image](https://user-images.githubusercontent.com/408368/59916122-9b7b7580-941e-11e9-9a22-f56bc1d1a288.png)

Commits
-------

1587e9a4e2 [Monolog] Added ElasticsearchLogstashHandler
2019-08-18 21:27:18 +02:00
Fabien Potencier
63272d61d0 minor #33212 [VarDumper] Add test dump image (ismail1432)
This PR was squashed before being merged into the 4.4 branch (closes #33212).

Discussion
----------

[VarDumper] Add test dump image

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| 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?   |     <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33107.   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |  <!-- 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/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.
-->

Commits
-------

8393a9b5c1 [VarDumper] Add test dump image
2019-08-18 21:21:12 +02:00
Smaine Milianni
8393a9b5c1 [VarDumper] Add test dump image 2019-08-18 21:20:46 +02:00
Fabien Potencier
2a1647a351 minor #33198 Add types to private and final methods (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Add types to private and final methods

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

Backports from #33154.

Commits
-------

1b880677d4 Add types to private and final methods.
2019-08-18 20:07:05 +02:00
Fabien Potencier
aa53a71e03 minor #33204 [Workflow] Added doc block for Registry::supports() (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Workflow] Added doc block for Registry::supports()

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

Follows #33197, prepares #33198.

Commits
-------

c76fd13848 Added doc block for Registry::supports().
2019-08-18 20:04:08 +02:00
Fabien Potencier
8eef7a7417 minor #33221 [Process] Doc block backport (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Process] Doc block backport

| 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/33154/files#r314600658

Commits
-------

fed395de4e [Process] Doc block backport.
2019-08-18 19:35:43 +02:00
Fabien Potencier
acb1373ac2 minor #33222 [Process] Added missing return type (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

[Process] Added missing return type

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

Commits
-------

20ff512269 [Process] Added missing return type.
2019-08-18 19:18:45 +02:00
Fabien Potencier
d1d0943f80 bug #32497 [Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers (Nyholm, BastienClement)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |no
| Tests pass?   | yes  (thanks @Nyholm)
| Fixed tickets | #32370
| License       | MIT
| Doc PR        | -

This is a fix for #32370. There is no need for anything sophisticated. There is no recursion or fancy stuff going on, just a queue of message handled sequentially. A simple variable is enough to keep track of the queue state.

Thanks @Nyholm for the test, it would clearly have been the hardest part of the job.

Commits
-------

1f5c8a6790 Cancel delayed message if handler fails
35c76a385d Added tests for #32370
2019-08-18 19:13:21 +02:00
Cedrick Oka
3211caa5b5 Allow exchange type headers binding 2019-08-18 17:49:22 +01:00
Amine Yakoubi
f6623c11bd Add missing translations for Armenian locale 2019-08-18 17:34:57 +01:00
Alexander M. Turek
1b880677d4 Add types to private and final methods. 2019-08-18 11:59:28 +02:00
Alexander M. Turek
20ff512269 [Process] Added missing return type. 2019-08-18 11:18:30 +02:00
Alexander M. Turek
fed395de4e [Process] Doc block backport. 2019-08-18 11:12:38 +02:00
Alexander M. Turek
c76fd13848 Added doc block for Registry::supports(). 2019-08-18 10:46:59 +02:00
Fabien Potencier
ff63bb325d feature #32783 [Messenger] InMemoryTransport handle acknowledged and rejected messages (tienvx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] InMemoryTransport handle acknowledged and rejected messages

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- 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        | symfony/symfony-docs/pull/12045 <!-- required for new features -->

This PR do 2 things:
* Limit receiving messages from InMemoryTransport to 1 (reverted, another PR will fix the bug: worker does not stop when receiver return more messages than the number specify by the `--limit` option)
* Handle acknowledged and rejected messages in InMemoryTransport. Currently, it does not care about acknowledged and rejected messages. So it always return all messages that have been sent. So if we run console command `messenger:consume`, it will never stop, even though we set the `--limit` option.

For more information, please check the [reproduction](https://github.com/tienvx/symfony-messenger-in-memory-reproduction) project for the expected behavior.

See also my [messenger-memory-transport](https://github.com/tienvx/messenger-memory-transport) project

Commits
-------

71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages
2019-08-18 10:25:08 +02:00
Fabien Potencier
431ead273a bug #33127 [Messenger] make delay exchange and queues durable like the normal ones by default (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] make delay exchange and queues durable like the normal ones by default

| 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 | #32891
| License       | MIT
| Doc PR        |

This also imrproves BC of #32631 by only adding the new expiry argument in case the delay queue name was not overwritten using the options. I will remove the checks in 4.4 again. Please merge this PR before releasing the new 4.3 version so that 32631 and this PR are part of one release.

Commits
-------

e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default
2019-08-18 10:19:16 +02:00
Fabien Potencier
9130c6ad1a bug #33140 [Intl] Full alpha3 language support (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Full alpha3 language support

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33136
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

I'll validate some more cases with tests.

Commits
-------

29aee2ddf2 [Intl] Full alpha3 language support
2019-08-18 10:17:19 +02:00
Fabien Potencier
98e86816ad feature #33155 [ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32936
| License       | MIT
| Doc PR        | symfony/symfony-docs#...

**Issue**

There is no easy way to catch PHP warnings, though some progress has been made in this area for PHP 8.0 (https://wiki.php.net/rfc/consistent_type_errors).

**Before**
```php
$file = file_get_contents('unknown.txt');
// PHP Warning:  file_get_contents(unknown.txt): failed to open stream: No such file or directory

// workaround:
$file = @file_get_contents('unknown.txt');
if (false === $file) {
    $e = error_get_last();
    throw new \ErrorException($e['message'], 0, $e['type'], $e['file'], $e['line']);
}
```

**After**
```php
$file = ErrorHandler::call('file_get_contents', 'unknown.txt');

// or
$file = ErrorHandler::call(static function () {
    return file_get_contents('unknown.txt');
});

// or (PHP 7.4)
$file = ErrorHandler::call(fn () => file_get_contents('unknown.txt'));
```

All credits to @nicolas-grekas https://github.com/symfony/symfony/issues/32936#issuecomment-518152681 and @vudaltsov for the idea.

Commits
-------

0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into `\ErrorException`
2019-08-18 10:09:38 +02:00
Fabien Potencier
6ee1f0b6f2 bug #33187 [Intl] Validate country preferred alpha code mapping (ro0NL)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Validate country preferred alpha code mapping

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Use the same approach for the preferred alpha2-to-alpha3 code mapping, like Languages does. It provides us some more support in terms of maintenance.

The added `CD => COD` was previously implied based on ordering upstream.

Commits
-------

345305904b [Intl] Validate region preferred alpha code mapping
2019-08-18 10:05:02 +02:00
Nicolas Grekas
76bb1fca5c minor #33197 Fix some docblocks (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix some docblocks

| 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

Backports from #33154.

Commits
-------

df89373e62 Fix some docblocks.
2019-08-18 09:33:13 +02:00
Quynh Xuan Nguyen
99f73fcca8 [Cache] Fix predis test 2019-08-18 09:29:35 +02:00
tien.xuan.vo
71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages 2019-08-18 09:00:51 +07:00
Fabien Potencier
d77d89d74f bug #33210 [Mailer] Don't duplicate addresses in Sendgrid Transport (pierredup)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mailer] Don't duplicate addresses in Sendgrid Transport

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

Sendgrid requires the `to`, `cc` and `bcc` fields to be unique

Commits
-------

2706a9763f Don't duplicate addresses in Sendgrid Transport
2019-08-17 13:06:15 +02:00
Fabien Potencier
afb1c04c35 [Mailer] added a way to test the number of queued emails 2019-08-16 21:31:41 +02:00
Pierre du Plessis
2706a9763f
Don't duplicate addresses in Sendgrid Transport 2019-08-16 20:11:33 +02:00
david-binda
cde223ad2a Remove unnecessary statement
The casting of `$id` to string inside the second foreach loop in `\Symfony\Component\DependencyInjection\Dumper\PhpDumper::addMethodMap` is redundant, as the variable is not used after the casting inside nor outside the loop (while still in the loop, it gets overriden upon next iteration).

Fixes #33206
2019-08-16 17:14:15 +02:00
Nicolas Grekas
940eabb121 Merge branch '4.3' into 4.4
* 4.3:
  [VarDumper] Remove useless variable
  [Console] Fix incomplete output mock.
  [Serializer] Fixed docblocks and parameter names.
2019-08-16 08:37:15 +02:00
Nicolas Grekas
6d6cea2baa Merge branch '3.4' into 4.3
* 3.4:
  [VarDumper] Remove useless variable
  [Serializer] Fixed docblocks and parameter names.
2019-08-16 08:36:19 +02:00
Nicolas Grekas
bb41d53c06 minor #33182 [VarDumper] Add types to private methods (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Add types to private methods

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

backport from #33153

Commits
-------

065acc816f [VarDumper] Add types to private methods.
2019-08-16 08:22:44 +02:00
Nicolas Grekas
73dcf71378 minor #33186 [Serializer] Fixed docblocks and parameter names (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fixed docblocks and parameter names

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

Backports from #33185.

Commits
-------

50701fed9f [Serializer] Fixed docblocks and parameter names.
2019-08-16 08:19:18 +02:00
Smaine Milianni
df47058c55 [VarDumper] Remove useless variable 2019-08-16 07:42:55 +02:00
Alexander M. Turek
df89373e62 Fix some docblocks. 2019-08-16 02:50:45 +02:00
Alexander M. Turek
6ecbcf6f22 [Console] Fix incomplete output mock. 2019-08-16 01:33:50 +02:00
Roland Franssen
345305904b [Intl] Validate region preferred alpha code mapping 2019-08-15 15:06:57 +02:00
Alexander M. Turek
50701fed9f [Serializer] Fixed docblocks and parameter names. 2019-08-15 13:43:21 +02:00
Nicolas Grekas
26cc652a79 bug #33184 [DI] fix dumping lazy proxies (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix dumping lazy proxies

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

Commits
-------

2ec1dd9628 [DI] fix dumping lazy proxies
2019-08-15 12:47:29 +02:00
Nicolas Grekas
2ec1dd9628 [DI] fix dumping lazy proxies 2019-08-15 11:38:48 +02:00
Nicolas Grekas
604a69fee7 Merge branch '4.3' into 4.4
* 4.3:
  [ProxyManagerBridge] remove false positive test case
2019-08-15 11:20:30 +02:00
Nicolas Grekas
97148313fe Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManagerBridge] remove false positive test case
2019-08-15 11:18:47 +02:00
Nicolas Grekas
628271db2f [ProxyManagerBridge] remove false positive test case 2019-08-15 11:17:58 +02:00
Alexander M. Turek
065acc816f [VarDumper] Add types to private methods. 2019-08-15 11:17:12 +02:00
Nicolas Grekas
3fa8ad0859 Merge branch '4.3' into 4.4
* 4.3:
  [ProxyManager] fix closure binding
  [VarDumper] fix annotations
  [Console] fixed a PHP notice when there is no function
2019-08-15 10:52:52 +02:00
Nicolas Grekas
8aff3ad611 Merge branch '3.4' into 4.3
* 3.4:
  [ProxyManager] fix closure binding
  [VarDumper] fix annotations
  [Console] fixed a PHP notice when there is no function
2019-08-15 10:50:12 +02:00
Nicolas Grekas
1e47f0fe47 minor #33180 [ProxyManager] fix closure binding (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[ProxyManager] fix closure binding

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

Follows #32992

Commits
-------

31f920850a [ProxyManager] fix closure binding
2019-08-15 10:47:41 +02:00
Nicolas Grekas
31f920850a [ProxyManager] fix closure binding 2019-08-15 10:42:18 +02:00
Nicolas Grekas
08147ddb9b bug #33172 [Console] fixed a PHP notice when there is no function in the stack trace of an Exception (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] fixed a PHP notice when there is no function in the stack trace of an Exception

| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Under certain circumstances, the `function` is not present in the stack trace. That's the case for instance when an error occurs on a line like this one `return require "somefile";`.

Commits
-------

ddb47358ae [Console] fixed a PHP notice when there is no function
2019-08-15 10:36:31 +02:00
Nicolas Grekas
82f4766498 [VarDumper] fix annotations 2019-08-15 10:03:47 +02:00
Christian Flothmann
21554aa8a5 trigger a deprecation not a notice 2019-08-15 09:51:39 +02:00
Fabien Potencier
ddb47358ae [Console] fixed a PHP notice when there is no function 2019-08-14 18:49:41 +02:00
Fabien Potencier
876cec7c45 [Mailer] fixed missing property assignment 2019-08-14 17:19:53 +02:00
Nicolas Grekas
320e49576e feature #30323 [ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type (fancyweb, nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30123
| License       | MIT
| Doc PR        | TODO

I wanted to push something to show the advancement and get feedback.

I pushed two versions : one with dedicated functions for code clarity (DebugClassLoader.php) and one withtout (DebugClassLoader___.php). It would be nice if some people with Blackfire could compare the performances.

So let's be clear, we are never gonna be able to cover all cases! We can however cover the vast majority.

Current non covered cases and problems :
- We assume that if there is more than 2 returned types, we cannot do anything. Even if it could technically be possible.
- We assume that any returned type that doesn't fit our "returnable" types list is a class. We don't check at all if this class actualy exists.
- We don't handle spaces in types. The types stop at the first space.
- That means we don't handle (yet) the callable type with spaces (cf https://github.com/symfony/symfony/issues/29969)
- Vendor code extending other vendor core triggers the deprecations 😕

Commits
-------

aa338c8b42 Import return annotations from vendors
10fc13e4a7 [ErrorHandler] Handle return types in DebugClassLoader
2019-08-14 15:35:48 +02:00
Nicolas Grekas
aa338c8b42 Import return annotations from vendors 2019-08-14 15:27:41 +02:00
Nicolas Grekas
c8e15e182a Merge branch '4.3' into 4.4
* 4.3:
  cs fix
2019-08-14 15:26:12 +02:00
Thomas Calvet
10fc13e4a7 [ErrorHandler] Handle return types in DebugClassLoader 2019-08-14 15:12:11 +02:00
Yonel Ceruto
0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into \ErrorException 2019-08-14 09:05:47 -04:00
Nicolas Grekas
bec6ebc352 cs fix 2019-08-14 14:40:06 +02:00
Nicolas Grekas
507223dc73 Merge branch '4.3' into 4.4
* 4.3:
  Remove superfluous phpdoc tags
2019-08-14 14:37:46 +02:00
Nicolas Grekas
b3467e641c Merge branch '3.4' into 4.3
* 3.4:
  Remove superfluous phpdoc tags
2019-08-14 14:26:46 +02:00
Philippe Segatori
608e23c09a Remove superfluous phpdoc tags 2019-08-14 13:59:53 +02:00
Roland Franssen
29aee2ddf2 [Intl] Full alpha3 language support 2019-08-14 13:08:30 +02:00
Nicolas Grekas
0bdf10a886 Merge branch '4.3' into 4.4
* 4.3:
  cs fix
  Partially Revert "Remove trailing space in all markdown files"
  [Intl] Explicit check
  Fix getMaxFilesize() returning zero
  [DI] fix docblocks in Container*
  Fixed markdown file
  [TwigBridge] Replaced plain doc block copies with inheritdoc.
  [DomCrawler] Fixed CHANGELOG markup
  [Intl] Cleanup unused language aliases entry
2019-08-14 13:04:46 +02:00
Nicolas Grekas
cda8a67df8 Merge branch '3.4' into 4.3
* 3.4:
  cs fix
  Partially Revert "Remove trailing space in all markdown files"
  [Intl] Explicit check
  Fix getMaxFilesize() returning zero
  [DI] fix docblocks in Container*
  Fixed markdown file
  [TwigBridge] Replaced plain doc block copies with inheritdoc.
  [Intl] Cleanup unused language aliases entry
2019-08-14 13:02:36 +02:00
Nicolas Grekas
990a149edc minor #33158 [Intl] Explicit check (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Explicit check

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This avoids a little conflict with #33140

data is not impacted (today), but i like to make our data selection as explicit as possible and avoid ever pulling in `deprecated` or e.g. `legacy` languages.

Commits
-------

fbd4ce4c5c [Intl] Explicit check
2019-08-14 12:59:22 +02:00
Grégoire Pineau
1587e9a4e2 [Monolog] Added ElasticsearchLogstashHandler 2019-08-14 12:08:23 +02:00
Nicolas Grekas
644edb0e93 cs fix 2019-08-14 11:39:58 +02:00
Nicolas Grekas
f23d1396dd minor #33160 Partially Revert "Remove trailing space in all markdown files" (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

Partially Revert "Remove trailing space in all markdown files"

This reverts commit 5a3c19846e22399f5ce43d366346dd404e2f825f.

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

Commits
-------

2aec7df12c Partially Revert "Remove trailing space in all markdown files"
2019-08-14 10:47:17 +02:00
Nicolas Grekas
663ba5b479 minor #33149 [DI] fix docblocks in Container* (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix docblocks in Container*

| 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        | -

Backport from master.
Internally, services can be of any kind, but only `object|null` is allowed for public services.

Commits
-------

8e4d08fe95 [DI] fix docblocks in Container*
2019-08-14 10:46:52 +02:00
Grégoire Pineau
2aec7df12c Partially Revert "Remove trailing space in all markdown files"
This reverts commit 5a3c19846e22399f5ce43d366346dd404e2f825f.
2019-08-14 10:40:35 +02:00
Fabien Potencier
b382e622cf bug #33157 Fix getMaxFilesize() returning zero (ausi)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix getMaxFilesize() returning zero

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

With #32790 a BC break got introduced. Previously an empty `upload_max_filesize` returned `PHP_INT_MAX` but after the changes from #32790 it returns `0`.

Setting `upload_max_filesize` or `post_max_size` to `0` or `''` disables the limit so for both cases `PHP_INT_MAX` should be returned.

Commits
-------

f4c2ea5b73 Fix getMaxFilesize() returning zero
2019-08-14 09:48:19 +02:00
Roland Franssen
fbd4ce4c5c [Intl] Explicit check 2019-08-14 08:36:48 +02:00
Martin Auswöger
f4c2ea5b73 Fix getMaxFilesize() returning zero 2019-08-14 08:35:19 +02:00
Nicolas Grekas
8e4d08fe95 [DI] fix docblocks in Container* 2019-08-13 22:10:42 +02:00
Fabien Potencier
7ae7a66f05 minor #33142 Fixed markdown file (lyrixx)
This PR was squashed before being merged into the 3.4 branch (closes #33142).

Discussion
----------

Fixed markdown file

| 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
-------

136972506e Fixed markdown file
2019-08-13 19:39:17 +02:00
Grégoire Pineau
136972506e Fixed markdown file 2019-08-13 19:39:09 +02:00
Fabien Potencier
b06231fd24 minor #33141 [DomCrawler] Fixed CHANGELOG markup (lyrixx)
This PR was merged into the 4.3 branch.

Discussion
----------

[DomCrawler] Fixed CHANGELOG markup

| 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        | -

Commits
-------

3c56b12538 [DomCrawler] Fixed CHANGELOG markup
2019-08-13 19:38:16 +02:00
Fabien Potencier
04b411695e minor #33145 [TwigBridge] Replaced plain doc block copies with inheritdoc (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Replaced plain doc block copies with inheritdoc

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

Commits
-------

e50d3bcf31 [TwigBridge] Replaced plain doc block copies with inheritdoc.
2019-08-13 18:39:16 +02:00
Michael Lutz
b3928d5ac3 [HttpFoundation] Fix deprecation message in ::isMethodSafe() 2019-08-13 12:17:15 -04:00
Alexander M. Turek
e50d3bcf31 [TwigBridge] Replaced plain doc block copies with inheritdoc. 2019-08-13 17:56:37 +02:00
Tobias Schultze
e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default 2019-08-13 17:14:16 +02:00
Grégoire Pineau
3c56b12538 [DomCrawler] Fixed CHANGELOG markup 2019-08-13 17:04:37 +02:00
Roland Franssen
1689f77ef0 [Intl] Cleanup unused language aliases entry 2019-08-13 16:04:50 +02:00
Nicolas Grekas
50c5911229 feature #33137 [DI] deprecate support for non-object services (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] deprecate support for non-object services

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

Follows #32432 /cc @derrabus
Prepares for adding the `?object` return-type on master.

Commits
-------

7c01c4c80c [DI] deprecate support for non-object services
2019-08-13 15:30:43 +02:00
Nicolas Grekas
32e0a25200 feature #32845 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32845).

Discussion
----------

[HttpKernel][FrameworkBundle] Add alternative convention for bundle directories

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32453
| License       | MIT
| Doc PR        | TODO

We already know that bundles must be compatible with many Symfony's versions, so it is very likely that current bundles won't be able to use this feature soon, unless they create symbolic links to support both structures.

The point is that this is already happening, so in the future when our bundles stop to support <=4.3 then you'll be sure to change the current directory structure.

We have recently added the `getPublicDir()` method in https://github.com/symfony/symfony/pull/31975, here I'm removing it in favor of hardcoding a new convention.

I've added some functional tests in which I've changed everything to this structure:
```
-- ModernBundle
   |-- config/
   |-- public/
   |-- src/
       |-- ModernBundle.php
   |-- templates/
   |-- translations/
```
WDYT?

Commits
-------

6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
2019-08-13 15:29:11 +02:00
Yonel Ceruto
6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories 2019-08-13 15:29:02 +02:00
Nicolas Grekas
7c01c4c80c [DI] deprecate support for non-object services 2019-08-13 15:22:18 +02:00
Nicolas Grekas
d6773bc547 feature #32548 [Translation] XliffLintCommand: allow .xliff file extension (codegain)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] XliffLintCommand: allow .xliff file extension

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

I ran into a problem with XLIFF files having an *.xliff extension and a "target-language" attribute.
The command always outputted: There is a mismatch between the language included in the file name and the value used used in the "target-language" attribute of the file.

The "target-language" attribute was set to "en" and the filename was also "menu.en.xliff".
After reading the source code, I realized that this regex does not respect other valied file extensions such as "xliff" for these files and therefore throws this (rather confusing) error.

Commits
-------

dba6a21eac [Translation] XliffLintCommand: allow .xliff file extension
2019-08-13 09:17:21 +02:00
Michael Steininger
dba6a21eac [Translation] XliffLintCommand: allow .xliff file extension 2019-08-13 09:15:19 +02:00
Fabien Potencier
44f6e947fc feature #28363 [Serializer] Encode empty objects as objects, not arrays (mcfedr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Encode empty objects as objects, not arrays

Allows Normalizers to return a representation of an empty object that the encoder recognizes as such.

Often PHP code is relaxed about the difference betweens arrays and objects, and particularly empty arrays are ambiguous. This preserves objects that would otherwise have turned into arrays as objects in the encoding.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | No
| Deprecations? | No
| Tests pass?   | yes
| Fixed tickets | #23019
| License       | MIT
| Doc PR        | I'll do it if/when this might be merged

Commits
-------

f28e826627 [Serializer] Encode empty objects as objects, not arrays
2019-08-13 09:09:56 +02:00
Nicolas Grekas
046aff2c04 minor #33132 [Form] Add type declarations to private DefaultChoiceListFactory methods (vudaltsov)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] Add type declarations to private DefaultChoiceListFactory methods

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

These are the type declarations that can be safely added to private methods of the `DefaultChoiceListFactory` without breaking BC.

Commits
-------

9fc6ba66b3 Add type declarations to private DefaultChoiceListFactory methods
2019-08-13 08:55:08 +02:00
Nicolas Grekas
3ec91065f7 Merge branch '4.3' into 4.4
* 4.3:
  cs fix
  Fix return statements
  [TwigBridge] add missing dep
  Add false type to ChoiceListFactoryInterface::createView $label argument
  Update UPGRADE guide of 4.3 for EventDispatcher
  [SecurityBundle] display the correct class name on the deprecated notice
2019-08-13 08:48:26 +02:00
Nicolas Grekas
ad8c35feec bug #33126 [SecurityBundle] display the correct class name on the deprecated notice (maxhelias)
This PR was merged into the 4.3 branch.

Discussion
----------

[SecurityBundle] display the correct class name on the deprecated notice

| Q             | A
| ------------- | ---
| Branch?       | 4.3 <!-- see below -->
| 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 | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- 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/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.
-->

Commits
-------

8e64b9a7ec [SecurityBundle] display the correct class name on the deprecated notice
2019-08-13 08:39:28 +02:00
Nicolas Grekas
7d0795d0b8 Merge branch '3.4' into 4.3
* 3.4:
  Fix return statements
  [TwigBridge] add missing dep
  Add false type to ChoiceListFactoryInterface::createView $label argument
2019-08-13 08:39:03 +02:00
Nicolas Grekas
e6b52cc48a minor #33130 Fix return statements (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix return statements

| 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        | -

Discovered while working on #30323
This will sync the code from 3.4 up to master, where adding return types will require these.

Commits
-------

2bc05c83b4 Fix return statements
2019-08-13 08:33:19 +02:00
Nicolas Grekas
2bc05c83b4 Fix return statements 2019-08-13 08:33:05 +02:00
Nicolas Grekas
e72ae347a7 [TwigBridge] add missing dep 2019-08-13 08:30:45 +02:00
Valentin Udaltsov
9fc6ba66b3 Add type declarations to private DefaultChoiceListFactory methods 2019-08-13 09:07:15 +03:00
Valentin Udaltsov
8f5d1ca794 Add false type to ChoiceListFactoryInterface::createView $label argument 2019-08-13 09:00:22 +03:00
Maxime Helias
8e64b9a7ec [SecurityBundle] display the correct class name on the deprecated notice 2019-08-12 17:48:20 +02:00
Nicolas Grekas
b570ee1103 [WebLink] implement PSR-13 directly 2019-08-12 15:51:36 +02:00
Fred Cox
f28e826627 [Serializer] Encode empty objects as objects, not arrays
Allows Normalizers to return a representation of an empty object that the encoder recognizes as such.
2019-08-12 16:06:27 +03:00
Nicolas Grekas
1aa41ed918 Merge branch '4.3' into 4.4
* 4.3:
  [Form] fix return type on FormDataCollector
  [Cache][DI] cleanup
2019-08-12 13:55:02 +02:00
Nicolas Grekas
cca22c4a20 Merge branch '3.4' into 4.3
* 3.4:
  [Form] fix return type on FormDataCollector
2019-08-12 13:52:55 +02:00
Maxime Helias
de6b9efddd [Form] fix return type on FormDataCollector 2019-08-12 11:55:03 +02:00
Nicolas Grekas
ef2db217e2 [Cache][DI] cleanup 2019-08-12 09:38:14 +02:00
Nicolas Grekas
43739dbf53 Merge branch '4.3' into 4.4
* 4.3:
  [HttpFoundation] fix typo
2019-08-11 11:51:46 +02:00
Nicolas Grekas
f51f7e7b74 [HttpFoundation] fix typo 2019-08-11 11:51:13 +02:00
azjezz
f62a3c0810 [HttpFoundation] some cleanups 2019-08-11 11:22:42 +02:00
Nicolas Grekas
ed590ca16b Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
This reverts commit 2f2d1aa053, reversing
changes made to 07cf927237.
2019-08-10 23:23:27 +02:00
Nicolas Grekas
e37f672c2b Merge branch '4.3' into 4.4
* 4.3:
  Bump minimal requirements
2019-08-10 23:16:51 +02:00
Jérémy Derussé
c874d3b778 Bump minimal requirements 2019-08-10 23:01:55 +02:00
Nicolas Grekas
50167b9509 Merge branch '4.3' into 4.4
* 4.3:
  cleanups
  Disable PHPUnit result cache on the CI
  [Security] Cleanup "Digest nonce has expired." translation
  [Translation] Highlight invalid translation status
  Added translations in validator for Serbian Cyrillic
  Added translations in validator for Serbian Latin
  [EventDispatcher] wrong Request class
  [DependencyInjection] improved exception message
2019-08-10 22:49:34 +02:00
Nicolas Grekas
9d9f5582b2 Merge branch '3.4' into 4.3
* 3.4:
  cleanups
  Disable PHPUnit result cache on the CI
  [Translation] Highlight invalid translation status
2019-08-10 22:47:15 +02:00
Nicolas Grekas
7fb7f59385 cleanups 2019-08-10 22:41:30 +02:00
Nicolas Grekas
d45b903935 minor #33110 Disable PHPUnit result cache on the CI (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Disable PHPUnit result cache on the CI

| 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        | -

We don't need it and disabling it works around the segfault on 4.3

Commits
-------

912d7db7dd Disable PHPUnit result cache on the CI
2019-08-10 21:57:59 +02:00
Nicolas Grekas
912d7db7dd Disable PHPUnit result cache on the CI 2019-08-10 20:59:22 +02:00
Roland Franssen
7aa1120993 [Security] Cleanup "Digest nonce has expired." translation 2019-08-10 09:37:37 +02:00
Roland Franssen
2d8015551e [Translation] Highlight invalid translation status 2019-08-10 09:29:37 +02:00
Fabien Potencier
1ca00893f6 Merge branch '3.4' into 4.3
* 3.4:
  Added translations in validator for Serbian Cyrillic
  Added translations in validator for Serbian Latin
2019-08-10 07:38:01 +02:00
Fabien Potencier
5e3bfad8c8 minor #33096 Added translations in validator for Serbian Cyrillic (Kristijan Kanalas)
This PR was squashed before being merged into the 3.4 branch (closes #33096).

Discussion
----------

Added translations in validator for Serbian Cyrillic

Resolves #30188

Should be able for merges in branches >3.4, not sure how to do that tho :(

Commits
-------

23d4a23b46 Added translations in validator for Serbian Cyrillic
2019-08-10 07:37:06 +02:00
Kristijan Kanalas
23d4a23b46 Added translations in validator for Serbian Cyrillic 2019-08-10 07:36:57 +02:00
Fabien Potencier
143789cabe minor #33097 Added translations in validator for Serbian Latin (Kristijan Kanalas)
This PR was squashed before being merged into the 3.4 branch (closes #33097).

Discussion
----------

Added translations in validator for Serbian Latin

[Validator] Added translations
Related to #30188

Working on Serbian Cyrillic I saw that Latin translations are also missing some translations so this is a PR related to that. As said in the Cyrillic PR this should be able to be merged in all branches above 3.4, but I am not sure how to do that.

Commits
-------

fbe7362362 Added translations in validator for Serbian Latin
2019-08-10 07:35:48 +02:00
Kristijan Kanalas
fbe7362362 Added translations in validator for Serbian Latin 2019-08-10 07:35:39 +02:00
Maxime Helias
97d6184123 [EventDispatcher] wrong Request class 2019-08-09 15:57:59 +02:00
Fabien Potencier
2f2d1aa053 bug #33092 [DependencyInjection] Improve an exception message (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

[DependencyInjection] Improve an exception message

| 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
| License       | MIT
| Doc PR        | n/a

When defining a service with an id that is also a class name, you might have an error message like `Class “” used for service “\App\Some\Service” cannot be found.` if your is starts with a backslash.

The new error message is now hopefully less cryptic: `Service definition "\App\Some\Service" has no class, and its name looks like a FQCN but it starts with a backslash; remove the leading backslash.`

Commits
-------

3647ccaeca [DependencyInjection] improved exception message
2019-08-09 14:54:19 +02:00
Nicolas Grekas
24858f2aee Merge branch '4.3' into 4.4
* 4.3:
  Bump minimal requirements
  Use PHPUnit 8.3 on Travis when possible
2019-08-09 14:40:26 +02:00
Nicolas Grekas
07cf927237 Merge branch '3.4' into 4.3
* 3.4:
  Bump minimal requirements
  Use PHPUnit 8.3 on Travis when possible
2019-08-09 14:37:48 +02:00
Fabien Potencier
3647ccaeca [DependencyInjection] improved exception message 2019-08-09 14:35:59 +02:00
Fabien Potencier
8c91e7e48a Merge branch '4.3' into 4.4
* 4.3:
  [HttpKernel] fixed class having a leading \ in a route controller
  [HttpKernel] trim the leading backslash in the controller init
2019-08-09 14:17:13 +02:00
Fabien Potencier
3c8d395d0d [HttpKernel] fixed class having a leading \ in a route controller 2019-08-09 14:15:48 +02:00
Amrouche Hamza
6fdf2527d6 [HttpKernel] trim the leading backslash in the controller init 2019-08-09 14:15:48 +02:00
Jérémy Derussé
41d94c3226
Bump minimal requirements 2019-08-09 13:59:47 +02:00
Nicolas Grekas
1964016d07 Merge branch '4.3' into 4.4
* 4.3:
  Fix typo
  Fix unitialized variable in DeprecationErrorHandler
  fix Danish translations
  Added the missing translations for the Slovak 'sk' locale.
  [HttpFoundation] Clear invalid session cookie
  Fix tst patern to handle callstack with/without return typehint
  Fix negative DateInterval
2019-08-09 13:48:22 +02:00
Nicolas Grekas
ece1532f27 Merge branch '3.4' into 4.3
* 3.4:
  Fix typo
  Fix unitialized variable in DeprecationErrorHandler
  fix Danish translations
  Added the missing translations for the Slovak 'sk' locale.
  Fix negative DateInterval
2019-08-09 13:45:54 +02:00
Nicolas Grekas
d851a794fc Fix typo 2019-08-09 13:44:41 +02:00
Nicolas Grekas
7bfd7bb664 minor #33087 Fix unitialized variable in DeprecationErrorHandler (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix unitialized variable in DeprecationErrorHandler

| 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        | -

In some case the variable `isAtLeastPhpUnit83` were not initialized (see https://github.com/symfony/symfony/pull/33079/files#r312406060).
This PR initialize it when needed.

Commits
-------

310e5c7549 Fix unitialized variable in DeprecationErrorHandler
2019-08-09 13:31:42 +02:00
Jérémy Derussé
310e5c7549
Fix unitialized variable in DeprecationErrorHandler 2019-08-09 11:49:26 +02:00
Christian Flothmann
6e0c916eaf fix Danish translations 2019-08-09 11:35:22 +02:00
Fabien Potencier
121f426418 feature #33078 Add compatibility trait for PHPUnit constraint classes (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

Add compatibility trait for PHPUnit constraint classes

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

Similar to the SetUpTearDownTrait, this trait removes the pain of dealing with method signature changes. The `PHPUnit\Framework\Constraint\Constraint` class added return type hints in PHPUnit 7 which this trait will take care of.

Commits
-------

908c8c1f15 Add compatibility trait for PHPUnit constraint classes
2019-08-09 11:30:34 +02:00
Fabien Potencier
32b2a5251d feature #32988 [Intl] Support ISO 3166-1 Alpha-3 country codes (terjebraten-certua)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Support ISO 3166-1 Alpha-3 country codes

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20313
| Doc PR | symfony/symfony-docs#12105
| License       | MIT

This is a pre-requiste for fixing #20313 and only handles the changes to the INTL component.

Commits
-------

848f60e905 Support ISO 3166-1 Alpha-3 country codes
2019-08-09 11:14:26 +02:00
Terje Bråten
848f60e905 Support ISO 3166-1 Alpha-3 country codes 2019-08-09 09:42:26 +01:00
Jan Vernarsky
32a085a75f Added the missing translations for the Slovak 'sk' locale. 2019-08-09 10:35:07 +02:00
Jérémy Derussé
56d5d6d0e6
Add deprecation for method signature 2019-08-09 10:19:49 +02:00
Andreas Braun
908c8c1f15
Add compatibility trait for PHPUnit constraint classes 2019-08-09 09:31:28 +02:00
Yanick Witschi
b22a7263b9 [HttpFoundation] Clear invalid session cookie 2019-08-09 09:08:17 +02:00
Fabien Potencier
8c255923d8 feature #32598 [FrameworkBundle][Routing] Private service route loaders (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle][Routing] Private service route loaders

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30402
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11337

Continuation of https://github.com/symfony/symfony/pull/30926.

~Please review only the 2nd commit, I'm building this on top of https://github.com/symfony/symfony/pull/32582.~

Commits
-------

64aa2c8529 [FrameworkBundle][Routing] Private service route loaders
2019-08-09 08:48:02 +02:00
Fabien Potencier
865e4d7fdf feature #32486 [DoctrineBridge] Invokable event listeners (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Invokable event listeners

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11992

Invokable Doctrine entity listeners will likely be supported in the next version of the DoctrineBundle (cf https://github.com/doctrine/DoctrineBundle/pull/989).

I think it would also be great to support it for Doctrine event listeners.

Commits
-------

47e872a826 [DoctrineBridge] Allow invokable event listeners
2019-08-09 08:38:52 +02:00
Fabien Potencier
5ce3a61660 feature #31083 [Validator] Allow objects implementing __toString() to be used as violation messages (mdlutz24)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Allow objects implementing __toString() to be used as violation messages

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | I didn't see a doc on violations to update, but I'm happy to do documentation if somone can suggest the best place to do it.

Currently in the Drupal project we use Translatable Markup object to hold most strings and currently pass them in as Constraint Violation messages. In Symfony 3 this works but with the added typehinting in Symfony 4, these markup objects are rendered into strings at the time of the violation creation.  This causes any html in the message string to be considered unsafe by twig later in our rendering process.  This pr explicitly allows objects implementing a __toString() method to be used as violation messages, and the violation will save and return the original stringable object.

See https://www.drupal.org/project/drupal/issues/3029540 For our Drupal issue on the subject.

Commits
-------

79f4dcd2dc [Validator] Allow objects implementing __toString() to be used as violation messages
2019-08-09 08:10:48 +02:00
Fabien Potencier
e848729ba7 bug #33066 [Serializer] Fix negative DateInterval (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fix negative DateInterval

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

This PR adds support for negative and signed DateInterval

Commits
-------

abb8a676ba Fix negative DateInterval
2019-08-09 08:01:14 +02:00
Nicolas Grekas
1b98df7c64 minor #33067 [VarDumper] Fix test patern to handle callstack with/without return typehint (jderusse)
This PR was merged into the 4.3 branch.

Discussion
----------

[VarDumper] Fix test patern to handle callstack with/without return typehint

| 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        | NA

The TestCase::tearDownAfterClass methods does not always have the same signature which change the output of the reflection. This use another methods for testing

Commits
-------

feaadd1c0b Fix tst patern to handle callstack with/without return typehint
2019-08-08 23:10:45 +02:00
Nicolas Grekas
6888e702b9 Merge branch '4.3' into 4.4
* 4.3:
  Replace warning by isolated test
2019-08-08 22:52:24 +02:00
Nicolas Grekas
85c50119f1 Merge branch '3.4' into 4.3
* 3.4:
  Replace warning by isolated test
2019-08-08 22:52:04 +02:00
Jérémy Derussé
9c45a8e093 Replace warning by isolated test 2019-08-08 22:45:38 +02:00
Jérémy Derussé
05640456c6
Fix deprecation in 4.4 branche 2019-08-08 21:31:13 +02:00
Jérémy Derussé
feaadd1c0b
Fix tst patern to handle callstack with/without return typehint 2019-08-08 21:16:30 +02:00