1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 09:47:29 +01:00
Commit Graph

679 Commits

Author SHA1 Message Date
Matthew Brown
43189b3d55 Allow types to be traversed 2020-03-14 23:54:51 -04:00
Matthew Brown
0aca01faea Improve fix to #2805 2020-03-14 01:09:12 -04:00
leightonthomas
60fb3924bc Fix #2914 - falsable functions who only expect true now produce errors 2020-03-09 14:25:18 -04:00
Brown
3c416482ec Fix #2932 - don’t crash when trying to expand callable object-like array 2020-03-09 10:56:37 -04:00
Matthew Brown
f44c3488eb Keep track of which arg a given template was assigned from
Fixes #2900 - We only care about the depth of a templated match when templating from a particular argument. The next argument should essentially start afresh
2020-03-01 12:27:18 -05:00
Matthew Brown
e0d555e203 Allow function names to passed in as strings for callable template resolution 2020-02-29 15:43:45 -05:00
Matthew Brown
1f19aed31b Fix support for replacing mocked types in own classes 2020-02-27 21:36:03 -05:00
Brown
748abaf02a Add params required for 7.1 2020-02-27 18:56:33 -05:00
Brown
35c1670602 Fix #2875 - treat intersections more similarly than before 2020-02-27 18:42:15 -05:00
Matthew Brown
746f8d4973 Prevent returning named object where template return assumed 2020-02-24 23:14:16 -05:00
Matthew Brown
3cc4c2b37e Fix #2721 - only warn about deprecated classes exactly where they are used 2020-02-22 01:12:19 -05:00
Matthew Brown
d8b6467b1a Fix #2852 - no duplicatearraykey warning for non string-keyed arrays 2020-02-21 01:27:42 -05:00
Matthew Brown
9bdca3c706 Forbid array<mixed, ...> 2020-02-21 01:26:51 -05:00
Brown
9230b425e7 Ors can still be created directly from conditions 2020-02-18 12:12:34 -05:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Matthew Brown
fb5a0c39cb Fix #2819 - improve negated assertions on templates 2020-02-14 11:18:47 -05:00
Brown
1c42875179 Support lowercase-string and warn about unnecessary calls to strtolower 2020-02-13 16:38:58 -05:00
Brown
f141f7c526 Improve --diff checks by including trait-using classes in dependents 2020-02-11 16:39:33 -05:00
Brown
2abe76d3c2 Fix assertion generation 2020-02-10 17:27:46 -05:00
Matthew Brown
47ffb59241 Fix #2764 - iterate through all possible template types where necessary 2020-02-09 18:11:50 -05:00
Brown
23f8967fb5 Fix conditional class-string template replacement 2020-02-06 19:40:18 -05:00
Brown
2a0dd48dcd Fix bad type 2020-02-06 17:31:17 -05:00
Brown
d5f71bf529 Localise template checks to class being tested 2020-02-06 16:38:45 -05:00
Brown
6116b457ed Port over more fixes from template match refactor 2020-02-06 15:07:57 -05:00
Brown
0fd0d01d2b Improve class-string templating 2020-02-06 14:35:36 -05:00
Matthew Brown
8db4bc7691 Improve formatting of intersection error messages
Also reduce false positives on intersections of templates
2020-02-02 12:25:24 -05:00
Matthew Brown
292f6e797f Only make directly-assertable things possibly-undefined
Ref #2724
2020-02-01 10:58:13 -05:00
Brown
3b6f53a356 Revert "Fix #2724 - make sure behaviour is not dependent on array type"
This reverts commit 1df03b0ff2.
2020-01-31 17:25:15 -05:00
Brown
1df03b0ff2 Fix #2724 - make sure behaviour is not dependent on array type 2020-01-31 16:46:05 -05:00
Brown
37765098e9 Fix #2725 - allow empty checks on objects that implement countable 2020-01-31 12:55:33 -05:00
Matthew Brown
5eb2ebc508 Add more type-system protections for bad array args 2020-01-29 23:41:17 -05:00
Pavel Batečko
ecf85aef12
Add generic definition of DOMNamedNodeMap (#2703)
* Fix #2638 - propagate phantom classes to recursive calls to Scanner::queueClassLikeForScanning()

* Add generic definition of DOMNamedNodeMap
2020-01-29 08:39:07 -05:00
Matthew Brown
dec274a1fe Fix list scanning 2020-01-27 09:07:22 -05:00
Matthew Brown
db7b537bd1 Fix missing class 2020-01-17 13:19:57 -05:00
Matthew Brown
8ccd4860e3 fclose should treat resource as passed-by-reference 2020-01-17 13:12:00 -05:00
Matthew Brown
7f093ca8ed Fix #2626 - allow assertions on resource types
Also fixes #2266
2020-01-17 11:55:16 -05:00
Matthew Brown
1697115861 Only set from docblock if not mixed 2020-01-17 10:34:13 -05:00
Matthew Brown
a840743015 Fix #2625 - set template as type from docblock 2020-01-17 10:27:00 -05:00
Matthew Brown
2c48d42904 Allow destructuring of callable array
Fixes #2653
2020-01-17 10:02:58 -05:00
Matthew Brown
389af1bfc7 Fix #2618 setting list param from docblock 2020-01-14 22:46:19 -05:00
Matthew Brown
c3edbdbc19 Allow checking $_SESSION for null without altering type 2020-01-14 21:51:04 -05:00
Brown
7482b9e56f Emit all stubs discovered by Psalm during analysis
Fixes #827
2020-01-08 17:23:40 -05:00
Matthew Brown
cc9e0fab67 Prevent string being used in non-empty-string location 2020-01-06 20:57:57 -05:00
Brown
8e786a17dd Deal with a reconciled var more accurately
Ref #2426
2020-01-06 11:09:07 -05:00
Matthew Brown
137650fe6f Fix #2556 - don’t remap params if they’ve already been remapped once 2020-01-06 09:18:16 -05:00
Matthew Brown
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Brown
bfbb9b2b34 Un-nest some logic 2020-01-02 16:59:19 -05:00
Matthew Brown
d175abe0f0 Improve templating for intersections 2020-01-01 13:31:41 -05:00
Matthew Brown
4630d19d45 Fix psalm running 2020-01-01 12:49:12 -05:00
Matthew Brown
16b8edd583 Fix #2409 - use more robust assertion parsing 2019-12-31 09:10:14 -05:00