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?

5
  • 3
    What about the conflict section of your composer.json containing symfony/symfony ? That explicitly tells composer not to install your package and symfony/symfony together. Commented Dec 31, 2017 at 11:44
  • @ccKep indeed so i must misunderstand something, because im following the intructions as stated on the doc. Commented Dec 31, 2017 at 11:49
  • Which step told you / caused the conflict section to appear? The part you linked shouldn't - try removing it to see if you have any luck requireing symfony/symfony then. Commented Dec 31, 2017 at 11:53
  • For the record, the installation worked, but symfony has become a mess, for instance the front controller has gone missing Commented Dec 31, 2017 at 12:01
  • Even if get this to work it won't do what you want. symfony/symfony is intended to install all of symfony components. It won't install bundles which means they won't be integrated into the framework. Just start over with symfony/skelton and then require the recipes as needed. Or stick with 3.4 and use the standard framework. Commented Dec 31, 2017 at 14:49

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

When i enter the following command composer create-project symfony/symfony-standard whatever after a short while a get an InvalidArgumentException : Could not find package 'symfony/symfony-standard' with stability stable.
Sorry, that was the Github address. The command you want is composer create-project symfony/framework-standard-edition
Just be aware that you will get 3.4. As far as I can tell, there is no standard edition for 4.0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.