简体   繁体   English

Composer无法在symfony 4上要求symfony / symfony

[英]Composer fail to require symfony/symfony on symfony 4

I have installed the last version of symfony through composer with the following line: 我已经通过composer安装了最新版本的symfony,其中包含以下行:

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: 当我指定版本4.0.2我有2个错误少,但问题保持不变:

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: 我的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? 我很困惑,我在symfony doc上找不到关于这个的很多信息,而且我对作曲家,任何线索都不是很好?

The symfony/skeleton package is designed to be used with Symfony Flex . symfony/skeleton包旨在与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. 您应该从symfony/framework-standard-edition创建项目,这将引入整个框架,或者利用Flex中的新功能来提供您需要的组件或“配方”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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