-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathbootstrap.php
More file actions
31 lines (24 loc) · 988 Bytes
/
bootstrap.php
File metadata and controls
31 lines (24 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* SPDX-FileCopyrightText: 2021-2022 Jankari Tech Pvt. Ltd.
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
define('PHPUNIT_RUN', 1);
use Composer\Autoload\ClassLoader;
include_once __DIR__.'/vendor/autoload.php';
$serverPath = __DIR__ . '/server';
if (!file_exists($serverPath . '/lib/base.php')) {
$serverPath = __DIR__ . '/../..';
}
if (!file_exists($serverPath . '/lib/base.php')) {
throw new RuntimeException('Server path not found: ' . $serverPath);
}
include_once $serverPath.'/3rdparty/autoload.php';
require_once $serverPath. '/lib/base.php';
$classLoader = new ClassLoader();
$classLoader->addPsr4("OCA\\OpenProject\\", __DIR__ . '/lib', true);
$classLoader->addPsr4("OCP\\", $serverPath . '/lib/public', true);
$classLoader->addPsr4("OC\\", $serverPath . '/lib/private', true);
$classLoader->addPsr4("OCA\\Files\\", $serverPath . '/apps/files/lib', true);
$classLoader->register();
set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php');