Kdyby / DoctrineCache

Doctrine 2 Cache integration into Nette Framework
https://packagist.org/packages/kdyby/doctrine-cache
Other
10 stars 21 forks source link

Add support for symfony/validator #7

Closed enumag closed 9 years ago

enumag commented 9 years ago

Needed for https://github.com/Kdyby/Validator/pull/16.

I don't like this solution though. Let me think about it for a bit. Suggestions are welcomed of course.

Also there is obviously missing support for traits.

fprochazka commented 9 years ago

I think it's fine. Working is better then perfect :) We can make it nicer when we figure out how.

enumag commented 9 years ago

In my opinion there should be DependenciesProviderInterface which would receive the data and return dependencies for nette cache. Implementations of this interface should be in kdyby/doctrine and kdyby/validator respectively. That way kdyby/doctrine-cache won't need to know anything about ClassMetadata or annotation classes.

But I want to check how Symfony is handling this or whether it has such invalidation at all (couldn't find it in the code anywhere so I need to install it and try). And if not ask on stackoverflow how sf develpers deal with it...

It will take a while though so if you want to merge this as a temporary solution i'm ok with it.

fprochazka commented 9 years ago

@enumag that sounds like a clean solution, but unnecesary slow one. Cache should be fast.

enumag commented 9 years ago

@fprochazka It's only for debug mode so it doesn't matter that much right?

fprochazka commented 9 years ago

@enumag good point

enumag commented 9 years ago

@fprochazka Should I implement it then? As I plan it in production mode these services won't be created (although they will be in DIC).

fprochazka commented 9 years ago

@enumag sure, if you have the time :)

enumag commented 9 years ago

@fprochazka Well not right now, but I'll try to make some next week. :-)