Problem/Motivation
Since PHP 8.0 GD no longer using resources, in parent issue there was introduced TODO to remove that method #3156887-10: \Drupal\system\Plugin\ImageToolkit\GDToolkit needs to support \GdImage objects for PHP 8 compatibility
Also checks with is_resource() should be removed
Proposed resolution
Remove the __destruct() method as imagedestroy() is no-op for 8.0+
Clean-up other methods which has shim to image when it was resource
Remaining tasks
create a patch, commit
User interface changes
no
API changes
TBD
Data model changes
no
Release notes snippet
no
Issue fork drupal-3173031
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
andypostComment #4
andypostComment #6
mondrakeComment #9
spokjeComment #10
mondrakeCommented on the MR
Comment #11
quietone commentedSetting to NW for the unresolved items
Comment #12
andypostClosed as duplicate #3179058: Remove ToolkitGdTest::testResourceDestruction() when core require PHP 8.0
Comment #13
andypost@mondrake Nice idea! I filed follow-up to change naming #3265953: Deprecate resource mentions in GDToolkit method names
added commit to remove unrelated hunk and rebased MR
Comment #14
mondrakeComments in MR
Comment #15
andypostComment #16
spokjeThis is as far as I can take this one. I don't understand the remaining two open remarks on the MR.
Comment #17
andypostI think deprecation should be separate issue as it could go only into 10.1.x
Comment #18
andypostFiled follow-up #3292531: Rename GDToolkit::resource as it object since PHP 8.0 the rest looks ready
Comment #19
alexpottCommitted and pushed 7f337ca7b1 to 10.1.x and 54a3f55501 to 10.0.x. Thanks!