File tree Expand file tree Collapse file tree
Integration/DynamicConsistencyBoundary/Course Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55namespace Patchlevel \EventSourcing \DCB ;
66
77use Patchlevel \EventSourcing \Attribute \EventTag ;
8- use Patchlevel \EventSourcing \Stringable ;
8+ use Patchlevel \EventSourcing \Identifier \ Identifier ;
99use ReflectionClass ;
10- use Stringable as NativeStringable ;
10+ use Stringable ;
1111
1212use function array_keys ;
1313use function hash ;
@@ -36,12 +36,12 @@ public function extract(object $event): array
3636
3737 $ value = $ property ->getValue ($ event );
3838
39- if ($ value instanceof Stringable) {
40- $ value = $ value -> toString () ;
39+ if ($ value instanceof Stringable || is_int ( $ value ) ) {
40+ $ value = ( string ) $ value ;
4141 }
4242
43- if ($ value instanceof NativeStringable || is_int ( $ value ) ) {
44- $ value = ( string ) $ value ;
43+ if ($ value instanceof Identifier ) {
44+ $ value = $ value-> toString () ;
4545 }
4646
4747 if (!is_string ($ value )) {
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 44
55namespace Patchlevel \EventSourcing \Tests \Benchmark ;
66
7- use Patchlevel \EventSourcing \Aggregate \ AggregateRootId ;
7+ use Patchlevel \EventSourcing \Identifier \ Identifier ;
88use Patchlevel \EventSourcing \Message \Message ;
99use Patchlevel \EventSourcing \Metadata \Event \AttributeEventRegistryFactory ;
1010use Patchlevel \EventSourcing \Repository \DefaultRepository ;
@@ -24,8 +24,8 @@ final class SimpleSetupTaggableStoreBench
2424 private TaggableDoctrineDbalStore $ store ;
2525 private Repository $ repository ;
2626
27- private AggregateRootId $ singleEventId ;
28- private AggregateRootId $ multipleEventsId ;
27+ private Identifier $ singleEventId ;
28+ private Identifier $ multipleEventsId ;
2929
3030 public function setUp (): void
3131 {
Original file line number Diff line number Diff line change 44
55namespace Patchlevel \EventSourcing \Tests \Integration \DynamicConsistencyBoundary \Course ;
66
7- use Patchlevel \EventSourcing \Aggregate \ RamseyUuidV7Behaviour ;
8- use Patchlevel \EventSourcing \Stringable ;
7+ use Patchlevel \EventSourcing \Identifier \ Identifier ;
8+ use Patchlevel \EventSourcing \Identifier \ RamseyUuidV7Behaviour ;
99
10- final class CourseId implements Stringable
10+ final class CourseId implements Identifier
1111{
1212 use RamseyUuidV7Behaviour;
1313}
Original file line number Diff line number Diff line change 44
55namespace Patchlevel \EventSourcing \Tests \Integration \DynamicConsistencyBoundary \Course ;
66
7- use Patchlevel \EventSourcing \Aggregate \ RamseyUuidV7Behaviour ;
8- use Patchlevel \EventSourcing \Stringable ;
7+ use Patchlevel \EventSourcing \Identifier \ Identifier ;
8+ use Patchlevel \EventSourcing \Identifier \ RamseyUuidV7Behaviour ;
99
10- final class StudentId implements Stringable
10+ final class StudentId implements Identifier
1111{
1212 use RamseyUuidV7Behaviour;
1313}
Original file line number Diff line number Diff line change 44
55namespace Patchlevel \EventSourcing \Tests \Unit \DCB ;
66
7- use Patchlevel \EventSourcing \Aggregate \CustomId ;
87use Patchlevel \EventSourcing \Attribute \EventTag ;
98use Patchlevel \EventSourcing \DCB \AttributeEventTagExtractor ;
9+ use Patchlevel \EventSourcing \Identifier \CustomId ;
1010use PHPUnit \Framework \TestCase ;
1111
1212final class AttributeEventTagExtractorTest extends TestCase
You can’t perform that action at this time.
0 commit comments