aboutsummaryrefslogtreecommitdiffstats
path: root/lib/composer/autoload.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/composer/autoload.php')
-rw-r--r--lib/composer/autoload.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/composer/autoload.php b/lib/composer/autoload.php
index 610dbf34bca..7b1481e876c 100644
--- a/lib/composer/autoload.php
+++ b/lib/composer/autoload.php
@@ -2,6 +2,21 @@
// autoload.php @generated by Composer
-require_once __DIR__ . '/composer' . '/autoload_real.php';
+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;
+ }
+ }
+ throw new RuntimeException($err);
+}
-return ComposerAutoloaderInit53792487c5a8370acc0b06b1a864ff4c::getLoader();
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInit749170dad3f5e7f9ca158f5a9f04f6a2::getLoader();