Skip to content

Commit

Permalink
Adjusted fetching of reflection constants (API changed naming in `roa…
Browse files Browse the repository at this point in the history
…ve/better-reflection:^6`)
  • Loading branch information
uzibhalepu authored and Ocramius committed Oct 10, 2022
1 parent 5082a4a commit fca3b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DetectChanges/BCBreak/ClassBased/ConstantChanged.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public function __construct(private ClassConstantBased $checkConstant)
public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass): Changes
{
return Changes::fromIterator($this->checkSymbols(
$fromClass->getReflectionConstants(),
$toClass->getReflectionConstants(),
$fromClass->getConstants(),
$toClass->getConstants(),
));
}

Expand Down
2 changes: 1 addition & 1 deletion src/DetectChanges/BCBreak/ClassBased/ConstantRemoved.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __invoke(ReflectionClass $fromClass, ReflectionClass $toClass):
/** @return ReflectionClassConstant[] */
private function accessibleConstants(ReflectionClass $class): array
{
return Dict\filter($class->getReflectionConstants(), static function (ReflectionClassConstant $constant): bool {
return Dict\filter($class->getConstants(), static function (ReflectionClassConstant $constant): bool {
return $constant->isPublic() || $constant->isProtected();
});
}
Expand Down

0 comments on commit fca3b98

Please sign in to comment.