Bruce Weirdan
375fe32992
Update tests/CallableTest.php
2024-03-20 05:32:13 +01:00
kkmuffme
e83530a6c1
report invalid callable if callable cannot be called like this from current context
...
Fix https://github.com/vimeo/psalm/issues/10823
Fix https://github.com/vimeo/psalm/issues/8509
2024-03-20 01:02:54 +01:00
kkmuffme
a59248f5a1
self, parent and static in callable are deprecated since PHP 8.2
...
Fix https://github.com/vimeo/psalm/issues/10837
2024-03-20 01:02:54 +01:00
Bruce Weirdan
f61c7e108f
Merge pull request #10805 from weirdan/10461-allow-more-callable-types-as-subtypes-of-callable
2024-03-20 00:17:24 +01:00
Bruce Weirdan
4b7957b789
Merge pull request #10829 from vimeo/isTypeContainedByType_flags
2024-03-20 00:13:38 +01:00
Bruce Weirdan
644ef8d573
Merge pull request #10832 from Ayesh/php84/nullability
2024-03-20 00:11:42 +01:00
45d9fbeb68
Merge pull request #10843 from kkmuffme/fix-psalm-6-notice-in-tests-config
...
Explicitly set value in config to fix warning in tests
2024-03-20 00:03:18 +01:00
kkmuffme
8efbf386c3
fix bad class
2024-03-19 21:17:26 +01:00
kkmuffme
ea825c626d
Explicitly set value in config to fix warning in tests
2024-03-19 21:06:20 +01:00
e8e1f47ddb
Merge pull request #10842 from kkmuffme/fix-tests-using-other-than-called-from-php-version
...
fix tests running with other than called PHP binary if called with a non-default PHP binary
2024-03-19 13:47:01 +01:00
kkmuffme
881546340c
fix tests running with other than called PHP binary if called with a non-default PHP binary
...
e.g. you run the tests with a php83 executable but your default php is PHP 7.4, it will suddenly change while running the tests leading to false positive errors
2024-03-19 13:26:25 +01:00
Ayesh Karunaratne
431977cb1d
[PHP 8.4] Fixes for implicit nullability deprecation
...
Fixes all issues that emits a deprecation notice on PHP 8.4.
See:
- [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types )
- [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated )
2024-03-16 02:19:34 +07:00
b431e5fc73
cs-fix
2024-03-15 12:52:36 +01:00
ad87c2e905
Allow specifying flags to Codebase::isTypeContainedByType
2024-03-15 12:15:05 +01:00
Bruce Weirdan
c9468b63e5
Introduce TCallableInterface
...
`TClosure` does not implement it at this point. It's intentional, to maintain the
separation between callables and closures that our code relies on.
2024-03-12 12:58:15 +01:00
Bruce Weirdan
4ea41cb69a
Merge branch '5.23.x' into 5.x
2024-03-11 21:34:28 +01:00
Bruce Weirdan
8471a896cc
Merge pull request #10812 from issidorov/bug-10807
2024-03-11 21:33:46 +01:00
Ivan Sidorov
fe42e8821d
Resolve fail test #10807
...
Resolved problem:
```
Psalm\Tests\AssertAnnotationTest::testAssertsAllongCallStaticMethodWork
Psalm\Exception\CodeException: LessSpecificReturnStatement
The type 'string' is more general than the declared return type 'non-empty-string' for returnNonEmpty
```
2024-03-11 20:09:30 +01:00
Aleksandr Zhuravlev
2a91bd6616
Added test for #10807
2024-03-11 20:09:30 +01:00
Bruce Weirdan
ae1d510c4b
Merge pull request #10806 from weirdan/9596-dont-crash-on-invalid-templates
2024-03-11 01:54:45 +01:00
Bruce Weirdan
4a2cf93d7a
Don't crash on invalid templates
...
Fixes vimeo/psalm#9596
2024-03-11 01:41:52 +01:00
Bruce Weirdan
20c788911f
Allow more callable types as subtypes of callable
...
Fixes vimeo/psalm#10461
2024-03-10 22:23:01 +01:00
Bruce Weirdan
c511185fbe
Merge pull request #10804 from weirdan/10533-no-named-arguments-for-array-access
2024-03-10 01:02:18 +01:00
Bruce Weirdan
00c2fef25d
Forbid named arguments for ArrayAcccess methods
...
Fixes vimeo/psalm#10533
2024-03-10 00:06:27 +01:00
Bruce Weirdan
005e3184fb
Merge pull request #10800 from weirdan/10799-use-wider-classstring
2024-03-09 20:39:11 +01:00
Bruce Weirdan
739d87dba7
Use wider class-string when combining class strings with intersections
...
Fixes vimeo/psalm#10799
2024-03-09 20:32:20 +01:00
Bruce Weirdan
87f7101e01
Merge pull request #10802 from weirdan/10796-nullable-resource-for-mkdir
2024-03-09 20:14:10 +01:00
Bruce Weirdan
5c780c7b05
$resource
parameter of mkdir()
is nullable since PHP 7.3
...
Fixes vimeo/psalm#10796
2024-03-09 20:06:47 +01:00
Bruce Weirdan
02b58a592f
Merge pull request #10801 from weirdan/fix-trailing-commas-after-anon-functions
2024-03-09 19:38:57 +01:00
Bruce Weirdan
8e1aa46195
CS fix
...
- trailing commas in calls with anon functions
- useless array docblock
Refs 8d0f603bef
Refs 6ea0278a67
2024-03-09 18:41:51 +01:00
Bruce Weirdan
dca888c777
Merge pull request #10781 from theodorejb/fix-sqlsrv-callmap
2024-03-03 20:20:06 +01:00
Theodore Brown
33071242aa
Update CallMap for sqlsrv_connect and sqlsrv_errors to match reflection
2024-03-03 12:08:05 -06:00
Bruce Weirdan
667a6a7b01
Merge pull request #10779 from weirdan/10755-namespace-anon-classes
2024-03-03 16:27:49 +01:00
Bruce Weirdan
6b9b4b523d
Namespace anonymous classes
...
Fixes vimeo/psalm#10755
2024-03-03 16:21:20 +01:00
Bruce Weirdan
b061783848
Merge pull request #10776 from kkmuffme/fix-php8-tests-use-wrong-analysis-version
2024-03-03 15:26:10 +01:00
Bruce Weirdan
87e2af43f5
Use PHP_VERSION_ID
instead of version_compare()
...
As we do elsewhere
2024-03-03 15:21:22 +01:00
Bruce Weirdan
64a32721e3
Allow the test fixed in vimeo/psalm#10778
2024-03-03 15:16:39 +01:00
kkmuffme
0975c156af
set previous default setting for failing test temporarily
...
Refs https://github.com/vimeo/psalm/issues/10773
2024-03-03 15:10:03 +01:00
kkmuffme
963feb91a7
fix PHP 8 tests running with wrong --php-version=/phpVersion= if not explicitly specified
2024-03-03 15:10:03 +01:00
Bruce Weirdan
9e905ec21d
Merge pull request #10778 from weirdan/10773-fix-weakmap-iteration
2024-03-03 15:09:44 +01:00
Bruce Weirdan
edc123b219
Backport WeakMap
iterator fix from master
...
Refs vimeo/psalm#10773
2024-03-03 13:45:25 +01:00
Bruce Weirdan
20e8604b0c
Merge pull request #10772 from weirdan/10766-named-parameters-for-callables
2024-03-02 20:01:32 +01:00
Bruce Weirdan
ceb290891b
Initial support for named parameters for callables
...
Fixes vimeo/psalm#10766
2024-03-02 19:17:48 +01:00
Bruce Weirdan
cabcb02614
Merge pull request #10765 from theodorejb/avoid-duplication
2024-03-02 15:52:52 +01:00
Bruce Weirdan
d3e070c89e
Merge pull request #10769 from kkmuffme/since-annotations-outside-phpstub-should-not-infer-php-version
2024-03-02 14:14:48 +01:00
kkmuffme
a1848a1a14
@since annotations should only infer PHP version in .phpstub files or for @since 8.0.0 PHP
...
Fix https://github.com/vimeo/psalm/issues/10761
2024-03-02 11:52:51 +01:00
kkmuffme
d751c202d8
fix unrelated Config bug not honoring PHP composer versions 8.2 + 8.3
2024-03-02 11:50:52 +01:00
Theodore Brown
e357b972f6
Avoid duplicating code for RiskyTruthyFalsyComparison
2024-02-29 20:38:40 -06:00
Bruce Weirdan
496b214671
Merge pull request #10764 from weirdan/fix-since-version-comparison
2024-03-01 03:03:19 +01:00
Bruce Weirdan
97b22ecdfd
Fix version comparison for @since
...
Refs vimeo/psalm#10761
2024-03-01 01:37:33 +01:00