Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable31] refactor: remove composer dir and redirect autoloader #4430

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/autoloader.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/cypress-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ jobs:
apc.enable_cli=on
coverage: none

- name: Install composer dependencies
working-directory: apps/richdocuments
run: |
composer install

- name: Set up Nextcloud
env:
DB_PORT: 4444
Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
},
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
},
"optimize-autoloader": true,
"autoloader-suffix": "Richdocuments"
},
"require": {
"ext-json": "*",
"ext-simplexml": "*"
"ext-simplexml": "*",
"mikehaertl/php-pdftk": "^0.13.1"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down Expand Up @@ -41,6 +44,11 @@
"cs:fix": "php-cs-fixer fix",
"test:unit": "vendor/bin/phpunit -c tests/phpunit.xml"
},
"autoload" : {
"psr-4": {
"OCA\\Richdocuments\\": "./lib/"
}
},
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP"
Expand Down
144 changes: 142 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 6 additions & 21 deletions composer/autoload.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
<?php

// autoload.php @generated by Composer
declare(strict_types=1);

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$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;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitRichdocuments::getLoader();
require_once __DIR__ . '/../vendor/autoload.php';
15 changes: 0 additions & 15 deletions composer/composer.json

This file was deleted.

Loading
Loading