Commit Graph

44029 Commits

Author SHA1 Message Date
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
31b668b8c4 minor #33255 Add return types to internal|final|private methods (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add return types to internal|final|private methods

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

Related to #33228
This adds return-type declarations to internal, final and private methods.
Found by using a patched DebugClassLoader + manual edits.

Commits
-------

32116184d7 Add return types to internal|final|private methods
2019-08-20 17:40:49 +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
Nicolas Grekas
cfb218456c minor #33254 Fix inconsistent return points (derrabus)
This PR was merged into the 4.3 branch.

Discussion
----------

Fix inconsistent return points

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

That's #33252 on the 4.3 branch.

Commits
-------

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

Discussion
----------

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

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

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

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

Commits
-------

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

Discussion
----------

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

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

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

Commits
-------

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

Discussion
----------

[Router] Fix TraceableUrlMatcher behaviour with trailing slash

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32149
| License       | MIT
| Doc PR        | ¤
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->
This pull requests fixes the bug #32149. This issue was about TraceableUrlMatcher having a wrong behaviour regarding trailing slashes (according to UrlMatcher and documentation).

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

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

Commits
-------

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

Discussion
----------

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

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

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

Commits
-------

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

Discussion
----------

Fix inconsistent return points

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

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

Commits
-------

f5b6ee9de1 Fix inconsistent return points.
2019-08-20 15:34:30 +02:00
Alexander M. Turek
f5b6ee9de1 Fix inconsistent return points. 2019-08-20 15:31:17 +02:00
Nicolas Grekas
00d7f8cde7 [Security/Core] UserInterface::getPassword() can return null 2019-08-20 15:10:28 +02:00
Nicolas Grekas
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
Nicolas Grekas
e132c429c0 bug #33253 Fix missing exporter in PHPUnit constraint poylfill (alcaeus)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix missing exporter in PHPUnit constraint poylfill

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

Since PHPUnit 7 drops the constructor in `PHPUnit\Framework\Constraint\Constraint`, overriding the constructor in a user land constraint breaks. To do so, we create an exporter in `exporter()` as is done in PHPUnit > 7.

Commits
-------

b78c5cb1a6 Fix missing exporter in PHPUnit constraint poylfill
2019-08-20 12:04:03 +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
Robin Chalas
54b6eb112d minor #33240 Typo - Fix bad classnames in Exceptions docblocks (Mathieudewet)
This PR was squashed before being merged into the 4.4 branch (closes #33240).

Discussion
----------

Typo - Fix bad classnames in Exceptions docblocks

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

Set right classname in some Exceptions docblocks.

Commits
-------

7d1fefe8b8 Typo - Fix bad classnames in Exceptions docblocks
2019-08-19 15:54:29 +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
Fabien Potencier
ef0119a2d4 minor #33238 [HttpKernel] Remove outdated docblock comment (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Remove outdated docblock comment

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

Convention is deprecated since 3.4.

Commits
-------

841c0b041f [HttpKernel] Remove outdated docblock comment
2019-08-19 14:17:06 +02:00
Robin Chalas
841c0b041f [HttpKernel] Remove outdated docblock comment 2019-08-19 13:48:36 +02:00
Nicolas Grekas
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
7bdeff0f84 feature #33233 [Mailer] Simplify the way TLS/SSL/STARTTLS work (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Simplify the way TLS/SSL/STARTTLS work

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | -

The way TLS/SSL/STARTTLS is handled is not easy to understand. It's inherited from Swiftmailer and today, I've spent some time to see if we could improve it.

First, the current way: `setEncryption()` takes a string, either `ssl` or `tls`:

 * `ssl`: to enable TLS support on the connection
 * `tls`: to enable `STARTTLS` (upgrade the connection)

There is also a `isTLS()` method which is really confusing due to the fact that both configuration are about TLS anyway.

So, this PR changes things radically:

 * The `setEncryption` method and the `encryption` option on the DSN are gone.

 * TLS is used by default and you can disable it via `disableTls()`. Being secure by default is probably a good idea anyway (like using HTTPS by default instead of HTTP).

 * A new "protocol" SMTPS is supported now and is a way to say that you want TLS; so use `smtps://localhost` to set TLS instead of `smtp://localhost?encryption=ssl`. Note that using `smtp://localhost:465` does the same. All third-party providers now supports both `smtp` and `smtps` protocol even if that does the exact same thing for them (TLS is always enabled).

 * The port is automatically determined based on the TLS setting (if not set explicitly). So 465 for TLS and falls back to 25.

 * There is no more way to enable `STARTTLS`. If you don't configure TLS on the connection and if the server supports `STARTTLS`, then we will enable it automatically.

Great document about all of this: https://www.fastmail.com/help/technical/ssltlsstarttls.html

Commits
-------

5b8c4676d0 [Mailer] simplified the way TLS/SSL/StartTls work
2019-08-19 12:47:43 +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