Delegators AND Factories


#1

Hi,

in case of delegators, can I still use an entry in the factories like:

'factories' => [
   Zend\Stratigility\Middleware\ErrorHandler::class => Container\ErrorHandlerFactory::class
]

I’m trying to follow the instructions described here: https://docs.zendframework.com/zend-expressive/features/error-handling/

But my delegator is not being invoked if I have that entry in the ‘factories’.

I have delegators as follow:

'delegates' => [
            Zend\Stratigility\Middleware\ErrorHandler::class => [
                App\Lib\ErrorHandler\LogginErrorListenerDelegatorFactory::class
            ]
        ]

#2

Try the key delegators instead of delegates. :slight_smile:


#3

At least it was a easy fix. Damn, an hour lost looking into it. Sorry about that :blush: