Skip to content
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] Apply PathFilterIterator only to directory root if path provided as non-regex #28410

Closed
wants to merge 1 commit into from

Conversation

erickskrauch
Copy link

@erickskrauch erickskrauch commented Sep 8, 2018

#28158

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #28158
License MIT
Doc PR symfony/symfony-docs#...

Apply PathFilterIterator only to directory root if path provided as non regex
@nicolas-grekas
Copy link
Member

We never merge BC breaks sorry. Is there any other way around that wouldn't involve a BC break?

@erickskrauch
Copy link
Author

erickskrauch commented Sep 11, 2018

Hmm... I can suggest implementing Finder::useStrictPaths(bool $strict) method, that will toggle applying path and notPath to the root directory. It shouldn't involve BC.

@mnapoli
Copy link
Contributor

mnapoli commented Nov 15, 2018

Continuing the discussion here by hope of merging this :) (see #28158 (comment))

Is it really considered a break if the behavior it's fixing is broken? By "broken" I mean it's not respecting the original contract which is:

Directories passed as argument must be relative to the ones defined with the in() method.

(https://api.symfony.com/4.1/Symfony/Component/Finder/Finder.html#method_exclude)

This issue is becoming problematic in Bref (brefphp/bref#51) so I'm really hoping we can find a solution :)

@xabbuh xabbuh added the Finder label Mar 8, 2019
@taylorotwell
Copy link
Contributor

Agree this would be very nice to have.

@Simperfit
Copy link
Contributor

@erickskrauch do you want to do it or do you want me to help you ?

@erickskrauch
Copy link
Author

@Simperfit you mean update my PR and resolve conflicts?

@mnapoli
Copy link
Contributor

mnapoli commented Apr 10, 2019

@Simperfit not sure I understand, is this a green light to merge this once conflicts are fixed?

Edit: sorry my bad, i mixed up "Contributor" and "Member". I guess this PR is still blocked per the discussion above.

@nicolas-grekas nicolas-grekas changed the title Apply PathFilterIterator only to directory root if path provided as non-regex [Finder] Apply PathFilterIterator only to directory root if path provided as non-regex Sep 3, 2020
@nicolas-grekas
Copy link
Member

I'm closing because this breaks BC and this staled.

@erickskrauch
Copy link
Author

@nicolas-grekas, I'm still in touch if it is a condition of removing the "stale" label :)

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Sep 4, 2020

Great thanks. Let's keep this PR closed and try a new one that doesn't break BC. Note that I'd prefer not adding a Finder::useStrictPaths() method as I don't think its intend will be obvious to anyone. We'd need another idea. Maybe just using a regexp works as I asked on the issue? (let's continue on the issue btw).

@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
joshtrichards added a commit to joshtrichards/symfony that referenced this pull request Apr 26, 2024
joshtrichards added a commit to joshtrichards/symfony that referenced this pull request Apr 27, 2024
joshtrichards added a commit to joshtrichards/symfony that referenced this pull request Apr 27, 2024
phil-davis pushed a commit to phil-davis/symfony that referenced this pull request Apr 27, 2024
phil-davis pushed a commit to phil-davis/symfony that referenced this pull request Apr 27, 2024
phil-davis pushed a commit to phil-davis/symfony that referenced this pull request Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants