0

我正在尝试使用 Composer 将我的 Laminas 项目中的 Doctrine Module 更新到版本 3,但出现错误。

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install doctrine/doctrine-orm-module 3.0.5
    - Conclusion: don't install doctrine/doctrine-orm-module 3.0.4
    - Conclusion: don't install doctrine/doctrine-orm-module 3.0.3
    - Conclusion: don't install doctrine/doctrine-orm-module 3.0.2
    - Conclusion: don't install doctrine/doctrine-orm-module 3.0.1
    - Conclusion: remove doctrine/doctrine-module 2.1.10
    - Installation request for doctrine/doctrine-orm-module ^3.0 -> satisfiable by doctrine/doctrine-orm-module[3.0.0, 3.0.1, 3.0.2,
3.0.3, 3.0.4, 3.0.5].
    - Conclusion: don't install doctrine/doctrine-module 2.1.10
    - doctrine/doctrine-orm-module 3.0.0 requires doctrine/doctrine-module ^4.0 -> satisfiable by doctrine/doctrine-module[4.0.0, 4.0.1, 4.0.2, 4.0.3].
    - Can only install one of: doctrine/doctrine-module[4.0.0, 2.1.10].
    - Can only install one of: doctrine/doctrine-module[4.0.1, 2.1.10].
    - Can only install one of: doctrine/doctrine-module[4.0.2, 2.1.10].
    - Can only install one of: doctrine/doctrine-module[4.0.3, 2.1.10].
    - Installation request for doctrine/doctrine-module (locked at 2.1.10) -> satisfiable by doctrine/doctrine-module[2.1.10].


Installation failed, reverting ./composer.json to its original content.

关于为什么没有安装教义-orm-module 的任何想法。我曾尝试卸载并重新安装教义-orm-module,但没有运气。

提前谢谢了。

编辑

作曲家.json

{
    "name": "kryten/direct_sites",
    "description": "Direct Sites",
    "license": "",
    "keywords": [
        "framework",
        "zf3",
        "Ecommerce"
    ],
    "homepage": "http://framework.zend.com/",
    "require": {
        "php": ">=7.3",
        "laminas/laminas-component-installer": "^2.1",
        "laminas/laminas-mvc": "^3.1",
        "laminas/laminas-filter": "^2.9",
        "laminas/laminas-crypt": "^3.3",
        "laminas/laminas-mvc-plugin-flashmessenger": "^1.1",
        "laminas/laminas-i18n": "^2.9",
        "ocramius/proxy-manager": "^2.2",
        "krytenuk/refresh-redirect": "^2.0",
        "krytenuk/logger": "^2.0",
        "krytenuk/recaptchav2": "^2.0",
        "krytenuk/mailchimp": "^0.2.0",
        "laminas/laminas-serializer": "^2.9",
        "laminas/laminas-mvc-i18n": "^1.1",
        "gedmo/doctrine-extensions": "^2.4",
        "laminas/laminas-permissions-acl": "^2.7",
        "laminas/laminas-navigation": "^2.9",
        "laminas/laminas-cache": "^2.8",
        "ocramius/package-versions": "^1.4",
        "laminas/laminas-feed": "^2.12",
        "symfony/filesystem": "^4.2",
        "laminas/laminas-dependency-plugin": "^1.0",
        "krytenuk/messenger": "^1.1",
        "laminas/laminas-file": "^2.8",
        "doctrine/doctrine-orm-module": "2.1"
    },
    "autoload": {
        "psr-4": {
            "Application\\": "module/Application/src/",
            "Auth\\": "module/Auth/src/",
            "Admin\\": "module/Admin/src/",
            "Author\\": "module/Author/src/",
            "User\\": "module/User/src/"
        }
    }
}

我正在尝试运行该命令composer require doctrine/doctrine-orm-module,然后得到响应Using version ^3.0 for doctrine/doctrine-orm-module,然后是上面的消息。

4

1 回答 1

0

尝试清理vendor/目录,因为它可能包含doctrine/doctrine-module以前安装的太旧版本。

作为另一种解决方案,我建议您执行composer update并查看是否有任何错误。

通常,在这种情况下,最常见的问题是composer require ...没有升级现有的包。

于 2020-09-16T22:53:58.447 回答