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
Workflows currently provides StateInterface and TransitionInterface for the State and Transition value objects. Content Moderation also uses StateInterface for ContentModerationState value object.
Do we need these interfaces?
Discussion started in #2899553: Architectural review of the Workflows module (documentation cleanups) at #29.
Proposed resolution
Discuss.
Remaining tasks
User interface changes
API changes
Possible removal of these two internal interfaces.
Comments
Comment #2
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedIf there are two implementations, the interface is required. So perhaps the issue should clarify the terminology around "value objects" in the comments?
Comment #3
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedGiven we have methods like
WorkflowTypeInterface::getTransitions
which are@api
that return an array of objects that implement an@internal
interface, this should probably be resolved for 8.5.Additionally I missed that #2896724: Create constants for transition directions. introduced a constant on an
@internal
interface, to be used as an argument for an@api
method. I suspect the outcome of this will be, those interfaces will become@api
, so hopefully not an actual problem?Adding some context to the IS which will help us decide what to do with these.
Comment #5
Nigel CunninghamI have a further argument for treating Transitions as entities in their own right: I'm preparing a quote for a client that wants transitions to require approval from multiple users. To my mind, it makes most sense to implement this by having transitions be entities supporting the implementation of the rules that are required.
If this quote goes further, I'll do more work but happy to participate in further discussion.