Skip to content

Commit

Permalink
handle interface_exists check in HeroAutoload class
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Sep 17, 2018
1 parent 7235d22 commit 64c647e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/HeroAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,13 @@ public static function handle(string $class)
if (
isset($debugBacktrace[1]['function'], $debugBacktrace[2]['function']) &&
$debugBacktrace[1]['function'] === 'spl_autoload_call' &&
$debugBacktrace[2]['function'] === 'class_exists'
(
$debugBacktrace[2]['function'] === 'class_exists' || $debugBacktrace[2]['function'] === 'interface_exists'
)
) {
return;
}

if (\in_array(
$class,
[
'ErrorHeroModuleLogger',
]
)) {
return;
}

throw new RuntimeException(sprintf(
'class %s not found',
$class
Expand Down

0 comments on commit 64c647e

Please sign in to comment.