neos / Neos.EventSourcing

A library for Event Sourcing and CQRS for Flow projects.
MIT License
45 stars 30 forks source link

Adjust the composer dependencies to Flow 4 when released #98

Closed sorenmalling closed 7 years ago

sorenmalling commented 8 years ago

Trying out the Users example form @bwaidelich and latest 3.3.5 Flow I'm experiencing that classes marked as final doesn't get properties injected.

Example here from EventStream (added

\TYPO3\Flow\var_dump($this->streamIterator->current());
\TYPO3\Flow\var_dump($this->eventTypeResolver);

on line 79 for debug information)

✘ soren@kevin  ~/Sites/cqrs-test  ./flow user:makeadmin 985e66db-434e-4a0f-a729-e91e6c9e5937
Flow Variable Dump
Neos\Cqrs\EventStore\RawEvent object
 identifier => string "1" (1)
 type => string "Wwwision.Users:UserHasSignedUp" (30)
 payload => array(4)
   string "hashedPassword" (14) => string "bcrypt=>$2a$14$Zv.O3G1GutG54TtFPmx4E.fEs.0Zt0ODV6i35WRVivbvmX/4jbJCW" (68)
   string "name" (4) => string "Søren" (6)
   string "userIdentifier" (14) => string "985e66db-434e-4a0f-a729-e91e6c9e5937" (36)
   string "username" (8) => string "soren4" (6)
 metadata => array(empty)
 version => integer 0
 recordedAt => DateTimeImmutable object
  date => string "2016-11-09 13:03:42.000000" (26)
  timezone_type => integer 3
  timezone => string "UTC" (3)

Flow Variable Dump
NULL

Call to a member function getEventClassNameByType() on null

  Type: Error
  File: Packages/Application/Neos.Cqrs/Classes/EventStore/EventStream.php
  Line: 76

The annotation

    /**
     * @Flow\Inject
     * @var EventTypeResolver
     */
    protected $eventTypeResolver;

doesn't get injected untill i remove the final from the class name

A issue of Flow or a issue of this package? I see some issues mentioning final and AOP in the main Flow package https://github.com/neos/flow-development-collection/issues?utf8=%E2%9C%93&q=is%3Aissue%20final

sorenmalling commented 8 years ago

Looking deeper this change seems to be somehow haing an effect on the CQRS package

https://github.com/neos/flow-development-collection/pull/644

bwaidelich commented 8 years ago

Yes, the Cqrs package will require the upcoming Flow 4.0 (or dev-master). Sorry for that..

sorenmalling commented 8 years ago

So a quick solution is to require typo3/flow dev-master in composer.json ?

bwaidelich commented 8 years ago

So a quick solution is to require typo3/flow dev-master in composer.json ?

yes, if you dare to work with master ;)

I reponened the issue so we don't forget to adjust the composer dependencies accordingly

sorenmalling commented 8 years ago

I dare untill the 4.0 release :-)