Unable to exclude directories from PHPDocumentor

2020-03-23 18:21发布

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.

3条回答
女痞
2楼-- · 2020-03-23 18:51

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.

查看更多
劳资没心,怎么记你
3楼-- · 2020-03-23 19:04

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.

查看更多
孤傲高冷的网名
4楼-- · 2020-03-23 19:16

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

--ignore sqlbuddy/,docs/

查看更多
登录 后发表回答