This currently does not allow full support for external PSR Containers, which do support mixed return values (eventho its not recommanded or offically documented).
Describe the solution you'd like
We should remove the object typehint on $service and also on the return type for this method. Additionally we should update the documentation to mention support of non-object values for Services with clarification that we do not recommand this.
Is your feature request related to a problem? Please describe. Currently our code restricts Services to be
object
when get and resolving internally the extensions viaReadOnlyContainer::resolveExtensions(string $id, object $service): object
. This happens for Services comming from our own Modules but also for Services comming from external ContainersThis currently does not allow full support for external PSR Containers, which do support mixed return values (eventho its not recommanded or offically documented).
Examples:
Describe the solution you'd like We should remove the
object
typehint on$service
and also on the return type for this method. Additionally we should update the documentation to mention support of non-object values for Services with clarification that we do not recommand this.