Using the ignore option does nothing at all, no directory specified is ignored, and no error is thrown either. Is this functionality implemented?
C:\wamp\bin\php\php5.3.1>php.exe "C:\docblox\bin\docblox.php" project:run -d "C:\test" -t "C:\docbloxoutput2" --force -v --ignore "c:\test\test"
2011-04-19T13:32:14+00:00 INFO (6): [2.26mb]: Starting to process 2 files
2011-04-19T13:32:14+00:00 INFO (6): [2.26mb]: Starting to parse file: C:\test\test\newtest.php
2011-04-19T13:32:14+00:00 INFO (6): [2.81mb]: Starting to parse file: C:\test\test.php
*snip*
2011-04-19T13:32:14+00:00 INFO (6): [3.29mb]: Processing the file: \test\newtest.php as C:\docbloxoutput2\test_newtest.html
2011-04-19T13:32:14+00:00 INFO (6): [3.29mb]: Processing the file: \test.php as C:\docbloxoutput2\test.html
Ignore uses the target directory as a basis (which you can see from the 'Processing the file' message) and needs a full path (it allows wildcards); it should work correctly if you were to use '--ignore "\test*"'.
"C:\test\test*" ignores the subdir succesfully.
I'm having this issue with 0.10.0:
docblox run -i "/var/local/samba/sandbox/fong/detailquebec2011/tmp*" -d "/var/local/samba/sandbox/fong/detailquebec2011" -t "/var/local/samba/sandbox/fong/docblox/detailquebec2011"
DocBlox version 0.10.0
ERROR: RecursiveDirectoryIterator::__construct(/var/local/samba/sandbox/fong/detailquebec2011/tmp/zend_cache--7): failed to open dir: Permission denied
It appears that DocBlox cannot access the subdirectory /var/local/samba/sandbox/fong/detailquebec2011/tmp/zend_cache--7 due to permission restraints. Can you check the file permissions on that folder?
I don't have any permissions on that folder (it's a cache folder created by the Apache user with 0600 permissions), so that's why I'd like to have DocBlox ignore the tmp folder and all of its subfolders.
I must investigate how to prevent indexing of that folder in total then. Will come back to this ASAP
Issue is caused because the RecursiveDirectoryIterator cannot handle directories that it cannot access. I am now working on a work around to that.
Issue fixed on master by adding an option to the RecursiveIteratorIterator which makes sure any unreadable directories are skipped by default
This error occurs in the latest phpDocumentor2 (6220334). I'm not sure whether to file this bug against phpDocumentor2, fileset, or symfony (where the actual RecursiveIteratorIterator is called from what I can tell). What would you prefer?
FWIW, this seems to work, adding CATCH_GET_CHILD to phpdoc/vendor/symfony/finder/Symfony/Component/Finder/Finder.php:
$iterator = new \RecursiveIteratorIterator(
new Iterator\RecursiveDirectoryIterator($dir, $flags),
\RecursiveIteratorIterator::SELF_FIRST,
\RecursiveIteratorIterator::CATCH_GET_CHILD
);
@dpkirchner That helped me, thanks! (File was vendor/symfony/finder/Finder.php.)
Most helpful comment
This error occurs in the latest phpDocumentor2 (6220334). I'm not sure whether to file this bug against phpDocumentor2, fileset, or symfony (where the actual RecursiveIteratorIterator is called from what I can tell). What would you prefer?
FWIW, this seems to work, adding CATCH_GET_CHILD to phpdoc/vendor/symfony/finder/Symfony/Component/Finder/Finder.php: