Clean up BC layer for deprecated method implementsHook()

Created on 16 October 2023, about 1 year ago
Updated 17 October 2023, about 1 year ago

Call to deprecated method implementsHook() of class Drupal\Core\Extension\ModuleHandlerInterface. Deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use the hasImplementations() methods instead with the $modules argument.

πŸ“Œ Task
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡·Costa Rica yuvania

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @yuvania
  • πŸ‡¨πŸ‡·Costa Rica yuvania

    Patch generated by Upgrade Rector

  • πŸ‡¨πŸ‡·Costa Rica yuvania

    This is a better version than the previous patch. The previous one improved the code but did not solve the problem of the deprecated method: implementsHook()

  • Status changed to Needs work about 1 year ago
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    As commented on the other issue, there is no bug here, the call is in a condition that checks if the new method exists and only calls it if not.

    What we can do is up the drupal core version we depend on to 9.4 and remove that condition, but that's a low-prio cleanup.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    It's also worth noting that a lot of the patch focuses on test issues, not specifically the implementsHook() change.

  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    True, we can keep those changes, but they aren't that important, nothing is actually broken, it's just recommended to make it protected now.

    The proxy class changes on the other hand are wrong and must be reverted, rector does that all the time because it's confused about the generated proxy class code.

Production build 0.71.5 2024