Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add rector rule for deprecated GDToolkit #289

Merged
merged 3 commits into from
Mar 4, 2024

Conversation

timohuisman
Copy link
Contributor

feat: add rector rule for deprecated GDToolkit resource methods and properties in 10.2

Description

GDToolkit::setResource(), GDToolkit::getResource() and GDToolkit::resource are deprecated.

GDToolkit has been updated to use the GD extension classed object \GdImage instead of a generic resource.

Todo

  • There should probably be a test for RenamePropertyRector, but I'm not sure where to start.

To Test

  • composer test

Drupal.org issue

https://www.drupal.org/project/rector/issues/3416757
https://www.drupal.org/node/3265963

@timohuisman timohuisman force-pushed the feature/3416757-GDToolkit branch from a7bcc4a to 12d8a10 Compare January 24, 2024 16:14
@timohuisman
Copy link
Contributor Author

The tests are failing because of #290

@bbrala bbrala force-pushed the feature/3416757-GDToolkit branch from 12d8a10 to c8d751e Compare January 28, 2024 14:00
@bbrala
Copy link
Collaborator

bbrala commented Feb 11, 2024

Wonder if renaming ::resource is even something we should do. I mean, its a protected var, you might use it in an extending class but you could argue that is not common at all.

When looking at contrib i see no instances of that.

https://git.drupalcode.org/search?group_id=2&page=4&repository_ref=11.x&scope=blobs&search=extends+GDToolkit

So perhaps just remove the property fetch and only do the public API.

@bbrala bbrala force-pushed the feature/3416757-GDToolkit branch from 1829c34 to 5f08443 Compare March 4, 2024 07:36
@bbrala bbrala merged commit 18a3ea5 into palantirnet:main Mar 4, 2024
7 checks passed
@timohuisman timohuisman deleted the feature/3416757-GDToolkit branch May 27, 2024 19:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants