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

105 Commits

Author SHA1 Message Date
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
Matthew Brown
45058ea494 Fix possible crash when class-string class doesn’t exist 2019-01-28 01:12:41 -05:00
Matthew Brown
22ee72808a Remove a bunch of hacks around generic offsets
Also fixes #1245
2019-01-26 16:58:49 -05:00
Brown
60e9d4f245 Don’t give up after method_exists if static method exists 2019-01-23 15:50:12 -05:00
Matthew Brown
94aa51ba6d abstract trait method return type override should not be MethodSignatureMistmatch 2019-01-13 13:27:07 -05:00
Brown
14f456e160 Fix #1176 - always evaluate assignments in unknown function calls 2019-01-07 12:24:44 -05:00
Matthew Brown
90e1648d5b Fix #979 - be more conservative about method_exists handling 2019-01-06 09:36:25 -05:00
Matthew Brown
901596281c Fix #1143 - check some variable new calls 2019-01-02 06:58:49 -05:00
Brown
7b03e0159c Prevent invalid static invocation
Fixes #1134
2018-12-17 17:48:13 -05:00
Brown
d9945a0ced Fix issue re-asserting non-empty-mixed 2018-12-10 18:33:26 -05:00
Brown
dc834fdb01 Default allowStringToStandInForClass to true and fix errors found 2018-11-12 12:03:55 -05:00