Commit Graph

44930 Commits

Author SHA1 Message Date
Ryan Weaver
01a9fefe77 Adding ConsumedByWorkerStamp as way to mark a message in a "worker context" 2019-10-28 13:18:09 -04:00
Ryan Weaver
38f19a960c Revert "[Messenger] Removing "sync" transport and replacing it with much nicer config trick"
This reverts commit 3d4e59a10b.
2019-10-28 11:14:08 -04:00
Fabien Potencier
0472dbfccb bug #34145 [FrameworkBundle] make SodiumVault report bad decryption key accurately (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] make SodiumVault report bad decryption key accurately

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

Commits
-------

d9d16d2ce7 [FrameworkBundle] make SodiumVault report bad decryption key accurately
2019-10-27 18:49:11 +01:00
Nicolas Grekas
d9d16d2ce7 [FrameworkBundle] make SodiumVault report bad decryption key accurately 2019-10-27 17:21:30 +01:00
Nicolas Grekas
0a1de38a5b cs fix 2019-10-27 13:36:05 +01:00
Nicolas Grekas
b5a47df0b9 feature #34020 [Security] Allow to stick to a specific password hashing algorithm (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Allow to stick to a specific password hashing algorithm

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

Allows using `argon2i`, `argon2id` and `bcrypt`.

Commits
-------

6712d1e504 [Security] Allow to set a fixed algorithm
2019-10-27 13:33:51 +01:00
Robin Chalas
6712d1e504 [Security] Allow to set a fixed algorithm 2019-10-27 13:32:13 +01:00
Nicolas Grekas
60a4d8dc7a [Security/Core] make encodedLength computation more generic 2019-10-27 11:16:45 +01:00
Robin Chalas
32b227d004 minor #34138 [Security/Core] add fast path when encoded password cannot match anything (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security/Core] add fast path when encoded password cannot match anything

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

Only `MessageDigestPasswordEncoder` and `Pbkdf2PasswordEncoder` need this fast path: the sodium and the native encoders already implement it natively.

When a migrating encoder is used, a failed password validation fallbacks to all encoders. This makes the process slower than needed currently.

Commits
-------

c57f8f7f93 [Security/Core] add fast path when encoded password cannot match anything
2019-10-27 11:11:28 +01:00
Nicolas Grekas
c57f8f7f93 [Security/Core] add fast path when encoded password cannot match anything 2019-10-27 10:41:22 +01:00
Fabien Potencier
22230f7b8e feature #34131 [FrameworkBundle] Remove suffix convention when using env vars to override secrets from the vault (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Remove suffix convention when using env vars to override secrets from the vault

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

Right now, env vars that override encrypted secrets must en up with `_SECRET`.
This PR removes this convention. It also enforces that only vars defined in the vault can be overriden locally. This means one cannot set a local-only secret.

Commits
-------

2ec9647e75 [FrameworkBundle] Remove suffix convention when using env vars to override secrets from the vault
2019-10-27 09:05:59 +01:00
Robin Chalas
54e1d12f92 minor #34137 [Messenger] Fix redis test (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Fix redis test

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

3fdaf970c3 [Messenger] Fix redis test
2019-10-27 08:01:46 +01:00
Robin Chalas
3fdaf970c3 [Messenger] Fix redis test 2019-10-27 07:53:30 +01:00
Fabien Potencier
b54997d1df bug #34126 [VarDumper] fix infinite recursion (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] fix infinite recursion

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

Commits
-------

56d9f47857 [VarDumper] fix infinite recursion
2019-10-26 21:52:16 +02:00
Nicolas Grekas
2ec9647e75 [FrameworkBundle] Remove suffix convention when using env vars to override secrets from the vault 2019-10-26 15:06:32 +02:00
Fabien Potencier
8eb17aa203 bug #34076 [HttpKernel] Avoid nested exceptions if errors occur when generating file links (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Avoid nested exceptions if errors occur when generating file links

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

Multiple exceptions are fired until the fallback error page is rendered without the FileLinkFormatter:
48282ce80f/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php (L79-L86)

