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
Over in #2116841: [policy] Decide what the Drupal Public API should be and how to manage it we're talking about how we'll decide what constitutes the Drupal API.
This is the @larowlan's patented less yak, more hack
™ approach - lets talk about a concrete implementation and let the policy develop organically.
Proposed resolution
Document what constitutes the api of forum.module as an example of how #2116841: [policy] Decide what the Drupal Public API should be and how to manage it might look
Remaining tasks
Bikeshed
Consensus
Commit
User interface changes
None
API changes
None, other than locking down forum's api.
Comment | File | Size | Author |
---|---|---|---|
#4 | forum-api.2.patch | 21.05 KB | larowlan |
forum-api.1.patch | 22.64 KB | larowlan | |
Comments
Comment #1
larowlanContentious points in the attached patch - ForumManager protected methods become private.
This means if you want a different implementation of ForumManager, we don't need to worry about future changes from core breaking said implementations.
Comment #2
larowlanSummary of patch:
Comment #3
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedAnd those are exactly things that I frequently see overriding in "custom" space.
E.g. I want to define additional topic orders or change the topic order to depend on something else, too ...
OR
forumStatistics or lastVisit might be a slow query on my site, can't I exchange it?
OR
I might have a better algorithm to get last post data, why is overridding not possible, etc.
Comment #4
larowlanRemoves the contentious private
Comment #5
Crell CreditAttribution: Crell as a volunteer commentedAs webchick noted in the parent issue, we should probably just document that hook implementations are always @internal unless specified otherwise and save ourselves a ton of typing.
If the non-constructor public methods are all @api, just make the class @api and skip the extra typing. (Same for @internal.) Assume that public methods inherit the @api/@internal status of their class.
Comment #17
smustgrave CreditAttribution: smustgrave at Mobomo commentedLooks like changes were requested in #5.
This has been 8 years so wonder if this is still a valid task? If so please move back to Needs Work.
Comment #19
quietone CreditAttribution: quietone at PreviousNext commentedForum is approved for removal. See #1898812: [policy] Deprecate forum module for removal in Drupal 11
This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
It will be moved to the contributed extension once the Drupal 11 branch is open.
Comment #21
quietone CreditAttribution: quietone at PreviousNext commented