You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -152,12 +152,11 @@ $query->getOneOrNullResult(Query::HYDRATE_OBJECT); // User
152
152
153
153
This is due to the design of the `Query` class preventing from determining the hydration mode used by these functions unless it is specified explicitly during the call.
154
154
155
-
### Numeric types inferring
155
+
### Expression types inferring
156
156
157
-
By default, any expression like `MAX(e.id)` results in `int|numeric-string` as certain drivers & PHP versions do cast the result to string.
158
-
If you are using setup that does not do that, you can disable stringification of such expressions by setting `parameters.doctrine.stringifyExpressions` to `false`.
159
-
160
-
This should be accurate behaviour for [PHP 8.1.25+ with PDO driver](https://github.com/php/php-src/blob/php-8.1.25/UPGRADING#L122-L139) and disabled `PDO::ATTR_STRINGIFY_FETCHES` (which is default).
157
+
Whether `MAX(e.id)` is fetched as `string` or `int` highly [depends on drivers, their setup and PHP version](https://github.com/janedbal/php-database-drivers-fetch-test).
158
+
This extension copies the logic from linked analysis, autodetects your setup and provides accurate results for `pdo_mysql`, `mysqli`, `pdo_sqlite`, `sqlite3`, `pdo_pgsql` and `pgsql`.
159
+
Any other driver will result in union with stringified version, e.g. `numeric-string|int`.
Copy file name to clipboardExpand all lines: phpstan.neon
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,3 +37,6 @@ parameters:
37
37
-
38
38
message:'#^Call to method getProperty\(\) on an unknown class PHPStan\\BetterReflection\\Reflection\\Adapter\\ReflectionEnum\.$#'
39
39
path:src/Rules/Gedmo/PropertiesExtension.php
40
+
-
41
+
message:'#^Call to function method_exists\(\) with Doctrine\\DBAL\\Connection and ''getNativeConnection'' will always evaluate to true\.$#'# needed for older DBAL versions
0 commit comments