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

Command icon 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

andypost created an issue. See original summary.

andypost’s picture

Title: Remove \Drupal\system\Plugin\ImageToolkit\GDToolkit::__destruct() when core require php 8.0 » Clean-up \Drupal\system\Plugin\ImageToolkit\GDToolkit when core require php 8.0
Issue summary: View changes

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mondrake’s picture

Version: 9.3.x-dev » 10.0.x-dev

Spokje made their first commit to this issue’s fork.

spokje’s picture

Status: Postponed » Needs review
mondrake’s picture

Commented on the MR

quietone’s picture

Status: Needs review » Needs work

Setting to NW for the unresolved items

andypost’s picture

andypost’s picture

Status: Needs work » Needs review
Related issues: +#3265953: Deprecate resource mentions in GDToolkit method names

@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

mondrake’s picture

Status: Needs review » Needs work

Comments in MR

andypost’s picture

spokje’s picture

This is as far as I can take this one. I don't understand the remaining two open remarks on the MR.

andypost’s picture

Status: Needs work » Needs review
Issue tags: +Needs followup

I think deprecation should be separate issue as it could go only into 10.1.x

andypost’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs followup
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 7f337ca7b1 to 10.1.x and 54a3f55501 to 10.0.x. Thanks!

  • alexpott committed 7f337ca on 10.1.x
    Issue #3173031 by Spokje, andypost, mondrake: Clean-up \Drupal\system\...

  • alexpott committed 54a3f55 on 10.0.x
    Issue #3173031 by Spokje, andypost, mondrake: Clean-up \Drupal\system\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.