1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

115 Commits

Author SHA1 Message Date
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
Brown
cbb97c42a8
Fix #4146 - allow null checks on Iterator::current output 2021-01-29 11:38:55 +01:00
Brown
c96ba8d1f5
Add some backwards-incompatible changes for 4.x 2021-01-29 11:38:48 +01:00
Brown
6aa8a492ac
Create empty params by default for SplObjectStorage
Fixes #4055
2021-01-29 11:38:45 +01:00
Brown
262bb9fd89 Invalidate memoized getter method results after property assignment 2020-07-16 12:59:49 -04:00
Brown
b361b44889 Rip out plain getter property logic cc @m0003r
It gets in the way of the other IMO more useful memoisation logic (e.g. when a getter is declared final)
2020-07-16 12:42:59 -04:00
Brown
96bfd144df Fix #3825 - ensure final getters are treated as mutation free 2020-07-16 11:58:27 -04:00
Brown
c95ebfeb21 Fix #3694 - allow two args for PDO::query 2020-06-26 18:26:06 -04:00
Brown
cf92361338 Fix #3522 - only use property pass-through when it’s visible 2020-06-04 16:15:07 -04:00
Brown
f6aa9cb11b Relocate tests 2020-06-04 16:07:00 -04:00
Brown
618a54ff41 Fix #3240 - check arguments when class cannot be found 2020-05-02 22:13:59 -04:00
Brown
aceaf6c356 Fix #3217 - don’t override abstract return type with parent one 2020-05-02 21:57:53 -04:00
Brown
5988149272 Prevent checking assertions on $this-> types, always accessible 2020-04-12 14:13:42 -04:00
m0003r
77270dc9b7
Getters automagic (#3122)
* When method is a plain getter: (1) correct method return type if property type is known (2) auto assert-if-true that corresponding property is not falsy

* do not use getter automagic if getter is overridden somewhere
2020-04-12 08:40:24 -04:00
Matthew Brown
3ebb5a1142 Fix #1843 - ignore intersection TooManyArguments issues 2020-03-15 14:01:33 -04:00
Matthew Brown
0022de1f13 Fix #946 - allow too many arguments when one of union agrees 2020-03-15 13:44:00 -04:00
Matthew Brown
8f28f41399 Improve magic checks 2020-03-11 18:42:41 -04:00
Matthew Brown
0d62fbdf98 Detect erroneous abstract static method calls 2020-03-11 10:18:40 -04:00
Brown
40a7a1156f Fix #2930 2020-03-09 09:45:35 -04:00
Matthew Brown
7ea06c7b1a Only emit PossiblyUndefinedVariable issue on variables 2020-03-05 23:40:47 -05:00
Matthew Brown
b2678d40aa Revert "Fix #2909 - don’t treat args of unknown calls as possible by-reference vars"
This reverts commit 105fe012c4.
2020-03-05 21:10:29 -05:00
Matthew Brown
105fe012c4 Fix #2909 - don’t treat args of unknown calls as possible by-reference vars 2020-03-04 23:49:06 -05:00
Matthew Brown
c1bcd3ce12 Add another test 2020-02-27 08:59:43 -05:00
Brown
89a0b101e4 Fix #2784 - no crash when get_class arg is mixed 2020-02-10 14:44:33 -05:00
Alexander Wühr
f9560009ca Allow false as \PDO::fetch return type (#2647) 2020-01-17 08:48:08 -05:00
Brown
df8e3845e5 Fix #2590 - allow null argument for DateTime when no second arg passed 2020-01-10 15:53:15 -05:00
Dusk
63dea52e76 Add support for most PDOStatement fetch modes (#2553)
Flags like PDO::FETCH_CLASSTYPE and PDO::FETCH_PROPS_LATE aren't
supported yet.

(in re. #2529)
2020-01-06 16:41:52 -05:00
Matthew Brown
53a2f77d00 Add better return type provider for PDO statement
Fixes #2529
2019-12-30 11:34:24 -05:00
Matthew Brown
050eb82f04 Fix #2290 - detect call on void type 2019-11-01 13:05:28 +00:00
lhchavez
216f991b0c Normalize stringified type names (#2239)
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
Brown
9bd7f21a9d Fix #2083 - don’t bludgeon method_exists first type 2019-08-29 14:27:25 -04:00
Matthew Brown
738ba81185 Fix #2046 - trigger PossiblyNullArgument when in union with mixed 2019-08-22 23:26:04 -04:00
Matthew Brown
302ed4b21b Support existing concatenation more better 2019-08-20 00:33:59 -04:00
Matthew Brown
73f245f91d Allow compounding method_exists types with || 2019-08-20 00:00:20 -04:00
Brown
a3e9dec925 Allow multiple method_exists checks to inform type 2019-08-19 10:08:21 -04:00
Matthew Brown
920c2d83c3 Use types for method_exists checks in some places 2019-08-18 22:27:19 -04:00
Brown
c283f0877d Analyse binary ops always 2019-07-22 18:04:52 -04:00
Brown
7f0dcae0b2 Always evaluate property calls on mixed methods 2019-07-12 14:39:06 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
4807ebe04a Always evaluate static calls when method call cannot 2019-04-18 13:51:34 -04:00
Matthew Brown
d377bbde2b Check for Soap before running method call test
Fixes #1554
2019-04-13 13:53:08 -04:00
Brown
97f53a6486 @voku’s fixes for issues found by their callmap update 2019-04-11 11:02:46 -04:00
Brown
808522c36f Add workaround SoapFault::__construct, fixing #1535 2019-04-09 15:06:10 -04:00
Brown
1ab6345bac Fix treatment of PDOStatement::setFetchMode
Fixes #1496
2019-03-29 13:26:13 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Brown
601f303de2 Fix position of invalid param 2019-02-27 16:00:44 -05:00
SignpostMarv
4a56688800 adding DIRECTORY_SEPARATOR to tests that fail under windows 2019-02-06 14:29:10 -05:00
Matthew Brown
509709d6bc Fix #1267 - flesh out self static property types 2019-02-01 08:59:01 -05:00