【发布时间】:2017-01-25 20:14:50
【问题描述】:
我刚开始使用 phpdoc。我使用 pear 1.10.1、php 7.1.1 将它安装在 Windows 上,并且我已经安装了 graphviz 并设置了路径变量。
我正在使用
从控制台运行 phpdoc phpdoc -d "path" -t "path\doc"
当我在包含
的测试文件上运行 phpdoc 时 <?php
/**
* class.
*
*/
class test
{
}
?>
它编译并生成一个可查看的 html。 我将“类测试”切换到“功能测试()”的那一刻,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表达式?? 感谢您的帮助!
【问题讨论】:
标签: phpdoc