Vulkhan
Vulkhan

Reputation: 458

Composer fail to require symfony/symfony on symfony 4

I have installed the last version of symfony through composer with the following line:

composer create-project symfony/skeleton whatever

Then following the instructions on this page i decided to require the whole framework so i have not to install all the bundles one by one by entering this:

composer require symfony/symfony

But the problem is that i end up with the following error:

composer require symfony/symfony
Using version ^4.0 for symfony/symfony
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - symfony/symfony v4.0.0 conflicts with __root__[No version set (parsed as 1.0.0)].
    - symfony/symfony v4.0.1 conflicts with __root__[No version set (parsed as 1.0.0)].
    - symfony/symfony v4.0.2 conflicts with __root__[No version set (parsed as 1.0.0)].
    - Installation request for __root__ No version set (parsed as 1.0.0) -> satisfiable by __root__[No version set (parsed as 1.0.0)].
    - Installation request for symfony/symfony ^4.0 -> satisfiable by symfony/symfony[v4.0.0, v4.0.1, v4.0.2].


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

When i specify the version 4.0.2 i have 2 errors less, but the problem remain the same:

composer require symfony/symfony v4.0.2
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for __root__ No version set (parsed as 1.0.0) -> satisfiable by __root__[No version set (parsed as 1.0.0)].
    - symfony/symfony v4.0.2 conflicts with __root__[No version set (parsed as 1.0.0)].
    - Installation request for symfony/symfony v4.0.2 -> satisfiable by symfony/symfony[v4.0.2].


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

My composer.json:

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-iconv": "*",
        "sensiolabs/security-checker": "^4.1",
        "symfony/console": "^4.0",
        "symfony/flex": "^1.0",
        "symfony/framework-bundle": "^4.0",
        "symfony/lts": "^4@dev",
        "symfony/yaml": "^4.0"
    },
    "require-dev": {
        "symfony/dotenv": "^4.0",
        "symfony/thanks": "^1.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd",
            "security-checker security:check": "script"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "id": "0133333333333333337ed17ed",
            "allow-contrib": false
        }
    }
}

I'm very confused, i can't find much informations about this on the symfony doc, and i'm far from being good with composer, any clue?

Upvotes: 4

Views: 8484

Answers (1)

iainn
iainn

Reputation: 17433

The symfony/skeleton package is designed to be used with Symfony Flex. The entire point of that project is to avoid using the entire framework, so the package expressly conflicts with it.

You should either be creating your project from symfony/framework-standard-edition, which will pull in the entire framework, or make use of the new functionality in Flex to pull in just the components or "recipes" that you need.

Upvotes: 2

Related Questions