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