Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-12-04 21:16:13 +0300
committerGitHub <noreply@github.com>2020-12-04 21:16:13 +0300
commita3762d891209a0a2338e4ba224ab4210ff074ac1 (patch)
treed8f4545b15b925dd9831c5c109f2be7bd032c6db /lib/AppInfo
parent6da3f3635e29344b42837b0804493277eb90458b (diff)
parente4bcf0a515d1059192c17dae9d56b35f6c9e7769 (diff)
Merge pull request #4086 from nextcloud/techdept/proper-vendor-include
Require vendor autoloader in class definition
Diffstat (limited to 'lib/AppInfo')
-rw-r--r--lib/AppInfo/Application.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index f8ef744b1..43a447537 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;
@@ -72,6 +71,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';
@@ -80,10 +81,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) {