After packaging the created API, the application.config.php which originally contains the key => value of :
'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}.php'],
getting replaced by
'config_glob_paths' =>
array (
0 => '/tmp/ZFDeploy_57c06a6d3c68a/config/autoload/{,*.}{global,local}.php',
),
Which causes the DB connected REST services to fail with an exception
PHP Fatal error: Uncaught Zend\\ServiceManager\\Exception\\ServiceNotFoundException: ZF\\Rest\\Factory\\RestControllerFactory::canCreate requires that a valid "listener" service be specified for controller TodoBackend\\V1\\Rest\\Todo\\Controller; no service found in /home/tacsiazuma/shared/www/todobackend/vendor/zfcampus/zf-rest/src/Factory/RestControllerFactory.php:
as it's cannot resolve the DB adapters configured in local.php inside the autoload folder.
After packaging the created API, the application.config.php which originally contains the key => value of :
'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}.php'],
getting replaced by 'config_glob_paths' => array ( 0 => '/tmp/ZFDeploy_57c06a6d3c68a/config/autoload/{,*.}{global,local}.php', ),Which causes the DB connected REST services to fail with an exception
PHP Fatal error: Uncaught Zend\\ServiceManager\\Exception\\ServiceNotFoundException: ZF\\Rest\\Factory\\RestControllerFactory::canCreate requires that a valid "listener" service be specified for controller TodoBackend\\V1\\Rest\\Todo\\Controller; no service found in /home/tacsiazuma/shared/www/todobackend/vendor/zfcampus/zf-rest/src/Factory/RestControllerFactory.php:
as it's cannot resolve the DB adapters configured in local.php inside the autoload folder.
Originally posted by @letscodehu at https://github.com/zfcampus/zf-apigility/issues/176