Skip to content
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

[reproducer] QueryBuilder DQL is not reported correctly when QB is pased around #80

Open
wants to merge 1 commit into
base: 1.3.x
Choose a base branch
from

Conversation

mhujer
Copy link
Contributor

@mhujer mhujer commented Oct 10, 2019

This is not a bugfix but rather just a bug-reproducer.

I stumbled across this when testing a class that add extra conditions to a provided Query Builder.

Strict comparison using === between 'SELECT e FROM…' and 'SELECT e FROM…' will always evaluate to false.

When there is a QB passed around and where() or something is called in the other method (or class), the resulting DQL is not reported correctly. I understand that it is hard to statically analyze code like this when the things happen in separate methods. The solution may be not to analyze the DQL query builder in this case (or just mark it as a string, not as a "fixed" string).

Also the error message is not very helpful because the displayed portion is similar, in this case it should probably display whole DQL.

I am not sure where this should be fixed but I will try to fix, if you point me in the correct direction.

I understand that it is hard to evaluate code like this when the things happen in separate methods. The solution may be not to analyze the query builder in this case.

And the message is not very helpful because the displayed portion is similar
```
Strict comparison using === between 'SELECT e FROM…' and 'SELECT e FROM…' will always evaluate to false.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant