sokil / php-mongo

MongoDB ODM. Part of @PHPMongoKit
http://phpmongokit.github.io/
MIT License
242 stars 46 forks source link

symfony/event-dispatcher 5.* support added #178

Closed pmiroslawski closed 4 years ago

sokil commented 4 years ago

Hi. Thanks for interest to project.

This is good change but i think it is road to nowhere, because verstion 1.0 try to support php 5.4 and this forces you to add code like

if (class_exists('Symfony\Contracts\EventDispatcher\Event'))
{   {
    /**     class Event extends \Symfony\Contracts\EventDispatcher\Event

Also there was my mistake to inject dependency to symfony instead of depending from interface.

If you want to upgrade event manager i thing better way

Then anyone who want use symfony event dispatcher just configure client with predefined factory and instance of dispatcher, and also this adds posibility to inject any other event dispatcher compatible with psr of write adapter

If you made this change i'll make release with 2.0 )))

pmiroslawski commented 4 years ago

Ok, I've added a new PR #179 and I'm closing this one.

Thanks