Maximilian Bösing
6d5f999c75
bugfix: do not report required closure arguments as unused
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 01:54:03 +02:00
Paolo Conizzoli
3ccb1eaffe
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface
2023-03-16 12:01:16 +01:00
Bruce Weirdan
1c2bc49838
Forbid non-null defaults for callable parameters
...
Fixes vimeo/psalm#3284
2023-02-16 01:36:06 -04:00
Bruce Weirdan
e6aa63731d
Flag docblock parameters that have no counterparts in function signature
...
Fixes vimeo/psalm#3166
2023-02-15 22:04:26 -04:00
Bruce Weirdan
01911a06b7
Deprecate FunctionLikeStorage::$unused_docblock_params
...
Refs vimeo/psalm#3166
2023-02-15 21:29:20 -04:00
Bruce Weirdan
2bb590feb6
Allow suppressing MissingThrowsDocblock
for individual exceptions
...
Fixes vimeo/psalm#8638
2023-02-15 03:29:02 -04:00
Bruce Weirdan
873d79c5d7
Forbid overriding built-in enum methods
...
Fixes vimeo/psalm#9274
2023-02-13 00:37:59 -04:00
Bruce Weirdan
250d4d593e
Don't crash on unknown exceptions in @throws
docblock
...
Fixes vimeo/psalm#9248
2023-02-09 02:56:01 -04:00
Bruce Weirdan
70f2fb7d1b
Check $this
in static closures
...
Fixes vimeo/psalm#9148
Fixes vimeo/psalm#2813
2023-01-23 05:16:12 -04:00
Jack Worman
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -06:00
Jack Worman
2f677f600b
CS fixes
2022-12-17 08:13:32 -06:00
Jack Worman
30a8f71958
Remove useless ifs
2022-12-16 22:00:34 -06:00
Jack Worman
69658e8315
SlevomatCodingStandard.Commenting.DocCommentSpacing
2022-12-14 13:34:41 -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
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
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
Matthew Brown
8d36bdc3ed
Make array shapes strict by default ( #8701 )
...
* Make array shapes strict by default
* Fix PSL tests
2022-11-11 20:14:21 -05:00
1986c8b4a8
Add support for strict arrays, fix type alias intersection, fix array_is_list assertion on non-lists ( #8395 )
...
* Immutable CodeLocation
* Remove excess clones
* Remove external clones
* Remove leftover clones
* Fix final clone issue
* Immutable storages
* Refactoring
* Fixes
* Fixes
* Fix
* Fix
* Fixes
* Simplify
* Fixes
* Fix
* Fixes
* Update
* Fix
* Cache global types
* Fix
* Update
* Update
* Fixes
* Fixes
* Refactor
* Fixes
* Fix
* Fix
* More caching
* Fix
* Fix
* Update
* Update
* Fix
* Fixes
* Update
* Refactor
* Update
* Fixes
* Break one more test
* Fix
* FIx
* Fix
* Fix
* Fix
* Fix
* Improve performance and readability
* Equivalent logic
* Fixes
* Revert
* Revert "Revert"
This reverts commit f9175100c8452c80559234200663fd4c4f4dd889.
* Fix
* Fix reference bug
* Make default TypeVisitor immutable
* Bugfix
* Remove clones
* Partial refactoring
* Refactoring
* Fixes
* Fix
* Fixes
* Fixes
* cs-fix
* Fix final bugs
* Add test
* Misc fixes
* Update
* Fixes
* Experiment with removing different property
* revert "Experiment with removing different property"
This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9.
* Uniform naming
* Uniform naming
* Hack hotfix
* Clean up $_FILES ref #8621
* Undo hack, try fixing properly
* Helper method
* Remove redundant call
* Partially fix bugs
* Cleanup
* Change defaults
* Fix bug
* Fix (?, hope this doesn't break anything else)
* cs-fix
* Review fixes
* Bugfix
* Bugfix
* Improve logic
* Add support for list{} and callable-list{} types, properly implement array_is_list assertions (fixes #8389 )
* Default to sealed arrays
* Fix array_merge bug
* Fixes
* Fix
* Sealed type checks
* Properly infer properties-of and get_object_vars on final classes
* Fix array_map zipping
* Fix tests
* Fixes
* Fixes
* Fix more stuff
* Recursively resolve type aliases
* Fix typo
* Fixes
* Fix array_is_list assertion on keyed array
* Add BC docs
* Fixes
* fix
* Update
* Update
* Update
* Update
* Seal arrays with count assertions
* Fix #8528
* Fix
* Update
* Improve sealed array foreach logic
* get_object_vars on template properties
* Fix sealed array assertion reconciler logic
* Improved reconciler
* Add tests
* Single source of truth for test types
* Fix tests
* Fixup tests
* Fixup tests
* Fixup tests
* Update
* Fix tests
* Fix tests
* Final fixes
* Fixes
* Use list syntax only when needed
* Fix tests
* Cs-fix
* Update docs
* Update docs
* Update docs
* Update docs
* Update docs
* Document missing types
* Update docs
* Improve class-string-map docs
* Update
* Update
* I love working on psalm :)
* Keep arrays unsealed by default
* Fixup tests
* Fix syntax mistake
* cs-fix
* Fix typo
* Re-import missing types
* Keep strict types only in return types
* argc/argv fixes
* argc/argv fixes
* Fix test
* Comment-out valinor code, pinging @romm pls merge https://github.com/CuyZ/Valinor/pull/246 so we can add valinor to the psalm docs :)
2022-11-05 22:34:42 +01:00
d0be59e16e
Immutable unions ( #8627 )
...
* Immutable CodeLocation
* Remove excess clones
* Remove external clones
* Remove leftover clones
* Fix final clone issue
* Immutable storages
* Refactoring
* Fixes
* Fixes
* Fix
* Fix
* Fixes
* Simplify
* Fixes
* Fix
* Fixes
* Update
* Fix
* Cache global types
* Fix
* Update
* Update
* Fixes
* Fixes
* Refactor
* Fixes
* Fix
* Fix
* More caching
* Fix
* Fix
* Update
* Update
* Fix
* Fixes
* Update
* Refactor
* Update
* Fixes
* Break one more test
* Fix
* FIx
* Fix
* Fix
* Fix
* Fix
* Improve performance and readability
* Equivalent logic
* Fixes
* Revert
* Revert "Revert"
This reverts commit f9175100c8452c80559234200663fd4c4f4dd889.
* Fix
* Fix reference bug
* Make default TypeVisitor immutable
* Bugfix
* Remove clones
* Partial refactoring
* Refactoring
* Fixes
* Fix
* Fixes
* Fixes
* cs-fix
* Fix final bugs
* Add test
* Misc fixes
* Update
* Fixes
* Experiment with removing different property
* revert "Experiment with removing different property"
This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9.
* Uniform naming
* Uniform naming
* Hack hotfix
* Clean up $_FILES ref #8621
* Undo hack, try fixing properly
* Helper method
* Remove redundant call
* Partially fix bugs
* Cleanup
* Change defaults
* Fix bug
* Fix (?, hope this doesn't break anything else)
* cs-fix
* Review fixes
* Bugfix
* Bugfix
* Improve logic
* Update
2022-11-04 19:04:23 +01:00
7b6e09afc9
Merge branch 'merge_4.x' into immutable_readonly_3
2022-10-17 12:58:41 +02:00
748a74bb2c
Merge remote-tracking branch 'origin/4.x' into HEAD
2022-10-16 13:41:27 +02:00
0155ad7472
Immutable readonly 3
2022-10-03 15:13:47 +02:00
45452c7125
Immutable readonly 2
2022-10-03 14:02:41 +02:00
ef60a0c88c
Fix properties-of on generics&intersections
2022-10-03 11:28:01 +02:00
3abd0b961f
Immutable Unions
2022-10-03 10:45:36 +02:00
dennis
ab690df4da
Improved class name generation for @throws annotation
2022-09-19 21:09:45 +02:00
Semyon
b1295d6894
Code style
2022-07-25 17:15:28 +03:00
orklah
416b597d1c
Merge pull request #7994 from aszenz/4.x
...
Adds support for fixing missing throws doc block
2022-07-12 20:46:14 +02:00
AndrolGenhald
285740a753
Merge branch '4.x'
2022-07-07 15:01:38 -05:00
orklah
06dd975cb5
Merge pull request #8174 from AndrolGenhald/fix-attribute-crash
...
Fix crash when redefining method with fewer params (fixes #8141 ).
2022-06-26 13:47:54 +02:00
AndrolGenhald
e751a27eaf
Fix crash when redefining method with fewer params ( fixes #8141 ).
2022-06-26 06:27:46 -05:00
AndrolGenhald
b671117417
Improve @psalm-internal and prevent usage of IssueBuffer::add().
2022-06-25 02:09:40 -05:00
asrar
e3f46d9a3c
refactor: use list<string>
2022-05-23 19:45:33 +02:00
asrar
e28831dff8
feat: fix ci + preserve existing throws
2022-05-22 18:27:38 +02:00
asrar
c6854cf567
Adds support for fixing missing throws doc block
2022-05-21 17:39:51 +02:00
Matt Brown
20351c6667
Avoid json_encode when serializing non-UTF8 literals
...
`\Psalm\Internal\Clause::$hash` basically holds a hash on
arbitrary input literals, used for later comparison. Using
`json_encode` fails when dealing with non-UTF8 literals,
which has been replaced by plain PHP `serialize`.
Resolves : #7771
2022-04-27 01:42:37 -04:00
AndrolGenhald
08d4d797ef
More attribute fixes.
2022-03-14 14:15:07 -05:00
orklah
0fe6eaf5d9
Merge remote-tracking branch 'upstream/4.x' into upstream-master13
2022-02-26 21:26:59 +01:00
AndrolGenhald
1387f94324
Attribute analysis improvements.
2022-02-23 22:12:32 -06:00
AndrolGenhald
04c0db5aff
Use current context when analyzing attributes ( fixes #7710 ).
2022-02-21 10:38:50 -06:00
Bruce Weirdan
997bded2e3
Merge branch '4.x' into upstream-master
2022-02-21 01:08:21 +02:00
AndrolGenhald
ea2f452c25
Analyze attribute statements instead of constructing virtual statements.
2022-02-18 08:18:34 -06:00
AndrolGenhald
f9450656e1
Add support for references and improve UnusedVariable checks ( fixes #7254 ).
2022-01-26 12:55:47 -06:00
AndrolGenhald
ba8234dd2c
Fix crash due to unresolvable constant.
2022-01-25 17:03:13 -06:00
AndrolGenhald
c18a155f77
Support type annotations for class consts ( fixes #942 ).
2022-01-22 17:06:53 -06:00
orklah
b3e7f12933
Prevent NoValue when there is no phpdoc
2022-01-14 21:39:23 +01:00
orklah
b633619a2c
Merge remote-tracking branch 'upstream/4.x' into upstream-master
2022-01-14 21:01:25 +01:00