2017-01-25 64 views
0

我剛開始使用phpdoc。我使用pear 1.10.1,php 7.1.1在windows上安裝了它,並且我已經安裝了graphviz並設置了路徑變量。當涉及函數時,phpdoc崩潰;如何正確調試phpdoc

我從控制檯

phpdoc -d "path" -t "path\doc" 

運行PHPDoc的時候,我就含

<?php 
     /** 
     * class. 
     * 
     */ 
     class test 
     { 
     } 
    ?> 

它編譯併產生一個視圖的HTML格式的測試文件運行PHPDoc的。 當我將'class test'切換到'function test()'時,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

一切工作通過手動下載phpdoc 2.9.0(只是谷歌搜索)!

顯然,梨(v2.8.5)上的最新可用版本不適用於php7?