diff --git a/src/Auth/Provider.php b/src/Auth/Provider.php index c031af5..2f8e3bc 100644 --- a/src/Auth/Provider.php +++ b/src/Auth/Provider.php @@ -40,6 +40,12 @@ public function register(Container $container): void return $ldap; }; } + // if wtf/orm not installed, we use \Wtf\Root class directly + if (!\class_exists('\Wtf\ORM\Entity')) { + $container['entity'] = $container->protect(function (string $name) use ($container) { + return new \Wtf\Root($container); + }); + } //@codeCoverageIgnoreEnd } }