Skip to content

Commit

Permalink
Support for legacy plugins using October's ExtendableTrait (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin authored Mar 6, 2024
1 parent dd89dc1 commit ca1796f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Extension/ExtendableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Winter\Storm\Support\Serialization;
use Illuminate\Support\Facades\App;
use ReflectionException;
use October\Rain\Extension\ExtendableTrait as OctoberExtendableTrait;

/**
* This extension trait is used when access to the underlying base class
Expand Down Expand Up @@ -566,7 +567,10 @@ protected function extensionGetParentClass(object $instance = null)
return false;
}

while (!in_array(ExtendableTrait::class, $parent->getTraitNames())) {
while (
!in_array(ExtendableTrait::class, $parent->getTraitNames())
&& !in_array(OctoberExtendableTrait::class, $parent->getTraitNames())
) {
$parent = $parent->getParentClass();
if ($parent === false) {
break;
Expand Down

0 comments on commit ca1796f

Please sign in to comment.