Skip to content

Report deprecations as warnings

Summary

Report deprecations that are triggered during execution of a test method as warnings

Background

If a deprecation (E_USER_DEPRECATED) is triggered, it is reported by PHP at one place. It tells where it happened but it may not be trivial to figure out which test method triggered it. So we should instead report it as a warning for the test method.

Details

We can probably just set error handler in Job::execute() to catch the deprecation and add a warning for the job in the handler.

Follow-ups

In the future we might also add an assertion that a deprecation is expected to happen.