Commit Graph

48453 Commits

Author SHA1 Message Date
Fabien Potencier
67948a7ffb feature #36431 [Messenger] Add FIFO support to the SQS transport (cv65kr)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Messenger] Add FIFO support to the SQS transport

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

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html

Commits
-------

37601753f1 [Messenger] Add FIFO support to the SQS transport
2020-04-17 05:34:16 +02:00
cv65kr
37601753f1 [Messenger] Add FIFO support to the SQS transport 2020-04-17 05:34:10 +02:00
Fabien Potencier
a85545f3e9 feature #36455 [Cache] Added context to log messages (Nyholm)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Cache] Added context to log messages

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

In my application logs, I've got many entries like:

> Failed to save key "foobar" of type string.

I know it is related to the cache, But I dont know from what adapter. I use a chain of Array, Apcu and Redis. This PR adds some context to that log entry so I know which one of my cache adapter that fails.

Commits
-------

a4d9e0fc94 [Cache] Added context to log messages
2020-04-17 05:32:08 +02:00
Nyholm
a4d9e0fc94 [Cache] Added context to log messages 2020-04-17 05:31:59 +02:00
Fabien Potencier
5369aff94f minor #36468 Use ExpectDeprecationTrait (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Use ExpectDeprecationTrait

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

Commits
-------

08febef500 Use ExpectDeprecationTrait
2020-04-17 05:15:37 +02:00
Thomas Calvet
08febef500 Use ExpectDeprecationTrait 2020-04-16 18:52:30 +02:00
Fabien Potencier
4d8a4b6ede Merge branch '5.0'
* 5.0:
  Fix From/Sender handling in Emails
2020-04-16 17:13:28 +02:00
Fabien Potencier
3b4c41fd4b Merge branch '4.4' into 5.0
* 4.4:
  Fix From/Sender handling in Emails
2020-04-16 17:13:13 +02:00
Fabien Potencier
3aa7f0c5bf bug #36467 Mailer from sender fixes (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Mailer from sender fixes

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| 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 #35818, Fix #35805, Fix #33753 | License       | MIT
| Doc PR        | n/a

Commits
-------

