-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] Fixed BC break #27848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Workflow] Fixed BC break #27848
Conversation
Q | A |
---|---|
Branch? | 4.1 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #27759 |
License | MIT |
Doc PR |
Looking at the breaking commit, this means the parameter will be mandatory in 5.0? Should the deprecation message tell something about it? If not, null is not allowed right now. |
When not passing a fouth parameter (which used to be valid), the deprecation message is now odd because it tells me not to pass a string (which is not what I did). |
What do you suggest ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes #27759 👍 . I only get a deprecation notice.
Would that work? public function __construct($subject, Marking $marking, Transition $transition, $workflow = null)
{
// …
if (null === $workflow) {
@trigger_error(sprintf('Passing only three parameters to "%s" is deprecated since Symfony 4.1. Pass a %s instance as fourth parameter instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
$this->workflowName = 'unnamed';
} elseif (is_string($workflow)) {
// … |
@derrabus 👍 I updated the PR |
Thank you @lyrixx. |
This PR was merged into the 4.1 branch. Discussion ---------- [Workflow] Fixed BC break | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27759 | License | MIT | Doc PR | Commits ------- b24acb0 [Workflow] Fixed BC break