This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle][HttpFoundation] add assertResponseFormatSame()
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix n/a
| License | MIT
| Doc PR | todo
Add a new PHPUnit assertion checking the format of the HTTP request.
Example:
```php
namespace App\Tests;
use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase;
use App\Entity\Book;
class BooksTest extends ApiTestCase
{
public function testGetCollection(): void
{
static::createClient()->request('GET', '/books');
$this->assertResponseFormatSame('jsonld');
}
}
```
Commits
-------
8fffa2c6f8 [FrameworkBundle][HttpFoundation] add assertResponseFormatSame()
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Serializer] Migrate ArrayDenormalizer to DenormalizerAwareInterface
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | N/A
| License | MIT
| Doc PR | N/A
`ArrayDenormalizer` currently asks for a full-blown serializer while a simple denormalizer would be enough. I'd like to change this in Symfony 6. This PR prepares the removal of `SerializerAwareInterface` from this class.
Commits
-------
90f6d30b06 [Serializer] Migrate ArrayDenormalizer to DenormalizerAwareInterface.
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Messenger] Setup queues once in AMQP
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#39605, Fix#38092, Fix#32172
| License | MIT
| Doc PR | -
To ease the setup, this PR also merge setup of exchange AND delayExchange.
/cc @Nyholm
Commits
-------
c2e84c610a Setup queues once in AMQP
This PR was merged into the 4.4 branch.
Discussion
----------
[Yaml] do not dump extra trailing newlines for multiline blocks
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#38310
| License | MIT
| Doc PR |
Commits
-------
5fa9592d5e do not dump extra trailing newlines for multiline blocks
This PR was merged into the 5.1 branch.
Discussion
----------
[Messenger] fix postgres transport when the retry table is the same
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
---
I noticed messenger do not consume all messages when there is a retry
and when I'm using only one table for everything.
To reproduce, use the following configuration + use PG + throw an
exception in the handler
```yaml
framework:
messenger:
failure_transport: failed
transports:
async: '%env(MESSENGER_TRANSPORT_DSN)%'
failed: 'doctrine://default?queue_name=failed'
routing:
'App\Message\Foobar': async
```
The real issue is PG does not notify messenger when we `UPDATE` the message.
---
ping @dunglas
Commits
-------
2b4d47163f fix postgres transport when the retry table is the same
* 5.2:
Bump license year
Bump license year
Bump license year
[Form] fix passing null $pattern to IntlDateFormatter
[Notifier] Add missing LICENSE file
Add reference link
[Validator] Update Isin message to match the translation files.
Update README.md
Add AuthenticationTokenCreatedEvent to be propagated
This PR was merged into the 5.3-dev branch.
Discussion
----------
[PropertyInfo] Support multiple types for collection keys & values
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| Tickets | #38093
| License | MIT
| Doc PR | N/A
This PR is here to introduce multiple types for collection keys & values.
Today, we support types as following: `A|B|C` thanks to `getTypes` interface (in extractors) but we do not support union types in collection keys or values, such as `array<A|B|C>`. This PR will allow this.
In a next PR, we'll introduce an Extractor that will parse phpDoc in order to have union types in collection keys or values.
I tried to introduce as few depreciations as possible, we have only 2 of them here:
- `Type::getCollectionKeyType`
- `Type::getCollectionValueType`
Commits
-------
84dd1784cb Support multiple types for collection keys & values
This PR was merged into the 5.3-dev branch.
Discussion
----------
[PhpUnitBridge] Modernize CoverageListener
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
This PR proposes to merge `CoverageListener`, `CoverageListenerForV7` and `CoverageListenerTrait` into a single class because we don't have to deal with multiple implementations anymore.
Additionally, I've removed compat code for PHPUnit < 7.5 and added type declarations where possible.
Commits
-------
eb1669069b [PhpUnitBridge] Modernize CoverageListener
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Notifier] [BC BREAK] Change constructor signature for Mattermost and Esendex transport
| Q | A
| ------------- | ---
| Branch? | 5.x, but BC BREAK for experimental bridge
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
Based on https://github.com/symfony/symfony/pull/39428#issue-535936925
cc @odolbeau as you provided the bridge
Commits
-------
c5b9acf5d5 [Notifier] [BC BREAK] Change constructor signature for Mattermost and Esendex transport
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Fix event propagation for AuthenticationTokenCreatedEvent when globally registered
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
As promised, here's the follow-up to #39621, fixing `AuthenticationTokenCreatedEvent` to be propated from the global event dispatcher to firewall-specific event dispatchers.
The event was added in Symfony 5.2, therefore the separate PR targeting the 5.2 branch.
Commits
-------
68aaf4f916 Add AuthenticationTokenCreatedEvent to be propagated
This PR was merged into the 5.2 branch.
Discussion
----------
[Validator] Update Isin message to match the translation files
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#39645
| License | MIT
| Doc PR | N/A
Commits
-------
add3cdd623 [Validator] Update Isin message to match the translation files.
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.
Discussion
----------
Update README.md
update readme semver link to use https
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | no
| License | MIT
| Doc PR | no
I just update semver link to use https instead of http. 😉
Commits
-------
9ee2dc6d66 Update README.md
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Fix stopwach usage if it has been reset
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
I'm slowly migrating an application to messenger (from swarrot) and I
hit a strange bug. My message was well processeed **BUT** retry!
It comes from two things
* I manually reset the application (via the service resetter, to keep a
low memory usage)
* symfony/messenger try to collect some information, but since the
stopwatch has been reset, an exception occurs and the message has been
retried
So this patch avoid throwing an exception when everything works well
<details>
<summary>the trace:</summary>
```
18:45:41 INFO [messenger] Message AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage handled by AppBundle\Crawler\Messenger\MessageHandler\CrawlSitemapMessageHa
ndler::__invoke
[
"message" => AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage^ {
-crawlId: "885d23a7-8ad5-4935-a2b3-1c114ac76ded"
},
"class" => "AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage",
"handler" => "AppBundle\Crawler\Messenger\MessageHandler\CrawlSitemapMessageHandler::__invoke"
]
18:45:41 ERROR [messenger] Error thrown while handling message AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage. Sending for retry #1 using 1000 ms delay. Erro
r: "Event ""Symfony\Component\Messenger\Middleware\HandleMessageMiddleware" on "messenger.bus.default"" is not started."
[
"message" => AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage^ {
-crawlId: "885d23a7-8ad5-4935-a2b3-1c114ac76ded"
},
"class" => "AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage",
"retryCount" => 1,
"delay" => 1000,
"error" => "Event ""Symfony\Component\Messenger\Middleware\HandleMessageMiddleware" on "messenger.bus.default"" is not started.",
"exception" => LogicException {
#message: "Event ""Symfony\Component\Messenger\Middleware\HandleMessageMiddleware" on "messenger.bus.default"" is not started."
#code: 0
#file: "./vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php"
#line: 142
trace: {
./vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php:142 { …}
./vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php:126 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php:75 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php:83 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php:74 { …}
./src/Middleware/ResetApplicationMiddlerwareMiddleware.php:14 {
AppBundle\Middleware\ResetApplicationMiddlerwareMiddleware->handle(Envelope $envelope, StackInterface $stack): Envelope^
› echo "couocu";
› return $stack->next()->handle($envelope, $stack);
› }
}
./vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php:34 { …}
./vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Messenger/AbstractDoctrineMiddleware.php:45 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/FailedMessageProcessingMiddleware.php:34 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/DispatchAfterCurrentBusMiddleware.php:68 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/RejectRedeliveredMessageMiddleware.php:48 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/AddBusNameStampMiddleware.php:37 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php:43 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/MessageBus.php:80 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/TraceableMessageBus.php:41 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/RoutableMessageBus.php:54 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Worker.php:114 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Worker.php:77 { …}
./vendor/symfony/symfony/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php:198 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:989 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:290 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:82 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:166 { …}
./bin/console:29 { …}
}
}
]
```
</details>
Commits
-------
bf4b0cc022 [Messenger] Fix stopwach usage if it has been reset