Unable to exclude directories from PHPDocumentor

纵饮孤独 提交于 2019-12-19 07:49:19

问题


I'm trying to run PHPDocumentor on my WAMPServer setup. It runs fine, but I'd like to exclude certain directories, such as \sqlbuddy\ which don't contain my own code. Ironically, PHPDocumentor appears to be ignoring my --ignore switch. I've tried several ways of expressing the same thing, but with the same result. Below is the command I'm running it with:

php.exe "C:\Users\username\Documents\PhpDocumentor\phpdoc" -t "C:\Program Files\wamp\www\docs" -o HTML:default:default -d "C:\Program Files\wamp\www" --ignore sqlbuddy\ --ignore docs\

Many thanks.


回答1:


Which version of phpDocumentor are you using?

Because the phpDocumentor 1.4.2 release notes states:

This release fixes two Windows-specific bugs, one involving usage of the "--ignore" option, and one involving usage of the @filesource tag.




回答2:


I had the same problem, but different cause: ignoring more than one directory requires passing a comma-separated list i.e:

--ignore sqlbuddy/,docs/




回答3:


You might need to change that ignore value to forward slash...

Internally, old PHP4-era PhpDocumentor still has some slash-handling of its own, where it tries to make all directory separators read as forward-slashes only. Compound this with the --ignore option values effectively being a regex mask, and it gets easy to see how a backslash (typically an escape char in regexes) can be an insidious cause of unexpected behavior.

Try using "--ignore sqlbuddy/" instead, and let us know how that goes.



来源:https://stackoverflow.com/questions/362328/unable-to-exclude-directories-from-phpdocumentor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!