-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ExpressionLanguage] lint should return bool #58679
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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
a31d5cc
to
fd29ef2
Compare
This indeed looks like a mistake in the documentation. The method is supposed to throw an exception in case of a syntax error. Would you like to send a PR to fix the documentation? |
Idk, I think it's weird that a method which validates an expression does't return anything. By logic, I would make it return a bool. I bypassed my issue by doing
I made my change on the docs repo #20351 |
Taking a look on it after seeing the PR doc, considering author comment from original code PR the void return is on purpose then this is pretty like a doc mistake |
I'm going to close this PR. The proposed change break backwards compatibility, so merging it is out of the question. I think, we agree that this is an issue of the documentation, so let's continue the discussion on symfony/symfony-docs#20351. |
This PR was submitted for the 7.1 branch but it was merged into the 6.4 branch instead. Discussion ---------- [ExpressionLanguage] fix lint method description At first, I made a fix pr [#58679](symfony/symfony#58679), but someone suggested to make a doc fix. I think it's pretty weird to have a linting method throwing exception as its task is to tell if the expression is valid or not. 🤔 Commits ------- d558cc8 updating expression language documentation
I don't know how to qualify this : Documentation says lint should return boolean, but when you check the code, it's a void value, so should I update doc first, and then add it to a new branch as a new feature?
Depending on the point of view, if the documentation is the source of truth, this means it's a bug fix. But if the code is the source of truth, then, this is a new Features which introduces breaking changes 🤔
And It seems like some non-related tests in this component don't work?