Repository navigation
fix(core): keep files excluded by FinderConfig out of found files - #387
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1 task done
roxblnfk
force-pushed
the
fix/finder-excluded-files
branch
from
October 13, 2026 09:27
860f51a to
2797ee3
Compare
A file listed in `exclude` was appended to the Symfony finder, and appended entries skip every filter, so the excluded file came back from the search, and one outside the includes was added to it. Test discovery ran tests from a file excluded in a suite's `location`. Excluded paths now only feed the filter, which also stops excluded directories from being scanned for nothing. The filter walks up from a file to its include directory; when the include is spelled unlike the real path (letter case, a symlink), it never met it and looped forever at the filesystem root. The walk now stops there and keeps the file. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…symlinks Excludes are resolved through realpath() and compared to found entries with Path::isWithin(), which ignores letter case on Windows. This replaces the string walk up the parent directories. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
test(core): pin that a file listed in include survives an excluded directory Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
An empty result used to pass the per-entry isDir() loop, so over-exclusion went unnoticed. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
roxblnfk
force-pushed
the
fix/finder-excluded-files
branch
from
October 13, 2026 09:39
2797ee3 to
3ec3a24
Compare
…de filter A dangling symlink has no real path, and passing `false` on to `Path::create()` threw a TypeError whenever excludes were configured. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Without pruning, Symfony walked every entry beneath an excluded directory only to filter each one out, and failed on an excluded directory it could not read. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
roxblnfk
force-pushed
the
fix/finder-excluded-files
branch
from
October 13, 2026 15:22
85e849a to
7c46d17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
FinderConfigexcludes is no longer returned byFinder, and an excluded file outside the includes is no longer added to the results. Before, test discovery ran tests from a file excluded in a suite'slocation.core/Xwith excludecorefinds nothing.Why?
Excluded files were passed to Symfony
append(), and appended entries skip every filter, includingfiles()andwithFilter(). Found while reporting unloaded source files for coverage (#383), where an excluded file showed up as fully uncovered.Checklist
tests/Tokenizersuite passes locally on Windows and Linux