【问题标题】:phpdoc crashes when functions are involved; how to debug phpdoc correctly涉及函数时 phpdoc 崩溃;如何正确调试phpdoc
【发布时间】: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


    【解决方案1】:

    一切都可以通过手动下载 phpdoc 2.9.0 来运行(只是用谷歌搜索)!

    显然,pear 上的最新可用版本(v2.8.5)不适用于 php7?!

    【讨论】:

      猜你喜欢
      • 2012-01-08
      • 1970-01-01
      • 1970-01-01
      • 2012-05-29
      • 1970-01-01
      • 2011-06-22
      • 2010-10-05
      • 2016-04-04
      • 1970-01-01
      相关资源
      最近更新 更多