Symfony2,作曲家,您的PHP版本(5.6.18)被“config.platform.php”覆盖版本(5.3.9)不符合要求 [英] Symfony2, composer, your PHP version (5.6.18) overriden by "config.platform.php" version (5.3.9) does not satisfy requirement
问题描述
- ignore-platform-reqs
,如 https://getcomposer.org/doc/03-cli.md#require 。 PHP版本:PHP 5.6 .18
PHP 5.6.18(cli)(内置:2016年2月3日17:20:21)
版权所有(c)1997-2016 PHP组
Zend Engine v2.6.0,版权所有(c)1998-2016 Zend Technologies
与Zend OPcache v7.0.6-dev,版权所有(c)1999-2016,by Zend Technologies
错误:c ..> composer require doctrine / data-fixtures
使用版本^ 1.1 for doctrine / data-fixtures
./composer.json已更新
加载包装的作曲家仓库信息
更新依赖项(包括require-dev)
您的要求无法解析为可安装的程序包集。
问题1
- doctrine / migrations v1.3.0需要php ^ 5.5 | ^ 7.0 - >您的PHP版本(5.6
.18)被config.platform.php版本(5.3.9)覆盖,不符合re
的要求。
- doctrine / migrations v1.2.2要求php> = 5.4.0 - >您的config.platform.php版本(5.3.9)覆盖的PHP版本(5.6.1
8)不能满足该请求
的要求。
- doctrine / migrations v1.2.1要求php> = 5.4.0 - >您的config.platform.php版本(5.3.9)覆盖的PHP版本(5.6.1
8)不能满足该请求
的要求。
- doctrine / migrations v1.2.0需要php> = 5.4.0 - >您的config.platform.php版本(5.3.9)覆盖的PHP版本(5.6.1
8)不能满足该请求
的要求。
- doctrine / migrations v1.1.0要求php> = 5.4.0 - >您的config.platform.php版本(5.3.9)覆盖的PHP版本(5.6.1
8)不能满足该请求
的要求。
- doctrine / migrations v1.0.0需要php> = 5.4.0 - >您的config.platform.php版本(5.3.9)覆盖的PHP版本(5.6.1
8)不能满足该请求
的要求。
- 教学/迁移的安装请求〜1.0 - >可以通过doctri
ne / migrations [v1.0.0,v1.1.0,v1.2.0,v1.2.1,v1.2.2,v1.3.0]来满足。
安装失败,将./composer.json还原到其原始内容。
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 $ bdoctrine / doctrine-fixtures-bundle:dev-master,
您的 composer.json
中的某个地方您有
config:{
preferred-install:dist,
platform:{
php:5.3.9
}
}
该块将覆盖您当前的PHP版本,如投票文件。
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 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
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.
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",
Somewhere in your composer.json
you have
"config": {
"preferred-install": "dist",
"platform": {
"php": "5.3.9"
}
}
That block overrides your current PHP version as described in composer doc.
这篇关于Symfony2,作曲家,您的PHP版本(5.6.18)被“config.platform.php”覆盖版本(5.3.9)不符合要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!