Closed aszenz closed 1 year ago
You can use https://github.com/staabm/phpstan-dba/blob/main/src/QueryReflection/ChainedReflector.php to combine several pdo or mysql,... reflectors
Perfect, works great. I see it now in docs too https://github.com/staabm/phpstan-dba/blob/main/docs/reflectors.md, hence closing this issue
How does phpstan-dba know which reflector to use for each file like a repository, i see some errors where it uses an incorrect reflector on the repository file and throws errors like table central.foo
doesn't exist, while it should actually check demo.foo
the chain just works thru the list of reflectors. the first one which returns a type, is used:
I guess this might lead to problems, e.g. when you have queries which can be executed successfully on several reflectors
Hmm, my query should work on only one reflector, but it's not using that reflector
please open a new issue with code which reproduces your problem. it might be useful to create a small example repo.
We use two db connections in the app, is their a way to analyze them both, i only see an option to add one pdo mysql db