File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,14 @@ can reuse those rules to exclude files and directories from the results with the
148
148
// excludes files/directories matching the .gitignore patterns
149
149
$finder->ignoreVCSIgnored(true);
150
150
151
- Rules from higher levels will be overridden by those in lower levels .
151
+ The rules of a directory always override the rules of its parent directories .
152
152
153
153
.. note ::
154
154
155
- Only ``.gitignore `` files from search directories and their descendants are
156
- read. Files from parent directories are ignored. To be consistent with Git
157
- behavior, you should explicitly search from the Git repository root.
155
+ Git looks for ``.gitignore `` files starting from the repository root directory.
156
+ Symfony's Finder behavior is different and it looks for ``.gitignore `` files
157
+ starting from the directory used to search files/directories. To be consistent
158
+ with Git behavior, you should explicitly search from the Git repository root.
158
159
159
160
.. versionadded :: 5.4
160
161
You can’t perform that action at this time.
0 commit comments