See https://developer.wordpress.org/reference/functions/wp_trigger_error/ PHPCS linting warnings never mentioned this function as the recommended alternative, but I just now happened upon it. > trigger_error() found. Debug code should not normally be used in production. > (WordPress.PHP.DevelopmentFunctions.error_log_trigger_error) phpcs
See https://developer.wordpress.org/reference/functions/wp_trigger_error/
PHPCS linting warnings never mentioned this function as the recommended alternative, but I just now happened upon it.