Closed (fixed)
Project:
farmOS
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2025 at 18:40 UTC
Updated:
4 Nov 2025 at 17:59 UTC
Jump to comment: Most recent
See Drupal core issue: #3483599: Convert all procedural hook implementations to Hook classes
And change record: Most procedural hook implementations have been converted to a hook class
Let's follow core's pattern in farmOS.
TBD
None.
None.
None.
Comments
Comment #2
m.stentaComment #3
m.stentaWe have another issue open that overlaps/relates to this: #3415475: Replace farmOS hooks with Events + EventSubscribers
I think we can work on this issue as the first priority, since we should follow core's pattern first and foremost.
IIRC the other issue proposes some other changes, so let's review that again and see if/how it needs to be updated
Comment #4
m.stentaI wonder if we should consider deprecating the Asset/Log/Plan/etc events, and just recommend using the core hooks as intended.
Comment #5
m.stentaThere is a draft PR for a Rector rule that automates this conversion here: https://github.com/palantirnet/drupal-rector/pull/308
Comment #6
m.stentaComment #7
m.stentaPull request: https://github.com/farmOS/farmOS/pull/1007
Comment #8
m.stenta