Skip to content

Prevent test extending #21266

@keradus

Description

@keradus
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? yes
Symfony version n/a

Somehow related to #20493 (cc @nicolas-grekas).

Symfony project treats (which is good) it tests as internal code that should serve only this repo purposes.
It's not common, but I do saw very edge case when someone actually extend concrete Foo...TestCase of Symfony unittests. I would like to propose marking all utests as @internal and @final (or maybe even final class on class-syntax level, not docs) - to prevent that kind of situations.
In the case I describe the exotic project tests crashed after updating Symfony becouse of BC breaks on Foo...TestCase class.

If agreed, I could prepare a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions