Skip to content

Commit d195486

Browse files
committed
#767 : Fix BC break
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
1 parent e1cccb7 commit d195486

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CompareClasses.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __construct(
2121
private ClassBased $classBasedComparisons,
2222
private InterfaceBased $interfaceBasedComparisons,
2323
private TraitBased $traitBasedComparisons,
24-
private EnumBased $enumBasedComparisons,
24+
private ?EnumBased $enumBasedComparisons = null, // optional argument for now to avoid BC break
2525
) {
2626
}
2727

@@ -91,7 +91,7 @@ private function examineSymbol(
9191
return;
9292
}
9393

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

9797
return;

0 commit comments

Comments
 (0)