Symfony2,作曲家,你的 PHP 版本(5.6.18)被“config.platform.php"覆盖版本 (5.3.9) 不满足要求

Symfony2, composer, your PHP version (5.6.18) overriden by quot;config.platform.phpquot; version (5.3.9) does not satisfy requirement(Symfony2,作曲家,你的 PHP 版本(5.6.18)被“config.platform.php覆盖版本 (5.3.9) 不满足要求)
本文介绍了Symfony2,作曲家,你的 PHP 版本(5.6.18)被“config.platform.php"覆盖版本 (5.3.9) 不满足要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将教义安装到我的项目中.我收到有关错误 PHP 版本的错误.可以做些什么来消除此错误的真正原因?克服它的方法是使用选项--ignore-platform-reqs",如 https://getcomposer.org/doc/03-cli.md#require .

I am trying to install doctrine to my project. I am getting the error about the wrong PHP version. What can be done to remove the real reason for this error? The way to overcome it is to use the option "--ignore-platform-reqs" as described https://getcomposer.org/doc/03-cli.md#require .

PHP 版本:PHP 5.6.18

PHP version: PHP 5.6.18

PHP 5.6.18  (cli) (built: Feb  3 2016 17:20:21)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

错误:c..>作曲家需要学说/数据夹具

The error: c..>composer require doctrine/data-fixtures

Using version ^1.1 for doctrine/data-fixtures
./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
    - doctrine/migrations v1.3.0 requires php ^5.5|^7.0 -> your PHP version (5.6
.18) overriden by "config.platform.php" version (5.3.9) does not satisfy that re
quirement.
    - doctrine/migrations v1.2.2 requires php >=5.4.0 -> your PHP version (5.6.1
8) overriden by "config.platform.php" version (5.3.9) does not satisfy that requ
irement.
    - doctrine/migrations v1.2.1 requires php >=5.4.0 -> your PHP version (5.6.1
8) overriden by "config.platform.php" version (5.3.9) does not satisfy that requ
irement.
    - doctrine/migrations v1.2.0 requires php >=5.4.0 -> your PHP version (5.6.1
8) overriden by "config.platform.php" version (5.3.9) does not satisfy that requ
irement.
    - doctrine/migrations v1.1.0 requires php >=5.4.0 -> your PHP version (5.6.1
8) overriden by "config.platform.php" version (5.3.9) does not satisfy that requ
irement.
    - doctrine/migrations v1.0.0 requires php >=5.4.0 -> your PHP version (5.6.1
8) overriden by "config.platform.php" version (5.3.9) does not satisfy that requ
irement.
    - Installation request for doctrine/migrations ~1.0 -> satisfiable by doctri
ne/migrations[v1.0.0, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.3.0].


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

composer.json的内容

The content of composer.json

"require": {
    "php": ">=5.3.9",
    "symfony/symfony": "2.8.*",
    "doctrine/orm": "^2.4.8",
    "doctrine/doctrine-bundle": "~1.4",
    "doctrine/data-fixtures" : "~1.1",
    "doctrine/doctrine-fixtures-bundle": "dev-master",

推荐答案

在你的 composer.json 中的某个地方

Somewhere in your composer.json you have

"config": {
   "preferred-install": "dist",
   "platform": {
       "php": "5.3.9"
   }
}

该块会覆盖您当前的 PHP 版本,如 composer doc 中所述.

That block overrides your current PHP version as described in composer doc.

这篇关于Symfony2,作曲家,你的 PHP 版本(5.6.18)被“config.platform.php"覆盖版本 (5.3.9) 不满足要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)