Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signup error DateTimeImmutable given #11

Open
xcaptain opened this issue Jun 30, 2016 · 1 comment
Open

Signup error DateTimeImmutable given #11

xcaptain opened this issue Jun 30, 2016 · 1 comment

Comments

@xcaptain
Copy link

xcaptain commented Jun 30, 2016

on submit the signup form I got

Type error: Argument 2 passed to Ddd\Domain\Event\StoredEvent::__construct() must be an instance of DateTime, instance of DateTimeImmutable given, called in /home/joey/workbench/git/last-wishes/vendor/carlosbuenosvinos/ddd/src/Infrastructure/Application/Notification/DoctrineEventStore.php on line 19



    in StoredEvent.php line 34
    at StoredEvent->__construct('Lw\Domain\Model\User\UserRegistered', object(DateTimeImmutable), '{"user_id":{"id":"f62b75a0-76a1-481b-88e9-cbff0d66d0f1"},"occurred_on":{}}') in DoctrineEventStore.php line 19
    at DoctrineEventStore->append(object(UserRegistered)) in PersistDomainEventSubscriber.php line 21
    at PersistDomainEventSubscriber->handle(object(UserRegistered)) in DomainEventPublisher.php line 56
    at DomainEventPublisher->publish(object(UserRegistered)) in User.php line 64
    at User->__construct(object(UserId), '[email protected]', '123456') in SignUpUserService.php line 42
    at SignUpUserService->execute(object(SignUpUserRequest)) in TransactionalApplicationService.php line 42
    at TransactionalApplicationService->Ddd\Application\Service\{closure}(object(EntityManager))
    at call_user_func(object(Closure), object(EntityManager)) in EntityManager.php line 233
    at EntityManager->transactional(object(Closure)) in DoctrineSession.php line 32
    at DoctrineSession->executeAtomically(object(Closure)) in TransactionalApplicationService.php line 45
    at TransactionalApplicationService->execute(object(SignUpUserRequest)) in index.php line 45
    at {closure}(object(Request))
    at call_user_func_array(object(Closure), array(object(Request))) in HttpKernel.php line 139
    at HttpKernel->handleRaw(object(Request), '1') in HttpKernel.php line 62
    at HttpKernel->handle(object(Request), '1', true) in Application.php line 586
    at Application->handle(object(Request)) in Application.php line 563
    at Application->run() in index.php line 242

I'm using php7, please update https://github.com/dddinphp/ddd/blob/master/src/Domain/Event/StoredEvent.php#L34 thanks.

@Sarke
Copy link

Sarke commented Nov 21, 2017

Try using this fork, it has these fixes: https://github.com/dgafka/last-wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants