Hi everybody. One more note from my side for clarification: the ::class does not trigger the auto loading mechanism to check if a class is available or not. So you can listen to any kind of events on e.g. libraries your package has no hard dependency on.
All the best, Benni > On 20. Aug 2018, at 18:03, Woody Gilk <[email protected]> wrote: > >> On Mon, Aug 20, 2018 at 10:38 AM <[email protected]> wrote: >> >> To use `::class`, the event object must have already been created. > > That is incorrect, the following is entirely valid: > > use Acme\Domain\User\UserUpdatedEvent; > > $class = UpdatedEvent::Class; > > -- > Woody Gilk > https://shadowhand.me > > -- > You received this message because you are subscribed to the Google Groups > "PHP Framework Interoperability Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/php-fig/CAGOJM6J4Z1NfLP3Kmq-9aY8CSdGk78%2B%3DLdmz3puHegHjX3k7CA%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/1AC415C0-1EB2-4A98-83D7-939E6AA823A0%40gmail.com. For more options, visit https://groups.google.com/d/optout.
