Skip to content

Commit 3da306e

Browse files
committed
minor #16056 [Finder] Add note about .gitignore rules precedence (julienfalque)
This PR was merged into the 5.4 branch. Discussion ---------- [Finder] Add note about .gitignore rules precedence Closes #16055. Commits ------- 544bcf9 [Finder] Add note about .gitignore rules precedence
2 parents 8335ea4 + 544bcf9 commit 3da306e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/finder.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ can reuse those rules to exclude files and directories from the results with the
148148
// excludes files/directories matching the .gitignore patterns
149149
$finder->ignoreVCSIgnored(true);
150150

151+
Rules from higher levels will be overridden by those in lower levels.
152+
153+
.. note::
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.
158+
151159
.. versionadded:: 5.4
152160

153161
Recursive support for ``.gitignore`` files was introduced in Symfony 5.4.

0 commit comments

Comments
 (0)