Skip to content

Commit

Permalink
Merge pull request #201 from patchlevel/add-pause-command
Browse files Browse the repository at this point in the history
add pause subscription command
  • Loading branch information
DavidBadura authored Apr 25, 2024
2 parents 23e5398 + 610561b commit c5de2f3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"patchlevel/event-sourcing": "3.0.0-rc16",
"patchlevel/event-sourcing": "3.0.0-rc17",
"symfony/cache": "^6.4.0|^7.0.0",
"symfony/config": "^6.4.0|^7.0.0",
"symfony/console": "^6.4.1|^7.0.1",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/DependencyInjection/PatchlevelEventSourcingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Patchlevel\EventSourcing\Console\Command\ShowAggregateCommand;
use Patchlevel\EventSourcing\Console\Command\ShowCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionBootCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionPauseCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionReactivateCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionRemoveCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionRunCommand;
Expand Down Expand Up @@ -619,6 +620,12 @@ private function configureCommands(ContainerBuilder $container): void
])
->addTag('console.command');

$container->register(SubscriptionPauseCommand::class)
->setArguments([
new Reference(SubscriptionEngine::class),
])
->addTag('console.command');

$container->register(SubscriptionReactivateCommand::class)
->setArguments([
new Reference(SubscriptionEngine::class),
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/PatchlevelEventSourcingBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Patchlevel\EventSourcing\Console\Command\ShowAggregateCommand;
use Patchlevel\EventSourcing\Console\Command\ShowCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionBootCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionPauseCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionReactivateCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionRemoveCommand;
use Patchlevel\EventSourcing\Console\Command\SubscriptionRunCommand;
Expand Down Expand Up @@ -476,6 +477,7 @@ public function testCommands(): void
self::assertInstanceOf(DatabaseDropCommand::class, $container->get(DatabaseDropCommand::class));
self::assertInstanceOf(DebugCommand::class, $container->get(DebugCommand::class));
self::assertInstanceOf(SubscriptionBootCommand::class, $container->get(SubscriptionBootCommand::class));
self::assertInstanceOf(SubscriptionPauseCommand::class, $container->get(SubscriptionPauseCommand::class));
self::assertInstanceOf(SubscriptionReactivateCommand::class,
$container->get(SubscriptionReactivateCommand::class));
self::assertInstanceOf(SubscriptionRemoveCommand::class, $container->get(SubscriptionRemoveCommand::class));
Expand Down

0 comments on commit c5de2f3

Please sign in to comment.