orklah
5c2336f4d0
skip a test because we removed the feature for now
2022-02-11 21:53:29 +01:00
8d0c1c62e8
Ensure all template parameters are specified in classes, interfaces, traits
2022-01-31 10:06:31 +01:00
AndrolGenhald
2fe4fc397c
Enable extensions based on composer.json instead of those loaded at runtime ( fixes #5482 ).
2022-01-27 16:30:14 -06:00
orklah
070a1cc7a3
fix merge induced errors
2022-01-22 18:05:32 +01:00
orklah
af1888b631
Merge remote-tracking branch 'upstream/4.x' into upstream-master4
2022-01-22 17:48:42 +01:00
78a125ab95
Fix
2022-01-19 12:33:16 +01:00
d970661182
Add separate issue
2022-01-19 12:20:50 +01:00
cee9eb0ead
PHP 8.1: Report missing typehints in overridden native methods
2022-01-19 12:06:35 +01:00
Matthew Brown
b49682a485
Simplify issue suppression in tests
2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys ( #7386 )
...
* Transformation that updates assertions
* Simplify transformation
* Ensure that all tests have keys
* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
8fb2e0f885
Handle some partials
2021-12-04 21:55:53 +01:00
ralila
711be643c6
Import instead of using fqn exceptions
2021-12-03 20:29:06 +01:00
Bruce Weirdan
d19aad7db1
Display target PHP version
...
Historically it was often not quite clear to users what PHP version
Psalm assumes, and why. This PR addresses this issue by printing the
version and where we got it from right before scanning the files.
2021-11-27 02:18:09 +02: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
Aleksandr Zhuravlev
65407cc10d
Got rid of test
2021-09-16 23:07:32 +12:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
orklah
55079e92fe
Mixed contains everything ( #5763 )
2021-05-14 20:23:54 -04:00
Vincent Langlet
587b144f0e
Check for ParamName even for method with only one param ( #5732 )
...
* Check for ParamName even for method with only one param
* Fix tests
2021-05-08 19:33:48 -04:00
Bruce Weirdan
93946d0827
Forbid rejecting named arguments when parent allows them ( #5627 )
...
Fixes vimeo/psalm#5622
2021-04-15 06:55:13 -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
Matt Brown
cafbdb6831
Fix #5264 - use accurate static type when calling parent method in trait
2021-02-23 20:48:22 -05:00
Matt Brown
def7326ae1
Remove static from return type when final
...
Fixes #5244
2021-02-23 19:06:45 -05:00
Matt Brown
6f30399189
Fix #5070 – fix static return type inference in static methods
2021-01-22 09:58:09 -05:00
Matt Brown
e6dad6e65f
Be smarter when choosing inherited param types
...
Ref #4803
2020-12-10 00:15:37 -05:00
Matt Brown
387ab14bda
Use better stubs for Serializable and SoapClient
2020-12-08 11:27:51 -05:00
Matt Brown
db8a3ab846
Fix #4751 - allow MethodSignatureMismatch to be overridable when info comes from docblock
2020-12-02 15:13:28 -05:00
orklah
b6a3282589
Detect redundant cast ( #4695 )
...
* detect redundant cast
* fix redundant cast issues
* fix redundant cast in tests
2020-11-25 12:04:48 -05:00
Matt Brown
3dd185e395
Fix #4537 - use more rigorous inerhitance for return and param types
2020-11-12 13:54:27 -05:00
Matt Brown
ec3501b244
Ensure PHP 8 continuation of 7.4 method signature features
2020-10-03 23:34:29 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
877a81f808
Always detect return type mismatches from docblock parents
2020-09-07 16:42:25 -04:00
Brown
6def99d653
Add ConstructorSignatureMismatch issue distinct from MethodSignatureMismatch
2020-08-10 12:26:25 -04:00
Matthew Brown
6085e42fc1
Detect mismatching param names effectively
2020-08-10 09:58:43 -04:00
Brown
c0b0036109
Fix #3934 - prevent unsafe use of new static
2020-08-05 19:39:27 -04:00
Brown
cb94764d22
Prevent false-positive for Exception::__toString overriding
2020-07-02 14:09:56 -04:00
Grégoire Paris
e7b8983b7e
Make Throwable methods overridable ( #3203 )
...
Methods from \Exception cannot be overriden, but that does not mean
methods from \Throwable cannot be.
Closes #3202
2020-04-20 17:17:47 -04:00
Brown
4f07a8fc5d
Fix false positive in trait comparison in 7.4
...
Fixes #3042
2020-04-03 15:11:37 -04:00
Brown
467da32f84
Fix instanceof static and isa (static::class) handling
2020-03-24 18:58:15 -04:00
Brown
dbdf7473f4
Fix abstract trait method implementation errors when using self
2020-01-24 11:15:35 -05:00
Brown
0132b3789b
Fix #2665 - warn about abstract class interface inheritance issues
2020-01-21 11:46:51 -05:00
Matthew Brown
c50fa27025
Identify trait method access level violations as less serious
2020-01-17 00:28:08 -05:00
Matthew Brown
257ebfd205
Improve trait method mismatch failure rules
2020-01-16 22:36:30 -05:00
Matthew Brown
d1c4c85f97
Support covariant return types & contravariant param types
...
Fixes #2102 and #2264
2019-11-27 00:19:36 -05:00
Bruce Weirdan
79acbadfad
Added InvalidParent issue ( #2320 )
...
Refs vimeo/psalm#2304
2019-11-11 00:21:43 -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
Brown
3de056cdc2
Remove test that’s a bit broken
2019-10-04 14:00:53 -04:00
Jay Klehr
27961045a0
allowing null as type for mysqli real_connect for host and passwd parameters ( #2210 )
2019-10-04 13:07:28 -04:00