1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 02:07:37 +01:00
Commit Graph

6860 Commits

Author SHA1 Message Date
orklah
0825f220fe allow ternary to override previous type when reassigning 2021-09-04 20:22:06 +02:00
Bruce Weirdan
eb973ab2e1
Merge pull request #6335 from boesing/bugfix/recursive-class-aliases 2021-08-31 23:51:19 +03:00
Bruce Weirdan
b713140cc1
Merge pull request #6326 from piporoid/issue/2164
Prevent @property annotations on class properties
2021-08-31 23:46:56 +03:00
Bruce Weirdan
cbcc38aab8
Merge pull request #6339 from niconoe-/allow-object-on-array_walk 2021-08-31 23:45:10 +03:00
Bruce Weirdan
103b2b7244
Warn about array_walk_recursive over objects 2021-08-31 23:18:20 +03:00
Bruce Weirdan
624246b996
Merge pull request #6376 from orklah/use-variable-in-backtick 2021-08-29 04:39:13 +03:00
orklah
27b6d5ad3b fix psalm errors 2021-08-29 00:39:36 +02:00
orklah
10c20dc8f3 mark variable used in backticks as used 2021-08-29 00:26:52 +02:00
Bruce Weirdan
b370ce92aa
Report RawObjectIteration when array_walk is used on objects 2021-08-20 01:43:49 +03:00
Bruce Weirdan
9222b24ea1
Merge pull request #6321 from orklah/analyze-dynamic-classConstFetch 2021-08-20 01:06:56 +03:00
orklah
dbf3512b70 introduce $definite_class flag and use it to avoid using final keyword for simple inference 2021-08-19 23:19:59 +02:00
Bruce Weirdan
65f34d0d9f
Merge pull request #6346 from orklah/id-cache
remove cache after unsetting a key from a TKeyedArray
2021-08-19 22:01:44 +03:00
orklah
6ba8876153 remove cache after unsetting a key from a TKeyedArray 2021-08-19 20:40:25 +02:00
Bruce Weirdan
3cb28e6399
Merge pull request #6344 from orklah/vendor-suppressions
don't report UnusedSuppressions in non project dirs
2021-08-19 20:53:21 +03:00
Bruce Weirdan
230bdb43ad
Merge pull request #6345 from orklah/multiple_properties
use better solution to check for project dir paths
2021-08-19 20:53:07 +03:00
orklah
d416d46900 fix CS 2021-08-19 19:36:01 +02:00
orklah
ef34cbd321 use better solution to check for project dir paths 2021-08-19 18:49:28 +02:00
orklah
3e236fc2fe don't report UnusedSuppressions in non project dirs 2021-08-19 18:43:29 +02:00
Maximilian Bösing
c9aebe3082
bugfix: resolve recursive aliases in multiple methods
- `ClassLikes#hasFullyQualifiedClassName`
- `ClassLikes#hasFullyQualifiedInterfaceName`
- `ClassLikes#hasFullyQualifiedEnumName`
- `ClassLikes#hasFullyQualifiedTraitName`
- `ClassLikes#classExtends`
- `ClassLikes#classImplements`

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-18 16:37:08 +02:00
Maximilian Bösing
4e0484f283
bugfix: resolve recursive aliases
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-18 16:18:58 +02:00
orklah
2b37bdf253 get rid of the final check that was there only for static:: before 2021-08-17 23:40:03 +02:00
orklah
ee53c57952 add back alter blocks but remove renaming the $stmt->class part when it's a variable 2021-08-17 23:11:28 +02:00
Bruce Weirdan
e5b797c764
Merge pull request #6327 from boesing/bugfix/class-alias 2021-08-17 23:35:25 +03:00
Maximilian Bösing
158f2144b5
qa: use ClassLikes#getUnAliasedName instead of accessing the classlike_aliases
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 21:43:58 +02:00
Maximilian Bösing
5ef606a5f6
qa: avoid array_keys
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 21:39:53 +02:00
Barney Laurance
88276d7f1e Fix error message for call to internal method from root namespace 2021-08-17 18:54:57 +01:00
orklah
1bf7447685 small refactor, add LiteralClassString, remove alter code blocks 2021-08-17 18:51:59 +02:00
Maximilian Bösing
f8db5a0461
bugfix: enable ClassLikes to properly detect implementing class aliases
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 18:40:18 +02:00
piporoid
1df5f3012a Prevent @property annotations on class properties 2021-08-17 23:40:26 +09:00
Maximilian Bösing
cb244d5c1e
bugfix: add missing TNonEmptyMixed to Atomic#create
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 10:46:45 +02:00
orklah
7308c86bb2 fix build 2021-08-16 21:56:37 +02:00
orklah
9264ea5cbb Allow type inference on dynamic ClassConstFetch 2021-08-16 21:20:20 +02:00
Bruce Weirdan
f245c4ace7
Prevent failures when parsing in-array assertions
Fixes vimeo/psalm#6309
2021-08-16 01:23:48 +03:00
orklah
1e17069c24 Change > assertion back to @ and put back a perf threshold 2021-08-15 10:13:05 +02:00
Bruce Weirdan
a9ead63ae1
Revert "Assertions for Integer Range" 2021-08-14 18:06:41 +03:00
Matthew Brown
6cc5ba970a Fix tests 2021-08-14 10:45:32 -04:00
Matthew Brown
a4479761a7 Fix #3660 - ensure mixed percentage for file never drops below 0 2021-08-14 10:35:31 -04:00
Thomas Bley
04177496cc Fixed ReflectionException: Class \LanguageServerProtocol\TextDocumentContentChangeEvent does not exist 2021-08-14 05:54:36 +02:00
Bruce Weirdan
7ff2a660dd
Merge pull request #6233 from supersmile2009/fix-in-array-assert 2021-08-13 01:39:31 +03:00
Bruce Weirdan
568a9e0412
Prevented empty assertions
and simplified the code a bit.
2021-08-13 00:39:24 +03:00
Bruce Weirdan
6294e06955
Improve constant array inference
This fixes int offset inference and adds handling for array unpacks in
constant arrays. Mostly it's copy/pasted from `ArrayAnalyzer` with
further adjustments.

Fixes vimeo/psalm#6263
Fixes vimeo/psalm#6289
2021-08-12 20:39:21 +03:00
Bruce Weirdan
8f85f580da
Extract item handling 2021-08-11 01:18:23 +03:00
Bruce Weirdan
f9a75983f9
Use ArrayCreationInfo for is_list flag 2021-08-11 00:47:45 +03:00
Bruce Weirdan
b6ade31dd0
Use ArrayCreationInfo for can_create_objectlike flag 2021-08-11 00:39:56 +03:00
Bruce Weirdan
ba4f1db2cd
Use ArrayCreationInfo for class strings 2021-08-11 00:29:14 +03:00
Bruce Weirdan
47d3d31c47
Use ArrayCreationInfo for property types 2021-08-11 00:19:18 +03:00
Bruce Weirdan
abe5ef774c
Use ArrayCreationInfo for key and value types 2021-08-11 00:05:00 +03:00
Bruce Weirdan
a64a30cdda
Combine value types at once 2021-08-10 21:30:57 +03:00
Bruce Weirdan
a41d5c5b4f
Combine offset types at once 2021-08-10 21:23:13 +03:00
Bruce Weirdan
cf28859faf
Extract array type inference 2021-08-10 20:48:45 +03:00