8000 [Finder] Add note about .gitignore rules precedence by julienfalque · Pull Request #16056 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Finder] Add note about .gitignore rules precedence #16056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ can reuse those rules to exclude files and directories from the results with the
// excludes files/directories matching the .gitignore patterns
$finder->ignoreVCSIgnored(true);

Rules from higher levels will be overridden by those in lower levels.

.. note::

Only ``.gitignore`` files from search directories and their descendants are
read. Files from parent directories are ignored. To be consistent with Git
behavior, you should explicitly search from the Git repository root.

.. versionadded:: 5.4

``.gitignore`` files recursive support was introduced in Symfony 5.4.
Expand Down
0