1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Grégoire Paris
bc91de015e
Mark throwable methods as pure (#3171)
* Write stub as valid PHP

This works probably because it is not parsed by PHP but by something
more tolerant, but let's make it more valid (the final access type in
the signature is not valid) PHP anyway, that will raise fewer eyebrows.

* Document actual return type

See ca006e54e3/Zend/zend_exceptions.stub.php (L8)

* Mark all methods from Throwable as mutation free

Exception is the only possible class implementation of Throwable, and
all of its methods except __toString() are final.
See ca006e54e3/Zend/zend_exceptions.stub.php (L3-L25)

Closes #3170
2020-04-17 22:08:26 -04:00
Niklas Keller
a7affbe716
Add \Error stub (#3002)
Otherwise, errors are generated if \Error is extended: https://psalm.dev/r/8169465beb
2020-03-21 19:11:23 -04:00
Matthew Brown
f128c8ffda Fix overriding of mapped property type visibility 2020-03-11 17:41:05 -04:00
Matthew Brown
a5cf4dbaaa Make exception properties protected 2020-03-11 15:43:15 -04:00
Brown
d1fcbf38ae Fix #2956 - treat Exception::getMessage as final and mutation-free 2020-03-10 15:12:55 -04:00