-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Component Routing 2.6 composer package is missing a dependency #12828
Comments
@sk-sparhandy Did you experience any real issues (errors, etc.)? Because as far as I can see, there's no hard dependency on the ExpressionLanguage component if you don't make use of this optional feature. |
@xabbuh Install the Routing Component by composer and instantiate a mock object with the getMock Method of PHPUnit 3.7.
will result in
which leads to a failed UnitTest. |
@sk-sparhandy You can workaround this by explicitly passing the methods to mock (see #12088 or FriendsOfSymfony/FOSRestBundle#914 for examples how to do that). This may not be ideal, but I don't think it's something to fix in the Routing component. |
If you do not want to change the implementation would you consider adding ExpressionLanguage Component as a dependency as long as the not ideal situation remains? The current implementation strikes me as very unusual requiring extra effort to handle the class. I would be more then willing to offer a pull request dealing with this issue as you see fit. |
ExpressionLanguage is as a soft dependency as the component can work without it, that's why we did not add it as a requirement. The |
Note that only PHPUnit_MockObject requires the ExpressionLanguage to be there to mock the class. Both Prophecy and Mockery are handling this better |
It seams to me that at least one Class of the Routing Component 2.6 has a hard dependency on the ExpressionLanguage Component.
Symfony\Component\Routing\Matcher\UrlMatcher requires the presence of Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface (line 21 and 119)
The Packagist package definition of Routing Component does not contain this aspect. (Only in "Requires (Dev)" but that is not enough!)
The text was updated successfully, but these errors were encountered: