phpdocumentor v2 --template cli选项无效

时间:2014-03-23 10:42:35

标签: php phpdoc

从运行以下命令的文档中

phpdoc -d ../../src/ -t /tmp/domain-model-docs --template="responsive-twig"

我收到此错误

ERROR: Unknown command-line option "--template=responsive-twig" encountered, use phpdoc -h for help

ERROR: Unknown command-line option "--template=responsive-twig" encountered, use phpdoc -h for help

文档状态

$ phpdoc -d "./src" -t "./docs/api" --template="clean"

但是,在帮助中该选项不存在(phpdoc -h)。

是否已重命名?

1 个答案:

答案 0 :(得分:0)

经过更多工作&调查,我得到以下错误......

vagrant@packer-ubuntu-13:/var/www/opg-core-back-end$ vendor/bin/phpdoc.php
PHP Fatal error:  Class 'Monolog\ErrorHandler' not found in /var/www/opg-core-back-end/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Application.php on line 131
PHP Stack trace:
PHP   1. {main}() /var/www/opg-core-back-end/vendor/phpdocumentor/phpdocumentor/bin/phpdoc.php:0
PHP   2. phpDocumentor\Application->__construct() /var/www/opg-core-back-end/vendor/phpdocumentor/phpdocumentor/bin/phpdoc.php:26
PHP   3. phpDocumentor\Application->addLogging() /var/www/opg-core-back-end/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Application.php:57

然后我发现monolog是一个旧版本,因为ElasticSearch客户端指定phpdocumentor使用v2.3而不是v2。*在composer&得到了这个错误...

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

  Problem 1
    - Installation request for elasticsearch/elasticsearch 0.4.0 -> satisfiable by elasticsearch/elasticsearch[v0.4.0].
    - phpdocumentor/phpdocumentor v2.3.0 requires monolog/monolog ~1.6 -> satisfiable by monolog/monolog[1.6.0, 1.7.0, 1.8.0, 1.8.x-dev].
    - Can only install one of: monolog/monolog[1.6.0, 1.5.0].
    - Can only install one of: monolog/monolog[1.7.0, 1.5.0].
    - Can only install one of: monolog/monolog[1.8.0, 1.5.0].
    - Can only install one of: monolog/monolog[1.8.x-dev, 1.5.0].
    - elasticsearch/elasticsearch v0.4.0 requires monolog/monolog 1.5.0 -> satisfiable by monolog/monolog[1.5.0].
    - Installation request for phpdocumentor/phpdocumentor 2.3 -> satisfiable by phpdocumentor/phpdocumentor[v2.3.0].

为了生成类图,我临时从composer中删除了ElasticSearch依赖项。这不是一个长期的解决方案,但允许我获得域模型图。