2013-04-23 29 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