为什么作曲家会忽略我的php版本

时间:2016-12-13 21:05:03

标签: php symfony composer-php

我有一个silex项目,我的服务器有PHP 5.3.3,更新PHP不在桌面上。

{
    "config": {
        "platform": {
            "php": "5.3.3"
        }
    },
    "require": {
        "silex/silex": "1.2.*",
        "twig/twig": ">=1.8.0,<2.0-dev",
        "symfony/twig-bridge": "~2.3,<2.7",
        "twig/extensions": "1.2.*@dev",
        "monolog/monolog": "~1.4,>=1.4.1",
        "vrana/notorm": "dev-master",
        "mobiledetect/mobiledetectlib": "dev-master",
        "symfony/security": "2.6.*"
    }
}

我的问题是symfony / security安装版本2.6.13并且在依赖关系中有这一行 symfony / http-kernel:~2.4

安装symfony / http-kernel 2.6.16 和symfony / http-kernel 2.6.16有类似要求symfony / debug:~2.6,&gt; = 2.6.2 但是安装symfony / debug:2.6.16 composer install symfony / debug:2.8.15,那个版本需要PHP 5.3.9

这是错误

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for symfony/debug v2.8.15 -> satisfiable by symfony/debug[v2.8.15].
    - symfony/debug v2.8.15 requires php >=5.3.9 -> your PHP version (5.3.3) does not satisfy that requirement.
  Problem 2
    - symfony/debug v2.8.15 requires php >=5.3.9 -> your PHP version (5.3.3) does not satisfy that requirement.
    - symfony/http-kernel v2.6.13 requires symfony/debug ~2.6,>=2.6.2 -> satisfiable by symfony/debug[v2.8.15].
    - Installation request for symfony/http-kernel v2.6.13 -> satisfiable by symfony/http-kernel[v2.6.13].

我该如何解决?

伙计们,问题在于这一行

- symfony/http-kernel v2.6.13 requires symfony/debug ~2.6,>=2.6.2 -> satisfiable by symfony/debug[v2.8.15].

查看需要的调试版本和获取的版本

1 个答案:

答案 0 :(得分:2)

我解决了删除名为composer.lock并执行

的文件的问题
composer clearcache
composer update