-
Notifications
You must be signed in to change notification settings - Fork 227
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
fixes #7002 - filter rocket_lrc_processor to use regex if DOM extension is not found #7218
base: develop
Are you sure you want to change the base?
Conversation
as discussed with @wordpressfan switch rocket_lrc_processor to regex if dom extension is not found
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
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.
Awesome job @alfonso100
@DahmaniAdame With this approach we'll reintroduce this risk: I believe this is acceptable 🤔 |
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.
No fatal error now (only deprecated notices with php8.4 which shall be fixed on other PR. If the risk mentioned about regex is accepted then we can merge this one
Yes. Let's go with that. |
as discussed with @wordpressfan switch
rocket_lrc_processor
to regex if PHPdom
extension is not foundDescription
Fixes #7002
Here we check if the dom module is loaded in php so use the dom processor other than that use the regex which should do the same functionality.
Type of change
Detailed scenario
Disable the DOM extension, see a 500 error in the site frontend, in the console (As described in the issue).
With the new code, if DOM extension is not available it should switch rocket_lrc_processor to use regex instead, preventing the error
Technical description
Documentation
Mentioned above.
New dependencies
No.
Risks
In a few cases we may face slowness when using regex but I believe this will be better than the error 500.
Mandatory Checklist
Code validation
Code style
Unticked items justification
Because results for dom and regex are the same so we don't need to change anything in tests, we have integration tests covering this method.
Additional Checks