minor #35106 Use spaces correctly to display options in DebugCommand (ruudk)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead.
Discussion
----------
Use spaces correctly to display options in DebugCommand
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
Messenger ships with a DebugCommand. It doesn't properly place spaces for every option.
```diff
- handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2)
+ handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2)
```
Commits
-------
1c92e9e2f1
Use spaces correctly to display options in DebugCommand
This commit is contained in:
commit
8855082ffd
@ -108,9 +108,9 @@ EOF
|
||||
|
||||
$optionsMapping = [];
|
||||
foreach ($options as $key => $value) {
|
||||
$optionsMapping[] = ' '.$key.'='.$value;
|
||||
$optionsMapping[] = $key.'='.$value;
|
||||
}
|
||||
|
||||
return ' (when'.implode(', ', $optionsMapping).')';
|
||||
return ' (when '.implode(', ', $optionsMapping).')';
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class DebugCommandTest extends TestCase
|
||||
{
|
||||
$command = new DebugCommand([
|
||||
'command_bus' => [
|
||||
DummyCommand::class => [[DummyCommandHandler::class, []]],
|
||||
DummyCommand::class => [[DummyCommandHandler::class, ['option1' => '1', 'option2' => '2']]],
|
||||
MultipleBusesMessage::class => [[MultipleBusesMessageHandler::class, []]],
|
||||
],
|
||||
'query_bus' => [
|
||||
@ -62,12 +62,12 @@ command_bus
|
||||
|
||||
The following messages can be dispatched:
|
||||
|
||||
---------------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
Symfony\Component\Messenger\Tests\Fixtures\DummyCommand
|
||||
handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler
|
||||
handled by Symfony\Component\Messenger\Tests\Fixtures\DummyCommandHandler (when option1=1, option2=2)
|
||||
Symfony\Component\Messenger\Tests\Fixtures\MultipleBusesMessage
|
||||
handled by Symfony\Component\Messenger\Tests\Fixtures\MultipleBusesMessageHandler
|
||||
---------------------------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
query_bus
|
||||
---------
|
||||
|
Reference in New Issue
Block a user