Search code examples
svnphpdocpost-commitphpdocumentor2

phpDoc partial update


I'm trying to automate documentation building in our team development environmen, so we decided to use phpDocumentor(2.7.0) and to trigger it to rebuild documentation on SVN post-commit.

I have made a trigger, but I'm pretty shure that all documentation is rebuild every time it is executed, because even if I only commit one modified file, the phpdoc command lasts almost the same time like when documentation initial build.

So my idea was to rebuild only documentation of those files, changed in the commit. Is there some possibility to do so ? I have looked into the documentation of phpDoc and Google, but nothing found.


Solution

  • As long as your last phpDocumentor2 execution's result files are in the same place you're about to run the new execution, by default only new/modified files should be getting processed. phpDocumentor2 has a built-in caching mechanism to track "here's everything we did in the last doc run", so that it can determine what code files of yours have been added/changed.

    Of course, if your build is running fresh each time, that cache from the previous run is not available, and thus all phpDocumentor2 knows is "this is the first execution ever".