Skip to content

Commit 15550db

Browse files
authored
Merge pull request #4429 from nextcloud/backport/4427/stable30
[stable30] refactor: remove composer dir and redirect autoloader
2 parents 5bf617a + 9db12ad commit 15550db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+165
-5494
lines changed

.github/workflows/autoloader.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/cypress-e2e.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ jobs:
101101
apc.enable_cli=on
102102
coverage: none
103103

104+
- name: Install composer dependencies
105+
working-directory: apps/richdocuments
106+
run: |
107+
composer install
108+
104109
- name: Set up Nextcloud
105110
env:
106111
DB_PORT: 4444

composer.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
"config": {
77
"platform": {
88
"php": "8.0"
9-
}
9+
},
10+
"optimize-autoloader": true,
11+
"autoloader-suffix": "Richdocuments"
1012
},
1113
"require": {
1214
"ext-json": "*",
13-
"ext-simplexml": "*"
15+
"ext-simplexml": "*",
16+
"mikehaertl/php-pdftk": "^0.13.1"
1417
},
1518
"require-dev": {
1619
"roave/security-advisories": "dev-master",
@@ -37,6 +40,11 @@
3740
"cs:fix": "php-cs-fixer fix",
3841
"test:unit": "vendor/bin/phpunit -c tests/phpunit.xml"
3942
},
43+
"autoload" : {
44+
"psr-4": {
45+
"OCA\\Richdocuments\\": "./lib/"
46+
}
47+
},
4048
"autoload-dev": {
4149
"psr-4": {
4250
"OCP\\": "vendor/nextcloud/ocp/OCP"

composer.lock

Lines changed: 142 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer/autoload.php

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
<?php
22

3-
// autoload.php @generated by Composer
3+
declare(strict_types=1);
44

5-
if (PHP_VERSION_ID < 50600) {
6-
if (!headers_sent()) {
7-
header('HTTP/1.1 500 Internal Server Error');
8-
}
9-
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
10-
if (!ini_get('display_errors')) {
11-
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12-
fwrite(STDERR, $err);
13-
} elseif (!headers_sent()) {
14-
echo $err;
15-
}
16-
}
17-
trigger_error(
18-
$err,
19-
E_USER_ERROR
20-
);
21-
}
5+
/**
6+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
7+
* SPDX-License-Identifier: AGPL-3.0-or-later
8+
*/
229

23-
require_once __DIR__ . '/composer/autoload_real.php';
24-
25-
return ComposerAutoloaderInitRichdocuments::getLoader();
10+
require_once __DIR__ . '/../vendor/autoload.php';

composer/composer.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)