代码之家  ›  专栏  ›  技术社区  ›  Valeriu Seremet

无法安装symfony/maker包

  •  0
  • Valeriu Seremet  · 技术社区  · 4 年前

    我是新来的Symfony,我试图安装 symfony/maker-bundle

    Using version ^1.22 for symfony/maker-bundle
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Restricting packages listed in "symfony/symfony" to "4.4.*"
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
        - ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
        - ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
        - Installation request for ocramius/proxy-manager (locked at 2.9.0) -> satisfiable by 
    ocramius/proxy-manager[2.9.0].
    

    我搜索了类似的问题,它们经常在中更改包的版本 composer.json ocramius/proxy-manager 也不是 composer-runtime-api 其中:

    {
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "ext-simplexml": "*",
        "bluetel-solutions/twig-truncate-extension": "^0.1.3",
        "friendsofsymfony/rest-bundle": "^2.7",
        "jms/serializer-bundle": "^3.5",
        "liip/imagine-bundle": "^2.2",
        "sensio/framework-extra-bundle": "^5.4",
        "symfony/apache-pack": "^1.0",
        "symfony/asset": "4.4.*",
        "symfony/console": "4.4.*",
        "symfony/dotenv": "4.4.*",
        "symfony/flex": "^1.3",
        "symfony/form": "4.4.*",
        "symfony/framework-bundle": "4.4.*",
        "symfony/mailer": "4.4.*",
        "symfony/monolog-bundle": "^3.4",
        "symfony/orm-pack": "^1.0",
        "symfony/security-bundle": "4.4.*",
        "symfony/security-csrf": "4.4.*",
        "symfony/serializer": "4.4.*",
        "symfony/swiftmailer-bundle": "^3.4",
        "symfony/translation": "4.4.*",
        "symfony/twig-bundle": "4.4.*",
        "symfony/validator": "4.4.*",
        "symfony/webpack-encore-bundle": "^1.7",
        "symfony/yaml": "4.4.*",
        "twig/extensions": "^1.5",
        "vich/uploader-bundle": "^1.12",
        "whatwedo/core-bundle": "dev-symfony5",
        "whatwedo/search-bundle": "dev-symfony5"
    },
    "require-dev": {
        "symfony/maker-bundle": "^1.12",
        "symfony/web-server-bundle": "4.4.*"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.4.*"
        }
    }
    

    ?

    0 回复  |  直到 4 年前
        1
  •  6
  •   yivi SilverLink    4 年前

    奥克拉米乌斯以其在保持向后兼容性方面的强硬立场而闻名。

    在这个案子上, release 2.9.0

    此版本升级 ocramius/proxy-manager 使用 composer-runtime-api:^2 :这个 意味着你需要 composer:^2

    为了升级到composer v2,您可以运行 composer self-update --2 在你的 开发CI/CD系统。

    所以你的选择是:

    • 将composer升级到版本2(

    • 查找要安装的包是需要代理管理器的包( composer why ocramius/proxy-manager ),并查看是否可以调整该包的版本约束,使其依赖于的旧版本(<2.9) . (我提到这个选项只是为了完整性,但是升级composer确实是一个不错的选择)。