[reproducer] QueryBuilder DQL is not reported correctly when QB is pased around #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.