我在安装zend-form时出现作曲家错误[关闭]

问题描述 投票:0回答:1
C:\wamp64\www\zend_task>composer require zendframework/zend-form --dev
Using version ^2.14 for zendframework/zend-form
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Conclusion: don't install zendframework/zend-form 2.14.1
    - Conclusion: don't install zendframework/zend-form 2.14.0
    - Conclusion: don't install zendframework/zend-form 2.15.x-dev
    - Conclusion: remove zendframework/zend-filter 2.7.2
    - Conclusion: don't install zendframework/zend-filter 2.7.2**
    - zendframework/zend-inputfilter 2.10.0 requires zendframework/zend-filter ^2.9.1 -> satisfiable by zendframework/zend-filter[2.9.1, 2.10.x-dev, 2.9.x-dev].
    - zendframework/zend-inputfilter 2.9.0 requires zendframework/zend-filter ^2.9.1 -> satisfiable by zendframework/zend-filter[2.9.1, 2.10.x-dev, 2.9.x-dev].
    - zendframework/zend-inputfilter 2.9.1 requires zendframework/zend-filter ^2.9.1 -> satisfiable by zendframework/zend-filter[2.9.1, 2.10.x-dev, 2.9.x-dev].
    - zendframework/zend-inputfilter 2.11.x-dev requires zendframework/zend-filter ^2.9.1 -> satisfiable by zendframework/zend-filter[2.9.1, 2.10.x-dev, 2.9.x-dev].
    - zendframework/zend-inputfilter 2.10.x-dev requires zendframework/zend-filter ^2.9.1 -> satisfiable by zendframework/zend-filter[2.9.1, 2.10.x-dev, 2.9.x-dev].
    - Can only install one of: zendframework/zend-filter[2.9.1, 2.7.2].
    - Can only install one of: zendframework/zend-filter[2.10.x-dev, 2.7.2].
    - Can only install one of: zendframework/zend-filter[2.9.x-dev, 2.7.2].
    - Conclusion: don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.1|remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.1|don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.1|remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.1|don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.0|remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.0|don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.0|remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.14.0|don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.15.x-dev|remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.15.x-dev|don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Installation request for zendframework/zend-filter (locked at 2.7.2) -> satisfiable by zendframework/zend-filter[2.7.2].
    - Conclusion: don't install zendframework/zend-form 2.15.x-dev|remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Conclusion: don't install zendframework/zend-form 2.15.x-dev|don't install zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - Installation request for zendframework/zend-form ^2.14 -> satisfiable by zendframework/zend-form[2.14.0, 2.14.1, 2.15.x-dev, 2.14.x-dev].
    - Conclusion: remove zendframework/zend-inputfilter 2.7.6|install zendframework/zend-inputfilter 2.10.0|install zendframework/zend-inputfilter 2.9.0|install zendframework/zend-inputfilter 2.9.1|install zendframework/zend-inputfilter 2.11.x-dev|install zendframework/zend-inputfilter 2.10.x-dev
    - zendframework/zend-form 2.14.x-dev requires zendframework/zend-inputfilter ^2.8 -> satisfiable by zendframework/zend-inputfilter[2.10.0, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.9.0, 2.9.1, 2.11.x-dev, 2.10.x-dev].
    - Can only install one of: zendframework/zend-inputfilter[2.8.0, 2.7.6].
    - Can only install one of: zendframework/zend-inputfilter[2.8.1, 2.7.6].
    - Can only install one of: zendframework/zend-inputfilter[2.8.2, 2.7.6].
    - Can only install one of: zendframework/zend-inputfilter[2.8.3, 2.7.6].
    - Installation request for zendframework/zend-inputfilter (locked at 2.7.6) -> satisfiable by zendframework/zend-inputfilter[2.7.6].


Installation failed, reverting ./composer.json to its original content.
zend-framework composer-php
1个回答
0
投票

看起来你已经在旧版本中安装了一些依赖项:

- Conclusion: remove zendframework/zend-filter 2.7.2
- Installation request for zendframework/zend-filter (locked at 2.7.2) -> satisfiable by zendframework/zend-filter[2.7.2].
- Installation request for zendframework/zend-inputfilter (locked at 2.7.6) -> satisfiable by zendframework/zend-inputfilter[2.7.6].

要安装zend-form,您必须更新冲突的依赖项。

您可以尝试使用composer require zendframework/zend-form zendframework/zend-filter ...来显式更新每个依赖项,添加在路上出现的每个新依赖项,直到它被解析。

或者,您可以使用以下选项之一:

--update-with-dependencies      Allows inherited dependencies to be updated, except those that are root requirements.
--update-with-all-dependencies  Allows all inherited dependencies to be updated, including those that are root requirements.

例如:

composer require --update-with-all-dependencies zendframework/zend-form --dev

这是更“激烈”的选项,因为它还会更新根依赖性,因为它们直接影响您的代码,这可能更危险,而对于其他更新,理想情况下,您的库应该确保它们可以使用所选版本而您不应该直接自己使用它们。

这可能会更新比预期更多的依赖项,并可能导致副作用。一定要有一个干净的git历史记录和一个工作测试套件,以确保更新没有破坏任何东西。您应该能够从输出或composer.lock中的更改中看到哪些依赖项已更新。这还可以帮助识别测试应用程序中使用这些依赖项的部分的热点。

© www.soinside.com 2019 - 2024. All rights reserved.