3

尝试使用以下命令部署骨架应用程序时:

git clone git://github.com/zendframework/ZendSkeletonApplication.git
cd ZendSkeletonApplication
php composer.phar self-update
php composer.phar install

我收到以下错误:

PHP Fatal error: Uncaught exception 'Zend\\ServiceManager\\Exception\\InvalidArgumentException' with message 'Provided abstract factory must be the class name of an abstract factory or an instance of an AbstractFactoryInterface.' in /home/web/www/zftests/ZendSkeletonApplication/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:302\nStack trace:\n#0 /home/web/www/zftests/ZendSkeletonApplication/vendor/zendframework/zendframework/library/Zend/ServiceManager/Config.php(126): Zend\\ServiceManager\\ServiceManager->addAbstractFactory('Zend\\Cache\\Serv...')\n#1 /home/web/www/zftests/ZendSkeletonApplication/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ServiceListener.php(223): Zend\\ServiceManager\\Config->configureServiceManager(Object(Zend\\ServiceManager\\ServiceManager))\n#2 [internal function]: Zend\\ModuleManager\\Listener\\ServiceListener->onLoadModulesPost(Object(Zend\\ModuleManager\\ModuleEvent))\n#3 /home/web/www/zftests/ZendSkeletonApplication/vendor/zendframework/zendframework/library in /home/web/www/zftests/ZendSkeletonApplication/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 302

4

3 回答 3

2

请评论 module/Application/config/module.config.php 中的以下行

      'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
      'Zend\Log\LoggerAbstractServiceFactory',

骨架应用程序将工作。

谢谢

于 2013-05-03T16:19:41.767 回答
2

这工作得很好。问题是 ZF2.5 框架中缺少两个文件。

  'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
  'Zend\Log\LoggerAbstractServiceFactory',

谢谢,加里

于 2013-05-03T19:02:00.160 回答
1

非常感谢大家!看起来现在的解决方案是克隆 2.1 标签,正如@weierophinney 在这里提到的那样:https ://github.com/zendframework/ZendSkeletonApplication/commit/80884b7da866f5136654c83604c1270a3228b7b9

git clone -b "zf/release-2.1.0" https://github.com/zendframework/ZendSkeletonApplication.git ./
php composer.phar self-update
php composer.phar install
于 2013-05-04T08:38:07.070 回答