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?
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 ofDefinitionProviderInterface
. However, looks like this won't work, becauseDefinitionResolver
performs a check forObjectDefinition
instead ofObjectDefinitionInterface
. 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?