mu3ic
c8748dc5c9
Add trim() in global use
2023-12-14 09:54:32 +03:00
mu3ic
2ce340782e
Fix Uncaught RuntimeException: PHP Error: Uninitialized string offset 0 when $pattern is empty
2023-12-14 09:44:28 +03:00
orklah
3bc8cde539
Merge pull request #10488 from kkmuffme/invalidargument-false-not-true-param
...
add InvalidArgument error when passing false to true param
2023-12-13 18:48:51 +01:00
kkmuffme
d04694f4d4
Fix https://github.com/vimeo/psalm/issues/9267
2023-12-13 15:30:43 +01:00
kkmuffme
6363b57c33
fix bug equality assertion with int and float setting wrong type - required so previous commit works
2023-12-13 14:43:55 +01:00
kkmuffme
e6f24d91fd
Fix https://psalm.dev/r/aada187f50 where 2 union types are not intersected and the condition contains both types
2023-12-13 14:10:22 +01:00
kkmuffme
108f626712
fix literal int/string comparisons only using one literal
...
Fix https://github.com/vimeo/psalm/issues/9552
2023-12-13 13:59:26 +01:00
orklah
93c7a8fd63
Merge pull request #10452 from theodorejb/patch-1
...
Fix remaining POSIX-only absolute path detection
2023-12-07 18:08:57 +01:00
Theodore Brown
b5ee6e0d8b
Replace remaining POSIX only absolute path detection
...
These were missed in #10441 . Fixes "Could not resolve config path" error on Windows (#10418 ).
2023-12-06 13:48:06 -06:00
4ed0fe934f
Fix shaped array class string key combination
2023-12-06 14:12:19 +01:00
390df68966
Merge branch '5.x' into fix_literal_union_key
2023-12-03 20:55:05 +01:00
37cf82ea52
Merge branch '5.x' into fix_literal_union_key
2023-12-03 20:50:05 +01:00
18a6c0b6e9
Implement by-ref closure use analysis
2023-12-03 15:28:51 +01:00
orklah
0659967d05
Merge pull request #10429 from tscni/fix/trait-call-static
...
Fix static magic method pureness not being inherited from traits
2023-12-02 14:30:49 +01:00
orklah
794bdaac4f
Merge pull request #10422 from tscni/fix/match-null-coalesce
...
Restore support for null coalesce on match expressions
2023-12-02 14:29:20 +01:00
2e249ab3fa
Create keyed arrays when assigning literal union keys
2023-12-01 16:03:08 +01:00
Tinjo Schöni
4f458b46bc
Fix static magic method pureness not being inherited from traits
...
https://github.com/vimeo/psalm/pull/10385 "broke" this by propagating pseudo static methods from traits to using classes.
`AtomicStaticCallAnalyzer` was then not capable of dealing with this, because now these static pseudo methods actually exist.
As long as the methods from traits aren't actually transferred to the using class, it seems right that the logic in `AtomicStaticCallAnalyzer` uses `::getDeclaringMethodId()` instead of `::getAppearingMethodId()` for this purpose.
2023-11-29 23:22:14 +01:00
kkmuffme
4f25ccee40
update define types to be correct
2023-11-29 08:51:15 +01:00
Tinjo Schöni
d91aab15be
Restore support for null coalesce on match expressions
...
https://github.com/vimeo/psalm/pull/10068 added isset restrictions that didn't consider null coalesces on match expressions.
This restores that support by converting the match expression to a virtual variable for the isset analysis, similar to other incompatible expressions.
2023-11-29 02:08:23 +01:00
kkmuffme
00bed512af
suppress false positive
2023-11-18 08:55:20 +01:00
kkmuffme
adb8677f20
Fix optional args not enforced in callable (fix for non-closure/arrow functions of https://github.com/vimeo/psalm/issues/8438 ) Fix array callables not treated as callable https://psalm.dev/r/23f3787207 (this is needed to fix the optional args enforcement for array callables too)
2023-11-18 08:55:20 +01:00
kkmuffme
c5655c510d
Fix param providers for native methods not working Fix array_filter params callable incorrect required params depending on the 3rd argument value (at this commit psalm doesn't report an error, due to https://github.com/vimeo/psalm/issues/8438 , which gets fixed by this PR later on though) Fix https://github.com/vimeo/psalm/issues/3047 and further improve types for array_multisort and add errors for invalid params Fix SimpleTypeInferer failing on bitwise operations with constants
2023-11-18 08:55:20 +01:00
kkmuffme
88e3cda3b9
remove unused function, fix unusedVariable error after suppress
2023-11-13 20:24:58 +01:00
kkmuffme
dcd53cadab
Suppressing NoValue should not treat subsequent code as unevaluated
...
Fix https://github.com/vimeo/psalm/issues/10302
2023-11-13 18:57:41 +01:00
ec23f998ea
Finalize all internal classes
2023-10-26 17:00:29 +02:00
Daniel Linjama
a375f441f2
fix @param-out with named arguments
2023-10-23 10:39:09 +03:00
4c656f0a2b
Revert
2023-10-21 20:50:08 +02:00
596ee11d0d
cs-fix
2023-10-21 20:48:06 +02:00
3b66272aa0
More rector fixes
2023-10-21 20:45:09 +02:00
cddf6a9a57
Rector fixes
2023-10-21 20:44:04 +02:00
8ca610ae60
Fix
2023-10-19 11:23:24 +02:00
576e4d2bc4
Fix method calls and property accesses after extension_loaded
2023-10-19 11:16:20 +02:00
robchett
e2d1e83b87
Fix memory explosion with calls to method_exists
2023-10-17 19:15:23 +01:00
orklah
b432d812fb
Merge pull request #10274 from tuqqu/enum-case-value-type-from-class-constant
...
Fix inferring enum case value from a class constant
2023-10-16 20:25:11 +02:00
orklah
c9c3067044
Merge pull request #10279 from trusting-thompson/final-static-constant-type
...
fix final class constant type
2023-10-16 20:24:25 +02:00
Daniel Linjama
545e21b56b
fix final class constant type
2023-10-13 14:18:58 +03:00
tuqqu
d0825b5fe2
Fix for inferring enum case value from a class constant, const test fix
2023-10-13 01:15:05 +02:00
tuqqu
6039e2be9b
Fix for inferring enum case value from a class constant
2023-10-10 22:56:36 +02:00
cgocast
e0c24cbe7a
Remove unused parents_nodes
2023-10-02 15:38:01 +02:00
cgocast
6eb40e7897
Fix code style
2023-10-02 15:22:57 +02:00
cgocast
94a98ccddd
Allow tainted numerics except for 'html' and 'has_quotes'
2023-10-02 15:08:26 +02:00
orklah
2d3a625379
Merge pull request #10230 from ging-dev/lsp
...
feat(LSP): Improve the autocomplete for nested array shape
2023-09-28 23:42:02 +02:00
orklah
f57088646b
Merge pull request #10191 from boesing/bugfix/inherited-conditional-return-types
...
Resolve inherited conditional return types
2023-09-28 23:08:20 +02:00
orklah
bbcf50396d
Merge pull request #10189 from boesing/feature/inherited-assertions-v2
...
Inherited assertions v2
2023-09-28 23:07:15 +02:00
ging-dev
45807e27b8
feat(LSP): Improve the autocomplete for nested array shape
2023-09-26 01:52:23 +07:00
robchett
03e8d19eec
Only the binary op 'plus' works with two arrays
...
Treat the result of any other operation as int|float
Fixes #2123
2023-09-16 15:55:59 +01:00
Maximilian Bösing
7c8a5e8b09
bugfix: resolve recursive conditional return types containing templates
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-11 00:04:01 +02:00
Maximilian Bösing
ad463f38e9
bugfix: always gather class templates
...
No clue why there are conditions on when templates are allowed to get picked up. I've removed this check which actually solves a problem in inherited assertions.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-10 22:17:30 +02:00
Maximilian Bösing
66c01813c1
refactor: move assertion detection based on inherited classes/interfaces into internal resolver
...
This also enables `ExistingAtomicStaticCallAnalyzer` to detect those inherited assertions.
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 11:09:23 +02:00
Maximilian Bösing
2a0ce2fecc
qa: add newlines to prevent exceeding 120 character line-length limit
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-08-28 01:15:49 +02:00