Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a hardDeprecationErrors setting (default false) that throws an exception if a deprecation error is logged #3972
Puts Craft in "hard mode" where any deprecation error that gets logged will throw an exception if the general config setting
It can be convenient to throw exceptions whenever a deprecation is encountered, so that you're forced to go in and fix them.
We decided to add this as a configurable property on the Deprecator service, rather than a config setting.
To have Craft throw exceptions for deprecation warnings, add this to
return [ 'components' => [ 'deprecator' => [ 'throwExceptions' => true, ], ], ];
@brandonkelly TBH, I'm never quite sure of the merging recursion method when you do that…