Matt Brown
96e0743892
Fix #5325 – remove all memoised methods when calling a method with property mutations
2021-03-05 00:39:25 -05:00
Matt Brown
924f6b6f94
Propagate mutation removal up the context parent tree
...
Fixes #5231
2021-02-25 18:11:58 -05:00
Matt Brown
257a1ca672
Fix #5194 - don’t warn when redefining core class properties
2021-02-11 14:12:25 -05:00
Matt Brown
044602a244
Fix #5196 - fix type before assigning default property values
2021-02-11 09:38:04 -05:00
Matt Brown
2b9d307cab
Fix #5184 - remove this vars from parent context where possible
2021-02-09 10:23:22 -05:00
Matt Brown
3be1bb7342
Limited fix for #5028
2021-02-07 22:56:37 -05:00
Barney Laurance
0cd5442c47
Enforce property type invariance ( #5131 )
...
* Implement NonInvariantChildProperty detection
See https://github.com/vimeo/psalm/issues/4184
* Delete test cases with 'parentSetsWiderTypeInConstructor'
As I understand it these are not valid test cases. They
emit NonInvariantPropertyType issues which seems correct - the property
type variation is I think a latent bug in the sample code.
* Reduce shortcode for NonInvariantPropertyType to 1+max used shortcode on master
2021-01-31 11:32:24 -05:00
Matt Brown
3c58220f3a
Fix #5097 - memoise more things during null coalesce
2021-01-26 23:10:57 -05:00
Matt Brown
4378bec917
Fix #5025 - prevent crash in assert function during reflection
2021-01-17 12:08:19 -05:00
Matthew Brown
7764a4ce6c
Fix #4912 - detect mismatching property type
2020-12-29 16:37:03 +00:00
Matt Brown
a27c674cee
Add test for #4825
2020-12-10 13:51:49 -05:00
Matt Brown
2a92025737
Union types if stmt already has one
2020-12-10 01:40:20 -05:00
Matt Brown
b7a7e2fb87
Fix get magic property checks
2020-12-10 01:29:07 -05:00
Matt Brown
524084a64c
Tighten up rules arouund when mutation-free methods get memoised
2020-12-08 16:39:06 -05:00
Matt Brown
4d1aae43f9
Fix #4778 - remove already-initialized properties when checking initialisation
2020-12-06 11:07:59 -05:00
Matt Brown
51a92aa223
Fix interface property regression
2020-12-03 11:13:10 -05:00
Matt Brown
833f132cb3
Fix #4760 - prevent unpacked vars from breaking call when checking unitialised properties
2020-12-03 10:12:54 -05:00
Matt Brown
e7f9ce6da0
Break out RedundantCast issues
2020-12-01 17:25:45 -05:00
Matthew Brown
60ac109c01
Add RedundantPropertyInitializationCheck ( #4732 )
...
* Add RedundantPropertyInitializationCheck
* add documentation for RedundantPropertyInitializationCheck (#4734 )
Co-authored-by: orklah <orklah@users.noreply.github.com>
2020-11-29 11:57:20 -05:00
Matt Brown
14616b707a
Remove unset thing
2020-11-29 09:38:58 -05:00
Matt Brown
0efd4ebd7d
Detect some erroneous issets
2020-11-29 09:26:39 -05:00
Matt Brown
5a62dc5c40
Fix #4540 - use correct method when simulating property setting
2020-11-12 23:56:29 -05:00
feek
cc684eeccd
feature: ensure universal object crate class exists ( #4375 )
2020-10-20 17:17:49 -04:00
orklah
ceaaa39ec3
improve phpdoc ( #4352 )
2020-10-17 12:36:44 -04:00
feek
8d2db4e673
feature: universal object crates ( #3948 )
...
* feature: universal object crates
* docs: document universal object crate config option
Co-authored-by: Matthew Brown <github@muglug.com>
2020-10-07 09:56:21 -04:00
Matt Brown
2cd306b75c
Promoted properties are always initialized
2020-10-02 19:44:58 -04:00
Matt Brown
211553c53f
Support property type promotion ref #4089
2020-10-02 18:31:32 -04:00
Brown
ef3cf67f50
Fix #4198 - make analysis of class-string property assignments more robust
2020-09-20 09:18:35 -04:00
Brown
f180fb23bc
Fix #4178 - always detect missing property types
2020-09-13 16:50:50 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
f34e54ec41
Support PHP 8 union types
2020-08-30 13:16:37 -04:00
Brown
92239add4d
Add some backwards-incompatible changes for 4.x
2020-08-30 11:44:14 -04:00
Bruce Weirdan
4dcb7183f5
Fix windows tests ( #4040 )
...
* Fix windows tests by not mangling the expectations
* Use platform-dependent directory separator in expected messages
* fix CS
2020-08-22 10:00:36 -04: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