Skip to content

Commit

Permalink
#767 : Fix BC break
Browse files Browse the repository at this point in the history
Afaik this product is a tool rather than a library, so I'm not sure if
BC breaks on a function are really an issue, but the build is reporting
an unexpected BC break here

https://github.com/Roave/BackwardCompatibilityCheck/actions/runs/9148688556/job/25151720875
  • Loading branch information
bdsl committed May 19, 2024
1 parent e1cccb7 commit 3d288ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CompareClasses.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
private ClassBased $classBasedComparisons,
private InterfaceBased $interfaceBasedComparisons,
private TraitBased $traitBasedComparisons,
private EnumBased $enumBasedComparisons,
private EnumBased|null $enumBasedComparisons = null, // optional argument for now to avoid BC break
) {
}

Expand Down Expand Up @@ -91,7 +91,7 @@ private function examineSymbol(
return;
}

if ($oldSymbol->isEnum()) {
if ($oldSymbol->isEnum() && $this->enumBasedComparisons) {
yield from ($this->enumBasedComparisons)($oldSymbol, $newClass);

return;
Expand Down

0 comments on commit 3d288ec

Please sign in to comment.