Skip to content

Conversation

@samsonasik
Copy link
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
Member Author

Fixed 🎉 /cc @TomasVotruba

@samsonasik
Copy link
Member Author

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

@samsonasik samsonasik merged commit b3e556c into main Aug 9, 2025
47 checks passed
@samsonasik samsonasik deleted the crash-single branch August 9, 2025 17:50
@github-actions
Copy link
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants