从文档中运行以下命令
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)。
是否已重命名?
更多的工作& &;经过调查,我得到了以下错误…
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
然后我发现,在指定phpdocumentor使用v2.3而不是v2后,由于ElasticSearch客户端,monolog是一个旧版本。* in 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依赖项。不是一个长期的解决方案,但允许我得到域模型图。