phpstan-dba icon indicating copy to clipboard operation
phpstan-dba copied to clipboard

PHPStan based SQL static analysis and type inference for the database access layer

Results 112 phpstan-dba issues
Sort by recently updated
recently updated
newest added

Maybe fixes #422. Not sure where the `stripComments` method belongs :see_no_evil:

```php $query = ' Select * from ada where adakzid = 15 -- customer ??? '; $stmt = $pdo->prepare($query); $query = $stmt->execute([]); ``` phpstan reports: ``` ------ ------------------------------------------------------------------------ Line example.php...

bug
help wanted

missing part of https://github.com/staabm/phpstan-dba/pull/425 depends on https://github.com/phpstan/phpstan/issues/8058 atm the test fails because the rule involved runs into this early exit https://github.com/staabm/phpstan-dba/blob/f60f559183d22df4394f943d7a6a2470e6941fe2/src/Rules/SyntaxErrorInQueryMethodRule.php#L47-L50

> You can also detect queries without indexes via MYSQLI_REPORT_INDEX https://twitter.com/suckup_de/status/1559622717032259584?s=20&t=ZV3-jR2L-ZDlQwkjXIrQxA https://www.php.net/manual/de/mysqli-driver.report-mode.php

Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3. Release notes Sourced from ramsey/composer-install's releases. 3.0.0 Changed Update actions/cache to v4 to avoid deprecation notices. This requires a new major version because actions/cache...

dependencies
github_actions

I try to configure in project with `doctrine/dbal`. I create a bootstrap: ```

Closes: https://github.com/staabm/phpstan-dba/issues/642 It is a naive solution, and certainly does not cover all the possibilities, but it is a step in the right direction, IMHO.