Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support covering deprecated APIs in specs #1494

@stof

Description

@stof

Right now, deprecations are turned into ExampleException\ErrorException like notices and warnings, which interrupts the execution (turning deprecations into breaks instead, which defeats their purpose).

Deprecations should be collected and reported (potentially failing the suite depending on how the runner is configured if configuration is relevant) without turning them into exceptions (so that the behavior can still be asserted).

To allow covering deprecated methods (testing BC layers is also important), individual specs should be able to opt-out of the deprecation reporting (and any associated suite failure). I would suggest doing that thanks to a #[AllowDeprecations] attribute on the spec method.

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