Use StateTransitionValidationInterface instead of StateTransitionValidation in WorkflowButtonsWidget

Created on 17 June 2025, 3 months ago

Problem/Motivation

Sometimes there is a need to decorate StateTransitionValidation if logic is more complex than permission based.
There is as well few contrib modules which allows it.
As soon as you extend StateTransitionValidation it work, but when when you don't extend the class and implements StateTransitionValidationInterface, it returns error.
Best approach of decorators is that they should not extend classes, but use interface.

Steps to reproduce

1. Add decorator which implements StateTransitionValidationInterface interface, and does not extends StateTransitionValidation.

Proposed resolution

Replace StateTransitionValidation with StateTransitionValidationInterface in WorkflowButtonsWidget.

Remaining tasks

Nothing.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇵🇱Poland ad0z

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024