我已经包含了4个新的包:zfcampus/zf-apigility、zfcampus/zf-apigility-admin、zfcampus/zf-development-mode和rwoverdijk/assetmanager (虽然不确定原因,但很公平)到了我的ZF3项目中,以便开始使用无菌功能。
在此之后,网站现在显示此堆栈跟踪:
<b>Fatal error</b>: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Unable to resolve service "InputFilterManager" to a factory; are you certain you provided it during configuration?' in D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zendframework\zend-servicemanager\src\ServiceManager.php:670
Stack trace:
#0 D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(746): Zend\ServiceManager\ServiceManager->getFactory('InputFilterMana...')
#1 D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(195): Zend\ServiceManager\ServiceManager->doCreate('InputFilterMana...')
#2 D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zfcampus\zf-content-validation\src\ContentValidationListenerFactory.php(31): Zend\ServiceManager\ServiceManager->get('InputFilterMana...')
#3 D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(747): in <b>D:\RZECZY_ADAMA\_XAMPP\xampp-5.6\htdocs\zend3\vendor\zendframework\zend-servicemanager\src\ServiceManager.php</b> on line <b>670</b><br />有什么想法吗?
编辑:它出现了,我需要另一个pacakge:Zend\InputFilter,在通过Composer导入它并将它添加到modules.config.php之后,它开始显示我以前的网站。我仍然看不到运行后的管理面板:php public/index.php development enable.:
编辑:2016年11月23日,,我不得不将AssetManager添加到development.config.php & dist (是的,我知道这可以很容易地被开发支持的脚本复制)。开始起作用了。对于像我这样挣扎的其他人,下面是一个development.config.php模块列表:
'modules' => [
'ZF\Apigility\Admin',
'ZF\Apigility\Admin\Ui',
'ZF\Configuration',
'AssetManager'
],发布于 2016-11-23 16:58:15
这是由缓存的模块配置引起的。它是第一次生成,以加快读取配置。因此,在添加新模块之后,总是删除data/cache/module-config-cache.application.config.cache.php中的缓存,如果找不到它,就会自动创建它。
https://stackoverflow.com/questions/40729445
复制相似问题