laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

Extend Application to allow catching route exceptions - lack of Factory #28

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

According to Extend Application to allow catching route exceptions #120 there's a lack of Factory for ZF\Apigility\Application. Adding \ZF\Apigility\Application::init($appConfig)->run(); to index.php changes nothing, because when bootstrapping application there's a call to return $serviceManager->get('Application')->bootstrap($listeners);, but $serviceManager->get('Application') returns original Zend\Mvc\Application

To be done:

'service_manager' => [
        'factories'  => [
            'Application' => \ZF\Apigility\ApplicationFactory::class,

Originally posted by @dnahrebecki at https://github.com/zfcampus/zf-apigility/issues/162

weierophinney commented 4 years ago

Or is there other existing or possible solution for that @weierophinney ?


Originally posted by @snapshotpl at https://github.com/zfcampus/zf-apigility/issues/162#issuecomment-213342531

weierophinney commented 4 years ago

@weierophinney ping ;)


Originally posted by @dnahrebecki at https://github.com/zfcampus/zf-apigility/issues/162#issuecomment-217235403