1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
Commit Graph

13297 Commits

Author SHA1 Message Date
orklah
5afc3282d4
Merge pull request #8902 from kkmuffme/fix-never-static-calls
fix return type never for static function calls
2022-12-16 22:06:19 +01:00
Jack Worman
a52f35e5e1 Even more property typehints 2022-12-16 13:24:21 -06:00
orklah
4d0ddf6310
Merge pull request #8907 from danog/fix_array_merge
Fix array_merge edge case
2022-12-16 19:41:27 +01:00
2c00c64304 Bypass bug 2022-12-16 19:18:33 +01:00
f5b6889c32 Fix 2022-12-16 18:39:35 +01:00
992f26a8e7 Fix array_merge edge case 2022-12-16 18:10:46 +01:00
Leo Viezens
0ef7ec100a #7387 Add asserting non-empty-string by strlen 2022-12-16 17:04:01 +01:00
kkmuffme
eeb0c06173 fix return type never for static function calls 2022-12-16 11:55:31 +01:00
orklah
5132de22e0
Merge pull request #8900 from othercorey/fix-unreflectable
Fix remaining invalid unreflectable methods
2022-12-15 21:19:10 +01:00
orklah
f4d70384ee
Merge pull request #8885 from lptn/php-ext-with-deprecation
Deprecation message on loading php-ext stubs without explicitly declaring them as dependency or in a config
2022-12-15 21:17:38 +01:00
orklah
e69f88af5a
Merge pull request #8897 from jack-worman/Add_some_more_property_typehints
Add property typehints in Internal directory
2022-12-15 21:11:43 +01:00
Corey Taylor
067d0649ca Fix remaining invalid unreflectable methods 2022-12-15 04:09:02 -06:00
Bruce Weirdan
e7a4fd98e5
Fix SA issues 2022-12-15 00:18:53 -04:00
Jack Worman
76a7c7da4a Added SlevomatCodingStandard.TypeHints.PropertyTypeHint sniff 2022-12-14 20:43:26 -06:00
Jack Worman
2b5407d2fb Added SlevomatCodingStandard.TypeHints.ParameterTypeHint sniff and removed php-cs-fixer 2022-12-14 20:26:17 -06:00
Jack Worman
69658e8315 SlevomatCodingStandard.Commenting.DocCommentSpacing 2022-12-14 13:34:41 -06:00
Jack Worman
643542346b Add codesniffer rules and expand php-cs-fixer to bin and test 2022-12-14 13:29:09 -06:00
orklah
398a1c6df8
Merge pull request #8899 from othercorey/update-callmap-methods
Fix DOM and Reflection unreflectable methods
2022-12-14 19:39:20 +01:00
Corey Taylor
902ea9d7e2 Fix DOM and Reflection unreflectable methods 2022-12-14 10:18:15 -06:00
Jack Worman
0939e63323 Add @internal tag and fix php-cs-fixer mistake 2022-12-14 08:06:37 -06:00
Jack Worman
749ce58c27 Add more property typehints 2022-12-13 21:34:34 -06:00
Jack Worman
36fa162d6d Use php-cs-fixer to clean up docblocks 2022-12-13 20:46:43 -06:00
Jack Worman
fc2df8e8ae Add more property typehints 2022-12-13 20:20:15 -06:00
027354cabc
Improve parsing of list shapes (#8841)
* Improve parsing of list shapes

* Improve logic

* One more test

* Fix tests
2022-12-13 22:30:40 +01:00
6347a21546
Literal inferring for array_column, array_combine, array_fill_keys, array_fill (#8850)
* Squash

* Remove BC break

* Suppress

* Possibly fix

* Fixes

* Fix test

* Implement literal array_column

* Improve array_column inference

* Improve logic

* Add array_combine return type provider

* Cleanup

* Fix #8868 (add array_fill_keys/array_fill return type)

* cs-fix

* Fix
2022-12-13 22:29:35 +01:00
cca276768e
List refactoring v5 (#8820)
* Squash

* Remove BC break

* Suppress

* Possibly fix

* Fixes

* Fix test

* Trigger build

* Update psl

* Update psl

* Fixes

* Fixes

* Cleanup

* fix

* Fix build

* Do not consider never when getting the max count

* Add assertion

* Cleanup

* Fix

* Cleanup
2022-12-13 21:40:19 +01:00
orklah
794ca9362a
Merge pull request #8887 from jack-worman/Use_rector_to_add_property_typehints
Use rector to add property typehints
2022-12-13 19:58:43 +01:00
orklah
00706de18e
Merge pull request #8826 from othercorey/callmap-methods
Add validation for Class::Method names in CallMap
2022-12-13 18:47:23 +01:00
Bruce Weirdan
321d5fee62
Merge pull request #8895 from weirdan/replace-array-to-xml
Fixes https://github.com/vimeo/psalm/issues/8852
2022-12-13 05:36:00 -04:00
Corey Taylor
e57079f581 Add validation for Class::Method names in CallMap 2022-12-13 03:34:47 -06:00
Bruce Weirdan
586d0c931c
[skip ci] fix indentation 2022-12-13 05:34:43 -04:00
Bruce Weirdan
d0e335ab29
Replace unmaintained openlss/lib-array2xml with spatie/array-to-xml
Fixes vimeo/psalm#8852
2022-12-13 05:27:55 -04:00
Alies Lapatsin
1115cfb980 Merge branch 'master' into php-ext-with-deprecation
# Conflicts:
#	src/Psalm/Config.php
2022-12-12 23:49:01 +01:00
orklah
72e7386eb5
Merge pull request #8722 from Ocramius/feature/#8720-improve-types-and-purity-for-reflection-symbols
Declaring more precise types and purity boundaries on `ext-reflection` symbols in `.phpstub` files
2022-12-12 21:27:47 +01:00
Bruce Weirdan
fb685a16df
Merge pull request #8890 from weirdan/enum-forbidden-methods
Fixes https://github.com/vimeo/psalm/issues/8889
Fixes https://github.com/vimeo/psalm/issues/8888
2022-12-12 04:18:56 -04:00
Bruce Weirdan
9db0eb3e03
InvalidEnumMethod requires PHP8.1+ 2022-12-12 03:12:55 -04:00
Bruce Weirdan
19a1005bc3
Forbid most magic methods on enums
Fixes vimeo/psalm#8889

Additionally this fixes case-sensitivity of
MethodSignatureMustOmitReturnType issue

Fixes vimeo/psalm#8888
2022-12-12 03:03:20 -04:00
Jack Worman
dd0d8300b1 Use rector to add property typehints 2022-12-11 17:25:23 -06:00
Alies Lapatsin
c8b6b0b504 Remove unused @psalm-suppress 2022-12-11 15:10:43 +01:00
Alies Lapatsin
a8046a8682 Simplify array type declaration 2022-12-11 15:01:34 +01:00
Alies Lapatsin
729eb59169 Remove an excessive array shape annotation 2022-12-11 14:55:42 +01:00
Alies Lapatsin
5e95d13157 Make Psalm about stub file for random (core) extension 2022-12-11 14:45:20 +01:00
Alies Lapatsin
74f65cba71 Make Psalm about stub file for redis extension 2022-12-11 14:39:29 +01:00
Alies Lapatsin
62c998b8cf Load ext stubs using extension_loaded but display a deprecation note 2022-12-11 14:39:29 +01:00
Alies Lapatsin
0fd4c520de Load ext stubs using extension_loaded but diaplay a deprecation note 2022-12-11 14:01:20 +01:00
Alies Lapatsin
ecfa81471a Merge branch 'master' into php-ext 2022-12-11 13:58:18 +01:00
Bruce Weirdan
ca0b2a1b65
Merge pull request #8883 from weirdan/unused-messages-duplicates
Fixes https://github.com/vimeo/psalm/issues/8874
2022-12-11 06:08:10 -04:00
Bruce Weirdan
32eaf12d40
Prevent duplicate (Possibly)UnusedMethod/(Possibly)UnusedProperty
This also allows (Possibly)UnusedProperty to be suppressed with
`referencedProperty` attribute in psalm.xml

Fixes vimeo/psalm#8874
2022-12-11 05:49:09 -04:00
Bruce Weirdan
114552f9b6
Merge pull request #8882 from theofidry/feature/update-cpu-core-counter 2022-12-10 21:08:17 -04:00
Théo FIDRY
4a6bfea65c
Upgrade CpuCoreCounter 2022-12-11 01:12:52 +01:00