1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00
Commit Graph

9203 Commits

Author SHA1 Message Date
Andreas Möller
e9142d6ea2
Fix: Keep packages sorted in composer.json 2021-08-27 11:02:49 +02:00
Andreas Möller
10534471fe
Fix: Require ext-ctype 2021-08-27 10:59:30 +02:00
Bruce Weirdan
5138be3e4b
Merge pull request #6359 from drupol/fix/update-iterator-getinneriterator-return-type 2021-08-27 02:17:06 +03:00
Pol Dellaiera
f0d54128b6 Update return type of getInnerIterator which is always returning an iterator. 2021-08-24 15:27:02 +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
6cf7660ad8 fix CS 2021-08-19 19:34:30 +02:00
orklah
7fd0d5f28e create real path for Psalm to stop ignoring suppressions 2021-08-19 19:31:58 +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
Nicolas Giraud
6cff8b627f Update also historical classmap. 2021-08-19 13:03:47 +02:00
Nicolas Giraud
e254ebf5d5 Allow object type to be given to array_walk and array_walk_recursive. 2021-08-19 12:03:06 +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
Maximilian Bösing
d4559f5ba3
qa: add failing test regarding recursive alias resolving
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-18 16:18:44 +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
Bruce Weirdan
9e1f7ade86
Merge pull request #4738 from BenMorel/is_subclass_of 2021-08-18 00:29:40 +03:00
Benjamin Morel
621c4dd8d1 Enforce class-string in is_subclass_of() 2021-08-17 23:14:11 +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
990723ce64
qa: rework unit test to use already available project_initializer
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 21:46:00 +02: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
Bruce Weirdan
fdd286f70c
Merge pull request #6328 from bdsl/internal-call-from-root-namespace-fix
Fix error message for call to internal method from root namespace
2021-08-17 21:38:08 +03:00
Bruce Weirdan
cc717f7267
Merge pull request #6324 from VincentLanglet/strsplit 2021-08-17 21:03:40 +03: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
Vincent Langlet
4b84793b2f Add false back for mb_str_split 2021-08-17 18:45:02 +02:00
Maximilian Bösing
7ab5d29e08
qa: add unit test to verify aliased interface is properly detected
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-08-17 18:40:18 +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
Vincent Langlet
1cdad83630 Remove false if length is positive int 2021-08-17 17:47:22 +02:00
piporoid
1df5f3012a Prevent @property annotations on class properties 2021-08-17 23:40:26 +09:00
Bruce Weirdan
285fa13d3a
Merge pull request #6323 from boesing/bugfix/atomic-non-empty-mixed
bugfix: add missing `TNonEmptyMixed` to `Atomic#create`
2021-08-17 12:26:52 +03:00
Vincent Langlet
786d926d78 str split return non empty 2021-08-17 11:03:54 +02: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
Bruce Weirdan
b343ae5b5a
Merge pull request #6320 from Forceu/master
Fix false positive when passing null to socket_select
2021-08-17 09:29:15 +03: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
Marc Ole Bulling
1818609f43 Fix for #6318 2021-08-16 19:23:10 +02:00
Bruce Weirdan
2e7763c314
Merge pull request #6311 from weirdan/fix-6309
Prevent failures when parsing in-array assertions
2021-08-16 03:52:54 +03:00
Bruce Weirdan
3e6f5bdc2f
Merge pull request #6312 from TysonAndre/fix-80-delta
Fix issues in php 8.0 delta
2021-08-16 03:06:59 +03:00
Bruce Weirdan
babfb6a637
Fix histories 2021-08-16 02:52:18 +03:00
Tyson Andre
ff72d2c92e Fix issues in php 8.0 delta
In a last minute change in php 8.0 after the feature freeze,
PhpToken::getAll was changed to tokenize

Also, https://www.php.net/manual/en/function.mb-get-info
has been around since php 4.2 - it's in psalm/dictionaries/CallMap.php
already with the same signature. Same for ReflectionNamedType::isBuiltin

Also, add signatures for getAttributes.

Also, use the same param names for fdiv that are found in reflection in
php 8.0 and 8.1 to support named arguments
2021-08-15 19:28:44 -04:00
Bruce Weirdan
f245c4ace7
Prevent failures when parsing in-array assertions
Fixes vimeo/psalm#6309
2021-08-16 01:23:48 +03:00