Skip to content

Commit

Permalink
perf(autoloading): Add authoritative autoloader for files_external
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst authored and icewind1991 committed Feb 9, 2023
1 parent d4a9da0 commit a208cde
Show file tree
Hide file tree
Showing 13 changed files with 1,362 additions and 0 deletions.
25 changes: 25 additions & 0 deletions apps/files_external/composer/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

// autoload.php @generated by Composer

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
);
}

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

return ComposerAutoloaderInitFiles_External::getLoader();
13 changes: 13 additions & 0 deletions apps/files_external/composer/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"config" : {
"vendor-dir": ".",
"optimize-autoloader": true,
"classmap-authoritative": true,
"autoloader-suffix": "Files_External"
},
"autoload" : {
"psr-4": {
"OCA\\Files_External\\": "../lib/"
}
}
}
18 changes: 18 additions & 0 deletions apps/files_external/composer/composer.lock

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

Loading

0 comments on commit a208cde

Please sign in to comment.