Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
ForumManagerInterface::getParents() was deprecated in #2353013: Remove taxonomy_term_load_parents_all from taxonomy/taxonomy.module, but it's usage was not removed.
Proposed resolution
- Remove usages of ForumManager::getParents() from core.
- Trigger an E_USER_DEPRECATED error from ForumManager::getParents()
- add a legacy test to ensure the error is triggered, and the the deprecated method
- Create and publish a CR identifying the already deprecated method.
- Update the @deprecation tag wording to current standards.
Remaining tasks
Review it
Commit it
User interface changes
none
API changes
none
Comments
Comment #1
larowlanComment #2
larowlanDone
Comment #3
larowlanComment #4
andypostI don't think it's disruptive, and already marked as deprecated
Comment #5
bertramakers CreditAttribution: bertramakers commentedNote that this method has only been marked as deprecated in #2353013-10: Remove taxonomy_term_load_parents_all from taxonomy/taxonomy.module, so not that long ago. But I agree that the change is not that disruptive.
Doesn't really make much sense to have a new method in D8 if it's already deprecated anyway.
Comment #6
Mile23I'm not so sure we should remove convenience methods like this, but reviewing anyway.
The patch in #2 still applies, but running unit tests leads to this error:
Comment #7
Mile23At this point in the release cycle, this should be marked as to be removed before 9.0.0.
Comment #8
Mile23Needs a reroll.
Comment #9
madhavvyas CreditAttribution: madhavvyas as a volunteer commentedPatch re-rolled comment 2
Comment #11
Mile23Rescoping a little bit here so we're properly marking the deprecation.
The patch in #9 applies. Here's some review:
Entity manager is deprecated, so just get the entity storage manager service for the entity type.
We can't delete the method yet, since it's deprecated for removal in d9.
Comment #16
ashishdalviMarking issue for Drupal Mumbai Code Sprint
Comment #17
andypostbtw I think better to move it out of storage handler back to forum manager and convert to entity query, this way it will be independent from storage
maybe it needs follow-up? @larowlan any thoughts?
Comment #21
mikelutzComment #22
imalabyaThe patch doesn't apply anymore. Added a Reroll tag.
Comment #23
mikelutzRewriting from scratch to modern standards.
Comment #24
mikelutzUpdating Issue title and Summary.
Comment #25
BerdirLooks good. The test isn't very explicit as it just compares the two calls but I think that's enough for this simple deprecation.
Comment #27
catchCommitted 04051f2 and pushed to 8.8.x. Thanks!
Comment #29
quietone CreditAttribution: quietone at PreviousNext commentedPublish change record