Skip to content

PHP Fatal error: Cannot declare interface PhpParser\NodeVisitor, because the name is already in use in vendor/rector/rector/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php on line 6 #9242

@ostrolucky

Description

@ostrolucky

Bug Report

Subject Details
Rector version 2.1.0

Minimal PHP Code Causing Issue

It seems some of the projects do not have a proper nikic/php-parser dependency declared and it causes declarations to be incompatible. See this pipeline failing https://github.com/ostrolucky/rector-rules/actions/runs/16004559868/job/45147964072

Expected Behaviour

No parse error

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