Skip to content

Scope not available on "PhpParser\Node\ArrayItem" node #9628

@eliashaeussler

Description

@eliashaeussler

Bug Report

Subject Details
PHP version 8.2.30
Rector version 2.3.5

Running the code below results in a Scope not available on "PhpParser\Node\ArrayItem" node error. This is confusing, because the rule should actually not be relevant for the given code, since it should only apply to classes implementing PHPUnit's TestCase, from my understanding.

Minimal PHP Code Causing Issue

https://getrector.com/demo/da6425e5-7a8e-44ff-ac74-b1c0b478695e

Expected Behaviour

No error should be reported, the file should remain unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions