You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
It should create a service of RVMvp\Db\Adapter\Adapter but keep creating Zend\Db\Adapter\Adapter.
This is happening because the invokable method is calling directly the Zend\Db\Adapter\Adapter instead of the requested name provided on createService method:
I did my workaround adding the invokable method to my own AdapterServiceFactory:
That is how Service Manager expects factories to be. Depending on how you configured your service manager, this is not be a problem. I am guessing you have
In servicemanager config the Zend\Db\Adapter\Adapter::class service name is actually an alias for Zend\Db\Adapter\AdapterInterface::class::class (see ConfigProvider in zend-db), but you should build your dependencies upon the AdapterInterface::class interface as service name.
kind regards
I created my own
Db\Adapter\AdapterServiceFactory
so I could be able to call my ownDb\Adapter
.It should create a service of
RVMvp\Db\Adapter\Adapter
but keep creatingZend\Db\Adapter\Adapter
.This is happening because the invokable method is calling directly the
Zend\Db\Adapter\Adapter
instead of the requested name provided oncreateService
method:I did my workaround adding the invokable method to my own
AdapterServiceFactory
:I'm suggesting a bugfix so we don't need to override the invokable method.
The text was updated successfully, but these errors were encountered: