Skip to content

Commit 733a8aa

Browse files
committed
minor #17040 [Finder] Mention the new sortByExtension() and sortBySize() methods (javiereguiluz)
This PR was merged into the 6.2 branch. Discussion ---------- [Finder] Mention the new sortByExtension() and sortBySize() methods Fixes #17039. Commits ------- e6156e3 [Finder] Mention the new sortByExtension() and sortBySize() methods
2 parents 8ab7c3d + e6156e3 commit 733a8aa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/finder.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,17 @@ instance. The file is excluded from the result set if the Closure returns
336336
Sorting Results
337337
---------------
338338

339-
Sort the results by name or by type (directories first, then files)::
339+
Sort the results by name, extension, size or type (directories first, then files)::
340340

341341
$finder->sortByName();
342-
342+
$finder->sortByExtension();
343+
$finder->sortBySize();
343344
$finder->sortByType();
344345

346+
.. versionadded:: 6.2
347+
348+
The ``sortByExtension()`` and ``sortBySize()`` methods were introduced in Symfony 6.2.
349+
345350
.. tip::
346351

347352
By default, the ``sortByName()`` method uses the :phpfunction:`strcmp` PHP

0 commit comments

Comments
 (0)