From a91e7fda122f2448b82efc7d38075d1fd3eaff7b Mon Sep 17 00:00:00 2001 From: Bram Devries Date: Mon, 2 Jan 2017 19:31:50 +0100 Subject: [PATCH 1/2] Upgrade to broadway 0.10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e28480c..91477ff 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "php": ">=5.6.0", "doctrine/dbal": "^2.5", - "broadway/broadway": "^0.9", + "broadway/broadway": "^0.10", "illuminate/console": "^5.1", "illuminate/database": "^5.1", "illuminate/events": "^5.1", From d67a72b5b9d667cc888b02b80717758d38102dc0 Mon Sep 17 00:00:00 2001 From: Bram Devries Date: Mon, 2 Jan 2017 19:34:05 +0100 Subject: [PATCH 2/2] Change generator commands to use make: standard --- README.md | 14 +++++++------- .../Console/AbstractGeneratorCommand.php | 2 +- src/Generators/Console/Aggregate.php | 2 +- src/Generators/Console/Command.php | 2 +- src/Generators/Console/Event.php | 2 +- src/Generators/Console/File.php | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 20ffd83..54e92e1 100644 --- a/README.md +++ b/README.md @@ -23,28 +23,28 @@ Madewithlove\LaravelCqrsEs\ServiceProvider::class This package ships with some code generators to easily create commands, command handlers and events. To enable generators you have to add `Madewithlove\LaravelCqrEs\Generators\ServiceProvider::class` to your `app.providers` array. However, we advise you to not enable this service provider on production environments. -All of our generators besides `generate:aggreate` require an `--aggregate` option that is used to generate the proper namespace and directories. +All of our generators besides `make:cqrs:aggreate` require an `--aggregate` option that is used to make:cqrs the proper namespace and directories. -#### `generate:command` +#### `make:cqrs:command` ```bash -php artisan generate:command SayHello --aggregate World +php artisan make:cqrs:command SayHello --aggregate World # app/World/Commands/SayHello.php # app/World/CommandHandlers/SayHello.php # tests/World/CommandHandlers/SayHelloTest.php ``` -#### `generate:event` +#### `make:cqrs:event` ```bash -php artisan generate:event SaidHello --aggregate World +php artisan make:cqrs:event SaidHello --aggregate World # app/World/Events/SaidHello.php ``` -#### `generate:aggregate` +#### `make:cqrs:aggregate` ```bash -php artisan generate:aggregate World +php artisan make:cqrs:aggregate World # app/WorldAggregates/World.php # app/WorldAggregates/Repositories/WriteRepository.php # app/WorldAggregates/Repositories/DbalWriteRepository.php diff --git a/src/Generators/Console/AbstractGeneratorCommand.php b/src/Generators/Console/AbstractGeneratorCommand.php index f90b7fc..9e7d77d 100644 --- a/src/Generators/Console/AbstractGeneratorCommand.php +++ b/src/Generators/Console/AbstractGeneratorCommand.php @@ -191,7 +191,7 @@ protected function getOptions() */ protected function callCommandFile($type, $options = []) { - $this->call('generate:file', array_merge([ + $this->call('make:cqrs:file', array_merge([ 'name' => $this->getNameInput(), '--type' => $type, '--aggregate' => $this->option('aggregate'), diff --git a/src/Generators/Console/Aggregate.php b/src/Generators/Console/Aggregate.php index a481d7d..5e40ba1 100644 --- a/src/Generators/Console/Aggregate.php +++ b/src/Generators/Console/Aggregate.php @@ -7,7 +7,7 @@ class Aggregate extends AbstractGeneratorCommand /** * @var string */ - protected $name = 'generate:aggregate'; + protected $name = 'make:cqrs:aggregate'; /** * @var string diff --git a/src/Generators/Console/Command.php b/src/Generators/Console/Command.php index f48780a..8d4f083 100644 --- a/src/Generators/Console/Command.php +++ b/src/Generators/Console/Command.php @@ -7,7 +7,7 @@ class Command extends AbstractGeneratorCommand /** * @var string */ - protected $name = 'generate:command'; + protected $name = 'make:cqrs:command'; /** * @var string diff --git a/src/Generators/Console/Event.php b/src/Generators/Console/Event.php index 1bbe4a5..712a761 100644 --- a/src/Generators/Console/Event.php +++ b/src/Generators/Console/Event.php @@ -7,7 +7,7 @@ class Event extends AbstractGeneratorCommand /** * @var string */ - protected $name = 'generate:event'; + protected $name = 'make:cqrs:event'; /** * @var string diff --git a/src/Generators/Console/File.php b/src/Generators/Console/File.php index 03dc268..56ff139 100644 --- a/src/Generators/Console/File.php +++ b/src/Generators/Console/File.php @@ -7,7 +7,7 @@ class File extends AbstractGeneratorCommand /** * @var string */ - protected $name = 'generate:file'; + protected $name = 'make:cqrs:file'; /** * @var string