diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-02-10 08:53:28 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-03-27 12:56:52 +0200 |
commit | d5dcf7aa39140dff7cdc634a310e697a5766788f (patch) | |
tree | 3196b2ea3b52e7a5078d0d4c45e6329a6cb9c8bf /apps/theming/composer/autoload.php | |
parent | 7803ba18b39b93f186f5f7c2fbc951f5c2bee1dd (diff) | |
download | nextcloud-server-d5dcf7aa39140dff7cdc634a310e697a5766788f.tar.gz nextcloud-server-d5dcf7aa39140dff7cdc634a310e697a5766788f.zip |
perf(autoloading): Add authoritative autoloader for theming
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/theming/composer/autoload.php')
-rw-r--r-- | apps/theming/composer/autoload.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/theming/composer/autoload.php b/apps/theming/composer/autoload.php new file mode 100644 index 00000000000..2990c5da55a --- /dev/null +++ b/apps/theming/composer/autoload.php @@ -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 ComposerAutoloaderInitTheming::getLoader(); |