phpstan-dba
phpstan-dba copied to clipboard
PHPStan based SQL static analysis and type inference for the database access layer
Currently I'm not getting any errors/hints for (PDO->prepare())->execute(). It would be nice to have support for (PDO->prepare())->execute(). e.g. ``` $dsn = sprintf('mysql:host=%s;dbname=%s;port=3306;charset=utf8mb4;', 'host', 'database'); $pdo = new PDO($dsn, 'username', 'password',...
refs https://github.com/staabm/phpstan-dba/issues/547
Hi, it took me a while to get to this, but I finally managed to take a look at this and I'm keen for some comments regarding the features. I...
Invalid string type is substituted when column type is uuid (for pgsql): ``` Line src/Some/Infrastructure/Doctrine/Dbal/DbalSomeQuery.php ------ ----------------------------------------------------------------------------------------------------------------------- 22 Query error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for...
even if sqlftw does not yet support pgsql we can at least narrow types for pgsql when the statement at hand is compatible with mysql. I think we could run...
maybe we can utilize the query from https://github.com/SQLFTW/sqlftw/issues/22 to simulate a query which sqlftw is not able to parse (I did not yet verify whether sqlftw throws on said query)...
I've been looking into handling the case where `QueryScope::getType` receives an instance of `SqlFtw\Sql\Expression\Operator` as input. Currently, this falls back to simply returning `MixedType`, which renders the AST-derived types mostly...
Hello @staabm ```php public function rightLeftJoin(PDO $pdo): void { $stmt = $pdo->query('SELECT adaid from ada left join ak on adaid = eladaid'); assertType('PDOStatement', $stmt); $stmt = $pdo->query('SELECT adaid from ak...
When calling `Connection::insert()` with the table name as a `literal-string`, I got this error message > Argument #0 expects a literal string, got literal-string