Skip to content

[Php80] Handle crash on ClassOnObjectRector + GetDebugTypeRector#4483

Merged
samsonasik merged 2 commits intomainfrom
get-debug
Jul 11, 2023
Merged

[Php80] Handle crash on ClassOnObjectRector + GetDebugTypeRector#4483
samsonasik merged 2 commits intomainfrom
get-debug

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik requested a review from TomasVotruba as a code owner July 11, 2023 22:50
@samsonasik
Copy link
Copy Markdown
Member Author

samsonasik commented Jul 11, 2023

It show warning in unit test:

W                                                                   1 / 1 (100%)

Time: 00:00.664, Memory: 72.50 MB

1 test triggered 2 PHP warnings:

1) Rector\Core\Tests\Issues\ClassOnObjectGetDebugType\ClassOnObjectGetDebugTypeTest::test with data set #0
* Undefined property: PhpParser\Node\Expr\Variable::$args
  /Users/samsonasik/www/rector-src/rules/Php80/Rector/Ternary/GetDebugTypeRector.php:170

* Trying to access array offset on value of type null
  /Users/samsonasik/www/rector-src/rules/Php80/Rector/Ternary/GetDebugTypeRector.php:170

/Users/samsonasik/www/rector-src/tests/Issues/ClassOnObjectGetDebugType/ClassOnObjectGetDebugTypeTest.php:14

see https://github.com/rectorphp/rector-src/actions/runs/5525624780/jobs/10079443737#step:5:25

@samsonasik
Copy link
Copy Markdown
Member Author

Fixed 🎉 /cc @canvural

@samsonasik
Copy link
Copy Markdown
Member Author

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

Before: show warning in unit test: https://github.com/rectorphp/rector-src/actions/runs/5525624780/jobs/10079443737#step:5:25

After: no warning in unit test: https://github.com/rectorphp/rector-src/actions/runs/5525654777/jobs/10079508540#step:5:27

@samsonasik samsonasik merged commit 5dfb621 into main Jul 11, 2023
@samsonasik samsonasik deleted the get-debug branch July 11, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[UP_TO_PHP_81] System error: "Undefined property: PhpParser\Node\Expr\Variable::$args

1 participant