Roave / BackwardCompatibilityCheck

:ab: Tool to compare two revisions of a class API to check for BC breaks
MIT License
572 stars 59 forks source link

New feature: Detect EnumCaseAdded as a BC break #767

Closed bdsl closed 4 months ago

bdsl commented 4 months ago

As far as I can tell this isn't something currently detected, but I think adding a new enum case should be considered a breaking change, as it will break any consuming code that was previously relying on being able to exhaustively handle all cases of an enum.

For instance consuming code will often use match with an enum, which will throw UnhandledMatchError if the enum cases is a new one.

Would people be interested in a PR to implement this check?

Ocramius commented 4 months ago

Yes please!