File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -170,8 +170,13 @@ Sort the result by name or by type (directories first, then files)::
170170
171171.. tip ::
172172
173- To sort by name using `natural sort order `_ algorithm,
174- pass ``true `` as the first argument of ``sortByName() `` method.
173+ By default, the ``sortByName() `` method uses the :phpfunction: `strcmp ` PHP
174+ function (e.g. ``file1.txt ``, ``file10.txt ``, ``file2.txt ``). Pass ``true ``
175+ as its argument to use PHP's `natural sort order `_ algorithm instead (e.g.
176+ ``file1.txt ``, ``file2.txt ``, ``file10.txt ``).
177+
178+ .. versionadded :: 4.2
179+ The option to use the natural sort order was introduced in Symfony 4.2.
175180
176181You can also define your own sorting algorithm with ``sort() `` method::
177182
You can’t perform that action at this time.
0 commit comments