1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-16 11:26:55 +01:00
Commit Graph

279 Commits

Author SHA1 Message Date
Matt Brown
0691763803 Fix issue reconciling class strings 2018-08-23 11:43:53 -04:00
Matt Brown
ebc65baa91 Fix issues with coerced class-string 2018-08-21 17:59:06 -04:00
Matt Brown
91100edcc9 Fix issue mixing class strings and class string constants 2018-08-21 14:47:28 -04:00
Matt Brown
699a34fc9d Fix #952 - improve checks for string array offsets 2018-08-21 11:40:29 -04:00
Matthew Brown
bf79169a1d Fix #914 - check for correct character when setting calculated field 2018-08-21 00:43:45 -04:00
Matthew Brown
b9018a4a03 Fix #936 - add support for class constants in enums 2018-08-08 23:12:12 -04:00
Matthew Brown
9880e2bede Prevent leading-number constants in docblocks 2018-08-08 21:36:33 -04:00
Matthew Brown
6670dd31e1 Fix #927 - improve typing of object-like arrays containing class like strings 2018-08-08 21:31:13 -04:00
Matthew Brown
55be2c3ce4 Fix #934 - allow numbers in class constant enums 2018-08-08 20:36:16 -04:00
Matthew Brown
a8a504c3b9 Fix #889 - allow variables defined in try to avoid isset issues 2018-07-13 14:06:01 -04:00
Matt Brown
7713c7a8d6 Use continue 2 in place of continue 2018-07-12 18:04:05 -04:00
Matt Brown
bbf48bbdfe Fix #873 - allow unpacking of all iterables 2018-07-09 09:59:51 -04:00
Matthew Brown
0d62431cfb Fix #870 - improve magic method type handling 2018-07-07 00:06:05 -04:00
Matthew Brown
8bdeb5ed65 Fix #864 - only create intersection types when dealing with classes & interfaces 2018-07-05 19:46:33 -04:00
Matthew Brown
76e369d330 Allow multiple matching types to be captured in if 2018-07-02 22:53:17 -04:00
Matthew Brown
c354a024d8 Fix #856 - perform better class filtering based on parent classes 2018-07-02 21:59:40 -04:00
Matthew Brown
6267fa7d1d Fix #850 - allow is_numeric to refine scalar type 2018-06-30 10:52:45 -04:00
Matt Brown
1ca5ef9bf7 Prevent duplicate classes in same file 2018-06-29 15:39:17 -04:00
Matthew Brown
c1052c0a6a Only create intersections for types that don’t contain each other 2018-06-29 00:49:46 -04:00
Matt Brown
5f251a9d88 Allow intersection creation of interface then class 2018-06-28 18:13:06 -04:00
Matt Brown
ffda44c3ba Fix #838 - check assertions, even outside conditionals 2018-06-25 18:02:05 -04:00
Matt Brown
11240eb193 Fix #826 allow better template replacements 2018-06-19 13:19:41 -04:00
Matthew Brown
3670f066bb Improve dead code detection 2018-06-16 20:01:41 -04:00
Matthew Brown
dc02ca8a7a Fix - #816 - check we’re not just replacing a key with itself 2018-06-13 08:38:07 -04:00
Matt Brown
45a94af015 Fix #814 - remove literal types when removing base key 2018-06-12 11:19:35 -04:00
Matthew Brown
3891b08fc2 Fix #812 - deal with errant colon without crashing 2018-06-12 09:11:13 -04:00
Matt Brown
54893fdd55 Fix #808 - detect badly-placed ampersand early 2018-06-11 17:23:28 -04:00
Matthew Brown
3a2fa99969 Improve coverage of Reconciler and fix issues with float type comparison 2018-06-10 10:48:19 -04:00
Matthew Brown
3a3c10d044 Improve handling of ? before type 2018-06-08 23:54:07 -04:00
Matt Brown
29a971d40e Fix #793 - make sure in_array informs literal types 2018-06-08 13:53:42 -04:00
Matthew Brown
dfc32216b3 Fix #800 - treat array access offsets as mixed for reconciliation purposes 2018-06-08 09:31:21 -04:00
Bruce Weirdan
6ecea35837 array_column return type inference (#787)
* Exception message typo fixed

* array_column return type inference

It takes a safe approach and only tries to be smart when array row type
is definite single shape

* cs fix
2018-05-31 21:14:06 -04:00
Matt Brown
2b697a34f8 Fix #786 - improve treatment of array isset checks 2018-05-31 15:07:03 -04:00
Matt Brown
eb10b15cfc Improve reliability of elseif resolution 2018-05-30 18:56:44 -04:00
Matthew Brown
81ae1ca222 Fix #747 - allow Generator to replace Traversable in templated params 2018-05-28 22:26:43 +01:00
Matt Brown
772fd496b7 Fix issue with array_key_exists not having an effect 2018-05-24 12:23:50 -04:00
Matt Brown
056194bde5 Fix issues that cause exceptions 2018-05-21 18:33:39 -04:00
Matt Brown
aebbd473d9 Fix issues reconciling class-string params to actual types 2018-05-21 12:40:39 -04:00
Matthew Brown
228337415b Fix #761 - add support for class constants in enums 2018-05-21 00:46:56 -04:00
Matthew Brown
38252689b9 Remove typehints 2018-05-20 17:31:04 -04:00
Matthew Brown
5bd9ba6207 Make TClassString inherit from TLiteralString 2018-05-20 00:27:53 -04:00
Matthew Brown
34a39b895c Support checks for array emptiness 2018-05-19 20:31:48 -04:00
Matthew Brown
ea465852e1 Move TypeCombination logic into its own class 2018-05-19 19:44:03 -04:00
Matt Brown
c6aa396dea Fix #741 - make sure closures are cloned properly 2018-05-18 17:47:40 -04:00
Matthew Brown
b0733254bb
Use individual type objects for each string (#757)
* Experiment with individual types for each string

* Fix bunch of errors

* Fix a few more issues

* Fix a whole bunch of bugs

* Fix most remaining bugs

* Fix isset warnings

* Fix psalm errors in psalm

* Limit big string size

* Fix falsiness of ints

* Fix issue with type widening, allowing value set in nested if to be altered

* Don’t complain if type is mixed

* Add skipped-for-now test

* Add specific test to address issue
2018-05-18 11:02:50 -04:00
Matt Brown
3263b64301 Filter conditions better when encountering parent instanceof 2018-05-16 11:47:39 -04:00
Matt Brown
a0281e5716 Improve clause eradication after ifs 2018-05-14 16:29:51 -04:00
Matt Brown
02d65b617b Allow weak comparison between floats and ints 2018-05-14 12:02:06 -04:00
Matt Brown
58c68c355e Allow weak equality between scalar types 2018-05-14 10:36:41 -04:00
Matthew Brown
d46997b196 Make sure weak equality clauses don’t generate ParadoxicalCondition 2018-05-13 01:27:45 -04:00