...ssMetadata to use it and ClassMetadataFactory to delegate reflection init/wakup to metadata. This way we can remove the ClassMetadata + ClassMetadataInfo double madness in all the managers.
DCOM-93 - Add ReflectionService and RuntimeReflectionService, change …
…ClassMetadata to use it and ClassMetadataFactory to delegate reflection init/wakup to metadata. This way we can remove the ClassMetadata + ClassMetadataInfo double madness in all the managers.
DCOM-93 - Fix typo
Shouldn't it be wakeUpReflection?
Util is not a good namespace to place such an important Mapping feature.
I'd rather create a subnamespace inside of Mapping for that (Reflection is my suggestion).
This feature has nothing to do with mapping Its just a simple abstraction/factory for the reflection stuff.
I didn't like the *Service here. The purpose of this class contract is not to expose a Service, but rather a Implementor.
My naming suggestion for this interface is "Implementor".
by that reason every reason would be named "implementor". I don't like that name, it conveys no further meaning.
Following the same idea of the other class, this class would be called:
Do you plan to provide a cache based reflection service? Otherwise a class with some static methods should be enough, no?
... wakeUpReflection... =P
DCOM-93 - Fix typo in method name
DCOM-93 - Move ReflectionService to Mapping subnamespace to make clea…
…rer where it belongs.
Why is "getClass" in "StaticReflectionService", while stating it should return ReflectionClass|null, returns always null, which leads to generate:entities in Symfony2 not working? Shouldn't it be something like that instead (which is working)?
return $class ? new \ReflectionClass($class) : null;
because this implementation is meant to be used in the EntityGenerator, when the class does not exist yet. So it cannot return a Reflection in such place (you would have an exception)
So this seems to be a temporary Symfony2 issue.
@suxxes btw, which version of Symfony are you using ? 2.0.x or master ?
@stof in this case it's an s-s edition, which is the master for Symfony2