diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-11-16 14:28:09 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-12-01 15:43:47 +0300 |
commit | e4bcf0a515d1059192c17dae9d56b35f6c9e7769 (patch) | |
tree | 31ea63e415641f6ab09714a3a27906dc1fa854c2 /lib/AppInfo | |
parent | b4afd1347a14559848b52ac44425b382f2e05742 (diff) |
Require vendor autoloader in class definition
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/AppInfo')
-rw-r--r-- | lib/AppInfo/Application.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index d81684cb6..886418057 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -24,7 +24,6 @@ declare(strict_types=1); namespace OCA\Mail\AppInfo; -use Exception; use Horde_Translation; use OCA\Mail\Contracts\IAttachmentService; use OCA\Mail\Contracts\IAvatarService; @@ -70,6 +69,8 @@ use OCP\User\Events\UserDeletedEvent; use OCP\Util; use Psr\Container\ContainerInterface; +include_once __DIR__ . '/../../vendor/autoload.php'; + class Application extends App implements IBootstrap { public const APP_ID = 'mail'; @@ -78,10 +79,6 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { - if ((@include_once __DIR__ . '/../../vendor/autoload.php') === false) { - throw new Exception('Cannot include autoload. Did you run install dependencies using composer?'); - } - $context->registerParameter('hostname', Util::getServerHostName()); $context->registerService('userFolder', function (ContainerInterface $c) { |