Skip to content

Commit 4b08ee6

Browse files
[Finder docs] Add early directory prunning filter support
Co-authored-by: Alexis Lefebvre <[email protected]>
1 parent 83aaa26 commit 4b08ee6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/finder.rst

+6
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ it is called with the file as a :class:`Symfony\\Component\\Finder\\SplFileInfo`
329329
instance. The file is excluded from the result set if the Closure returns
330330
``false``.
331331

332+
.. versionadded:: 6.4
333+
334+
Since Symfony 6.4, a filter can prune directories early, pass ``true`` as the second
335+
parameter for the ``filter()`` method and when the Closure returns ``false`` the deeper
336+
levels will not be traversed.
337+
332338
Sorting Results
333339
---------------
334340

0 commit comments

Comments
 (0)