简体   繁体   中英

Composer Install : Your requirements could not be resolved to an installable set of packages. symfony/css-selector

Can someone help me please, I'm lost

mypc@mypc:~/project$ docker-compose exec project php -d memory_limit=-1 /usr/local/bin/composer install

Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Your requirements could not be resolved to an installable set of packages.

Problem 1 - Installation request for symfony/css-selector v3.3.6 -> satisfiable by symfony/css-selector[v3.3.6]. - don't install symfony/symfony v2.8.26|don't install symfony/css-selector v3.3.6 - Installation request for symfony/symfony v2.8.26 -> satisfiable by symfony/symfony[v2.8.26].

Here is my composer.json

{
"name": "company/project",
"license": "proprietary",
"type": "project",
"autoload": {
    "psr-4": {
        "": "src/"
    },
    "classmap": [
        "app/AppKernel.php",
        "app/AppCache.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/"
    }
},
"require": {
    "php": ">=5.5.9",
    "symfony/symfony": "^2.8",
    "doctrine/orm": "^2.5",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/doctrine-cache-bundle": "^1.2",
    "symfony/swiftmailer-bundle": "^2.3",
    "symfony/monolog-bundle": "^2.8",
    "symfony/polyfill-apcu": "^1.0",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "incenteev/composer-parameter-handler": "^2.0",
    "sonata-project/doctrine-orm-admin-bundle": "^3.0",
    "sonata-project/admin-bundle": "^3.20.0",
    "sonata-project/user-bundle": "^3.0",
    "sonata-project/formatter-bundle": "^3.0",
    "exercise/htmlpurifier-bundle": "^0.2.3",
    "doctrine/doctrine-fixtures-bundle": "^2.3",
    "jbroadway/urlify": "^1.0",
    "friendsofsymfony/elastica-bundle": "^4.0",
    "liip/imagine-bundle": "^1.6",
    "pagerfanta/pagerfanta": "^1.0",
    "eightpoints/guzzle-bundle": "^6.0",
    "symfony/dom-crawler": "^3.1",
    "symfony/css-selector": "^3.1",
    "sonata-project/block-bundle": "^3.2",
    "fabpot/goutte": "^3.2",
    "doctrine/doctrine-migrations-bundle": "^1.2",
    "sonata-project/intl-bundle": "^2.3",
    "sonata-project/news-bundle": "^3.2.1",
    "nicolab/php-ftp-client": "^1.4",
    "presta/sitemap-bundle": "^1.5"
},
"require-dev": {
    "sensio/generator-bundle": "^3.0",
    "symfony/phpunit-bridge": "^3.0",
    "phpunit/phpunit": "^5.0",
    "friendsofphp/php-cs-fixer": "^1.12"
},
"scripts": {
    "post-install-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-update-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ]
},
"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",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml",
        "env-map": {
            "database_user": "APP_DATABASE_USER",
            "database_password": "APP_DATABASE_PASSWORD",
            "database_host": "APP_DATABASE_HOST",
            "database_port": "APP_DATABASE_PORT",
            "database_name": "APP_DATABASE_NAME",
            "database_name_test": "APP_DATABASE_NAME_TEST",
            "mailer_host": "APP_MAILER_HOST",
            "mailer_user": "APP_MAILER_USER",
            "mailer_password": "APP_MAILER_PASSWORD",
            "elasticsearch_host": "APP_ELASTICSEARCH_HOST",
            "elasticsearch_port": "APP_ELASTICSEARCH_PORT",
            "bbgmailer_email_from": "APP_BBGMAILER_EMAIL_FROM",
            "bbgmailer_name_from": "APP_BBGMAILER_NAME_FROM",
            "app_secret": "APP_SECRET"
        }
    }
},
"config": {
    "bin-dir": "bin"
}

}

The symfony/symfony package already includes the CssSelector component (which you try to install with the symfony/css-selector package). This is something Composer wrongly allowed in older versions and was fixed in Composer 1.7.3.

Do you really need the CssSelector component in version 3.3? If that's the case, you need to remove symfony/symfony first and require all the needed components explicitly if you cannot upgrade all Symfony packages to 3.

The same applies to other Symfony components.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM