phpstan-dba
phpstan-dba copied to clipboard
PHPStan based SQL static analysis and type inference for the database access layer
released with phpstan 1.8.3+
https://github.com/php/php-src/pull/9270#issuecomment-1208720373
show queries should also work with type inference and syntax error validation examples: `'show variables like "slow_query_log"'` `"SHOW TABLE STATUS where collation ='utf8_mbw4'"` ```php private static function get_table_columns(string $table) {...
https://wiki.php.net/rfc/mysqli_execute_query https://github.com/php/php-src/pull/8660
investigate whether we can just use https://github.com/staabm/sql-parser-util instead of our own implementation
this PR just illustrates the problem of a phpunit error ``` The data provider specified for staabm\PHPStanDba\Tests\DbaInferenceTest::testFileAsserts is invalid. _PHPStan_0b5253d36\Nette\FileNotFoundException: File 'phar://phpstan.phar/conf/bleedingEdge.neon' is missing or is not readable. ``` which...
it seems since introducing pdo-pgsql we missed a bit of testcoverage - [rule tests](https://github.com/staabm/phpstan-dba/tree/main/tests/rules) seem to only exist for pdo-mysql and mysqli, but non for pgsql - double check test-cases...
I ran into a PHPStan error on the following code: https://phpstan.org/r/0a244b72-7cea-4746-8d69-26b17871fd62 After installing this package, I was still getting the same error, but noticed the cache file also wasn't being...