mnapoli / assembly

[EXPERIMENTAL] Implementation of container-interop/definition-interop
MIT License
7 stars 5 forks source link

Object Definition Not Standards Compliant #18

Closed XedinUnknown closed 8 years ago

XedinUnknown commented 8 years ago

I am writing a container implementation-agnostic lib. As explained in #16, I want to provide a default, agnostic service definition. I have a class with common functionality that implements ObjectDefinitionInterface. I create instances of this class via shorthand methods to streamline the process and to abstract the class name in hope to later feed the definitions to your container via an implementation of DefinitionProviderInterface. However, looks like this won't work, because DefinitionResolver performs a check for ObjectDefinition instead of ObjectDefinitionInterface. Therefore, my definitions would never get resolved.

I believe this could easily be fixed by checking against the interface instead of the class name. Until this is fixed, I cannot continue the development of my project. @mnapoli, would you be able to look into fixing this?