php - 如何逐步设置和使用 phpDocumentor

标签 php phpdoc

如何逐步设置和使用 phpDocumentor?

我正在尝试使用 composer 有很多安装请求。谁能告诉我有关 phpDocumentor 设置和在 php 中使用的想法。

试过 $ composer require "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.

最佳答案

尝试PHAR 方法。这会很容易。

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

只需调用 php 并将 phar 文件作为参数提供即可使用 phar 文件:

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

尝试一下。

关于php - 如何逐步设置和使用 phpDocumentor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49233925/

相关文章:

php - 是否有记录 GET/POST 参数的标准?

PHPDocumentor @example 用法

php - 好的编程软件

phpDoc - 持有类实例的私有(private)成员的文档

php - 在php中打印递归列表

PHP Mysql 登录

PhpDoc 生成的文档没有链接在一起

php-7 - PHPDoc 特征函数的返回类型

php - PHP/MySQL 中的游戏大厅

php - 从 php 访问主题标签后的 URI 变量的最佳方法是什么?