-
Notifications
You must be signed in to change notification settings - Fork 3.6k
PHP 8.5: Prevent deprecation notices for imagedestroy #4625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`imagedestroy` is deprecated in PHP 8.5+, and hasn't been doing anything since PHP 8.0. To prevent deprecation warnings it should therefore be called on older versions of PHP only. See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion.
|
Thank you for identifying this problem. We do not support any Php release below 8.1, so you can just delete the |
TobiasBg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, of course! Then the imagedestroy call can be removed entirely.
|
Sorry, I wasn't sure if you were around today, so I made that change myself. I was really curious to see how Coveralls handled the change. It did well. I deleted 2 statements, which actually resulted in reduced coverage - previous was 74/102 = 72.5%, new is 72/100 = 72%. This will just happen sometimes, and Coverall reported success. |
|
Thank you for your contribution. |
|
No worries! I assume it's even faster for you to just make these small changes than working of PRs sometimes :-) Good to hear that this is helpful! |
…ving this function call entirely is not desired. To prevent deprecation warnings, it's called conditionally. Revert "Merge pull request PHPOffice#4625 from TobiasBg/patch-1" This reverts commit fb51c3d, reversing changes made to ff7195c.
…ving this function call entirely is not desired. To prevent deprecation warnings, it's called conditionally. Revert "Merge pull request PHPOffice#4625 from TobiasBg/patch-1" This reverts commit fb51c3d, reversing changes made to ff7195c.
…ving this function call entirely is not desired. To prevent deprecation warnings, it's called conditionally. Revert "Merge pull request PHPOffice#4625 from TobiasBg/patch-1" This reverts commit fb51c3d, reversing changes made to ff7195c.
imagedestroyis deprecated in PHP 8.5+, and hasn't been doing anything since PHP 8.0.To prevent deprecation warnings it should therefore be called on older versions of PHP only.
See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion.
This is:
Checklist: