2013-04-23 165 views
1

的更新当我尝试在我的项目更新ZF2,我得到这样的警告:跳过安装斌/ classmap_generator.php ......由Zend框架2库

# php composer.phar update 
Loading composer repositories with package information 
Updating dependencies (including require-dev) 
    - Installing zendframework/zendframework (2.1.5) 
    Loading from cache 

    Skipped installation of bin/classmap_generator.php for package zendframework/zendframework: name conflicts with an existing file 
zendframework/zendframework suggests installing doctrine/common (Doctrine\Common >=2.1 for annotation features) 
zendframework/zendframework suggests installing ext-intl (ext/intl for i18n features) 
zendframework/zendframework suggests installing ircmaxell/random-lib (Fallback random byte generator for Zend\Math\Rand if OpenSSL/Mcrypt extensions are unavailable) 
zendframework/zendframework suggests installing pecl-weakref (Implementation of weak references for Zend\Stdlib\CallbackHandler) 
zendframework/zendframework suggests installing zendframework/zendpdf (ZendPdf for creating PDF representations of barcodes) 
zendframework/zendframework suggests installing zendframework/zendservice-recaptcha (ZendService\ReCaptcha for rendering ReCaptchas in Zend\Captcha and/or Zend\Form) 
Writing lock file 
Generating autoload files 

什么错吗?这些冲突的原因是什么?如何正确更新ZF2?

+0

你在哪个环境工作? – 2013-04-23 10:29:03

+0

Ubuntu 10.04.3&Apache 2&PHP 5.4.14 – automatix 2013-04-23 10:40:56

+0

在终端上执行'composer.phar update'命令,然后检查。 – 2013-04-23 10:49:39

回答

2

通常没有什么可担心的,最可能的解释是您删除了zendframework(或您的整个供应商dir)并忘记删除bin/classmap_generator.php文件,因此它看到它已经存在并跳过安装该文件。

+0

我没有删除任何东西。或者更好:我实际上“删除”了一切,因为它是一个新的项目实例。所以我克隆了我的项目,然后执行了ZF2作曲家突击队。 – automatix 2013-04-23 11:05:44

+0

刚刚检查:实际上'vendor/bin/classmap_generator.php'是版本化的。这意味着:当我克隆时,它也被检出 - 在ZF2之前。所以,你的假设是对的。什么是推荐/最正确的方法?应该将'vendor/bin/classmap_generator.php'添加到忽略列表中吗? – automatix 2013-04-23 11:12:43

+2

一般来说,整个vendor/dir应该被git ye​​s忽略。 – Seldaek 2013-04-23 14:19:39