Skip to content

Commit

Permalink
Merge pull request #36 from MbhSoft/fix/autoload-phpstan
Browse files Browse the repository at this point in the history
[BUGFIX] Support autoloaders registered as classname
  • Loading branch information
garbast authored Dec 20, 2023
2 parents c5db937 + 5a99309 commit 816c2f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Event/RegisterAutoloaderEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ protected function autoloaderAlreadyRegistered(array $autoloader): bool
foreach ($currentAutoLoaders as $currentAutoLoader) {
if (
is_array($currentAutoLoader)
&& get_class($currentAutoLoader[0]) === $autoloaderClass
&& ((is_object($currentAutoLoader[0]) && get_class($currentAutoLoader[0]) === $autoloaderClass) ||
(is_string($currentAutoLoader[0]) && $currentAutoLoader[0] === $autoloaderClass))
) {
$result = true;
break;
Expand Down

0 comments on commit 816c2f5

Please sign in to comment.