Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 4.1: [Messenger][DX] Uses a default receiver when only one is defined fix deps [Profiler] Join using ';\n' Rename the command `DebugCommand` [Messenger] Add debug:messenger CLI command [Messenger] Fix default bus name Fix the transport factory after moving it [Messenger] Fix AMQP Transport factory & TransportFactoryInterface Fix AmqpTransport [Profiler] Fix dump makes toolbar disappear Improved exception on invalid message type bumped Symfony version to 4.1.0 updated VERSION for 4.1.0-BETA1 updated CHANGELOG for 4.1.0-BETA1 [Messenger] Add TransportInterface as first class citizen sender+receiver
- Loading branch information
Showing
23 changed files
with
518 additions
and
96 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Messenger\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Symfony\Component\Console\Style\SymfonyStyle; | ||
|
||
/** | ||
* A console command to debug Messenger information. | ||
* | ||
* @author Roland Franssen <franssen.roland@gmail.com> | ||
* | ||
* @experimental in 4.1 | ||
*/ | ||
class DebugCommand extends Command | ||
{ | ||
protected static $defaultName = 'debug:messenger'; | ||
|
||
private $mapping; | ||
|
||
public function __construct(array $mapping) | ||
{ | ||
parent::__construct(); | ||
|
||
$this->mapping = $mapping; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function configure() | ||
{ | ||
$this | ||
->setDescription('Lists messages you can dispatch using the message bus') | ||
->setHelp(<<<'EOF' | ||
The <info>%command.name%</info> command displays all messages that can be | ||
dispatched using the message bus: | ||
<info>php %command.full_name%</info> | ||
EOF | ||
) | ||
; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$io = new SymfonyStyle($input, $output); | ||
$io->title('Messenger'); | ||
$io->text('The following messages can be dispatched:'); | ||
$io->newLine(); | ||
|
||
$tableRows = array(); | ||
foreach ($this->mapping as $message => $handlers) { | ||
$tableRows[] = array(sprintf('<fg=cyan>%s</fg=cyan>', $message)); | ||
foreach ($handlers as $handler) { | ||
$tableRows[] = array(sprintf(' handled by %s', $handler)); | ||
} | ||
} | ||
|
||
if ($tableRows) { | ||
$io->table(array(), $tableRows); | ||
} else { | ||
$io->text('No messages were found that have valid handlers.'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/Symfony/Component/Messenger/Exception/InvalidArgumentException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Messenger\Exception; | ||
|
||
/** | ||
* @author Yonel Ceruto <yonelceruto@gmail.com> | ||
*/ | ||
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.