我刚开始使用phpdoc。我使用pear 1.10.1,php 7.1.1在Windows上安装它,我已经安装了graphviz并设置了路径变量。
我正在使用
从控制台运行phpdoc phpdoc -d "path" -t "path\doc"
当我在包含
的测试文件上运行phpdoc时 <?php
/**
* class.
*
*/
class test
{
}
?>
它编译并生成一个可查看的html。 我切换班级考试的那一刻&#39;到功能测试()&#39; phpdoc放弃我,不起作用。我甚至不知道如何调试它在控制台中输出的所有东西! 调试/查找错误的最佳方法是什么?这是错误代码:
Execute transformation using writer "twig"
PHP Notice: Array to string conversion in C:\php\pear\phpDocumentor\vendor\erus
ev\parsedown\Parsedown.php on line 1405
PHP Notice: Undefined property: Parsedown::$Array in C:\php\pear\phpDocumentor\
vendor\erusev\parsedown\Parsedown.php on line 1405
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Monolog\ErrorHandler:
:handleException() must be an instance of Exception, instance of Error given in
C:\php\pear\phpDocumentor\vendor\monolog\monolog\src\Monolog\ErrorHandler.php:12
2
Stack trace:
#0 [internal function]: Monolog\ErrorHandler->handleException(Object(Error))
#1 {main}
thrown in C:\php\pear\phpDocumentor\vendor\monolog\monolog\src\Monolog\ErrorHa
ndler.php on line 122
[2017-01-25 20:08:56] phpDocumentor.ALERT: Fatal Error (E_ERROR): Uncaught TypeE
rror: Argument 1 passed to Monolog\ErrorHandler::handleException() must be an in
stance of Exception, instance of Error given in C:\php\pear\phpDocumentor\vendor
\monolog\monolog\src\Monolog\ErrorHandler.php:122 Stack trace: #0 [internal func
tion]: Monolog\ErrorHandler->handleException(Object(Error)) #1 {main} thrown {
"code":1,"message":"Uncaught TypeError: Argument 1 passed to Monolog\\ErrorHandl
er::handleException() must be an instance of Exception, instance of Error given
in C:\\php\\pear\\phpDocumentor\\vendor\\monolog\\monolog\\src\\Monolog\\ErrorHa
ndler.php:122\nStack trace:\n#0 [internal function]: Monolog\\ErrorHandler->hand
leException(Object(Error))\n#1 {main}\n thrown","file":"C:\\php\\pear\\phpDocum
entor\\vendor\\monolog\\monolog\\src\\Monolog\\ErrorHandler.php","line":122} []
后面是一些html表达式? 谢谢你的帮助!
答案 0 :(得分:0)
一切都可以手动下载phpdoc 2.9.0(只需谷歌搜索)!
显然,pear(v2.8.5)上最新的可用版本与php7不兼容?!