8000 minor #26396 Improve the documentation of `Finder::exclude()` (mnapoli) · symfony/symfony@3379310 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3379310

Browse files
committed
minor #26396 Improve the documentation of Finder::exclude() (mnapoli)
This PR was merged into the 2.7 branch. Discussion ---------- Improve the documentation of `Finder::exclude()` | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | | License | MIT | Doc PR | Tried to do this and this didn't work: ```php $iterator->in($sourcePath) ->exclude($sourcePath.'/foo'); ``` I read on http://symfony.com/doc/current/components/finder.html that excluded directories need to be relative: ![capture d ecran 2018-03-04 a 16 10 31](https://user-images.githubusercontent.com/720328/36947055-28e47eda-1fc7-11e8-9475-399a3d853169.png) Commits ------- cc3084e Improve the documentation of `Finder::exclude()`
2 parents 79e8545 + cc3084e commit 3379310

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Finder/Finder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@ public function size($size)
386386
/**
387387
* Excludes directories.
388388
*
389+
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
390+
*
391+
* $finder->in(__DIR__)->exclude('ruby');
392+
*
389393
* @param string|array $dirs A directory path or an array of directories
390394
*
391395
* @return $this

0 commit comments

Comments
 (0)
0