container-interop / service-provider

[EXPERIMENTAL] Promoting container/framework interoperability through standard service providers
72 stars 10 forks source link

FactoryDefinitionInterface and ExtensionDefinitionInterface target #70

Closed Furgas closed 9 months ago

Furgas commented 9 months ago

Issue description

A provider MAY choose to implement the optional FactoryDefinitionInterface for type-safety.

Shouldn't it be: A factory MAY choose to implement the optional FactoryDefinitionInterface for type-safety.

A provider MAY choose to implement the optional ExtensionDefinitionInterface for type-safety.

Shouldn't it be: An extension MAY choose to implement the optional ExtensionDefinitionInterface for type-safety.

mindplay-dk commented 9 months ago

Appreciate your attention to detail! I was actually wondering the same thing when I wrote it.

It sounds a bit odd either way, right? Factories and extensions do not "make choices" - the choice is on the part of the person implementing the provider.

How about this?

A provider MAY include factories that implement the optional FactoryDefinitionInterface for type-safety.

A provider MAY include extensions that implement the optional ExtensionDefinitionInterface for type-safety.

What do you think, does this make more sense? 🙂

Furgas commented 9 months ago

Or simply: A factory/extension MAY implement the optional FactoryDefinitionInterface/ExtensionDefinitionInterface for type-safety.

mindplay-dk commented 9 months ago

Perfect, thanks 🙂