Cannot declare class X, because the name is already in use (when using custom stored event repository) #242
Unanswered
fabioferreira3
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use a custom event storage repository, following this guideline: https://spatie.be/index.php/docs/laravel-event-sourcing/v5/advanced-usage/using-your-own-event-storage-repository
So I created a custom class, named UniqueClassNotYetDeclaredRepository which implements Spatie\EventSourcing\StoredEvents\Repositories\StoredEventRepository
But after updating event-sourcing.php with the new custom repository, in 'stored_event_repository' the app throws this error:
Cannot declare class Domain\StoredEvent\UniqueClassNotYetDeclaredRepository, because the name is already in use
It doesn't matter what class name I use, it will always trigger this error. The namespaces are correct. And btw, the same error occurs if trying to use a custom event storage model.
Beta Was this translation helpful? Give feedback.
All reactions