e885860edc Fix From/Sender handling in Emails
2020-04-16 17:12:45 +02:00
Fabien Potencier
e885860edc Fix From/Sender handling in Emails 2020-04-16 16:49:30 +02:00
Nicolas Grekas
6dc7d8b211 Merge branch '5.0'
* 5.0:
  [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
  [Messenger] Make sure redis transports are initialized correctly
  Remove return type for Twig function workflow_metadata()
  [DI] fix typo
2020-04-15 18:09:08 +02:00
Nicolas Grekas
4f8f3747d3 Merge branch '4.4' into 5.0
* 4.4:
  [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
  [Messenger] Make sure redis transports are initialized correctly
  Remove return type for Twig function workflow_metadata()
  [DI] fix typo
2020-04-15 17:59:10 +02:00
Nicolas Grekas
14a204636d bug #36408 [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions (soyuka)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions

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

expectExceptionMessageRegExp is deprecated coming phpunit 8.5.3  see https://github.com/sebastianbergmann/phpunit/issues/4133

Not sure if I need to add something else lmk.

Commits
-------

cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions
2020-04-15 17:56:18 +02:00
soyuka
cfd5a29eaf [PhpUnitBridge] add PolyfillTestCaseTrait::expectExceptionMessageMatches to provide FC with recent phpunit versions 2020-04-15 17:55:41 +02:00
Fabien Potencier
39a7ee1a61 bug #36447 Remove return type for Twig function workflow_metadata() (gisostallenberg)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove return type for Twig function workflow_metadata()

Technically it is allowed to have metadata other than string, even data that does not cast to string, like an array.

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

The workflow metadata store can contain not only strings, but setting nested metadata results in an error when workflow_metadata() is used in Twig.
Also see #36391

Commits
-------

55664c5a17 Remove return type for Twig function workflow_metadata()
2020-04-15 11:12:33 +02:00
Robin Chalas
efb0dee407 bug #36449 [Messenger] Make sure redis transports are initialized correctly (Seldaek)
This PR was squashed before being merged into the 4.4 branch (closes #36449).

Discussion
----------

[Messenger] Make sure redis transports are initialized correctly

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

Took me a while to figure out why my messages were dispatched/handled twice.. Turns out I had two messenger transports using the same dsn and the parsing was broken so they ended up both polling from a `""` stream, which caused them to both handle the messages (I think).

Below my config, note the trailing slash in the dsn was the root cause of the issue, but I don't think it's that unreasonable.

```
.env:

MESSENGER_TRANSPORT_DSN=redis://localhost:6379/?dbindex=3

messenger.yml:

            async_urgent:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    group: async_urgent
                    stream: messages_urgent
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    group: async
                    stream: messages

```

Commits
-------

68b3b898d8 [Messenger] Make sure redis transports are initialized correctly
2020-04-14 13:53:10 +02:00
Jordi Boggiano
68b3b898d8 [Messenger] Make sure redis transports are initialized correctly 2020-04-14 13:52:59 +02:00
Giso Stallenberg
55664c5a17 Remove return type for Twig function workflow_metadata()
Technically it is allowed to have metadata other than string, even data that does not cast to string, like an array.
Also see https://github.com/symfony/symfony/issues/36391
2020-04-14 11:16:32 +02:00
Nicolas Grekas
b3333e552d [DI] fix typo 2020-04-14 10:30:58 +02:00
Fabien Potencier
b2f210f1f3 feature #34363 [HttpFoundation] Add InputBag (azjezz)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[HttpFoundation] Add InputBag

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

When ppl read a request attribute, they never check if an array is returned
This means many apps just fail with a 500 when adding `[]` in the query string.
This PR turns them to 400 basically (with a deprecation for now)

Commits
-------

0a2ef70c04 [HttpFoundation] add InputBag
2020-04-13 22:42:08 +02:00
azjezz
0a2ef70c04 [HttpFoundation] add InputBag 2020-04-13 21:20:37 +01:00
Fabien Potencier
d5fd44db8b feature #36445 [WebProfilerBundle] Make a difference between queued and sent emails (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[WebProfilerBundle] Make a difference between queued and sent emails

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes-ish
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Refs #34972 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

The current profiler panel for Mailer is confusing when emails are sent synchronously.

Before:

![image](https://user-images.githubusercontent.com/47313/79122064-19867f80-7d97-11ea-9371-672f1b6f2998.png)

After:

![image](https://user-images.githubusercontent.com/47313/79121986-e8a64a80-7d96-11ea-8a41-b50f1d160f5f.png)

The new version makes a difference between queued and sent messages. The goes goes for the web debug toolbar.

I've also fixed an HTML markup issue and made the display more compact.

Commits
-------

0ee98a1679 [WebProfilerBundle] Make a difference between queued and sent emails
2020-04-13 15:11:45 +02:00
Fabien Potencier
0ee98a1679 [WebProfilerBundle] Make a difference between queued and sent emails 2020-04-13 14:53:23 +02:00
Fabien Potencier
0933f90fd5 feature #36424 [Mailer][Messenger] add return statement for MessageHandler (ottaviano)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Mailer][Messenger] add return statement for MessageHandler

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

By returning the result of the transporter in `MessageHandler` we can get hold of `SentMessage` from `HandledStamp::getResult()`.
![image](https://user-images.githubusercontent.com/4582866/79046122-3bed9100-7c0f-11ea-878f-65a6eb610758.png)

Commits
-------

7854cb488e [Mailer][Messenger] add return statement for MessageHandler
2020-04-13 13:14:28 +02:00
Nicolas Grekas
4f0375dccd fix merge 2020-04-13 12:44:30 +02:00
Nicolas Grekas
e94506bee7 Merge branch '5.0'
* 5.0:
  [DI] fix loading defaults when using the PHP-DSL
  RepeatedType should always have inner types mapped
2020-04-13 12:14:44 +02:00
Nicolas Grekas
8647ad3b2b Merge branch '4.4' into 5.0
* 4.4:
  [DI] fix loading defaults when using the PHP-DSL
  RepeatedType should always have inner types mapped
2020-04-13 12:13:27 +02:00
Nicolas Grekas
acb1060754 Merge branch '3.4' into 4.4
* 3.4:
  [DI] fix loading defaults when using the PHP-DSL
  RepeatedType should always have inner types mapped
2020-04-13 12:13:05 +02:00
Nicolas Grekas
f70286333f bug #36411 [Form] RepeatedType should always have inner types mapped (biozshock)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] RepeatedType should always have inner types mapped

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Doc PR| https://github.com/symfony/symfony-docs/pull/13519 |
| Tickets       | Fix #36410
| License       | MIT

Always set mapped=true to override inner type mapped setting.
Throw an exception if inner types of RepeatedType has mapped=false

Commits
-------

728cd66a13 RepeatedType should always have inner types mapped
2020-04-13 11:46:34 +02:00
Nicolas Grekas
41c93b65bf bug #36441 [DI] fix loading defaults when using the PHP-DSL (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix loading defaults when using the PHP-DSL

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

Commits
-------

51e0d3792c [DI] fix loading defaults when using the PHP-DSL
2020-04-13 11:45:24 +02:00
Nicolas Grekas
51e0d3792c [DI] fix loading defaults when using the PHP-DSL 2020-04-13 11:33:40 +02:00
Fabien Potencier
600280edf5 Merge branch '5.0'
* 5.0:
  Fixed false-negative fabbot error on exception message
2020-04-13 08:25:50 +02:00
Fabien Potencier
e9c82ad283 Merge branch '4.4' into 5.0
* 4.4:
  Fixed false-negative fabbot error on exception message
2020-04-13 08:25:42 +02:00
Fabien Potencier
7b8a3748af minor #36440 Fixed another false-negative fabbot error on exception message in SecurityExtension (wouterj)
This PR was merged into the 4.4 branch.

Discussion
----------

Fixed another false-negative fabbot error on exception message in SecurityExtension

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

I saw all false-negatives where fixed in the code today. This one has been coming up in my Security PRs lately, so it must have been missed.

Commits
-------

4f6381323c Fixed false-negative fabbot error on exception message
2020-04-13 08:25:02 +02:00
Wouter de Jong
4f6381323c Fixed false-negative fabbot error on exception message 2020-04-13 00:16:27 +02:00
Fabien Potencier
7eecd4fc11 Fix tests 2020-04-12 22:55:33 +02:00
Fabien Potencier
6ae2fc3d07 Merge branch '5.0'
* 5.0:
  Tweak the code to avoid fabbot false positives
2020-04-12 19:09:07 +02:00
Fabien Potencier
910cc727a0 Tweak the code to avoid fabbot false positives 2020-04-12 19:06:46 +02:00
Fabien Potencier
edb0518e56 Merge branch '5.0'
* 5.0:
  Fix tests
  Fix test
2020-04-12 18:56:52 +02:00
Fabien Potencier
780b539669 Merge branch '4.4' into 5.0
* 4.4:
  Fix tests
  Fix test
2020-04-12 18:56:42 +02:00
Fabien Potencier
093a71500a Fix tests 2020-04-12 18:56:09 +02:00
Fabien Potencier
96b28104bf Merge branch '3.4' into 4.4
* 3.4:
  Fix test
2020-04-12 18:54:34 +02:00
Fabien Potencier
311a944a08 Fix test 2020-04-12 18:54:01 +02:00
Fabien Potencier
b7c7b6f445 Merge branch '5.0'
* 5.0:
  Fix code
  Tweak the code to avoid fabbot false positives
2020-04-12 18:48:26 +02:00
Fabien Potencier
8e9bd7ad06 Merge branch '4.4' into 5.0
* 4.4:
  Fix code
  Tweak the code to avoid fabbot false positives
2020-04-12 18:45:47 +02:00
Fabien Potencier
9f9383b25f Fix code 2020-04-12 18:45:36 +02:00
Fabien Potencier
e4d4428bb3 Fix code 2020-04-12 18:39:58 +02:00
Fabien Potencier
e03e1bf420 minor #36438 Tweak the code to avoid fabbot false positives (4.4) (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Tweak the code to avoid fabbot false positives (4.4)

| 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       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

To avoid false positives from fabbot, I've changed some exception messages (the way we concatenate values) to avoid them.

Commits
-------

7d2cab1644 Tweak the code to avoid fabbot false positives
2020-04-12 18:18:20 +02:00
Fabien Potencier
7d2cab1644 Tweak the code to avoid fabbot false positives 2020-04-12 18:14:02 +02:00
Fabien Potencier
253e018ea5 Merge branch '5.0'
* 5.0:
  Tweak the code to avoid fabbot false positives
  Remove UPGRADE files for 4.x
2020-04-12 16:42:09 +02:00