【问题标题】:Skipped installation of bin/classmap_generator.php ... by update of the Zend Framework 2 library通过更新 Zend Framework 2 库跳过安装 bin/classmap_generator.php ...
【发布时间】:2013-04-16 12:36:32
【问题描述】:

当我尝试在我的项目中更新 ZF2 时,我收到以下警告:

# 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?

【问题讨论】:

  • 您在哪个环境中工作?
  • Ubuntu 10.04.3 & Apache 2 & PHP 5.4.14
  • 在终端执行命令composer.phar update然后检查。
  • # php composer.phar update 返回Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files
  • # php composer.phar install 后返回Loading composer repositories with package information Installing dependencies from lock file Nothing to install or update Generating autoload files

标签: zend-framework2 updates composer-php


【解决方案1】:

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

【讨论】:

  • 我没有删除任何内容。或者更好:我实际上“删除”了所有内容,因为它是一个新的项目实例。所以我克隆了我的项目并执行了 ZF2 作曲家突击队。
  • 刚刚检查:实际上vendor/bin/classmap_generator.php 是版本化的。这意味着:当我进行克隆时,它也在被检出——在 ZF2 出现之前。所以,你的假设是对的。推荐/最正确的方法是什么?是否应该将vendor/bin/classmap_generator.php 添加到忽略列表中?
  • 一般来说,git ye​​s 应该忽略整个 vendor/dir。
猜你喜欢
  • 1970-01-01
  • 2012-09-12
  • 1970-01-01
  • 1970-01-01
  • 2012-12-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多