Skip to content

Drop symfony/finder, reuse Entropy FileFinder - #140

Merged
TomasVotruba merged 2 commits into
mainfrom
remove-symfony-finder
Sep 17, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
remove-symfony-finder

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Sep 17, 2026

Copy link
Copy Markdown
Member

Removes symfony/finder from production require. Our commands relied on Symfony's Finder engine and its SplFileInfo (for getContents(), getRelativePathname(), getRelativePath()).

Replaced with the generic finder added to entropy in entropy#23, released as Entropy 0.4.14:

  • Entropy\FileSystem\FileFinder::find(array $directories, ?callable $filter): FileInfo[] - recursive scanner returning files with paths relative to the scanned directory.
  • Entropy\FileSystem\FileInfo - extends native \SplFileInfo, adds getContents(), getRelativePathname(), getRelativePath(). Same API as Symfony's, so call sites stay unchanged.

FilesFinder, PhpFilesFinder, TraitFilesFinder, NamespaceToPSR4Command and TestsDirectoryResolver now build on it. node_modules/vendor/var skips match the relative path (as Symfony's notPath did), not the absolute path.

Requires entropy/entropy ^0.4.14. symfony/finder remains only as a transitive dev dependency of class-leak.

Tests, PHPStan, ECS, Rector all green locally.

@TomasVotruba
TomasVotruba force-pushed the remove-symfony-finder branch 2 times, most recently from 47dbd0b to c89769f Compare September 17, 2026 22:03
@TomasVotruba TomasVotruba reopened this Sep 17, 2026
@TomasVotruba TomasVotruba changed the title Drop symfony/finder, use custom FileInfo value object Drop symfony/finder, reuse Entropy FileFinder Sep 17, 2026
@TomasVotruba
TomasVotruba merged commit ba2b157 into main Sep 17, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the remove-symfony-finder branch September 17, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant