This PR was squashed before being merged into the 4.1 branch (closes#27190).
Discussion
----------
[Workflow] Added DefinitionBuilder::setMetadataStore().
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR complements #26092.
Commits
-------
2882f8d8c8 [Workflow] Added DefinitionBuilder::setMetadataStore().
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle][Cache] Fix misses calculation when calling getItems
| 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 | -
Hello,
This PR fixes a bug in the misses calculation in the cache data collector when calling the `getItems` method.
Found this while trying to understand why I had an inconsistency in the profiler:
![misses](https://user-images.githubusercontent.com/4130750/39875423-e6212f60-5470-11e8-87be-c075ee76aeaa.png)
Commits
-------
3d1ab6df13 Fix misses calculation when calling getItems
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger][DX] Uses custom method names for handlers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/26685#issuecomment-383888657
| License | MIT
| Doc PR | ø
This has been discussed mostly in the [`MessageHandlerInterface` pull-request](https://github.com/symfony/symfony/pull/26685). For consistency reasons and convenience, this PR adds the ability to configure the method to be used on handlers:
```php
use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
use Symfony\Component\Messenger\Handler\MessageSubscriberConfiguration;
class CreateNumberMessageHandler implements MessageSubscriberInterface
{
/**
* {@inheritdoc}
*/
public static function getHandledMessages(): array
{
return [
CreateNumber::class => ['createNumber', 10],
AnotherMessage::class => 'anotherMethod',
];
}
public function createNumber(CreateNumber $command)
{
// ...
}
}
```
Commits
-------
2461e5119a [Messenger][DX] Uses custom method names for handlers
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Remove autoconfiguration for Sender/ReceiverInterface
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When creating a custom transport I ran into an error where the container was trying to autowire my transport and failing because it has arguments that can't be autowired.
The Transport service is created by the TransportFactory so this is not needed. (unless I am missing something)
Commits
-------
fa4ce7bbc4 [Messenger] remove autoconfiguration for Sender/ReceiverInterface
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Rename tag attribute "name" by "alias"
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As "name" is a reserved attribute in YAML and XML schema it makes impossible to register manually a custom Sender or Receiver with another "name" attribute.
> The file ".../demos/messenger-flex/config/services.yaml" does not contain valid YAML.
Duplicate key "name" detected at line 30 (near "- { name: 'messenger.receiver', name: 'mail' }").
Commits
-------
1ef27a7e6a Rename tag attribute "name" by "alias"
This PR was squashed before being merged into the 4.1 branch (closes#27224).
Discussion
----------
[Messenger] Make sure default receiver name is set before command configuration
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27203
| License | MIT
| Doc PR | -
Otherwise the receiver's name would still be required always.
3cc4a701e6/src/Symfony/Component/Console/Command/Command.php (L77)
Commits
-------
63871c9ce4 [Messenger] Make sure default receiver name is set before command configuration
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Autoconfiguring TransportFactoryInterface classes
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This would remove one step to create a custom transport factory.
Commits
-------
6295879a30 Autoconfiguring TransportFactoryInterface classes
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Fix new AMQP Transport test with Envelope & fix contract
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://travis-ci.org/symfony/symfony/jobs/377246434#L3685-L3686, https://ci.appveyor.com/project/fabpot/symfony/build/1.0.36261#L297 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Commits
-------
7223bd75f9 [Messenger] Fix new AMQP Transport test with Envelope
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Fix return senders based on the message parents/interfaces
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
c3d4536203/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (L1494-L1499)
According to the code a message interface is supported into routing configuration, but it doesn't work when `SendMessageMiddleware` gets the mapping senders for the current object message.
This PR tries to fix it.
Commits
-------
41e25abf8c Fixed return senders based on the message parents/interfaces
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Add more tests around the AMQP transport
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
Adding more tests to the AMQP transport/factory. These should have captured the following 3 bugs: #27198, #27197, #27196.
Commits
-------
faf9382223 Add more tests around the AMQP transport
This PR was squashed before being merged into the 4.1 branch (closes#27200).
Discussion
----------
[Messenger] Make sure Sender and Receiver locators have valid services
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This make sure that Sender and Receiver locators have valid services. Also adds minor improvements into consume command.
Commits
-------
301ce5f839 [Messenger] Make sure Sender and Receiver locators have valid services
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Re-introduce wrapped message configuration (with fix)
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26945
| License | MIT
| Doc PR | ø
The pull request was merged before beta1, but because it introduced a bug, it has been reverted. This adds back the merged PR but pushes a fix for the found bug.
Commits
-------
21e49d21d8 [Messenger] Fix TraceableBus with envelope
599f32c085 Ensure the envelope is passed back and can be altered Ensure that the middlewares can also update the message within the envelope
7c33cb27ab feature #26945 [Messenger] Support configuring messages when dispatching (ogizanagi)
This PR was squashed before being merged into the 4.1 branch (closes#27209).
Discussion
----------
[Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #...
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
ffa5d1ca94 [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead
This PR was squashed before being merged into the 4.1 branch (closes#27203).
Discussion
----------
[Messenger][DX] Uses a default receiver when only one is defined
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
When using only one receiver, as a developer, it makes no sense for me to have to precise the receiver name when using the `messenger:consume-messages` command. This is the change:
```patch
- bin/console messenger:consume-messages default
+ bin/console messenger:consume-messages
```
If I have more than one transport configured, I'll get the following message:
>
> You have 0 or more than one receiver (no default have been found). You need to specify the receiver name with an argument.
>
Commits
-------
8315b868d5 [Messenger][DX] Uses a default receiver when only one is defined