From e6156e364358ea881e0fdc21ee369681b6615eae Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 22 Jul 2022 15:48:49 +0200 Subject: [PATCH] [Finder] Mention the new sortByExtension() and sortBySize() methods --- components/finder.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/finder.rst b/components/finder.rst index ee6165e15bb..55f010d61b6 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -336,12 +336,17 @@ instance. The file is excluded from the result set if the Closure returns Sorting Results --------------- -Sort the results by name or by type (directories first, then files):: +Sort the results by name, extension, size or type (directories first, then files):: $finder->sortByName(); - + $finder->sortByExtension(); + $finder->sortBySize(); $finder->sortByType(); +.. versionadded:: 6.2 + + The ``sortByExtension()`` and ``sortBySize()`` methods were introduced in Symfony 6.2. + .. tip:: By default, the ``sortByName()`` method uses the :phpfunction:`strcmp` PHP