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] No hard dependency to expression language component #32512
Comments
I am not able to reproduce this issue. Can you create a small example application that allows us to do so? |
I guess you are using a guard expression ? |
I'm not using expressions, bus the project uses fos rest bundle, maybe it uses.. I will try to investigate and create an example app. |
Ok, I have managed to reproduce the exception: https://github.com/rmikalkenas/workflow-issue Looks like the problem is in Correct me if I'm wrong.. |
@nicolas-grekas I don't really understand this issue. This is not really related to the workflow. Could you have a look? Thanks |
Indeed, its more related to security bundle and DI. At first i thougt it was related to workflow, because exception started when i installed workflow component and created models. But after investigation it looks like I was wrong |
Yes, it's really weird. It occurs when Symfony try to load this file namespace Symfony\Component\Workflow\EventListener;
use Symfony\Component\Security\Core\Authorization\ExpressionLanguage as BaseExpressionLanguage; // HERE
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Symfony\Component\Workflow\Exception\RuntimeException;
class ExpressionLanguage extends BaseExpressionLanguage
{ If I comment the line with So I have two questions:
IMHO, there is 2 issues to fix here Note: It reminds me #31535 |
Can you show the full stack trace? Maybe the same root cause as #32395? |
Duplicate of #32395 |
Thanks @nicolas-grekas and @xabbuh |
Symfony version(s) affected: 4.3.2
Description
Running
composer require workflow
on a project which doesnt have expression language component throws exceptionThe "Symfony\Component\Security\Core\Authorization\ExpressionLanguage" class requires the "ExpressionLanguage" component. Try running "composer require symfony/expression-language".
How to reproduce
https://github.com/rmikalkenas/workflow-issue
Possible Solution
Move
symfony/expression-language
dependency in workflow component fromrequire-dev
torequire
Additional context
PHP 7.3.2
The text was updated successfully, but these errors were encountered: