Skip to content

Commit

Permalink
Merge branch 'release/v0.3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
betterthanclay committed Jul 31, 2024
2 parents 046f31b + 39c43b3 commit ba25885
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.3.7 (2024-07-31)
* Allow abstract classes as scanner interfaces

## v0.3.6 (2024-07-17)
* Updated Veneer dependency

Expand Down
4 changes: 1 addition & 3 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ public function scanClasses(
}

foreach ($resolver->scanClasses() as $path => $class) {
$ref = new ReflectionClass($class);

if (!$ref->implementsInterface($interface)) {
if (!is_a($class, $interface, true)) {
continue;
}

Expand Down
5 changes: 1 addition & 4 deletions src/Resolver/ScannerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Generator;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use ReflectionClass;

trait ScannerTrait
{
Expand Down Expand Up @@ -92,9 +91,7 @@ protected function scanVendorPath(
}

if ($interface !== null) {
$ref = new ReflectionClass($class);

if (!$ref->implementsInterface($interface)) {
if (!is_a($class, $interface, true)) {
continue;
}
}
Expand Down

0 comments on commit ba25885

Please sign in to comment.