supress ComplexMethod
ComplexMethod: This method’s complexity is greater than the project limit
AFAIR, the issues is what I named "Code complexity raised beyond limits :)". So it needs to be refactored, but I don't feel being able to handle this.
Upgrade LSP to support additional features
additional debugging
Merge branch '4.x' into feature/upgrade-lsp
add command to fix all and analyize single file
additional work to caching engine
analyze files even outside of the scope because this is how IDEs work
Merge branch '4.x' into feature/upgrade-lsp
improve file caching logic with versions and refreshes
log an error outside of requests
after bubble up we now need to not yield nulls
check nulls quicker
fix didClose
add psalm and phpcs checking and cleanup errors from that
add class reference
move starting of server into server itself
more fixes
remove need for defining lsp elsewhere
bump
bump again
Merge branch '4.x' into feature/upgrade-lsp
Upgrade LSP to support additional features
additional debugging
Merge branch '4.x' into feature/upgrade-lsp
add command to fix all and analyize single file
additional work to caching engine
analyze files even outside of the scope because this is how IDEs work
Merge branch '4.x' into feature/upgrade-lsp
improve file caching logic with versions and refreshes
log an error outside of requests
after bubble up we now need to not yield nulls
check nulls quicker
fix didClose
add psalm and phpcs checking and cleanup errors from that
add class reference
move starting of server into server itself
more fixes
remove need for defining lsp elsewhere
bump
bump again
Merge branch '4.x' into feature/upgrade-lsp
Base exapmle, which works as expected:
https://psalm.dev/r/6fcee69f07
Now, a very simillar with just intermediate variable used, shall work as well:
https://psalm.dev/r/23a681ff6c
but it doesn't.
Oh, accidentally this also includes fixes implemented in #9497.
This shall fix #9506.
Code complexity raised beyond limits :)
make some shepherd tests to pass
fixed #9605 for function-like compounds
fixed #9605 for class-like compounds
add more tests for #9506
I agree that this may be very complicated. Honestly, I created this issue mainly for the purpose of being referenced from other issues and PRs.
add test for #9496
Reuse the normal docblock-type parser when parsing type aliases instead of doing regex magic. Fixes #9496. Also resolves an additional issue with comments after a type which does not contain brackets. Includes a test for multiline types which did not yet exist.
add test for #9496
Merge branch 'pvandommelen-issue-9496' into issue-9494-merged
revised tests for #9496
add tests for #9506
add tests for #9506
https://psalm.dev/r/ebc33e6f34 https://psalm.dev/r/7ab8f17097
(the difference between above is just with '.'
after lorem ipsum
)
This commit reuses the normal type parser logic (which is also used for
@param
etc) to find the part of the string that belongs to the type. It is more invasive, but it's much better than trying to improve on the regex solution.It also fixes the issue with comments as found in #9497 (comment) :)
@pvandommelen Thanks. I let myself to merge https://github.com/vimeo/psalm/commit/6bbcfb242928b83e2bcf832e27f8cc82e447b966 here. Looks like it fixed all the mentioned issues (I've also created additional unit tests).
PS. I have seen similar issues with @psalm-template T of ....
, so probably similar solution there will be necessary.
add test for #9496
Reuse the normal docblock-type parser when parsing type aliases instead of doing regex magic. Fixes #9496. Also resolves an additional issue with comments after a type which does not contain brackets. Includes a test for multiline types which did not yet exist.
Merge branch 'pvandommelen-issue-9496' into issue-9494-merged
revised tests for #9496
Add missing array, float, int and bool types to callmaps
Make Atomic subclasses consistently call their parent constructors
Add back CallableTrait constructor
Deprecate CallableTrait::__construct
All internal consumers have their own constructors now, and we don't expect external classes to use it.
add tests for #9433
fix #9433
append commas to array items
workaround for false positives caused by #9484
Merge pull request #9439 from ptomulik/issue-9433
Fix #9433
Merge pull request #9474 from othercorey/missing-callmap-types
Add missing array, float, int and bool types to callmaps
Merge pull request #9406 from edsrzf/atomic-constructor
add test for #9496
Add missing array, float, int and bool types to callmaps
Make Atomic subclasses consistently call their parent constructors
Add back CallableTrait constructor
Deprecate CallableTrait::__construct
All internal consumers have their own constructors now, and we don't expect external classes to use it.
add tests for #9433
fix #9433
append commas to array items
workaround for false positives caused by #9484
Merge pull request #9439 from ptomulik/issue-9433
Fix #9433
Merge pull request #9474 from othercorey/missing-callmap-types
Add missing array, float, int and bool types to callmaps
Merge pull request #9406 from edsrzf/atomic-constructor
add test for #9496
Well, this is interesting. The current way of parsing type in @psalm-type is quite buggy. A bunch of examples below:
https://psalm.dev/r/e259fad4ec https://psalm.dev/r/84df87cc84 https://psalm.dev/r/4379a14de4 https://psalm.dev/r/517fe131ac https://psalm.dev/r/54ab72acce