Upgrading symfony/finder 3 to 4
Breakingv3.4.47 → v4.4.44Breaking3Deprecated3New3Changed18Fixed8
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- bug Use a lazyIterator to close files descriptors when no longer used (jderusse).
- Removed ExceptionInterface.
- Removed Symfony\Component\Finder\Iterator\FilterIterator.
- bug Fixed deprecation warnings about passing null as parameter (derrabus).
Must act Top 5 of 6 that need code or config changes
PHP requirement changed in v4.4.11: ^5.5.9|>=7.0.8 → >=7.1.3.
What you must change
Breaking3
bug Use a lazyIterator to close files descriptors when no longer used (jderusse).
Removed ExceptionInterface.
ExceptionInterfaceRemoved Symfony\Component\Finder\Iterator\FilterIterator.
Symfony\Component\Finder\Iterator\FilterIteratorDeprecations to plan for
Deprecated3
bug Fixed deprecation warnings about passing null as parameter (derrabus).
bug Ignore more deprecations for Mockery mocks (fancyweb).
the Finder::sortByName() method will have a new $useNaturalSort argument in version 5.0, not defining it is deprecated.
Finder::sortByName()$useNaturalSortAPI changes
Generated by DepDelta from published PHP source. Not mixed with prose notes.
- changed:
constructor SplFileInfo($file, $relativePath, $relativePathname) → constructor SplFileInfo(string $file, string $relativePath, string $relativePathname) - changed:
method Finder.contains($pattern) → method Finder.contains($patterns) - changed:
method Finder.date($date) → method Finder.date($dates) - changed:
method Finder.depth($level) → method Finder.depth($levels) - changed:
method Finder.name($pattern) → method Finder.name($patterns) - changed:
method Finder.notContains($pattern) → method Finder.notContains($patterns) - changed:
method Finder.notName($pattern) → method Finder.notName($patterns) - changed:
method Finder.notPath($pattern) → method Finder.notPath($patterns) - changed:
method Finder.path($pattern) → method Finder.path($patterns) - changed:
method Finder.size($size) → method Finder.size($sizes) - added:
class Gitignore - added:
const Finder.IGNORE_VCS_IGNORED_FILES - added:
method Finder.ignoreVCSIgnored(bool $ignoreVCSIgnored) - added:
method Finder.reverseSorting() - added:
method SplFileInfo.getFilenameWithoutExtension(): string - added:
static method Gitignore.toRegex(string $gitignoreFileContent): string
- changed:
constructor DateComparator($test) → constructor DateComparator(string $test) - changed:
constructor NumberComparator($test) → constructor NumberComparator(?string $test)
- removed:
interface ExceptionInterface - removed:
method ExceptionInterface.getAdapter() - added:
class DirectoryNotFoundException extends \InvalidArgumentException
- removed:
abstract class FilterIterator extends \FilterIterator - removed:
method FilterIterator.rewind() - changed:
abstract class MultiplePcreFilterIterator extends FilterIterator → abstract class MultiplePcreFilterIterator extends \FilterIterator - changed:
class CustomFilterIterator extends FilterIterator → class CustomFilterIterator extends \FilterIterator - changed:
class DateRangeFilterIterator extends FilterIterator → class DateRangeFilterIterator extends \FilterIterator - changed:
class DepthRangeFilterIterator extends FilterIterator → class DepthRangeFilterIterator extends \FilterIterator - changed:
class ExcludeDirectoryFilterIterator extends FilterIterator implements \RecursiveIterator → class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator - changed:
class FileTypeFilterIterator extends FilterIterator → class FileTypeFilterIterator extends \FilterIterator - changed:
class SizeRangeFilterIterator extends FilterIterator → class SizeRangeFilterIterator extends \FilterIterator - changed:
constructor DepthRangeFilterIterator(\RecursiveIteratorIterator $iterator, $minDepth = …, $maxDepth = …) → constructor DepthRangeFilterIterator(\RecursiveIteratorIterator $iterator, int $minDepth = …, int $maxDepth = …) - changed:
constructor FileTypeFilterIterator(\Iterator $iterator, $mode) → constructor FileTypeFilterIterator(\Iterator $iterator, int $mode) - changed:
constructor RecursiveDirectoryIterator($path, $flags, $ignoreUnreadableDirs = …) → constructor RecursiveDirectoryIterator(string $path, int $flags, bool $ignoreUnreadableDirs = …) - changed:
constructor SortableIterator(\Traversable $iterator, $sort) → constructor SortableIterator(\Traversable $iterator, $sort, bool $reverseOrder = …) - added:
class LazyIterator implements \IteratorAggregate - added:
const SortableIterator.SORT_BY_NAME_NATURAL - added:
const SortableIterator.SORT_BY_NONE - added:
constructor LazyIterator(callable $iteratorFactory) - added:
method LazyIterator.getIterator(): \Traversable