Skip to content

Commit

Permalink
Fix without wtf/orm
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Chernyi committed May 30, 2018
1 parent 0ae3558 commit f8e9b8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Auth/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit f8e9b8c

Please sign in to comment.