8000 [Workflow] Fixed BC break by lyrixx · Pull Request #27848 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Merged
merged 1 commit into from
Jul 5, 2018
Merged

[Workflow] Fixed BC break #27848

merged 1 commit into from
Jul 5, 2018

Conversation

lyrixx
Copy link
Member
@lyrixx lyrixx commented Jul 4, 2018
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

@nicolas-grekas
Copy link
Member

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.

bd1f2c8#diff-7ced8e5ceace060a06472087086f06eaR49

@derrabus
Copy link
Member
derrabus commented Jul 4, 2018

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).

@lyrixx
Copy link
Member Author
lyrixx commented Jul 5, 2018

What do you suggest ?

8000 Copy link
Contributor
@Nek- Nek- left a 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.

@derrabus
Copy link
Member
derrabus commented Jul 5, 2018

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)) {
        // …

@lyrixx
Copy link
Member Author
lyrixx 8000 commented Jul 5, 2018

@derrabus 👍 I updated the PR

@nicolas-grekas
Copy link
Member

Thank you @lyrixx.

@nicolas-grekas nicolas-grekas merged commit b24acb0 into symfony:4.1 Jul 5, 2018
nicolas-grekas added a commit that referenced this pull request Jul 5, 2018
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
@lyrixx lyrixx deleted the workflow-bc branch July 5, 2018 15:29
@fabpot fabpot mentioned this pull request Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0