Conversation

mhujer

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.
```
@mhujermhujer force-pushed the query-builder-extra-method branch from dfb46d7 to 8aab012 Compare November 18, 2019 14:13
@ondrejmirtesondrejmirtes force-pushed the master branch 4 times, most recently from b2b2414 to 1fe21ab Compare December 13, 2020 11:54
@ondrejmirtesondrejmirtes force-pushed the 1.3.x branch 2 times, most recently from aa4e98e to 8b28264 Compare May 25, 2023 13:40
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

@mhujer