@@ -5,9 +5,9 @@ |
||
| 5 | 5 | use Illuminate\Console\Command; |
| 6 | 6 | use Illuminate\Support\Collection; |
| 7 | 7 | use Spatie\EventProjector\EventProjectionist; |
| 8 | +use Spatie\EventProjector\Exceptions\InvalidEventHandler; |
|
| 8 | 9 | use Spatie\EventProjector\Models\StoredEvent; |
| 9 | 10 | use Spatie\EventProjector\Projectors\Projector; |
| 10 | -use Spatie\EventProjector\Exceptions\InvalidEventHandler; |
|
| 11 | 11 | |
| 12 | 12 | class ReplayEventsCommand extends Command |
| 13 | 13 | { |
@@ -38,6 +38,9 @@ |
||
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $event |
|
| 43 | + */ |
|
| 41 | 44 | protected function shouldBeStored($event): bool |
| 42 | 45 | { |
| 43 | 46 | if (! class_exists($event)) { |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Spatie\EventProjector\Console; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Console\Command; |
| 6 | -use Spatie\EventProjector\EventProjectionist; |
|
| 7 | 6 | use Spatie\EventProjector\Console\Snapshots\Concerns\ChooseSnapshot; |
| 7 | +use Spatie\EventProjector\EventProjectionist; |
|
| 8 | 8 | |
| 9 | 9 | class ResetProjectorCommand extends Command |
| 10 | 10 | { |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Spatie\EventProjector\Console\Snapshots; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Console\Command; |
| 6 | -use Spatie\EventProjector\Snapshots\SnapshotRepository; |
|
| 7 | 6 | use Spatie\EventProjector\Console\Snapshots\Concerns\ChooseSnapshot; |
| 7 | +use Spatie\EventProjector\Snapshots\SnapshotRepository; |
|
| 8 | 8 | |
| 9 | 9 | class RestoreSnapshotCommand extends Command |
| 10 | 10 | { |
@@ -3,13 +3,13 @@ |
||
| 3 | 3 | namespace Spatie\EventProjector; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Support\Collection; |
| 6 | -use Spatie\EventProjector\Models\StoredEvent; |
|
| 7 | -use Spatie\EventProjector\Projectors\Projector; |
|
| 8 | 6 | use Spatie\EventProjector\EventHandlers\EventHandler; |
| 9 | 7 | use Spatie\EventProjector\Events\FinishedEventReplay; |
| 8 | +use Spatie\EventProjector\Events\ProjectorDidNotHandlePriorEvents; |
|
| 10 | 9 | use Spatie\EventProjector\Events\StartingEventReplay; |
| 11 | 10 | use Spatie\EventProjector\Exceptions\InvalidEventHandler; |
| 12 | -use Spatie\EventProjector\Events\ProjectorDidNotHandlePriorEvents; |
|
| 11 | +use Spatie\EventProjector\Models\StoredEvent; |
|
| 12 | +use Spatie\EventProjector\Projectors\Projector; |
|
| 13 | 13 | |
| 14 | 14 | class EventProjectionist |
| 15 | 15 | { |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | 6 | use Illuminate\Support\Collection; |
| 7 | -use Spatie\EventProjector\Snapshots\Snapshot; |
|
| 8 | 7 | use Spatie\EventProjector\Projectors\Projector; |
| 8 | +use Spatie\EventProjector\Snapshots\Snapshot; |
|
| 9 | 9 | |
| 10 | 10 | class CouldNotCreateSnapshot extends Exception |
| 11 | 11 | { |
@@ -3,10 +3,10 @@ |
||
| 3 | 3 | namespace Spatie\EventProjector\Projectors; |
| 4 | 4 | |
| 5 | 5 | use Carbon\Carbon; |
| 6 | -use Spatie\EventProjector\Models\StoredEvent; |
|
| 7 | -use Spatie\EventProjector\Models\ProjectorStatus; |
|
| 8 | 6 | use Spatie\EventProjector\EventHandlers\HandlesEvents; |
| 9 | 7 | use Spatie\EventProjector\Exceptions\CouldNotResetProjector; |
| 8 | +use Spatie\EventProjector\Models\ProjectorStatus; |
|
| 9 | +use Spatie\EventProjector\Models\StoredEvent; |
|
| 10 | 10 | |
| 11 | 11 | trait ProjectsEvents |
| 12 | 12 | { |
@@ -3,10 +3,10 @@ |
||
| 3 | 3 | namespace Spatie\EventProjector\Snapshots; |
| 4 | 4 | |
| 5 | 5 | use Carbon\Carbon; |
| 6 | -use Spatie\EventProjector\EventProjectionist; |
|
| 7 | -use Spatie\EventProjector\Models\StoredEvent; |
|
| 8 | 6 | use Illuminate\Contracts\Filesystem\Filesystem; |
| 7 | +use Spatie\EventProjector\EventProjectionist; |
|
| 9 | 8 | use Spatie\EventProjector\Exceptions\InvalidSnapshot; |
| 9 | +use Spatie\EventProjector\Models\StoredEvent; |
|
| 10 | 10 | |
| 11 | 11 | class Snapshot |
| 12 | 12 | { |
@@ -3,10 +3,10 @@ |
||
| 3 | 3 | namespace Spatie\EventProjector\Snapshots; |
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | -use Spatie\EventProjector\EventProjectionist; |
|
| 7 | -use Spatie\EventProjector\Models\StoredEvent; |
|
| 8 | 6 | use Illuminate\Contracts\Filesystem\Filesystem; |
| 7 | +use Spatie\EventProjector\EventProjectionist; |
|
| 9 | 8 | use Spatie\EventProjector\Exceptions\CouldNotCreateSnapshot; |
| 9 | +use Spatie\EventProjector\Models\StoredEvent; |
|
| 10 | 10 | |
| 11 | 11 | class SnapshotFactory |
| 12 | 12 | { |