Skip to content

Commit

Permalink
[Finder docs] Add early directory prunning filter support
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Lefebvre <alexislefebvre@gmail.com>
  • Loading branch information
mvorisek and alexislefebvre committed Jul 12, 2023
1 parent 83aaa26 commit 4b08ee6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ it is called with the file as a :class:`Symfony\\Component\\Finder\\SplFileInfo`
instance. The file is excluded from the result set if the Closure returns
``false``.

.. versionadded:: 6.4

Since Symfony 6.4, a filter can prune directories early, pass ``true`` as the second
parameter for the ``filter()`` method and when the Closure returns ``false`` the deeper
levels will not be traversed.

Sorting Results
---------------

Expand Down

0 comments on commit 4b08ee6

Please sign in to comment.