Skip to content

ParentTestClassConstructorRector does not consider final constructor #9180

@Jean85

Description

@Jean85

Bug Report

Subject Details
Rector version 2.0.16

This version has enabled ParentTestClassConstructorRector on my classes (see facile-it/paraunit#317), which behaves badly when there's a final constructor, i.e. in PHPUnit's TestCase since 12.0.3: sebastianbergmann/phpunit@3263f4c

Minimal PHP Code Causing Issue

I'm unable to reproduce this in the demo, but as you can see it's happening in the CI of my PR: https://github.com/facile-it/paraunit/actions/runs/15117966724/job/42493333520?pr=317#step:5:16

Expected Behaviour

The constructor should not be added, since it's final.

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