ralila
8fb2e0f885
Handle some partials
2021-12-04 21:55:53 +01:00
ralila
fdaed941ad
use return type hints instead of php doc "@return void"
2021-11-26 20:59:41 +01:00
orklah
e2bb9859e4
fix tests
2021-11-01 22:27:43 +01:00
orklah
1efe272aed
stub for is_a
2021-10-12 22:12:51 +02:00
Matt Brown
d93c30d997
Fix Never test for latest PHP Parser
2021-05-03 16:59:24 -04:00
Bruce Weirdan
d57dde0d15
Allow phantom classes in instanceof expression ( #5498 )
...
Fixes vimeo/psalm#5481
2021-03-29 00:11:45 -04:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Bruce Weirdan
04bb2b1182
Prevent invalid Traversable implementation ( #5171 )
...
* Prevent invalid Traversable implementation
Fixes vimeo/psalm#5167
* Document new issue
* CS fix
2021-02-06 22:10:05 -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
Bruce Weirdan
d659957b88
Resolve class aliases when accessing properties ( #5068 )
...
* Resolve class aliases when accessing properties
* Moved Properties::getClasslikeStorage() to ClassLikes::getStorageFor()
2021-01-21 19:38:17 -05:00
Matt Brown
324e9d11c3
Fix tests
2020-11-08 11:04:39 -05:00
Matt Brown
3e9c5d3600
Add support for @return never
2020-11-04 12:30:02 -05:00
Matt Brown
6922caf9f6
Fix #4466 use better differentiation for class_exists second param
2020-11-01 13:14:17 -05:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
afce2dc66f
Tighten up rules around instantiation a bit more
2020-08-06 10:18:55 -04:00
Brown
c0b0036109
Fix #3934 - prevent unsafe use of new static
2020-08-05 19:39:27 -04:00
Brown
e3ff856cac
Improve treatment of static in intersection
2020-03-27 19:17:44 -04:00
Brown
1bfc61d402
Allow final classes to bypass static checks
2020-03-24 18:14:10 -04:00
Brown
ec34a16291
Warn about invalid static returns
2020-03-24 18:00:20 -04:00
Matthew Brown
f128c8ffda
Fix overriding of mapped property type visibility
2020-03-11 17:41:05 -04:00
Matthew Brown
1dc26afb27
Fix #2958 - prevent overriding final methods
2020-03-10 21:26:02 -04:00
Brown
2c8688dd97
Don’t crash when conditionally defining classes with properties
2020-03-09 14:24:19 -04:00
Matthew Brown
aea33824e6
Fix #1555 - allow phantom class constants
2020-02-18 19:46:05 -05:00
Brown
8989737e51
Fix #2775 - use lowercase strings in a couple more places
2020-02-13 17:44:16 -05:00
Matthew Brown
07a53f6b81
Fix #2789 - Numeric should not be a reserved class name
2020-02-11 22:34:34 -05:00
Matthew Brown
872365f444
Fix #2539 - use unaliased parent class name
2020-01-01 17:23:13 -05:00
Bruce Weirdan
33142e7637
Use unalised trait name when importing aliased trait ( #2393 )
...
Fixes vimeo/psalm#2392
Refs vimeo/psalm#2278
2019-11-29 01:21:00 -05: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
f8a2eae0e2
Fix #2186 - use expanded class name for aliased class
2019-09-30 22:15:48 -04:00
Matthew Brown
5d94e340ee
Remove unused suppressions in tests
2019-08-18 15:34:32 -04:00
Brown
a4d57e5524
Fix #2018 - prevent fatal error on class_aliased class reference
2019-08-15 10:17:27 -04:00
Matthew Brown
90854c4094
Fix broken behaviour when analysing interface test methods
2019-07-28 19:44:36 -04:00
Matthew Brown
ab50c6ce2e
Fix #1949 - check that aliased name doesn’t exist before transforming
2019-07-17 20:33:44 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
802016757c
Fix #1891 - don’t enter class_alias if the class doesn’t exist
2019-07-04 15:46:24 -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
602bae3bb3
Allow class_exists(..., false) to inform class-string type
2019-05-28 13:16:09 -04:00
Matthew Brown
69150d503a
Fix #1682 - correct arg check
2019-05-26 16:26:47 -04:00
Matthew Brown
d51ee033ce
Skip broken test
2019-05-26 14:22:28 -04:00
Matthew Brown
720ad42ab9
Fix test
2019-05-26 13:34:07 -04:00
Matthew Brown
8b9de8bba6
class_esists check with false arg shouldn’t count
...
Fixes #1682
2019-05-26 13:16:44 -04:00
Matthew Brown
ea930b8875
Fix interface_exists after class_exists check
2019-05-20 20:57:59 -04:00
Matthew Brown
1e853800a3
Fix #1657 - allow interface_exists to generate class-string assertion
2019-05-19 15:56:04 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
Brown
b3a59d2638
Fix #1435 - prevent classes extending interfaces
2019-03-07 11:16:40 -05:00
Bruce Weirdan
9bdc9f774f
More provider typing
2019-03-02 08:43:19 -05:00
Matthew Brown
17541b415f
Fix #1191 - allow Psalm to check against different versions of PHP
2019-02-07 12:25:57 -05:00
Matthew Brown
bf8f76671b
Don’t crash when suppressing UndefinedClass with bad params
2019-01-05 12:59:12 -05:00
Matthew Brown
87052537cf
Fix #1167 - don’t worry about AbstractInstantiation when it could be a descendant
2019-01-04 12:28:00 -05:00
Matthew Brown
0f6ce983f4
Fix #1154 - parent::foo() calls should not cause exception when parent does not exist
2018-12-30 18:28:15 +01:00