Skip to content

Releases: staabm/phpstan-dba

0.2.23

17 Mar 08:38
3996639
Compare
Choose a tag to compare

Major Improvements

  • PDOStatement generic types got simplified, to no longer include the previous technically necessary BOTH type
  • Preparations for PGSQL support

What's Changed

Full Changelog: 0.2.22...0.2.23

0.2.22

02 Mar 17:12
6fb6b07
Compare
Choose a tag to compare

Major Improvements

  • PDO: support PDOStatement::setFetchMode() by @staabm in #258
    • requires phpstan 1.4.7+
  • PDO: implement PDO::FETCH_OBJ by @staabm in #318

What's Changed

Full Changelog: 0.2.21...0.2.22

0.2.21

21 Feb 13:05
82c9041
Compare
Choose a tag to compare

Major Features

  • implement ReplayAndRecordingQueryReflector by @staabm in #311
  • Use transactions when simulating queries by @xPaw in #312

What's Changed

  • Use lowercase table name in tests to fix issue on Windows by @xPaw in #308
  • Readme: remove todos by @staabm in #317

Full Changelog: 0.2.20...0.2.21

0.2.20

19 Feb 19:01
6a4f4f3
Compare
Choose a tag to compare

What's Changed

  • Stabilize error/result in cache by @xPaw in #306
  • fetchAll(PDO::FETCH_KEY_PAIR) has incorrect return type with an extra array by @staabm in #307

Full Changelog: 0.2.19...0.2.20

0.2.19

19 Feb 09:12
29dddd0
Compare
Choose a tag to compare

Major Features

  • implement type inference for union-types in sql queries by @staabm in #290

example:

$queries = ['SELECT adaid FROM ada', 'SELECT email FROM ada'];

foreach ($queries as $query) {
    $stmt = $pdo->prepare($query);
    $result = $stmt->fetch(PDO::FETCH_ASSOC);
    assertType('array{adaid: int<0, 4294967295>}|array{email: string}|false', $result);
}
  • PDO: support PDO::FETCH_COLUMN in fetch() by @staabm in #302
  • PDO: support PDO::FETCH_COLUMN in fetchAll() by @staabm in #301
  • PDO: added PDO::FETCH_KEY_PAIR support by @staabm in #303
  • PDO: Added PDO::FETCH_CLASS support on fetch*(), fetchObject() by @staabm in #304

What's Changed

  • de-duplicate reflector Error logic by @staabm in #287
  • PDOStatement->fetch() may return false if there no is no data even in exception mode by @staabm in #281
  • exclude tests/ from releases by @staabm in #288
  • union query PDO->query() test coverage by @staabm in #293
  • mysqli: implement type inference for union-types in sql queries by @staabm in #294
  • doctrine-dbal: implement union query types by @staabm in #295
  • doctrine-dbal: union query fetch types by @staabm in #296

Full Changelog: 0.2.18...0.2.19

0.2.18

12 Feb 20:54
d60db80
Compare
Choose a tag to compare

Major Changes

  • Introduce PDO based QueryReflector by @p4veI in #261
    • not yet on feature/performance parity with MysqliReflector, but it will provide our base for getting PGSQL support
  • SyntaxErrorInQueryMethodRule: allow abstract classes in "classMethods" by @voku in #234

What's Changed

  • Remove recording workaround by @staabm in #270
  • Added env vars for Testsuite db-credentials, re-use ReflectorFactory in /bootstrap.php by @staabm in #280
  • moved Rule* tests into a separate testsuite by @staabm in #283
  • Skip Rule* tests when not using MysqliReflector by @staabm in #284
  • remove leftover --debug by @staabm in #285

Full Changelog: 0.2.17...0.2.18

0.2.17

10 Feb 11:44
6a03ce1
Compare
Choose a tag to compare

Major Changes

  • Prototype support for bindValue/bindParam on PDOStatement by @xPaw in #265
  • Add RuntimeConfiguration->defaultFetchMode() option by @xPaw in #256

What's Changed

  • Update README.md by @staabm in #250
  • support queries containing implode() of constant values by @staabm in #239
  • extracted PdoStatementReflection->getStatementResultType() for re-use by @staabm in #257
  • simplify PdoStatementExecuteTypeSpecifyingExtension by @staabm in #259
  • enforce strict comparison by @staabm in #260
  • Extract & refactor mysqli TypeMapping by @p4veI in #262
  • simplify PdoStatementReflection by @staabm in #263
  • refactored PdoStatementReflection by @staabm in #264
  • Refactoring by @staabm in #266
  • put both-type and fetch-type into PDOStatement generic by @staabm in #268
  • de-duplicate test bootstrap logic by @staabm in #271
  • simplify mapper to prepare re-use by @staabm in #272

New Contributors

Full Changelog: 0.2.16...0.2.17

0.2.16

05 Feb 19:56
e40c7f1
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.2.15...0.2.16

0.2.15

04 Feb 14:32
c4e6265
Compare
Choose a tag to compare

What's Changed

  • Doctrine Dbal: fetchOne() can return false by @staabm in #242
  • Support simulation of date/dateime placeholders by @staabm in #244
  • doctrine dbal: support statements without args by @staabm in #245
  • doctrine dbal: fix error detection in queries without args by @staabm in #246

Full Changelog: 0.2.14...0.2.15

0.2.14

04 Feb 11:25
ac7802e
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.2.13...0.2.14