1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
psalm/src/Psalm/Internal/Stubs
Grégoire Paris b47306ad3b
Account for PDOException (#3175)
Probably for legacy reasons, PDOException::getCode() can return string (it's an
SQLSTATE code). Note that if you instantiate it yourself, you will get
an integer though.

I changed the signature of the Exception stub accordingly, and then
there were errors about incompatible signatures, so I had to change the
signature of Throwable too, which makes sense since a Throwable could be
a PDOException. The signature at
https://www.php.net/manual/en/throwable.getcode.php seems plain wrong,
and that same page of the docs warns about PDOException. Not sure what
are the plans for future versions of PHP.
2020-04-18 10:39:23 -04:00
..
Generator Add constant definitions 2020-01-08 23:48:42 -05:00
CoreGenericClasses.phpstub Fix array key type 2020-04-11 08:12:28 -04:00
CoreGenericFunctions.phpstub Improve names a little 2020-04-18 00:59:16 -04:00
CoreImmutableClasses.phpstub Account for PDOException (#3175) 2020-04-18 10:39:23 -04:00
ext-ds.php Update ext-ds.php (#3165) 2020-04-17 15:07:16 -04:00
Xdebug.php load an xdebug stub when required, re: vimeo/psalm#2118 (#2133) 2019-09-14 10:13:39 -04:00