From a7a79dfd51a28fafe4953bc9305fab8cf8619cb1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 19 May 2022 14:22:06 +0200 Subject: [PATCH] Explicitly require `psr/http-server-handler` composer dependency --- .../install/files/lib/system/api/autoload.php | 5 +++ .../files/lib/system/api/composer.json | 3 +- .../files/lib/system/api/composer.lock | 4 +-- .../system/api/composer/InstalledVersions.php | 2 ++ .../system/api/composer/autoload_classmap.php | 2 +- .../system/api/composer/autoload_files.php | 2 +- .../api/composer/autoload_namespaces.php | 2 +- .../lib/system/api/composer/autoload_psr4.php | 2 +- .../lib/system/api/composer/autoload_real.php | 31 +++---------------- .../lib/system/api/composer/include_paths.php | 2 +- .../lib/system/api/composer/installed.json | 2 +- .../lib/system/api/composer/installed.php | 2 +- 12 files changed, 22 insertions(+), 37 deletions(-) diff --git a/wcfsetup/install/files/lib/system/api/autoload.php b/wcfsetup/install/files/lib/system/api/autoload.php index 4a0e648118..b5930ce8fb 100644 --- a/wcfsetup/install/files/lib/system/api/autoload.php +++ b/wcfsetup/install/files/lib/system/api/autoload.php @@ -2,6 +2,11 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + echo '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; + exit(1); +} + require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInita1f5f7c74275d47a45049a2936db1d0d::getLoader(); diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index f4555f9132..ed1d1570d3 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -21,6 +21,7 @@ "pear/net_idna2": "^0.2.0", "pelago/emogrifier": "^6.0.0", "scssphp/scssphp": "^1.10.2", - "true/punycode": "^2.1.1" + "true/punycode": "^2.1.1", + "psr/http-server-handler": "^1.0" } } diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index 4579fee145..f02949f906 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "99009961280142468dc935e22652f5a2", + "content-hash": "a0515c273a984b19e05fad9d486e7e00", "packages": [ { "name": "chrisjean/php-ico", @@ -1687,5 +1687,5 @@ "php": "8.1.2", "ext-gd": "0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php b/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php index d50e0c9fcc..41bc143c11 100644 --- a/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php +++ b/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php @@ -21,6 +21,8 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php b/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php index ad6c495a5b..d46e3d6cbf 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_files.php b/wcfsetup/install/files/lib/system/api/composer/autoload_files.php index 7c47b61b1f..2ffd9c6e2d 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_files.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_files.php @@ -2,7 +2,7 @@ // autoload_files.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_namespaces.php b/wcfsetup/install/files/lib/system/api/composer/autoload_namespaces.php index 67a9a9a041..de98c72873 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_namespaces.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php b/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php index 272956225b..c1d9021093 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_real.php b/wcfsetup/install/files/lib/system/api/composer/autoload_real.php index 05eb3408c4..15e78e0228 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_real.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_real.php @@ -25,42 +25,19 @@ class ComposerAutoloaderInita1f5f7c74275d47a45049a2936db1d0d require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInita1f5f7c74275d47a45049a2936db1d0d', 'loadClassLoader'), true, false); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInita1f5f7c74275d47a45049a2936db1d0d', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); set_include_path(implode(PATH_SEPARATOR, $includePaths)); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d::getInitializer($loader)); $loader->register(false); - if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d::$files; - } else { - $includeFiles = require __DIR__ . '/autoload_files.php'; - } + $includeFiles = \Composer\Autoload\ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d::$files; foreach ($includeFiles as $fileIdentifier => $file) { composerRequirea1f5f7c74275d47a45049a2936db1d0d($fileIdentifier, $file); } diff --git a/wcfsetup/install/files/lib/system/api/composer/include_paths.php b/wcfsetup/install/files/lib/system/api/composer/include_paths.php index 68aeefeb8d..0d7111cca3 100644 --- a/wcfsetup/install/files/lib/system/api/composer/include_paths.php +++ b/wcfsetup/install/files/lib/system/api/composer/include_paths.php @@ -2,7 +2,7 @@ // include_paths.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = $vendorDir; return array( diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index e39a38c9fe..b0752a2c7c 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -1718,6 +1718,6 @@ "install-path": "../true/punycode" } ], - "dev": false, + "dev": true, "dev-package-names": [] } diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index 5df6748ca4..7d95b59d4c 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -7,7 +7,7 @@ 'aliases' => array(), 'reference' => NULL, 'name' => '__root__', - 'dev' => false, + 'dev' => true, ), 'versions' => array( '__root__' => array( -- 2.20.1