I noticed in a linting job that PHPCS now raises a Generic.PHP.DeprecatedFunctions.Deprecated for the uses of imagedestroy() in Modern Image Formats. I've suppressed these via 67dee59 but we need to look at what needs to be done about this. Apparently this function does nothing as of PHP 8 (see docs), so we may just need to do a version check to only run it on PHP<8.