staabm / phpstan-dba

PHPStan based SQL static analysis and type inference for the database access layer
https://staabm.github.io/archive.html#phpstan-dba
MIT License
257 stars 17 forks source link

Fix getting columns when sql mode is using ansi_quotes #669

Closed lode closed 3 months ago

lode commented 3 months ago

This fixes #668.

staabm commented 3 months ago

Thanks for the PR. Would be great to have a unit test for the actual problem

lode commented 3 months ago

Thanks for the PR. Would be great to have a unit test for the actual problem

I agree that would be nice!

I tried but couldn't really get this to work. (Various things, didn't have the php extensions installed, tried putting it in Docker, that worked, but about half the existing tests fail, don't fully understand the structure of the existing tests.)

I did add the structure of what I think would be the test.

Do you have some guidelines of how to proceed?

Otherwise, feel free to take my code and make it work if you do have more concrete knowledge about the test setup.

staabm commented 3 months ago

I will have a look into a test when time allows, thanks for the fix.