phpstan-dba
phpstan-dba copied to clipboard
doctrine dbal type inference
Todo
- [x] Connection->fetchAssociative
- [x] Connection->fetchNumeric
- [x] Connection->fetchOne
- [x] Connection->fetchAllNumeric
- [x] Connection->fetchAllAssociative
- [x] Connection->fetchAllKeyValue
- [ ] Connection->fetchAllAssociativeIndexed
- [x] Connection->fetchFirstColumn
- [x] Connection->iterateNumeric
- [x] Connection->iterateAssociative
- [x] Connection->iterateKeyValue
- [ ] Connection->iterateAssociativeIndexed
- [x] Connection->iterateColumn
- [x] Connection->prepare
- [x] Connection->executeQuery
- [x] Connection->executeCacheQuery
- [x] Connection->executeStatement
- [x] Connection->executeUpdate (deprecated in doctrine)
- [x] Connection->query (deprecated in doctrine)
- [x] Connection->exec (deprecated in doctrine)
https://github.com/doctrine/dbal/blob/3.3.x/src/Connection.php
- [x] Statement->executequery
- [x] Statement->execute
https://github.com/doctrine/dbal/blob/3.3.x/src/Statement.php
-
[x] Result->fetchNumeric
-
[x] Result->fetchAssociative
-
[x] Result->fetchOne
-
[x] Result->fetchAllNumeric
-
[x] Result->fetchAllAssociative
-
[x] Result->fetchAllKeyValue
-
[ ] Result->fetchAllAssociativeIndexed
-
[x] Result->fetchFirstColumn
-
[x] Result->iterateNumeric
-
[x] Result->iterateAssociative
-
[x] Result->iterateKeyValue
-
[ ] Result->iterateAssociativeIndexed
-
[x] Result->iterateColumn
-
[x] Result->columnCount
-
[ ] Result->fetch (deprecated in doctrine)
-
[ ] Result->fetchAll (deprecated in doctrine)
https://github.com/doctrine/dbal/blob/3.3.x/src/Result.php
Remaining select-based api seems to be supported already
see https://github.com/staabm/phpstan-dba/blob/main/tests/data/doctrine-dbal.php for everything we understand right now