diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml
index 901d0ffa9..030f0f54a 100644
--- a/.github/workflows/shared_workflow.yml
+++ b/.github/workflows/shared_workflow.yml
@@ -229,7 +229,7 @@ jobs:
make psalm
make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 )
- - name: Copy dependent apps
+ - name: Setup dependent apps
run: |
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader --working-dir=../activity
cp -r ../activity server/apps
diff --git a/.gitignore b/.gitignore
index a4b5fff19..4288a84f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,6 @@ compose.override.yaml
!dev/.env
dev/apps
dev/certs
+
+# server files
+server/
\ No newline at end of file
diff --git a/bootstrap.php b/bootstrap.php
index a4e90b847..e26ec3bcb 100644
--- a/bootstrap.php
+++ b/bootstrap.php
@@ -9,26 +9,23 @@
use Composer\Autoload\ClassLoader;
include_once __DIR__.'/vendor/autoload.php';
-if (getenv('SERVER_PATH')) {
- $serverPath = getenv('SERVER_PATH');
-} elseif (file_exists(__DIR__ . '/server')) {
- $serverPath = __DIR__ . '/server';
-} else {
+$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("OCA\\OpenProject\\Service\\", __DIR__ . '/lib/Service', true);
-$classLoader->addPsr4("OCA\\OpenProject\\Settings\\", __DIR__ . '/lib/Settings', true);
$classLoader->addPsr4("OCP\\", $serverPath . '/lib/public', true);
$classLoader->addPsr4("OC\\", $serverPath . '/lib/private', true);
-$classLoader->addPsr4("OCA\\Files\\Event\\", $serverPath . '/apps/files/lib/Event', true);
-$classLoader->addPsr4("OCA\\OpenProject\\AppInfo\\", __DIR__ . '/lib/AppInfo', true);
-$classLoader->addPsr4("OCA\\OpenProject\\Controller\\", __DIR__ . '/lib/Controller', true);
-$classLoader->addPsr4("OCA\\OpenProject\\Exception\\", __DIR__ . '/lib/Exception', true);
+$classLoader->addPsr4("OCA\\Files\\", $serverPath . '/apps/files/lib', true);
$classLoader->register();
set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php');
diff --git a/psalm.xml b/psalm.xml
index 7e50d7561..5e6d4075f 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -20,6 +20,7 @@
+