Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Workflow] add get available on workflow component #26042

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

Closed
wants to merge 1 commit into from
Closed

[Workflow] add get available on workflow component #26042

wants to merge 1 commit into from

Conversation

ronfroy
Copy link
Contributor

@ronfroy ronfroy commented Feb 4, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Returns all available transitions (without taking care of guard handlers). It's may be really useful in the case we have to get the available and not juste enabled.

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Feb 5, 2018
@lyrixx
Copy link
Member

lyrixx commented Feb 7, 2018

Hello @ronfroy

Could you describe your use case for this feature? For now, I'm a bit reluctant to add this feature to Symfony.

@ronfroy
Copy link
Contributor Author

ronfroy commented Feb 7, 2018

@lyrixx I want to validate a transition with multiple error depending of rich condition (sub entity, author...) after an user action. In my idea i get all available transition and call "->can" to generate error with guard listener.

Maybe you have a better solution?

@ronfroy
Copy link
Contributor Author

ronfroy commented Feb 7, 2018

@lyrixx Maybe we can just add a "validate" method to the workflow that call only a throw validation event.

@ronfroy
Copy link
Contributor Author

ronfroy commented Feb 7, 2018

@lyrixx https://github.com/symfony/symfony/pull/26076/files this is maybe a better way to achieve this?

@lyrixx
Copy link
Member

lyrixx commented Feb 7, 2018

With #26076 you will be able to know why a transition is blocked. I think it's the way to go indeed.

I'm closing this PR, but don't hesitate to re-open it if something is missing.

@lyrixx lyrixx closed this Feb 7, 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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.