Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DowngradePhp81] Handle no scope on DowngradeFirstClassCallableSyntaxRector inside ArrayItem #2709

Merged
merged 9 commits into from Jul 27, 2022

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Jul 25, 2022

Given the following config:

final class DemoFile
{
    public function getCallables(): array
    {
        return [
            $this->opposite(...),
        ];
    }
}

It currently produce:

There was 1 error:

1) Rector\Core\Tests\Issues\ScopeNotAvailable\FirstClassCallableTest::test with data set #0 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
Rector\Core\Exception\ShouldNotHappenException: Node "PhpParser\Node\Expr\StaticCall" with parent of "PhpParser\Node\Expr\ArrayItem" is missing scope required for scope refresh.

Fixes rectorphp/rector#7314

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @leoloso

@leoloso
Copy link
Contributor

leoloso commented Jul 25, 2022

That was quick!!!! 🙏

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@samsonasik
Copy link
Member Author

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I think it is ready.

@samsonasik samsonasik force-pushed the handle-no-scope-first-class-callable branch from b37dc0d to 2b76ad1 Compare July 27, 2022 07:46
@samsonasik
Copy link
Member Author

rebased.

@TomasVotruba TomasVotruba merged commit a018130 into main Jul 27, 2022
@TomasVotruba
Copy link
Member

👍

@TomasVotruba TomasVotruba deleted the handle-no-scope-first-class-callable branch July 27, 2022 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants