镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[TypeDeclaration] Handle crash on direct callable without params on AddArrayFunctionClosureParamTypeRector - #7131

Merged
samsonasik merged 3 commits into
mainfrom
crash-single
Aug 9, 2025
Merged

samsonasik merged 3 commits into
mainfrom
crash-single

Conversation

@samsonasik

Copy link
Copy Markdown
Member

It cause crash:

There was 1 error:

1) Rector\Tests\TypeDeclaration\Rector\FuncCall\AddArrayFunctionClosureParamTypeRector\AddArrayFunctionClosureParamTypeRectorTest::test with data set #3 ('/Users/samsonasik/www/rector-...hp.inc')
Error: Attempt to assign property "type" on null

/Users/samsonasik/www/rector-src/rules/TypeDeclaration/Rector/FuncCall/AddArrayFunctionClosureParamTypeRector.php:124
/Users/samsonasik/www/rector-src/src/Rector/AbstractRector.php:154

Ref https://getrector.com/demo/a1453e38-add0-4607-b8ea-00c0ecef703c
Ref https://3v4l.org/65A36#v8.0.1

@samsonasik samsonasik changed the title [TypeDeclaration] Handle crash on direct callable with single arg on AddArrayFunctionClosureParamTypeRector [TypeDeclaration] Handle crash on direct callable with range 2nd arg on AddArrayFunctionClosureParamTypeRector Aug 9, 2025
@samsonasik samsonasik changed the title [TypeDeclaration] Handle crash on direct callable with range 2nd arg on AddArrayFunctionClosureParamTypeRector [TypeDeclaration] Handle crash on direct callable without params on AddArrayFunctionClosureParamTypeRector Aug 9, 2025
@samsonasik

Copy link
Copy Markdown
Member Author

Fixed 🎉 /cc @TomasVotruba

@samsonasik

Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik
samsonasik merged commit b3e556c into main Aug 9, 2025
@samsonasik
samsonasik deleted the crash-single branch August 9, 2025 17:50
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant