3bade96ff2
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Finder] added "use natural sort" option
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26930
| License | MIT
| Doc PR | symfony/symfony-docs#9671
Added `$useNaturalSort` optional argument to `Finder::sortByName()` method. If it is specified and equals to `true`, ["natural sort order" algorithm](https://en.wikipedia.org/wiki/Natural_sort_order) will be applied, which means that `strnatcmp` function will be used instead of `strcmp` (see #26930 for details).
Commits
-------
|
||
---|---|---|
.. | ||
Comparator | ||
Exception | ||
Iterator | ||
Tests | ||
.gitignore | ||
CHANGELOG.md | ||
composer.json | ||
Finder.php | ||
Glob.php | ||
LICENSE | ||
phpunit.xml.dist | ||
README.md | ||
SplFileInfo.php |
Finder Component
The Finder component finds files and directories via an intuitive fluent interface.