-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Finder] simplified code #15962
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] simplified code #15962
Conversation
fabpot
commented
Sep 28, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | n/a |
return !preg_match('/[*?[:alnum:] \\\\]/', $start); | ||
} | ||
|
||
if ($start === '{' && $end === '}') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are not the only bracket types supported for delimiters btw. Our code is missing support for other ones: http://php.net/manual/en/regexp.reference.delimiters.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, the logic in the Expression subsystem was supporting ()
as delimiters, so this is actually a regression
9c0f54d
to
3e1e1c7
Compare
👍 this complex system is not necessary anymore now that we deprecated the find-based adapters. @fabpot is it possible to add tests for the regex detection here, including the case of all kinds of bracket delimiters ? and you need to mark tests of the |
3e1e1c7
to
4fa3eaf
Compare
The tests where already in the iterator test class for |
good to me |
This PR was merged into the 2.8 branch. Discussion ---------- [Finder] simplified code | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 4fa3eaf [Finder] simplified code