New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Finder] Also consider .git inside the basedir of in() directory #54691
[Finder] Also consider .git inside the basedir of in() directory #54691
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
See symfony/symfony#54691 for more details Signed-off-by: Joas Schilling <coding@schilljs.com>
Nope, this was not intentional. |
src/Symfony/Component/Finder/Iterator/VcsIgnoredFilterIterator.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php
Show resolved
Hide resolved
e6ffe96
to
fdf5dcc
Compare
fdf5dcc
to
b31361f
Compare
src/Symfony/Component/Finder/Tests/Iterator/VcsIgnoredFilterIteratorTest.php
Outdated
Show resolved
Hide resolved
Signed-off-by: Joas Schilling <coding@schilljs.com>
b31361f
to
af870c6
Compare
Thank you @nickvergessen. |
Bug description
Previously when the
in()
directory was the root of your repository the.gitignore
was skipped from consideration, which meant potentially all local files are ignored.E.g. in the Nextcloud community we have the server locally with an
.gitignore
for theapps/
directory. Now when an app developer develops their own app locally, they put their own git repository inside this ignoredapps/
folder.The CS Fixer rules we use since a long time are:
and this worked pretty well with 5.4 and previous versions of the finder. Now that the Nextcloud project finally dropped PHP 8.0 for the latest version and we get the update to Symfony 6.4 the bug become visible locally, but our CI still works as we don't need the "server" repository as a parent when running the CS fixer.
Locally - nested inside "server" repository
❌ No files found, all ignored by
server/.gitignore
CI without a parent repository
✅ Correct file list found
5.4
VcsIgnoredFilterIterator.php
.