Skip to content

Commit 19b59d6

Browse files
authored
Merge pull request #70 from artfulrobot/master
Fix #69. Recursively follow symlinks.
2 parents abdb8e2 + 9ddc0ef commit 19b59d6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 0.6.1
2+
3+
* Follow symlinks below directories. (Previously only symlinks in the top
4+
directory were followed)
5+
16
Version 0.6.0
27
* Exclude phpctags when re-building phar
38
* Fix typo in README.md

PHPCtags.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
class PHPCtags
33
{
4-
const VERSION = '0.6.0';
4+
const VERSION = '0.6.1';
55

66
private $mFile;
77

@@ -525,7 +525,11 @@ public function __toString() {
525525
class ReadableRecursiveDirectoryIterator extends RecursiveDirectoryIterator {
526526
function getChildren() {
527527
try {
528-
return new ReadableRecursiveDirectoryIterator($this->getPathname());
528+
return new ReadableRecursiveDirectoryIterator(
529+
$this->getPathname(),
530+
FilesystemIterator::SKIP_DOTS |
531+
FilesystemIterator::FOLLOW_SYMLINKS);
532+
529533
} catch(UnexpectedValueException $e) {
530534
file_put_contents('php://stderr', "\nPHPPCtags: {$e->getMessage()} - {$this->getPathname()}\n");
531535
return new RecursiveArrayIterator(array());

tests/Acceptance/AcceptanceTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function assertTagsFileHeaderIsCorrect()
122122
"!_TAG_PROGRAM_AUTHOR\ttechlivezheng\t/[email protected]/",
123123
"!_TAG_PROGRAM_NAME\tphpctags\t//",
124124
"!_TAG_PROGRAM_URL\thttps://github.com/techlivezheng/phpctags\t/official site/",
125-
"!_TAG_PROGRAM_VERSION\t0.6.0\t//",
125+
"!_TAG_PROGRAM_VERSION\t0.6.1\t//",
126126
);
127127

128128
$realHeader = array_splice($this->tagsFileContent, 0, count($expectedHeader));

0 commit comments

Comments
 (0)