首頁  >  問答  >  主體

Symfony async-aws-bundle 安裝錯誤與 Composer require 衝突

我嘗試安裝async-aws symfony 套件:https://async-aws.com/integration/symfony-bundle.html,當我嘗試運行composer require async-aws/async- 時,我遇到了以下錯誤aws-bundle

#它似乎與另一個套件 require 衝突,但我還找不到它。 我嘗試刪除我的供應商資料夾和composer.lock 檔案並安裝軟體包。

如果有人可以幫助解決此問題,我們將不勝感激。

您的要求無法解析為一組可安裝的 包。

問題1 - 根composer.json需要async-aws/async-aws-bundle ^1.7 ->可由async-aws/async-aws-bundle[1.7.0]滿足。 - async-aws/async-aws-bundle 1.7.0 需要symfony/config ^4.4 || ^5.0 || ^6.0 -> 找到symfony/config[v4.4.0, ..., v4.4.42, v5.0.0 , ..., v5.4.9, v6.0.0, ..., v6.1.0] 但這些可能沒有加載 因為它與另一個要求衝突。

您也可以嘗試使用顯式版本重新執行composer require 約束,例如“作曲家需要 async-aws/async-aws-bundle:*” 弄清楚是否有任何版本可以安裝,或者“composer require” async-aws/async-aws-bundle:^2.1"(如果您知道需要哪一個)。

安裝失敗,正在將 ./composer.json 和 ./composer.lock 恢復為 他們的原始內容。

我的 composer.json 文件,

{
"name": "",
"license": "",
"type": "project",
"autoload": {
    "psr-4": {
        "AppBundle\": "src/AppBundle"
    },
    "classmap": [
        "app/AppKernel.php",
        "app/AppCache.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Tests\": "tests/"
    },
    "files": [
        "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
    ]
},
"require": {
    "php": ">=7.3",
    "ext-curl": "*",
    "ext-gmp": "*",
    "ext-intl": "*",
    "ext-json": "*",
    "ext-mbstring": "*",
    "ext-mongodb": "^1.8.1",
    "ext-openssl": "*",
    "async-aws/cognito-identity-provider": "^1.4",
    "async-aws/s3": "^1.12",
    "async-aws/simple-s3": "^1.1",
    "async-aws/sns": "^1.3",
    "async-aws/sqs": "^1.7",
    "doctrine/mongodb-odm-bundle": "^3.6.0",
    "fakerphp/faker": "^1.9",
    "friendsofsymfony/jsrouting-bundle": "^2.6",
    "friendsofsymfony/user-bundle": "~2.0",
    "php-http/guzzle6-adapter": "^2.0",
    "php-http/httplug-bundle": "^1.19",
    "sensio/distribution-bundle": "^5.0.19",
    "sensio/framework-extra-bundle": "^5.0.0",
    "symfony/dotenv": "^3.4",
    "symfony/intl": "^3.4",
    "symfony/monolog-bundle": "^3.1.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/polyfill-php81": "^1.23",
    "symfony/swiftmailer-bundle": "^2.6.4",
    "symfony/symfony": "3.4.*",
    "twig/extensions": "^1.5",
    "twig/twig": "^1.0||^2.0",
},
"require-dev": {
    "doctrine/data-fixtures": "^1.4",
    "phpstan/phpstan": "^0.12.33",
    "phpstan/phpstan-doctrine": "^0.12.33",
    "phpstan/phpstan-symfony": "^0.12.30",
    "symfony/maker-bundle": "^1.20",
    "symfony/phpunit-bridge": "5.1.3",
},
"scripts": {
    "symfony-scripts": [
        "AppBundle\Util\Helper\ScriptHandler::buildBootstrap",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
        "Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-install-cmd": [
        "@symfony-scripts"
    ],
    "post-update-cmd": [
        "@symfony-scripts"
    ],
    "test": "./vendor/bin/simple-phpunit -d memory_limit=-1",
    "phpcs": "./vendor/bin/phpcs --extensions=php --standard=PSR2 ./src/*",
    "phpcbf": "./vendor/bin/phpcbf --extensions=php --standard=PSR2 ./src/*",
    "stan" : "./vendor/bin/phpstan analyse --level=7 ./src"
},
"config": {
    "sort-packages": true,
    "process-timeout":0,
    "platform": {
        "ext-mongo": "1.6.16"
    },
    "allow-plugins": {
        "composer/package-versions-deprecated": true,
    }
},
"minimum-stability": "stable",
"extra": {
    "symfony-app-dir": "app",
    "symfony-bin-dir": "bin",
    "symfony-var-dir": "var",
    "symfony-web-dir": "web",
    "symfony-tests-dir": "tests",
    "symfony-assets-install": "relative",
    "branch-alias": null
}

}

P粉475315142P粉475315142227 天前422

全部回覆(1)我來回復

  • P粉949190972

    P粉9491909722024-03-30 00:53:59

    根據此要求,您仍在使用 Symfony 3.4:

    "symfony/symfony": "3.4.*",

    #請注意,該版本自 2021 年 11 月起不再受支持,因此請將您的應用程式更新至任何更高版本的 Symfony。

    即使 async-aws/async-aws-bundle 的第一個發布版本至少需要 Symfony 4.4,如果您確實想使用給定的包,您沒有其他機會

    回覆
    0
  • 取消回覆