dongyou6847 2014-09-01 19:37
浏览 53
已采纳

Composer依赖性不适用于PHPDOX

I am trying to install phpdox through composer.

"require": {
    "phploc/phploc": "2.0.6",
    "phpunit/phpunit": "4.2.4",
    "pdepend/pdepend": "2.0.0",
    "phpmd/phpmd": "2.0.0",
    "squizlabs/php_codesniffer": "2.0.0a2",
    "sebastian/phpcpd": "2.0.*@dev",
    "theseer/phpdox": "0.6.6.1"
}

Which produces the following:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

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 theseer/phpdox 0.6.6.1 -> satisfiable by theseer/phpdox[0.6.6.1].
  - theseer/phpdox 0.6.6.1 requires nikic/php-parser >=1.0.0 -> no matching package found.

Potential causes:
  - A typo in the package name
  - The package is not available in a stable-enough version according to your minimum-stability setting

However, on the packagist website it says that phpdox has a dependency nikic/php-parser: >=1.0.0 which does not exist.

How do I resolve that?

  • 写回答

1条回答 默认 最新

  • dongyi7669 2014-09-01 20:17
    关注

    The package nikic/php-parser has only been tagged as a beta version 1.0, not a stable release.

    theseer/phpdox does require that 1.0.0 version, however it has set minimum-stability:dev and prefer-stable:true in it's own composer.json. These settings can only be defined in the root composer.json.

    Two ways to fix it:

    1. Require the needed beta version of that package yourself: composer require nikic/php-parser:~1.0@beta would do it.
    2. Also set the settings for minimum stability to at least "beta" and add the prefer-stable flag to avoid getting ALL packages in beta stability.

    Reading the installation instructions I get the idea that you are not supposed to require this tool directly via Composer. I can't see a reason why not to do it, but this probably hasn't been anticipated. So optional step 3: Open a ticket on Github to get this issue fixed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog