gpt4 book ai didi

php - 无法安装 symfony/maker-bundle

转载 作者:行者123 更新时间:2023-12-04 12:19:22 25 4
gpt4 key购买 nike

我是 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.*"
}
}
可能是我需要其他版本的 symfony/maker-bundle ?

最佳答案

Ocramius 以其在保持向后兼容性方面的严厉立场而闻名。
在这种情况下,release 2.9.0说:

This release upgrades ocramius/proxy-manager to use composer-runtime-api:^2: thismeans that you will need composer:^2 to install this version of ProxyManager.

In order to upgrade to composer v2, you can run composer self-update --2 on yourdevelopment or CI/CD system.


所以你的选择是:
  • 要么将 composer 升级到版本 2 ( composer self-update --2 ),这确实是推荐的方法,除非您有一些您真正需要的特定 composer 插件并且尚未更新以适应新版本。
  • 查找您正在安装的软件包是需要代理管理器 ( composer why ocramius/proxy-manager ) 的软件包,然后查看您是否可以调整对该软件包的版本限制,使其依赖于较旧的 (< 2.9) 版本 ocramius/proxy-manager . (我提到这个选项只是为了完整起见,但升级 Composer 确实是要走的路)。
  • 关于php - 无法安装 symfony/maker-bundle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64563619/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com