如何设置和使用phpDocumentor一步一步

时间:2018-03-12 11:19:03

标签: php phpdoc

如何逐步设置和使用phpDocumentor?

我正在尝试使用composer,因此有很多安装请求。任何人都可以让我了解phpDocumentor设置并在php中使用。

试过$ composer需要“phpdocumentor / phpdocumentor:2。*”

低于错误

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

  Problem 1
    - phpdocumentor/phpdocumentor v2.8.0 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - phpdocumentor/phpdocumentor v2.8.1 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - phpdocumentor/phpdocumentor v2.8.2 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - phpdocumentor/phpdocumentor v2.8.3 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - phpdocumentor/phpdocumentor v2.8.4 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - phpdocumentor/phpdocumentor v2.8.5 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - phpdocumentor/phpdocumentor v2.9.0 requires herrera-io/phar-update 1.0.3 -> satisfiable by herrera-io/phar-update[1.0.3].
    - herrera-io/phar-update 1.0.3 requires herrera-io/json 1.* -> satisfiable by herrera-io/json[1.0.0, 1.0.1, 1.0.2, 1.0.3].
    - herrera-io/json 1.0.3 requires justinrainbow/json-schema >=1.0,<2.0-dev -> satisfiable by justinrainbow/json-schema[1.1.0, 1.2.1, 1.2.3, 1.2.4, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.6.1, v1.6.0] but these conflict with your requirements or minimum-stability.
    - herrera-io/json 1.0.2 requires justinrainbow/json-schema >=1.0,<2.0-dev -> satisfiable by justinrainbow/json-schema[1.1.0, 1.2.1, 1.2.3, 1.2.4, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.6.1, v1.6.0] but these conflict with your requirements or minimum-stability.
    - herrera-io/json 1.0.1 requires justinrainbow/json-schema >=1.0,<2.0-dev -> satisfiable by justinrainbow/json-schema[1.1.0, 1.2.1, 1.2.3, 1.2.4, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.6.1, v1.6.0] but these conflict with your requirements or minimum-stability.
    - herrera-io/json 1.0.0 requires justinrainbow/json-schema >=1.0,<2.0-dev -> satisfiable by justinrainbow/json-schema[1.1.0, 1.2.1, 1.2.3, 1.2.4, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.6.1, v1.6.0] but these conflict with your requirements or minimum-stability.
    - phpdocumentor/phpdocumentor v2.3.1 requires dompdf/dompdf dev-master@dev -> satisfiable by dompdf/dompdf[dev-master] but these conflict with your requirements or minimum-stability.
    - phpdocumentor/phpdocumentor v2.3.0 requires dompdf/dompdf dev-master@dev -> satisfiable by dompdf/dompdf[dev-master] but these conflict with your requirements or minimum-stability.
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.7.1
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.7.0
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.6.1
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.6.0
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.5.0
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.4.0
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.3.2
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.2.0
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.1.0
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.0.1
    - Conclusion: remove jms/serializer 1.11.0
    - Installation request for phpdocumentor/phpdocumentor 2.* -> satisfiable by phpdocumentor/phpdocumentor[v2.0.0, v2.0.1, v2.1.0, v2.2.0, v2.3.0, v2.3.1, v2.3.2, v2.4.0, v2.5.0, v2.6.0, v2.6.1, v2.7.0, v2.7.1, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.9.0].
    - Conclusion: don't install jms/serializer 1.11.0
    - phpdocumentor/phpdocumentor v2.0.0 requires jms/serializer ~0.12 -> satisfiable by jms/serializer[0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0].
    - Can only install one of: jms/serializer[0.12.0, 1.11.0].
    - Can only install one of: jms/serializer[0.13.0, 1.11.0].
    - Can only install one of: jms/serializer[0.14.0, 1.11.0].
    - Can only install one of: jms/serializer[0.15.0, 1.11.0].
    - Can only install one of: jms/serializer[0.16.0, 1.11.0].
    - Installation request for jms/serializer (locked at 1.11.0) -> satisfiable by jms/serializer[1.11.0].


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

1 个答案:

答案 0 :(得分:3)

尝试 PHAR 方法。这很容易。

您可以从http://www.phpdoc.org/phpDocumentor.phar下载最新的PHAR文件。

可以通过简单地调用php并将phar文件作为参数提供来使用phar文件:

$ php phpDocumentor.phar -d . -t docs/api

试一试。