From 95e075865f9340997bc05dc32690aee6f52e15e8 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 21 Apr 2019 12:35:33 +0200 Subject: [PATCH] rename prefix and add require --- blockbot/blockbot.php | 2 ++ blockbot/composer.json | 2 +- blockbot/vendor/autoload.php | 2 +- blockbot/vendor/composer/autoload_real.php | 8 ++++---- blockbot/vendor/composer/autoload_static.php | 8 ++++---- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index 5a501357..6e4bb5ff 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -12,6 +12,8 @@ use Friendica\Core\Hook; use Friendica\Core\System; use Jaybizzle\CrawlerDetect\CrawlerDetect; +require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; + function blockbot_install() { Hook::register('init_1', 'addon/blockbot/blockbot.php', 'blockbot_init_1'); } diff --git a/blockbot/composer.json b/blockbot/composer.json index 1ed7ec94..f13a2d17 100644 --- a/blockbot/composer.json +++ b/blockbot/composer.json @@ -18,7 +18,7 @@ "minimum-stability": "stable", "config": { "optimize-autoloader": true, - "autoloader-suffix": "AdvancedContentFilterAddon", + "autoloader-suffix": "BlockBotAddon", "preferred-install": "dist" } } diff --git a/blockbot/vendor/autoload.php b/blockbot/vendor/autoload.php index 3e6193fa..d3101347 100644 --- a/blockbot/vendor/autoload.php +++ b/blockbot/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitAdvancedContentFilterAddon::getLoader(); +return ComposerAutoloaderInitBlockBotAddon::getLoader(); diff --git a/blockbot/vendor/composer/autoload_real.php b/blockbot/vendor/composer/autoload_real.php index 984dcab7..ccb886a2 100644 --- a/blockbot/vendor/composer/autoload_real.php +++ b/blockbot/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitAdvancedContentFilterAddon +class ComposerAutoloaderInitBlockBotAddon { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInitAdvancedContentFilterAddon return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitAdvancedContentFilterAddon', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitBlockBotAddon', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitAdvancedContentFilterAddon', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitBlockBotAddon', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitAdvancedContentFilterAddon::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitBlockBotAddon::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { diff --git a/blockbot/vendor/composer/autoload_static.php b/blockbot/vendor/composer/autoload_static.php index cf117f33..01987181 100644 --- a/blockbot/vendor/composer/autoload_static.php +++ b/blockbot/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitAdvancedContentFilterAddon +class ComposerStaticInitBlockBotAddon { public static $prefixLengthsPsr4 = array ( 'J' => @@ -31,9 +31,9 @@ class ComposerStaticInitAdvancedContentFilterAddon public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitAdvancedContentFilterAddon::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitAdvancedContentFilterAddon::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitAdvancedContentFilterAddon::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitBlockBotAddon::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitBlockBotAddon::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitBlockBotAddon::$classMap; }, null, ClassLoader::class); } -- 2.39.5