Problem/Motivation
This module implements a lot of hooks but does not yet make use of D11's hook classes. Should be transitioning to the hook class model: https://www.drupal.org/node/3442349
Issue fork mposse-3555465
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
megakeegman commentedComment #3
megakeegman commentedThe important things to look at are the legacy hook implementations in the mposse.module file (in particular the service call on line 70, but I imagine they should all have the same problem) and the mposse.services.ymlAm I missing something? I have done several ddev poweroffs and cache rebuilds and Drupal can't seem to find this class
Comment #4
megakeegman commentedWe should also be able to transition from module_implements_alter for manipulating the weight of form alters and just use the hook weights attribute directly: https://www.drupal.org/node/3493962
I'm not sure whether I can implement those attributes while also implementing legacy hooks for backwards compatibility?
I presume we should wait until restricting this module D11.2+
Comment #5
megakeegman commentedFWIW I tried changing the service name to 'mposse.hooks' and calling the service with that name, and the error didn't change at all
Comment #6
megakeegman commentedResolved the fatal error. I just had the hook class file in the wrong location. Ready for more thorough testing.
Comment #7
megakeegman commentedTested on Drupal 10.5, everything seems to be working. Still need to test on 11.0 and 11.2+
Modules implementing mposse social platform plugin will need to order their node edit form alter hooks to run after mposse (post 11.2)
Those hook function attributes should be updated to look like:
per https://www.drupal.org/node/3493962
Comment #10
megakeegman commented