Closed noemi-salaun closed 2 years ago
thx for reporting.
the problem is that the query-inference cannot work with queries which don't contain a table-reference (or a variable table-reference) in FROM.
we should make sure this doesn't error.. but we cannot do type inference/error checking for those cases.
Yes of course, I did not expect the type checking to work on this case, just not to fatal error
do you have a full stacktrace to ease debugging?
I was able to isolate and repro the error on mysqli.
next time please provide a proper backtrace and information about used reflector and phpstandba-bootstrap settings. at best a reproducing repository or unit test would.
thanks for reporting
To be honest, I thought the error would be easier to deal with. I could have dug deeper and provided more specific information, but you solved the problem too quickly to give me time to react after your last message.
Thank you for your work :heart:
no worries. I was kind of suprised, that it was so hard to reproduce ;). but after a few hours fiddling it worked out
@staabm After updating to v0.2.50 I get a query error even without enabling the debug mode.
Query error: Incorrect table name '' (1103).
$rows = $this->dbal->fetchAllAssociative("SELECT * FROM `$tableExpression`");
@noemi-salaun thx for reporting. fixed with https://github.com/staabm/phpstan-dba/pull/456
When using
analyzeQueryPlans
with dynamic query, I get a PHPStan inernal error