diff --git a/patches/README.md b/patches/README.md index 145f02e..8f8d362 100644 --- a/patches/README.md +++ b/patches/README.md @@ -10,3 +10,24 @@ here and recorded below. $filterFn = null`. Implicitly nullable parameters are deprecated as of PHP 8.4, and the tt-rss app image is on PHP 8.5, so without this every extraction emits a deprecation notice. + +## composer autoloader class name + +`vendor/` was seeded by copying `tt-rss-plugin-af-readability`'s tree, so both +plugins shipped the same generated bootstrap classes — +`ComposerAutoloaderInitb44cc79a…` and `ComposerStaticInitb44cc79a…`. + +tt-rss's Preferences page (`Pref_Prefs::getPluginsList()` → `PluginHost::load_all()`) +loads **every** plugin on disk, enabled or not. The second `require vendor/autoload.php` +then redeclared those classes and PHP fataled, which tt-rss reports as: + +> Plugin af_readability has caused a PHP fatal error so it won't be loaded again +> in this session. + +— naming whichever plugin lost the race, not the one at fault. + +The hash in `vendor/autoload.php`, `vendor/composer/autoload_real.php` and +`vendor/composer/autoload_static.php` is therefore rewritten to +`affulltext0000000000000000000001`. Regenerating `vendor/` with composer would +also fix it (composer derives the hash per-install); if you ever do, keep the +name distinct from any other tt-rss plugin's. diff --git a/vendor/autoload.php b/vendor/autoload.php index d10009f..686cd6a 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -19,4 +19,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::getLoader(); +return ComposerAutoloaderInitaffulltext0000000000000000000001::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 0ab935b..864074a 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0 +class ComposerAutoloaderInitaffulltext0000000000000000000001 { private static $loader; @@ -24,12 +24,12 @@ class ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0 require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitaffulltext0000000000000000000001', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitb44cc79a0eaef9cd9c2f2ac697cbe9c0', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitaffulltext0000000000000000000001', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitaffulltext0000000000000000000001::getInitializer($loader)); $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index ab5a356..5519503 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0 +class ComposerStaticInitaffulltext0000000000000000000001 { public static $prefixLengthsPsr4 = array ( 'f' => @@ -94,9 +94,9 @@ class ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitb44cc79a0eaef9cd9c2f2ac697cbe9c0::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitaffulltext0000000000000000000001::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitaffulltext0000000000000000000001::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitaffulltext0000000000000000000001::$classMap; }, null, ClassLoader::class); }