dflydev / dflydev-doctrine-orm-service-provider

Doctrine ORM Service Provider
MIT License
209 stars 59 forks source link

setEntityListenerResolver call will only work with doctrine/orm >= 2.4.0 #41

Open lschricke opened 10 years ago

lschricke commented 10 years ago

Hi!

I think the requirements defined in composer.json are not strict enough since there is a call to Configuration's setEntityListenerResolver method which is only available since version 2.4 of Doctrine ORM.

Or I am missing something?

simensen commented 10 years ago

It is possible you are correct. :) I don't have time to look right now, but I would consider bumping the requirements to ~2.4. Otherwise, if there is a way to make it work w/ older versions of Doctrine as well I'd be up for that.

lschricke commented 10 years ago

Not sure I can help to make it work with 2.3 version of Doctrine. But I reckon bumping the requirement to ~2.4 would be a good quick fix as the provider does not seem to work with ~2.3 anyway. Thanks for your work btw! :)

simensen commented 10 years ago

Sure, thanks. :)

I'll have to look into this another time. Changing the version constraints might warrant a major version bump since it would no longer be BC, but if it already isn't working with Doctrine 2.3 maybe that isn't an issue...

inri13666 commented 6 years ago

Hello version 1.0.7 uses doctrine orm 2.3+ in composer.json But following class uses classes from doctrine version 2.4+, forexample DefaultRepositoryFactory https://github.com/dflydev/dflydev-doctrine-orm-service-provider/blob/v1.0.7/src/Dflydev/Pimple/Provider/DoctrineOrm/DoctrineOrmServiceProvider.php#L36

There are no DefaultRepositoryFactory https://github.com/doctrine/doctrine2/tree/2.3.5/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php

Firstly it appears at 2.4.0 https://github.com/doctrine/doctrine2/blob/v2.4.0/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php