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] Added an entered event #20787

Closed
wants to merge 1 commit into
base: 3.2
from

Conversation

Projects
None yet
6 participants
@Padam87
Contributor

Padam87 commented Dec 6, 2016

Q A
Branch? 3.2
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #20774 (partially) ; #21433
License MIT
Doc PR -
@lyrixx

This comment has been minimized.

Member

lyrixx commented Dec 6, 2016

Hello @Padam87

1/ there is already the enter event. What is the difference?
2/ What is the use case for this new event?

@Padam87

This comment has been minimized.

Contributor

Padam87 commented Dec 6, 2016

Hi, I have expained in the issue. The enter event is called before the new markings are set, so you can't flush an entity in a listener because of this :)

@nicolas-grekas nicolas-grekas modified the milestone: 3.x Dec 7, 2016

@lyrixx

This comment has been minimized.

Member

lyrixx commented Dec 13, 2016

Thanks @Padam87 for your time. But sadly I'm still 👎 about this event.

We already have many events. More over if you really want to to have your flush outside the controller, you can put it in the marking store. As well it makes more sense since the marking store, is all about the "store", and so the DB.

I need to close this PR as "won't fix" because of the -1 votes from the Symfony Core Team members.

The Workflow component is very recent, so we are very cautious about adding new features to it. In any case, if more users complain about this very same thing, we'll reconsider your proposal for Symfony 3.3. Thanks!

@lyrixx lyrixx closed this Dec 13, 2016

@Padam87 Padam87 referenced this pull request Feb 1, 2017

Closed

[Workflow] Enter events #21433

@lyrixx lyrixx reopened this Feb 9, 2017

@lyrixx

This comment has been minimized.

Member

lyrixx commented Feb 9, 2017

@Padam87 Could you rebase the PR? Thanks.

}
foreach ($transition->getTos() as $place) {
$marking->mark($place);

This comment has been minimized.

@lyrixx

lyrixx Feb 9, 2017

Member

The logic is wrong here, the marking is already set in the enter method

This comment has been minimized.

@Padam87

Padam87 Feb 9, 2017

Contributor

Oops, totally missed this, thx

@@ -238,6 +240,24 @@ private function enter($subject, Transition $transition, Marking $marking)
}
}
private function entered($subject, Transition $transition, Marking $marking)
{
if (null !== $this->dispatcher) {

This comment has been minimized.

@lyrixx

lyrixx Feb 9, 2017

Member

if (null == $this->dispatcher) { return ; }

@Padam87 Padam87 force-pushed the Padam87:workflow-event branch from 54d66c9 to 8adfb58 Feb 9, 2017

@Padam87 Padam87 force-pushed the Padam87:workflow-event branch from 8adfb58 to 7c7725c Feb 9, 2017

@lyrixx

This comment has been minimized.

Member

lyrixx commented Feb 9, 2017

👍

@xabbuh

xabbuh approved these changes Feb 10, 2017

👍

Status: Reviewed

@lyrixx

lyrixx approved these changes Feb 13, 2017

@lyrixx

This comment has been minimized.

Member

lyrixx commented Feb 13, 2017

Thank you @Padam87.

@lyrixx lyrixx closed this in 772d8e6 Feb 13, 2017

@fabpot

This comment has been minimized.

Member

fabpot commented Feb 13, 2017

@lyrixx Can you add a note in the component CHANGELOG?

@lyrixx

This comment has been minimized.

Member

lyrixx commented Feb 13, 2017

Yes, I will make a PR.

lyrixx added a commit to lyrixx/symfony that referenced this pull request Feb 13, 2017

@Padam87 Padam87 deleted the Padam87:workflow-event branch Feb 13, 2017

@nicolas-grekas nicolas-grekas modified the milestones: 3.x, 3.3 Mar 24, 2017

@nicolas-grekas nicolas-grekas modified the milestones: 3.3, 3.x Mar 24, 2017

@fabpot fabpot referenced this pull request May 1, 2017

Merged

Release v3.3.0-BETA1 #22603

weaverryan added a commit to symfony/symfony-docs that referenced this pull request Jun 13, 2017

feature #8023 Adding missing workflow.entered events (rufinus)
This PR was merged into the 3.3 branch.

Discussion
----------

Adding missing workflow.entered events

see symfony/symfony#20787

Commits
-------

1391473 Adding missing workflow.entered events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment