-
Notifications
You must be signed in to change notification settings - Fork 11
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
EditorBuilder registers deprecated PhpSearchStrategy #120
Comments
Hi @davidgorges thanks for your report. I'll remove |
@gnugat it can't be removed, as it's there for BC reasons. I think there are 2 options:
|
@wouterj good point, I'll try your first advice, if it doesn't do the trick I'll check the second :) |
@davidgorges could you provide us with a small piece of code to reproduce the issue? I'd like to add a test for it. |
@gnugat I think this will do (didn't test it though): $editor = EditorFactory::createEditor();
$editor->findBelow('something'); |
That's weird, |
@gnugat try with a line number search pattern. As that's the only strategy registered after the PHP search strategy (I forget about the priorty argument my previous comments). https://github.com/gnugat/redaktilo/blob/master/src/Gnugat/Redaktilo/Service/EditorBuilder.php#L86-L89 With all other patterns, there is a matching strategy stopping the iteration. |
@wouterj good point! LineNumberSearchStrategy is also deprecated, so I've added a test checking the notice (should be about LineNumberSearchStrategy and not PhpSearchStrategy). |
The triggered
\E_USER_DEPRECATED
errors cause phpunit to fail.If anyone else runs into that:
\PHPUnit_Framework_Error_Deprecated::$enabled = FALSE;
disables the test fails.
The text was updated successfully, but these errors were encountered: