phpDoc忽略除指定的一个以外的供应商目录

时间:2016-02-25 18:35:46

标签: composer-php phpdoc vendor

如何忽略除指定目录之外的所有供应商目录?

以下是我的目录示例:

- polar
    - logs
    - vendor
        - aws
        - composer
        - epickris
        - phpdocumentor
- src
- system

我想忽略除epickris目录之外的所有供应商目录。

以下是我的phpDoc配置示例:

phpdoc.dist.xml

<phpdoc>
    ...
    <files>
        <directory>polar</directory>
        <directory>polar/vendor/epickris</directory>
        <directory>src</directory>
        <directory>system</directory>
        <file>*.php</file>
        <ignore>polar/logs/*</ignore>
        <ignore>polar/vendor/*</ignore>
    </files>
</phpdoc>

1 个答案:

答案 0 :(得分:-1)

你可以使用下一个非常优雅,但是经过良好尝试的方法。

<phpdoc>
    ...
    <files>
        <directory>polar</directory>
        <directory>polar/vendor/epickris</directory>
        <directory>src</directory>
        <directory>system</directory>
        <file>*.php</file>
        <file>polar/vendor/epickris/*.php</file>
        <file>polar/vendor/epickris/*/*.php</file>
        <file>polar/vendor/epickris/*/*.php</file>
        <file>polar/vendor/epickris/*/*/*.php</file>
        <file>polar/vendor/epickris/*/*/*/*.php</file>
        <file>polar/vendor/epickris/*/*/*/*/*.php</file>
        <file>polar/vendor/epickris/*/*/*/*/*/*.php</file>
        <ignore>polar/logs/*</ignore>
        <ignore>polar/vendor/*</ignore>
    </files>
</phpdoc>