- Add early directory pruning to
Finder::filter()
- Add
Finder::sortByExtension()
andFinder::sortBySize()
- Add
Finder::sortByCaseInsensitiveName()
to sort by name with case insensitive sorting methods
- Remove
Comparator::setTarget()
andComparator::setOperator()
- Deprecate
Comparator::setTarget()
andComparator::setOperator()
- Add a constructor to
Comparator
that allows setting target and operator - Finder's iterator has now
Symfony\Component\Finder\SplFileInfo
inner type specified - Add recursive .gitignore files support
- added
$useNaturalSort
argument toFinder::sortByName()
- added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore
- added $useNaturalSort option to Finder::sortByName() method
- the
Finder::sortByName()
method will have a new$useNaturalSort
argument in version 5.0, not defining it is deprecated - added
Finder::reverseSorting()
to reverse the sorting
- removed
ExceptionInterface
- removed
Symfony\Component\Finder\Iterator\FilterIterator
- deprecated
Symfony\Component\Finder\Iterator\FilterIterator
- added Finder::hasResults() method to check if any results were found
- added double-star matching to Glob::toRegex()
- removed deprecated classes
- deprecated adapters and related classes
- added support for GLOB_BRACE in the paths passed to Finder::in()
- added a way to ignore unreadable directories (via Finder::ignoreUnreadableDirs())
- unified the way subfolders that are not executable are handled by always throwing an AccessDeniedException exception
- added Finder::path() and Finder::notPath() methods
- added finder adapters to improve performance on specific platforms
- added support for wildcard characters (glob patterns) in the paths passed to Finder::in()
- added Finder::sortByAccessedTime(), Finder::sortByChangedTime(), and Finder::sortByModifiedTime()
- added Countable to Finder
- added support for an array of directories as an argument to Finder::exclude()
- added searching based on the file content via Finder::contains() and Finder::notContains()
- added support for the != operator in the Comparator
- [BC BREAK] filter expressions (used for file name and content) are no more considered as regexps but glob patterns when they are enclosed in '*' or '?'