**Before** (the reproducer is highlighted inside the picture or simply adds an undefined option to the `@Route()` annotation)
![error-page-before](https://user-images.githubusercontent.com/2028198/67356903-c8a17700-f529-11e9-9384-12a29e17b682.png)

**After** (I couldn't find a better solution to display this exception once)
![error-page-after](https://user-images.githubusercontent.com/2028198/67356941-db1bb080-f529-11e9-8808-d7f72dadc4d6.png)

Commits
-------

d91a5a067d Avoid nested exceptions if errors occur when generating file links
2019-10-26 10:25:48 +02:00
Nicolas Grekas
56d9f47857 [VarDumper] fix infinite recursion 2019-10-26 10:24:21 +02:00
Fabien Potencier
a73341b0f6 bug #34124 [HttpKernel] (Welcome Page) Fix web debug toolbar z-index property (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] (Welcome Page) Fix web debug toolbar z-index property

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

Commits
-------

f7a242d705 Fix web debug toolbar z-index property
2019-10-26 10:22:14 +02:00
Yonel Ceruto
f7a242d705 Fix web debug toolbar z-index property 2019-10-25 20:47:58 -04:00
Tobias Schultze
0e3bae28ec remove experimental added in 4.3 as bugfix 2019-10-25 15:44:38 +02:00
Tobias Schultze
c950130fc2 Merge branch '4.3' into 4.4 2019-10-25 15:41:20 +02:00
Tobias Schultze
4d8a01e0f2 minor #34110 [Messenger] remove infinite (nullable) max retries (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] remove infinite (nullable) max retries

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #33284
| License       | MIT
| Doc PR        |

Infinite retries are useless and putting a high enough number is more self-explaining. Infinite retries could not be configured using the framework anyway, see issue.

Commits
-------

4a6ec8554e [Messenger] remove nullable max retries
2019-10-25 15:05:23 +02:00
Tobias Schultze
8bf8c50363 bug #32456 [Messenger] use database platform to convert correctly the DateTime (roukmoute)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] use database platform to convert correctly the DateTime

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32427
| License       | MIT

In Doctrine Messenger the method `\Symfony\Component\Messenger\Transport\Doctrine\Connection::formatDateTime()` is used to format dateTime into this: `Y-m-d\TH:i:s`.
But this is not supported in all databases platform.

Here we use the database platform to convert correctly the dateTime.

Commits
-------

cfa11561d1 Format DateTime depending on database platform
2019-10-25 12:57:14 +02:00
Tobias Schultze
13853d575d bug #34107 [Messenger] prevent infinite redelivery loops and blocked queues (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] prevent infinite redelivery loops and blocked queues

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #32055
| License       | MIT
| Doc PR        |

This PR solves a very common fitfall of amqp redeliveries. It's for example explained in https://blog.forma-pro.com/rabbitmq-redelivery-pitfalls-440e0347f4e0
Newer RabbitMQ versions provide a solution for this by itself but only for quorum queues and not the classic ones, see https://github.com/rabbitmq/rabbitmq-server/pull/1889

This PR adds a middleware that throws a RejectRedeliveredMessageException when a message is detected that has been redelivered by AMQP.

The middleware runs before the HandleMessageMiddleware and prevents redelivered messages from being handled directly. The thrown exception is caught by the worker and will trigger the retry logic according to the retry strategy.

AMQP redelivers messages when they do not get acknowledged or rejected. This can happen when the connection times out or an exception is thrown before acknowledging or rejecting. When such errors happen again while handling the redelivered message, the message would get redelivered again and again. The purpose of this middleware is to prevent infinite redelivery loops and to unblock the queue by republishing the redelivered messages as retries with a retry limit and potential delay.

Commits
-------

d211904c8e [Messenger] prevent infinite redelivery loops and blocked queues
2019-10-25 12:52:06 +02:00
Mathias STRASSER
cfa11561d1
Format DateTime depending on database platform 2019-10-25 10:13:54 +02:00
Tobias Schultze
4a6ec8554e [Messenger] remove nullable max retries 2019-10-24 23:51:16 +02:00
Tobias Schultze
d211904c8e [Messenger] prevent infinite redelivery loops and blocked queues
by republishing the redelivered messages as retries with a retry limit and potential delay
2019-10-24 18:35:41 +02:00
Nicolas Grekas
c5024bdbd0 feature #34051 [HttpClient] allow option "buffer" to be a stream resource (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] allow option "buffer" to be a stream resource

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

Commits
-------

e87301603e [HttpClient] allow option "buffer" to be a stream resource
2019-10-24 15:27:54 +02:00
Tobias Schultze
b9f69441c5 bug #32341 [Messenger] Show exceptions after multiple retries (TimoBakx)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] Show exceptions after multiple retries

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

After retrying a failed message, the `RedeliveryStamp` looses it's exception information. This PR will remedy that.

Commits
-------

598bd92313 [Messenger] Show exceptions on after empty fails
2019-10-23 16:09:27 +02:00
Timo Bakx
598bd92313 [Messenger] Show exceptions on after empty fails 2019-10-23 15:04:40 +02:00
Tobias Schultze
2e17488332 bug #34082 Revert "[Messenger] Fix exception message of failed message is dropped (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

Revert "[Messenger] Fix exception message of failed message is dropped

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        |

This reverts #33600 because it makes the message grow for each retry until AMQP cannot handle it anymore. On each retry, the full exception trace is added to the message. So in our case on the 5th retry, the message is too big for the AMQP library to encode it. AMQP extension then throws the exception

> Library error: table too large for buffer

(ref. https://github.com/alanxz/rabbitmq-c/issues/224 and https://github.com/pdezwart/php-amqp/issues/131) when trying to publish the message.

To solve this, I suggest to revert #33600 (this PR) and merge #32341 instead which does not re-add the exception on each failure.

Btw, the above problem causes other problematic side-effects of Symfony messenger. As the new retry message fails to be published with an exception, the old (currently processed message) also does not get removed (acknowledged) from the delay queue. So rabbitmq redelivers the message and the same thing happens forever. This can block the consumers and have a huge toll on your service. That's just another case for https://github.com/symfony/symfony/issues/32055#issuecomment-529630654. I'll try to fix this in another PR.

Commits
-------

3dbe924f47 Revert "[Messenger] Fix exception message of failed message is dropped on retry"
2019-10-23 14:36:36 +02:00
Nicolas Grekas
791810a4e1 bug #34081 [Validator] Set Length::$allowEmptyString to false when a NotBlank contraint is defined (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Set Length::$allowEmptyString to false when a NotBlank contraint is defined

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

Since #31528, we are told to do this kind of changes to our entities:
```diff
     /**
      * @Assert\NotBlank()
-     * @Assert\Length(min="10")
+     * @Assert\Length(min="10", allowEmptyString=false)
      */
     public $description;
```

But the `NotBlank` already says it - this is just boilerplate. More critically, this also means we cannot write annotations that are compatible with 3.4, 4.4 and 5.0 at the same time, making FC/BC hard.

By setting `Length::$allowEmptyString` to `false` when a `NotBlank` contraint is defined, we fix both issues.

/cc @ogizanagi

Commits
-------

840f7e7d88 [Validator] Set Length::$allowEmptyString to false when a NotBlank contraint is defined
2019-10-23 14:11:54 +02:00
Tobias Schultze
3dbe924f47 Revert "[Messenger] Fix exception message of failed message is dropped on retry"
This reverts commit 8f9f44eb21.
2019-10-23 13:26:24 +02:00
Nicolas Grekas
840f7e7d88 [Validator] Set Length::$allowEmptyString to false when a NotBlank contraint is defined 2019-10-23 12:57:33 +02:00
Nicolas Grekas
bfd308ff4a bug #34078 [FrameworkBundle] Don't reset the test container but the real one instead (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Don't reset the test container but the real one instead

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | -

After #31202 and #32056, the tearDown method keeps throwing deprecation notices about "Getting the container from a non-booted kernel". The reason is that resetting the test-container calls `$kernel->getContainer()` while the kernel has been shut down.

This fixes it and a few other glitches found meanwhile.

Commits
-------

8e16143256 [FrameworkBundle] Dont reset the test container but the real one instead
2019-10-23 11:00:45 +02:00
Nicolas Grekas
5d82cf3fca minor #34060 [SecurityBundle] test with doctrine-bundle 2 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] test with doctrine-bundle 2

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

Commits
-------

e3261f4f7f [SecurityBundle] test with doctrine-bundle 2
2019-10-23 10:59:42 +02:00
Nicolas Grekas
8e16143256 [FrameworkBundle] Dont reset the test container but the real one instead 2019-10-23 09:54:59 +02:00
Yonel Ceruto
d91a5a067d Avoid nested exceptions if errors occur when generating file links 2019-10-23 00:12:13 -04:00
Robin Chalas
48282ce80f minor #34075 [ErrorHandler] Import missing classes (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Import missing classes

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

Fix https://github.com/symfony/symfony/pull/33053#discussion_r337830081

Commits
-------

e07a3d7bba Import missing classes
2019-10-23 05:07:00 +02:00
Yonel Ceruto
e07a3d7bba Import missing classes 2019-10-22 22:46:01 -04:00
Fabien Potencier
28c9f48f7e bug #34072 [Debug] remove return types that break FC badly (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug] remove return types that break FC badly

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

The return type on Debug's FlattenException blocks creating a child class that is compatible with both v4.4 and v5.0.
Removing it fixes the issue with no BC break.
Adding `final` on `setPrevious` will allow updating its type hint in v5.0.

Commits
-------

cb5ef6ec18 [Debug] remove return types that break FC badly
2019-10-22 19:09:30 +02:00
Nicolas Grekas
cb5ef6ec18 [Debug] remove return types that break FC badly 2019-10-22 18:54:09 +02:00
Fabien Potencier
f00390ffd7 minor #33963 Add .gitignore to .gitattributes (reedy)
This PR was merged into the 4.4 branch.

Discussion
----------

Add .gitignore to .gitattributes

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

Commits
-------

246c5fdf43 Add .gitignore to .gitattributes
2019-10-22 17:44:54 +02:00
Fabien Potencier
8c5403e2dc bug #34015 [Mailer] Fix typo (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix typo

| Q             | A
| ------------- | ---
| Branch?       | 4.4 for features / 3.4 or 4.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #34006
| License       | MIT
| Doc PR        | n/a

The XML is different depending on the way we are sending email. So, it's `SendEmailResult` when using the API and `SendRawEmailResult` when using the HTTP class (we are then sending the raw email).

Commits
-------

4bd7cb0368 [Mailer] Fix SES Message Id retrieval
2019-10-22 17:36:06 +02:00
Fabien Potencier
4f9d449885 feature #34028 [ExpressionLanguage][Lexer] Exponential format for number (tigr1991)
This PR was merged into the 4.4 branch.

Discussion
----------

[ExpressionLanguage][Lexer] Exponential format for number

Exponential format has been added for numbers.
Ex: 1.99E+3 === 1990,
Ex: expression (1 + 1.99E+3) = 1991

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

Exponential format has been added for numbers.
Ex: 1.99E+3 === 1990,
Expressions:
0.1e+2 = 10
1e-2 = 0.01
(1 + 1.99E+3) = 1991
and etc...

Commits
-------

430ec32992 [ExpressionLanguage][Lexer] Exponential format for number
2019-10-22 17:29:53 +02:00
Fabien Potencier
2931227cad bug #34034 [Mailer][MailchimpBridge] Don't send address names if empty string (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer][MailchimpBridge] Don't send address names if empty string

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | https://github.com/symfony/symfony/pull/34029#issuecomment-543804450 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

197d1236ee [Mailer][MailchimpBridge] Don't send address names if empty string
2019-10-22 17:26:22 +02:00
Fabien Potencier
effae8a643 bug #34067 Use port 465 for SES SMTP transport (rimas-kudelis)
This PR was merged into the 4.4 branch.

Discussion
----------

Use port 465 for SES SMTP transport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34064
| License       | MIT

Commits
-------

8492e260cb Use port 465 for SES SMTP transport
2019-10-22 17:23:40 +02:00
Fabien Potencier
591c71bb7e bug #34066 [Messenger] Fix worker-only Doctrine middleware from running always (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Fix worker-only Doctrine middleware from running always

| Q             | A
| ------------- | ---
| Branch?       | 4.4 (or 4.3?, this is a bug fix)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #32436 Depends on #34069
| License       | MIT
| Doc PR        | not needed

Several Doctrine middleware are only meant to be run in a "worker" context: we want to "ping" the connection, "close" the connection and "clear" the entity manager ONLY when we are receiving messages. Before this PR, it was done always, which causes bad behavior for sync messages (imagine your Doctrine connection being closed in the middle of a controller or see https://github.com/symfony/symfony/pull/31334#issuecomment-544288437).

This fixes that in a pragmatic way: no new system for "worker-only" middleware or anything like that: just make the middleware smart enough to only do their work when a message is being received async.

Commits
-------

290a72917b Fixing issue where worker-only middleware were run in all contexts
2019-10-22 17:22:21 +02:00
Fabien Potencier
eaaabb6011 bug #34070 [ErrorRenderer] FlattenException cannot be final (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorRenderer] FlattenException cannot be final

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

Making it final forces tight coupling with the implementation as soon as one type-hints for the class.

That's a blocker on making e.g. `EasyAdminBundle` compatible with Symfony 5.

Commits
-------

b125835056 [ErrorRenderer] FlattenException cannot be final
2019-10-22 17:21:28 +02:00
Nicolas Grekas
b125835056 [ErrorRenderer] FlattenException cannot be final 2019-10-22 17:18:31 +02:00