-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Analyzing multiple connections #585
Comments
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. |
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 |
the chain just works thru the list of reflectors. the first one which returns a type, is used: phpstan-dba/src/QueryReflection/ChainedReflector.php Lines 54 to 60 in 31c4de9
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. |
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
The text was updated successfully, but these errors were encountered: