@@ -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\Snapshots; |
4 | 4 | |
5 | 5 | use Carbon\Carbon; |
6 | -use Spatie\EventProjector\EventProjectionist; |
|
7 | 6 | use Illuminate\Contracts\Filesystem\Filesystem; |
7 | +use Spatie\EventProjector\EventProjectionist; |
|
8 | 8 | use Spatie\EventProjector\Exceptions\InvalidSnapshot; |
9 | 9 | use Spatie\EventProjector\Models\StoredEvent; |
10 | 10 |
@@ -3,8 +3,8 @@ |
||
3 | 3 | namespace Spatie\EventProjector\Snapshots; |
4 | 4 | |
5 | 5 | use Exception; |
6 | -use Spatie\EventProjector\EventProjectionist; |
|
7 | 6 | use Illuminate\Contracts\Filesystem\Filesystem; |
7 | +use Spatie\EventProjector\EventProjectionist; |
|
8 | 8 | use Spatie\EventProjector\Exceptions\CouldNotCreateSnapshot; |
9 | 9 | use Spatie\EventProjector\Models\StoredEvent; |
10 | 10 |
@@ -4,13 +4,12 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Support\Collection; |
6 | 6 | use Spatie\EventProjector\EventHandlers\EventHandler; |
7 | -use Spatie\EventProjector\Models\ProjectorStatus; |
|
8 | -use Spatie\EventProjector\Models\StoredEvent; |
|
9 | -use Spatie\EventProjector\Projectors\Projector; |
|
10 | 7 | use Spatie\EventProjector\Events\FinishedEventReplay; |
8 | +use Spatie\EventProjector\Events\ProjectorDidNotHandlePriorEvents; |
|
11 | 9 | use Spatie\EventProjector\Events\StartingEventReplay; |
12 | 10 | use Spatie\EventProjector\Exceptions\InvalidEventHandler; |
13 | -use Spatie\EventProjector\Events\ProjectorDidNotHandlePriorEvents; |
|
11 | +use Spatie\EventProjector\Models\StoredEvent; |
|
12 | +use Spatie\EventProjector\Projectors\Projector; |
|
14 | 13 | |
15 | 14 | class EventProjectionist |
16 | 15 | { |
@@ -3,11 +3,10 @@ |
||
3 | 3 | namespace Spatie\EventProjector\Projectors; |
4 | 4 | |
5 | 5 | use Carbon\Carbon; |
6 | -use Illuminate\Database\Eloquent\Concerns\HasEvents; |
|
7 | 6 | use Spatie\EventProjector\EventHandlers\HandlesEvents; |
8 | 7 | use Spatie\EventProjector\Exceptions\CouldNotResetProjector; |
9 | -use Spatie\EventProjector\Models\StoredEvent; |
|
10 | 8 | use Spatie\EventProjector\Models\ProjectorStatus; |
9 | +use Spatie\EventProjector\Models\StoredEvent; |
|
11 | 10 | |
12 | 11 | trait ProjectsEvents |
13 | 12 | { |