diff --git a/ChangeLog.md b/ChangeLog.md index e347e28..aab5489 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +Version 0.6.1 + +* Follow symlinks below directories. (Previously only symlinks in the top + directory were followed) + Version 0.6.0 * Exclude phpctags when re-building phar * Fix typo in README.md diff --git a/PHPCtags.class.php b/PHPCtags.class.php index 8e3b8ed..f46f102 100644 --- a/PHPCtags.class.php +++ b/PHPCtags.class.php @@ -1,7 +1,7 @@ getPathname()); + return new ReadableRecursiveDirectoryIterator( + $this->getPathname(), + FilesystemIterator::SKIP_DOTS | + FilesystemIterator::FOLLOW_SYMLINKS); + } catch(UnexpectedValueException $e) { file_put_contents('php://stderr', "\nPHPPCtags: {$e->getMessage()} - {$this->getPathname()}\n"); return new RecursiveArrayIterator(array()); diff --git a/tests/Acceptance/AcceptanceTestCase.php b/tests/Acceptance/AcceptanceTestCase.php index 1a4f97d..ddb7452 100644 --- a/tests/Acceptance/AcceptanceTestCase.php +++ b/tests/Acceptance/AcceptanceTestCase.php @@ -122,7 +122,7 @@ protected function assertTagsFileHeaderIsCorrect() "!_TAG_PROGRAM_AUTHOR\ttechlivezheng\t/techlivezheng@gmail.com/", "!_TAG_PROGRAM_NAME\tphpctags\t//", "!_TAG_PROGRAM_URL\thttps://github.com/techlivezheng/phpctags\t/official site/", - "!_TAG_PROGRAM_VERSION\t0.6.0\t//", + "!_TAG_PROGRAM_VERSION\t0.6.1\t//", ); $realHeader = array_splice($this->tagsFileContent, 0, count($expectedHeader));