Put back exception during class scanning #24601
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In #24580 the exception was changed to a log call to avoid problems with test environments. But it can cause infinite loops with some extensions.
Before
On a site with, e.g. the csvimport extension installed, an infinite loop gives out of memory on every page. No error actually gets logged.
After
Error logged, but back to the original problem.
Technical Details
Comments
An intermediate option might be trigger_error() with E_USER_DEPRECATED, but whether that helps the original problem depends on that test environment's config on how it handles php deprecations during tests.
@eileenmcnaughton