You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use CloudCreativity\Modules\Contracts\Toolkit\Identifiers\Identifier;
22
-
use CloudCreativity\Modules\Contracts\Toolkit\Messages\Command;
23
-
use VendorName\EventManagement\Shared\Enums\CancellationReasonEnum;
21
+
use CloudCreativity\Modules\Contracts\Messaging\Command;use CloudCreativity\Modules\Contracts\Toolkit\Identifiers\Identifier;use VendorName\EventManagement\Shared\Enums\CancellationReasonEnum;
24
22
25
23
final readonly class CancelAttendeeTicketCommand implements Command
use App\Modules\EventManagement\Application\Ports\Driven\Persistence\AttendeeRepository;
56
-
use CloudCreativity\Modules\Application\Bus\Middleware\ExecuteInUnitOfWork;
57
-
use CloudCreativity\Modules\Contracts\Application\Messages\DispatchThroughMiddleware;
58
-
use CloudCreativity\Modules\Toolkit\Results\Result;
53
+
use App\Modules\EventManagement\Application\Ports\Driven\Persistence\AttendeeRepository;use CloudCreativity\Modules\Application\Bus\Middleware\ExecuteInUnitOfWork;use CloudCreativity\Modules\Contracts\Bus\DispatchThroughMiddleware;use CloudCreativity\Modules\Toolkit\Results\Result;
59
54
60
55
final readonly class CancelAttendeeTicketHandler implements
61
56
DispatchThroughMiddleware
@@ -142,8 +137,7 @@ And then our implementation is as follows:
use App\Modules\EventManagement\Application\UsesCases\Commands\{
171
-
CancelAttendeeTicket\CancelAttendeeTicketCommand,
172
-
CancelAttendeeTicket\CancelAttendeeTicketHandler,
173
-
};
174
-
use App\Modules\EventManagement\Application\Ports\Driving\CommandBus as CommandBusPort;
175
-
use App\Modules\EventManagement\Application\Ports\Driven\DependencyInjection\ExternalDependencies;
176
-
use CloudCreativity\Modules\Application\Bus\CommandHandlerContainer;
177
-
use CloudCreativity\Modules\Application\Bus\Middleware\ExecuteInUnitOfWork;
178
-
use CloudCreativity\Modules\Application\Bus\Middleware\LogMessageDispatch;
179
-
use CloudCreativity\Modules\Toolkit\Pipeline\PipeContainer;
164
+
use App\Modules\EventManagement\Application\Ports\Driven\DependencyInjection\ExternalDependencies;use App\Modules\EventManagement\Application\Ports\Driving\CommandBus as CommandBusPort;use App\Modules\EventManagement\Application\UsesCases\Commands\{CancelAttendeeTicket\CancelAttendeeTicketCommand,CancelAttendeeTicket\CancelAttendeeTicketHandler,};use CloudCreativity\Modules\Application\Bus\Middleware\ExecuteInUnitOfWork;use CloudCreativity\Modules\Bus\CommandHandlerContainer;use CloudCreativity\Modules\Bus\Middleware\LogMessageDispatch;use CloudCreativity\Modules\Toolkit\Pipeline\PipeContainer;
180
165
181
166
final class CommandBusProvider
182
167
{
@@ -343,9 +328,7 @@ And then our implementation is as follows:
use App\Modules\EventManagement\Application\Ports\Driving\CommandQueuer as Port;
347
-
use App\Modules\EventManagement\Application\Ports\Driven\Queue;
348
-
use CloudCreativity\Modules\Application\Bus\CommandQueuer as Queuer;
331
+
use App\Modules\EventManagement\Application\Ports\Driven\Queue;use App\Modules\EventManagement\Application\Ports\Driving\CommandQueuer as Port;use CloudCreativity\Modules\Application\Bus\CommandQueuer as Queuer;
349
332
350
333
final class CommandQueuer extends Queuer implements Port
351
334
{
@@ -466,8 +449,7 @@ singleton instances of dependencies.
466
449
For example:
467
450
468
451
```php
469
-
use App\Modules\EventManagement\Domain\Services;
470
-
use CloudCreativity\Modules\Application\Bus\Middleware\SetupBeforeDispatch;
452
+
use App\Modules\EventManagement\Domain\Services;use CloudCreativity\Modules\Bus\Middleware\SetupBeforeDispatch;
471
453
472
454
$middleware->bind(
473
455
SetupBeforeDispatch::class,
@@ -497,7 +479,7 @@ If you only need to do teardown work, use the `TeardownAfterDispatch` middleware
497
479
closure as its only constructor argument:
498
480
499
481
```php
500
-
use CloudCreativity\Modules\Application\Bus\Middleware\TeardownAfterDispatch;
482
+
use CloudCreativity\Modules\Bus\Middleware\TeardownAfterDispatch;
501
483
502
484
$middleware->bind(
503
485
TeardownAfterDispatch::class,
@@ -578,7 +560,7 @@ Use our `LogMessageDispatch` middleware to log the dispatch of a command, and th
578
560
[PSR Logger](https://php-fig.org/psr/psr-3/).
579
561
580
562
```php
581
-
use CloudCreativity\Modules\Application\Bus\Middleware\LogMessageDispatch;
563
+
use CloudCreativity\Modules\Bus\Middleware\LogMessageDispatch;
582
564
583
565
$middleware->bind(
584
566
LogMessageDispatch::class,
@@ -620,9 +602,7 @@ However, there may be scenarios where a property should not be logged, e.g. beca
620
602
In this scenario, use the `Sensitive` attribute on the property, and it will not be logged:
621
603
622
604
```php
623
-
use CloudCreativity\Modules\Contracts\Toolkit\Identifiers\Identifier;
624
-
use CloudCreativity\Modules\Contracts\Toolkit\Messages\Command;
625
-
use CloudCreativity\Modules\Toolkit\Loggable\Sensitive;
605
+
use CloudCreativity\Modules\Toolkit\Sensitive;use CloudCreativity\Modules\Contracts\Messaging\Command;use CloudCreativity\Modules\Contracts\Toolkit\Identifiers\Identifier;
626
606
627
607
final readonly class CancelAttendeeTicketCommand implements Command
628
608
{
@@ -638,9 +618,7 @@ final readonly class CancelAttendeeTicketCommand implements Command
638
618
If you need full control over the log context, implement the `ContextProvider` interface on your command message:
639
619
640
620
```php
641
-
use CloudCreativity\Modules\Contracts\Toolkit\Identifiers\Identifier;
642
-
use CloudCreativity\Modules\Contracts\Toolkit\Loggable\ContextProvider;
643
-
use CloudCreativity\Modules\Contracts\Toolkit\Messages\Command;
621
+
use CloudCreativity\Modules\Contracts\Bus\Loggable\ContextProvider;use CloudCreativity\Modules\Contracts\Messaging\Command;use CloudCreativity\Modules\Contracts\Toolkit\Identifiers\Identifier;
644
622
645
623
final readonly class CancelAttendeeTicketCommand implements
use CloudCreativity\Modules\Contracts\Application\Bus\CommandMiddleware;
675
-
use CloudCreativity\Modules\Contracts\Toolkit\Messages\Command;
676
-
use CloudCreativity\Modules\Contracts\Toolkit\Result\Result;
651
+
use Closure;use CloudCreativity\Modules\Contracts\Bus\Middleware\CommandMiddleware;use CloudCreativity\Modules\Contracts\Messaging\Command;use CloudCreativity\Modules\Contracts\Toolkit\Result\Result;
677
652
678
653
final class MyMiddleware implements CommandMiddleware
679
654
{
@@ -685,7 +660,7 @@ final class MyMiddleware implements CommandMiddleware
0 commit comments