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

187 Commits

Author SHA1 Message Date
feek
a19f738967
feature: universal object crates (#3948)
* feature: universal object crates

* docs: document universal object crate config option

Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:39:48 +01:00
Matt Brown
510f1e75cd
Promoted properties are always initialized 2021-01-29 11:39:45 +01:00
Matt Brown
613ce96582
Support property type promotion ref #4089 2021-01-29 11:39:45 +01:00
Brown
c0bf0a8fa7
Fix #4198 - make analysis of class-string property assignments more robust 2021-01-29 11:39:39 +01:00
Brown
168972e91a
Fix #4178 - always detect missing property types 2021-01-29 11:39:36 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
Brown
e5aae7f9e6
Support PHP 8 union types 2021-01-29 11:38:49 +01:00
Brown
c96ba8d1f5
Add some backwards-incompatible changes for 4.x 2021-01-29 11:38:48 +01:00
Bruce Weirdan
1cc4715740
Fix windows tests (#4040)
* Fix windows tests by not mangling the expectations

* Use platform-dependent directory separator in expected messages

* fix CS
2021-01-29 11:38:04 +01:00
Brown
c0b0036109 Fix #3934 - prevent unsafe use of new static 2020-08-05 19:39:27 -04:00
Brown
b168777236 Fix #3924 - remove descendants after reconciled change 2020-08-03 02:06:42 -04:00
Brown
fd4ced42a7 Don’t register new assignment inside isset expr 2020-07-31 12:44:01 -04:00
Brown
23f5d66516 Fix #3897 - support aliasing final methods 2020-07-26 14:46:52 -04:00
Matthew Brown
ab714a40c4 Allow binding of static to current final class
Ref #3892
2020-07-25 17:26:07 -04:00
Brown
6bdff42cda Add support for potentially-assigned properties 2020-07-08 11:46:55 -04:00
Brown
f72b609d42 Fix #3642 - detect missing property when name matches 2020-06-23 13:12:46 -04:00
Brown
8a0776c8e5 Fix tests 2020-06-11 12:19:34 -04:00
Brown
db67be5965 Fix #3483 - analyse variable static property access properly 2020-05-29 09:28:34 -04:00
Matthew Brown
1b752d06ab Fix #3201 - add additional constraints on constructor initialisation 2020-04-21 00:04:47 -04:00
Brown
2d4381eb4e Fix #3096 - forget clauses in context after call 2020-04-08 01:03:37 -04:00
Brown
99549871b6 Fix tests 2020-04-06 18:16:14 -04:00
Matthew Brown
c986cdf12e Allow edge-case of by-reference assignment with unitiliazed property
Fixes #3003
2020-03-21 19:23:32 -04:00
Matthew Brown
c85fa9083d Fix #2915 - prevent "if (true)" and similar 2020-03-15 22:23:31 -04:00
Matthew Brown
a2a507166d Fix #2923 - remove hack to fix a template issue 2020-03-06 09:42:23 -05:00
Matthew Brown
b3f6b56f9c Add support for @psalm-readonly-allow-private-mutation 2020-02-02 15:56:08 -05:00
Matthew Brown
ba8eb264d4 Fix test 2020-02-02 15:37:37 -05:00
Matthew Brown
93fc1b1cc7 Fix #2729 - allow mutation of otherwise-readonly properties 2020-02-02 15:35:12 -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
Brown
e68ca6a20b Fix #2661 - catch invalid array_push on property 2020-01-22 09:57:59 -05:00
Matthew Brown
2f2cd85a6a Identify invalid static property array assignment 2019-12-27 10:34:51 -05:00
Matthew Brown
4052e6dfac Allow isset to check for property initialisation
Ref #2382
2019-11-28 09:12:17 -05:00
Matthew Brown
dc0dd08a67 Fix test 2019-10-29 19:46:36 +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
Matthew Brown
85ae8f93d2 Clear out property assignments when necessary 2019-09-07 18:34:18 -04:00
Matthew Brown
37d09cdefa Fix call to impure function 2019-08-31 15:01:53 -04:00
Brown
1cb8c3f6c4 Infer missing docblock-supplied types from constructor
Fixes #2071
2019-08-27 10:37:39 -04:00
Brown
fef61e996e Propagate possibly-null issues onto fetched properties 2019-08-23 13:27:38 -04:00
Brown
4046b44903 fix #2010 - properties with defaults should work with static type 2019-08-12 14:29:14 -04:00
Matthew Brown
7ed30cd5b0 Add support for @readonly annotation 2019-08-11 16:01:37 -04:00
Matthew Brown
7c6b1581d3 Add warnings about uninitialised properties to mixed as well 2019-08-11 00:22:28 -04:00
Matthew Brown
f718c2fca1 Fix #1974 - prevent bad property defaults on static properties 2019-07-29 22:18:46 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
cb28c44228 Fix #1873 - allow spread operators in inferred property types 2019-06-28 22:28:35 -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
db38270a6a Clone closure param types before combining 2019-06-20 19:09:10 -04:00
Brown
d1630863ad Fix #1787 - prevent initialisation when nullable isn’t set 2019-06-14 16:53:40 -04:00
Brown
aa2fde521a Fix #1703 - infer properties from class params 2019-06-10 12:00:32 -04:00
Matthew Brown
93f81f599e Fix #1764 - prevent UndefinedInterfaceMethod error when checking initialisation 2019-06-09 09:18:05 -04:00
Matthew Brown
f5e4b9b45f Fix #1713 - don’t crash when a property is unset 2019-05-31 19:49:24 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00