From 6e72e0f997ac6954b7c7557be715195ba8f34bf3 Mon Sep 17 00:00:00 2001 From: albertlast Date: Tue, 8 Sep 2026 19:38:53 +0200 Subject: [PATCH] Writes class names as ::class resolvers rather than strings A class name in a string is not a name PHP ever checks. Every one that names a class SMF ships is now written as a ::class resolver, so the compiler resolves it against the file's imports and a misspelling stops being invisible. Where the value is a callable or a name that other code parses, the class half becomes a resolver and the rest stays a string, so every value is byte for byte what it was. The upgrader's FetchSMfiles is the exception: writing it as a resolver spells it the only way it can be spelled, which is the fix in #9660. Co-Authored-By: Claude Opus 5 Signed-off-by: albertlast --- Sources/Actions/Admin/ACP.php | 3 ++- Sources/Actions/Admin/Calendar.php | 4 +-- Sources/Actions/Admin/Membergroups.php | 7 +++--- Sources/Actions/Admin/PackageManager.php | 2 +- Sources/Actions/Admin/Registration.php | 3 ++- Sources/Actions/BoardIndex.php | 5 ++-- Sources/Actions/BuddyListToggle.php | 3 ++- Sources/Actions/Calendar.php | 2 +- Sources/Actions/Feed.php | 12 ++++----- Sources/Actions/Like.php | 3 ++- Sources/Actions/Moderation/Groups.php | 3 ++- Sources/Actions/Profile/Export.php | 5 ++-- Sources/Actions/Profile/GroupMembership.php | 3 ++- Sources/Actions/Profile/Main.php | 3 ++- Sources/Actions/ReportToMod.php | 6 +++-- Sources/Actions/TrackIP.php | 4 +-- Sources/Attachment.php | 2 +- Sources/BBCode/Quote4.php | 4 ++- Sources/Cache/CacheApi.php | 8 +++--- Sources/Calendar/Event.php | 3 ++- Sources/Class-BrowserDetect.php | 2 +- Sources/Class-CurlFetchWeb.php | 2 +- Sources/Class-Graphics.php | 12 ++++----- Sources/Class-Package.php | 4 +-- Sources/Class-Punycode.php | 2 +- Sources/Class-SearchAPI.php | 4 +-- Sources/Class-TOTP.php | 2 +- Sources/Config.php | 6 ++--- Sources/IntegrationHook.php | 6 ++--- Sources/ItemList.php | 4 +-- Sources/Mail.php | 4 +-- Sources/Maintenance/Maintenance.php | 2 +- Sources/Maintenance/Tools/Upgrade.php | 6 +++-- Sources/Maintenance/Utf8ConverterStep.php | 3 ++- Sources/Msg.php | 10 ++++---- Sources/Parsers/MarkdownParser.php | 8 +++--- Sources/Search/APIs/Parsed.php | 3 ++- Sources/SearchAPI-Custom.php | 2 +- Sources/SearchAPI-Fulltext.php | 2 +- Sources/SearchAPI-Standard.php | 2 +- Sources/ServerSideIncludes.php | 12 ++++----- Sources/Services/ErrorHandlerService.php | 2 +- Sources/TaskRunner.php | 28 ++++++++++----------- Sources/Tasks/WeeklyMaintenance.php | 4 +-- Sources/User.php | 2 +- Sources/Utils.php | 4 +-- proxy.php | 2 +- 47 files changed, 122 insertions(+), 103 deletions(-) diff --git a/Sources/Actions/Admin/ACP.php b/Sources/Actions/Admin/ACP.php index 060a995fa27..acda9ab08e4 100644 --- a/Sources/Actions/Admin/ACP.php +++ b/Sources/Actions/Admin/ACP.php @@ -28,6 +28,7 @@ use SMF\Lang; use SMF\Mail; use SMF\Menu; +use SMF\PackageManager\PackageManager; use SMF\Parser; use SMF\Routable; use SMF\Sapi; @@ -127,7 +128,7 @@ class ACP implements ActionInterface, Routable ], 'packages' => [ 'label' => 'package', - 'function' => 'SMF\\PackageManager\\PackageManager::call', + 'function' => PackageManager::class . '::call', 'permission' => ['admin_forum'], 'icon' => 'packages', 'subsections' => [ diff --git a/Sources/Actions/Admin/Calendar.php b/Sources/Actions/Admin/Calendar.php index f50118de912..81266834bc4 100644 --- a/Sources/Actions/Admin/Calendar.php +++ b/Sources/Actions/Admin/Calendar.php @@ -136,10 +136,10 @@ public function holidays(): void 'base_href' => Config::$scripturl . '?action=admin;area=managecalendar;sa=holidays', 'default_sort_col' => 'name', 'get_items' => [ - 'function' => 'SMF\\Calendar\\Holiday::list', + 'function' => Holiday::class . '::list', ], 'get_count' => [ - 'function' => 'SMF\\Calendar\\Holiday::count', + 'function' => Holiday::class . '::count', ], 'no_items_label' => Lang::getTxt('holidays_no_entries', file: 'ManageCalendar'), 'columns' => [ diff --git a/Sources/Actions/Admin/Membergroups.php b/Sources/Actions/Admin/Membergroups.php index 87b80be2767..aeb1171787b 100644 --- a/Sources/Actions/Admin/Membergroups.php +++ b/Sources/Actions/Admin/Membergroups.php @@ -16,6 +16,7 @@ namespace SMF\Actions\Admin; use SMF\ActionInterface; +use SMF\Actions\Groups; use SMF\ActionTrait; use SMF\Config; use SMF\Db\DatabaseApi as Db; @@ -70,7 +71,7 @@ class Membergroups implements ActionInterface 'settings' => ['settings', 'admin_forum'], // This subaction is handled by the Groups action. - 'members' => ['SMF\\Actions\\Groups::call', 'manage_membergroups'], + 'members' => [Groups::class . '::call', 'manage_membergroups'], ]; /**************** @@ -121,7 +122,7 @@ public function index(): void 'base_href' => Config::$scripturl . '?action=admin;area=membergroups' . (isset($_REQUEST['sort2']) ? ';sort2=' . urlencode($_REQUEST['sort2']) : ''), 'default_sort_col' => 'name', 'get_items' => [ - 'function' => '\\SMF\\Actions\\Groups::list_getMembergroups', + 'function' => Groups::class . '::list_getMembergroups', 'params' => [ 'regular', ], @@ -227,7 +228,7 @@ public function index(): void 'desc' => 'desc2', ], 'get_items' => [ - 'function' => '\\SMF\\Actions\\Groups::list_getMembergroups', + 'function' => Groups::class . '::list_getMembergroups', 'params' => [ 'post_count', ], diff --git a/Sources/Actions/Admin/PackageManager.php b/Sources/Actions/Admin/PackageManager.php index 5bcb0f9ccaa..abae3f2790c 100644 --- a/Sources/Actions/Admin/PackageManager.php +++ b/Sources/Actions/Admin/PackageManager.php @@ -16,4 +16,4 @@ } // Just an alias to help people looking for the package manager in the wrong namespace. -class_alias('SMF\\PackageManager\\PackageManager', 'SMF\\Actions\\Admin\\PackageManager'); +class_alias(\SMF\PackageManager\PackageManager::class, 'SMF\\Actions\\Admin\\PackageManager'); diff --git a/Sources/Actions/Admin/Registration.php b/Sources/Actions/Admin/Registration.php index 52403082fd8..73c9d4cf1a2 100644 --- a/Sources/Actions/Admin/Registration.php +++ b/Sources/Actions/Admin/Registration.php @@ -28,6 +28,7 @@ use SMF\Menu; use SMF\Profile; use SMF\SecurityToken; +use SMF\Tasks\UpdateSpoofDetectorNames; use SMF\Theme; use SMF\Time; use SMF\User; @@ -635,7 +636,7 @@ public function reservedNames(): void ], [ [ - 'SMF\\Tasks\\UpdateSpoofDetectorNames', + UpdateSpoofDetectorNames::class, json_encode(['last_member_id' => 0]), 0, ], diff --git a/Sources/Actions/BoardIndex.php b/Sources/Actions/BoardIndex.php index c8ea8eea5cc..8917b096bbf 100644 --- a/Sources/Actions/BoardIndex.php +++ b/Sources/Actions/BoardIndex.php @@ -22,6 +22,7 @@ use SMF\Cache\CacheApi; use SMF\Category; use SMF\Config; +use SMF\Group; use SMF\IntegrationHook; use SMF\Lang; use SMF\Logging; @@ -134,7 +135,7 @@ public function execute(): void 'num_days_shown' => empty(Config::$modSettings['cal_days_for_index']) || Config::$modSettings['cal_days_for_index'] < 1 ? 1 : Config::$modSettings['cal_days_for_index'], ]; - Utils::$context += CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', 'SMF\\Actions\\Calendar::cache_getRecentEvents', [$eventOptions]); + Utils::$context += CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', Calendar::class . '::cache_getRecentEvents', [$eventOptions]); // Whether one or multiple days are shown on the board index. Utils::$context['calendar_only_today'] = Config::$modSettings['cal_days_for_index'] == 1; @@ -177,7 +178,7 @@ public function execute(): void // Are we showing all membergroups on the board index? if (!empty(Theme::$current->settings['show_group_key'])) { - Utils::$context['membergroups'] = CacheApi::quickGet('membergroup_list', 'Group.php', 'SMF\\Group::getCachedList', []); + Utils::$context['membergroups'] = CacheApi::quickGet('membergroup_list', 'Group.php', Group::class . '::getCachedList', []); } // Mark read button diff --git a/Sources/Actions/BuddyListToggle.php b/Sources/Actions/BuddyListToggle.php index 2f00f3492bb..5bd174a0f82 100644 --- a/Sources/Actions/BuddyListToggle.php +++ b/Sources/Actions/BuddyListToggle.php @@ -23,6 +23,7 @@ use SMF\Db\DatabaseApi as Db; use SMF\ErrorHandler; use SMF\Routable; +use SMF\Tasks\Buddy_Notify; use SMF\User; use SMF\Utils; @@ -86,7 +87,7 @@ public function execute(): void ], [ [ - 'SMF\\Tasks\\Buddy_Notify', + Buddy_Notify::class, Utils::jsonEncode([ 'receiver_id' => $this->userReceiver, 'id_member' => User::$me->id, diff --git a/Sources/Actions/Calendar.php b/Sources/Actions/Calendar.php index f6a9de38f4b..50b1929cee9 100644 --- a/Sources/Actions/Calendar.php +++ b/Sources/Actions/Calendar.php @@ -1394,7 +1394,7 @@ public static function cache_getOffsetIndependentEvents(array $eventOptions): ar public static function cache_getRecentEvents(array $eventOptions): array { // With the 'static' cached data we can calculate the user-specific data. - $cached_data = CacheApi::quickGet('calendar_index', 'Actions/Calendar.php', 'SMF\\Actions\\Calendar::cache_getOffsetIndependentEvents', [$eventOptions]); + $cached_data = CacheApi::quickGet('calendar_index', 'Actions/Calendar.php', Calendar::class . '::cache_getOffsetIndependentEvents', [$eventOptions]); // Get the information about today (from user perspective). $today = self::getTodayInfo(); diff --git a/Sources/Actions/Feed.php b/Sources/Actions/Feed.php index 907c9f5d53b..a1a87b40d11 100644 --- a/Sources/Actions/Feed.php +++ b/Sources/Actions/Feed.php @@ -582,7 +582,7 @@ public function getXmlMembers(): array while ($row = Db::$db->fetch_assoc($request)) { // If any control characters slipped in somehow, kill the evil things - $row = filter_var($row, FILTER_CALLBACK, ['options' => '\\SMF\\Utils::cleanXml']); + $row = filter_var($row, FILTER_CALLBACK, ['options' => Utils::class . '::cleanXml']); // Create a UUID for each member $uuid = (string) (new Uuid(5, 'member=' . $row['id_member'])); @@ -772,7 +772,7 @@ public function getXmlNews(): array while ($row = Db::$db->fetch_assoc($request)) { // If any control characters slipped in somehow, kill the evil things - $row = filter_var($row, FILTER_CALLBACK, ['options' => '\\SMF\\Utils::cleanXml']); + $row = filter_var($row, FILTER_CALLBACK, ['options' => Utils::class . '::cleanXml']); // Old SMF versions autolinked during output rather than input, // so maintain expected behaviour for those old messages. @@ -1213,7 +1213,7 @@ public function getXmlRecent(): array while ($row = Db::$db->fetch_assoc($request)) { // If any control characters slipped in somehow, kill the evil things - $row = filter_var($row, FILTER_CALLBACK, ['options' => '\\SMF\\Utils::cleanXml']); + $row = filter_var($row, FILTER_CALLBACK, ['options' => Utils::class . '::cleanXml']); // Old SMF versions autolinked during output rather than input, // so maintain expected behaviour for those old messages. @@ -1619,7 +1619,7 @@ public function getXmlProfile(): array $profile = User::$loaded[$this->member]->format($this->format == 'smf'); // If any control characters slipped in somehow, kill the evil things - $profile = filter_var($profile, FILTER_CALLBACK, ['options' => '\\SMF\\Utils::cleanXml']); + $profile = filter_var($profile, FILTER_CALLBACK, ['options' => Utils::class . '::cleanXml']); // Create a UUID for this member $uuid = (string) (new Uuid(5, 'member=' . $profile['id'])); @@ -1979,7 +1979,7 @@ public function getXmlPosts(): array $row['poster_ip'] = new IP($row['poster_ip']); // If any control characters slipped in somehow, kill the evil things - $row = filter_var($row, FILTER_CALLBACK, ['options' => '\\SMF\\Utils::cleanXml']); + $row = filter_var($row, FILTER_CALLBACK, ['options' => Utils::class . '::cleanXml']); // Old SMF versions autolinked during output rather than input, // so maintain expected behaviour for those old messages. @@ -2431,7 +2431,7 @@ public function getXmlPMs(): array $this->start_after = (int) $row['id_pm']; // If any control characters slipped in somehow, kill the evil things - $row = filter_var($row, FILTER_CALLBACK, ['options' => '\\SMF\\Utils::cleanXml']); + $row = filter_var($row, FILTER_CALLBACK, ['options' => Utils::class . '::cleanXml']); // Old SMF versions autolinked during output rather than input, // so maintain expected behaviour for those old messages. diff --git a/Sources/Actions/Like.php b/Sources/Actions/Like.php index ca7b198192b..58b9bd1bb87 100644 --- a/Sources/Actions/Like.php +++ b/Sources/Actions/Like.php @@ -28,6 +28,7 @@ use SMF\OutputTypeInterface; use SMF\OutputTypes; use SMF\Routable; +use SMF\Tasks\Likes_Notify; use SMF\Theme; use SMF\Time; use SMF\User; @@ -518,7 +519,7 @@ protected function insert(): void ], [ [ - 'SMF\\Tasks\\Likes_Notify', + Likes_Notify::class, Utils::jsonEncode([ 'content_id' => $content, 'content_type' => $type, diff --git a/Sources/Actions/Moderation/Groups.php b/Sources/Actions/Moderation/Groups.php index 20a2b7fdb8f..40d7c8f0532 100644 --- a/Sources/Actions/Moderation/Groups.php +++ b/Sources/Actions/Moderation/Groups.php @@ -25,6 +25,7 @@ use SMF\Lang; use SMF\Menu; use SMF\SecurityToken; +use SMF\Tasks\GroupAct_Notify; use SMF\Theme; use SMF\Time; use SMF\User; @@ -333,7 +334,7 @@ public function requests(): void ], [ [ - 'SMF\\Tasks\\GroupAct_Notify', + GroupAct_Notify::class, $data, 0, ], diff --git a/Sources/Actions/Profile/Export.php b/Sources/Actions/Profile/Export.php index b9e7b0a5d89..45f1ef374bd 100644 --- a/Sources/Actions/Profile/Export.php +++ b/Sources/Actions/Profile/Export.php @@ -23,6 +23,7 @@ use SMF\Lang; use SMF\Security; use SMF\SecurityToken; +use SMF\Tasks\ExportProfileData; use SMF\Theme; use SMF\Time; use SMF\User; @@ -153,7 +154,7 @@ public function execute(): void WHERE task_class = {string:class} AND task_data LIKE {string:details}', [ - 'class' => 'SMF\\Tasks\\ExportProfileData', + 'class' => ExportProfileData::class, 'details' => substr(Utils::jsonEncode(['format' => $format, 'uid' => Utils::$context['id_member']]), 0, -1) . ',%', ], ); @@ -317,7 +318,7 @@ public function execute(): void ], [ [ - 'SMF\\Tasks\\ExportProfileData', + ExportProfileData::class, $data, 0, ], diff --git a/Sources/Actions/Profile/GroupMembership.php b/Sources/Actions/Profile/GroupMembership.php index 7b13f79e6ba..41a0a5fb35a 100644 --- a/Sources/Actions/Profile/GroupMembership.php +++ b/Sources/Actions/Profile/GroupMembership.php @@ -23,6 +23,7 @@ use SMF\Group; use SMF\Lang; use SMF\Profile; +use SMF\Tasks\GroupReq_Notify; use SMF\User; use SMF\Utils; @@ -420,7 +421,7 @@ protected function sendJoinRequest(int $new_group_id): void ], [ [ - 'SMF\\Tasks\\GroupReq_Notify', + GroupReq_Notify::class, $data, 0, ], diff --git a/Sources/Actions/Profile/Main.php b/Sources/Actions/Profile/Main.php index a83fbd3cdbf..f7e443a953c 100644 --- a/Sources/Actions/Profile/Main.php +++ b/Sources/Actions/Profile/Main.php @@ -19,6 +19,7 @@ use SMF\ActionTrait; use SMF\Config; use SMF\Db\DatabaseApi as Db; +use SMF\Draft; use SMF\ErrorHandler; use SMF\IntegrationHook; use SMF\Lang; @@ -197,7 +198,7 @@ class Main implements ActionInterface, Routable ], 'showdrafts' => [ 'label' => 'drafts_show', - 'function' => 'SMF\\Draft::showInProfile', + 'function' => Draft::class . '::showInProfile', 'icon' => 'drafts', 'enabled' => true, 'permission' => [ diff --git a/Sources/Actions/ReportToMod.php b/Sources/Actions/ReportToMod.php index 392a091811f..4926fabd520 100644 --- a/Sources/Actions/ReportToMod.php +++ b/Sources/Actions/ReportToMod.php @@ -26,6 +26,8 @@ use SMF\Parser; use SMF\Routable; use SMF\Security; +use SMF\Tasks\MemberReport_Notify; +use SMF\Tasks\MsgReport_Notify; use SMF\Theme; use SMF\Topic; use SMF\User; @@ -474,7 +476,7 @@ protected function reportMsg(int $msg): void ], [ [ - 'SMF\\Tasks\\MsgReport_Notify', + MsgReport_Notify::class, Utils::jsonEncode([ 'report_id' => $id_report, 'msg_id' => $msg, @@ -639,7 +641,7 @@ protected function reportMember(int $id_member): void ], [ [ - 'SMF\\Tasks\\MemberReport_Notify', + MemberReport_Notify::class, Utils::jsonEncode([ 'report_id' => $id_report, 'user_id' => $user['id_member'], diff --git a/Sources/Actions/TrackIP.php b/Sources/Actions/TrackIP.php index 0dc1721961c..b1b50488a1f 100644 --- a/Sources/Actions/TrackIP.php +++ b/Sources/Actions/TrackIP.php @@ -230,14 +230,14 @@ public function execute(): void 'base_href' => Utils::$context['base_url'] . ';searchip=' . Utils::$context['ip'], 'default_sort_col' => 'date2', 'get_items' => [ - 'function' => '\\SMF\\Actions\\Profile\\Tracking::list_getUserErrors', + 'function' => \SMF\Actions\Profile\Tracking::class . '::list_getUserErrors', 'params' => [ 'le.ip >= ' . $ip_string[0] . ' and le.ip <= ' . $ip_string[1], $fields, ], ], 'get_count' => [ - 'function' => '\\SMF\\Actions\\Profile\\Tracking::list_getUserErrorCount', + 'function' => \SMF\Actions\Profile\Tracking::class . '::list_getUserErrorCount', 'params' => [ 'ip >= ' . $ip_string[0] . ' and ip <= ' . $ip_string[1], $fields, diff --git a/Sources/Attachment.php b/Sources/Attachment.php index 373e1a557b4..f7834da3abf 100644 --- a/Sources/Attachment.php +++ b/Sources/Attachment.php @@ -1453,7 +1453,7 @@ public static function create(array &$attachmentOptions): bool ], [ [ - 'SMF\\Tasks\\CreateAttachment_Notify', + Tasks\CreateAttachment_Notify::class, Utils::jsonEncode(['id' => $attachmentOptions['id']]), 0, ], diff --git a/Sources/BBCode/Quote4.php b/Sources/BBCode/Quote4.php index 1c6dae1bb12..350f950681f 100644 --- a/Sources/BBCode/Quote4.php +++ b/Sources/BBCode/Quote4.php @@ -15,6 +15,8 @@ namespace SMF\BBCode; +use SMF\Time; + /** * Represents the version of the quote BBCode with multiple parameters. */ @@ -35,7 +37,7 @@ class Quote4 extends BBCode public ?array $parameters = [ 'author' => ['match' => '([^<>]{1,192}?)'], 'link' => ['match' => '(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?|msg=\d+?|action=profile;u=\d+)'], - 'date' => ['match' => '(\d+)', 'validate' => 'SMF\\Time::stringFromUnix'], + 'date' => ['match' => '(\d+)', 'validate' => Time::class . '::stringFromUnix'], ]; /** diff --git a/Sources/Cache/CacheApi.php b/Sources/Cache/CacheApi.php index de9543e79ae..cdc3273cdde 100644 --- a/Sources/Cache/CacheApi.php +++ b/Sources/Cache/CacheApi.php @@ -488,7 +488,7 @@ final public static function clean(string $type = ''): void */ final public static function quickGet(string $key, string $file, string|array $function, array $params, int $level = 1): mixed { - if (class_exists('SMF\\IntegrationHook', false)) { + if (class_exists(IntegrationHook::class, false)) { IntegrationHook::call('pre_cache_quick_get', [&$key, &$file, &$function, &$params, &$level]); } @@ -529,7 +529,7 @@ final public static function quickGet(string $key, string $file, string|array $f $callback($cache_block, $params); } - if (class_exists('SMF\\IntegrationHook', false)) { + if (class_exists(IntegrationHook::class, false)) { IntegrationHook::call('post_cache_quick_get', [&$cache_block]); } @@ -568,7 +568,7 @@ final public static function put(string $key, mixed $value, int $ttl = 120): voi $value = $value === null ? null : serialize($value); self::$loadedApi->putData($key, $value, $ttl); - if (class_exists('SMF\\IntegrationHook', false)) { + if (class_exists(IntegrationHook::class, false)) { IntegrationHook::call('cache_put_data', [&$key, &$value, &$ttl]); } @@ -613,7 +613,7 @@ final public static function get(string $key, int $ttl = 120): mixed } } - if (class_exists('SMF\\IntegrationHook', false) && isset($value)) { + if (class_exists(IntegrationHook::class, false) && isset($value)) { IntegrationHook::call('cache_get_data', [&$key, &$ttl, &$value]); } diff --git a/Sources/Calendar/Event.php b/Sources/Calendar/Event.php index c7cb9bb527d..981f2bf2455 100644 --- a/Sources/Calendar/Event.php +++ b/Sources/Calendar/Event.php @@ -22,6 +22,7 @@ use SMF\ErrorHandler; use SMF\IntegrationHook; use SMF\Lang; +use SMF\Tasks\EventNew_Notify; use SMF\Theme; use SMF\Time; use SMF\TimeInterval; @@ -1802,7 +1803,7 @@ public static function create(array $eventOptions): void ], [ [ - 'SMF\\Tasks\\EventNew_Notify', + EventNew_Notify::class, Utils::jsonEncode([ 'event_title' => $event->title, 'event_id' => $event->id, diff --git a/Sources/Class-BrowserDetect.php b/Sources/Class-BrowserDetect.php index 9a1fba834b6..70d6508576f 100644 --- a/Sources/Class-BrowserDetect.php +++ b/Sources/Class-BrowserDetect.php @@ -17,4 +17,4 @@ die('No direct access...'); } -class_alias('SMF\\BrowserDetector', '\\browser_detector'); +class_alias(\SMF\BrowserDetector::class, '\\browser_detector'); diff --git a/Sources/Class-CurlFetchWeb.php b/Sources/Class-CurlFetchWeb.php index 71143e774a9..138193115d1 100644 --- a/Sources/Class-CurlFetchWeb.php +++ b/Sources/Class-CurlFetchWeb.php @@ -17,4 +17,4 @@ die('No direct access...'); } -class_alias('SMF\\WebFetch\\APIs\\CurlFetcher', '\\curl_fetch_web_data'); +class_alias(\SMF\WebFetch\APIs\CurlFetcher::class, '\\curl_fetch_web_data'); diff --git a/Sources/Class-Graphics.php b/Sources/Class-Graphics.php index c5f70cdd6e2..fa42b7e8e67 100644 --- a/Sources/Class-Graphics.php +++ b/Sources/Class-Graphics.php @@ -17,9 +17,9 @@ die('No direct access...'); } -class_alias('SMF\\Graphics\\Gif\\ColorTable', '\\gif_color_table'); -class_alias('SMF\\Graphics\\Gif\\File', '\\gif_file'); -class_alias('SMF\\Graphics\\Gif\\FileHeader', '\\gif_file_header'); -class_alias('SMF\\Graphics\\Gif\\Image', '\\gif_image'); -class_alias('SMF\\Graphics\\Gif\\ImageHeader', '\\gif_image_header'); -class_alias('SMF\\Graphics\\Gif\\LzwCompression', '\\gif_lzw_compression'); +class_alias(\SMF\Graphics\Gif\ColorTable::class, '\\gif_color_table'); +class_alias(\SMF\Graphics\Gif\File::class, '\\gif_file'); +class_alias(\SMF\Graphics\Gif\FileHeader::class, '\\gif_file_header'); +class_alias(\SMF\Graphics\Gif\Image::class, '\\gif_image'); +class_alias(\SMF\Graphics\Gif\ImageHeader::class, '\\gif_image_header'); +class_alias(\SMF\Graphics\Gif\LzwCompression::class, '\\gif_lzw_compression'); diff --git a/Sources/Class-Package.php b/Sources/Class-Package.php index 638de276ca2..cc483dfb947 100644 --- a/Sources/Class-Package.php +++ b/Sources/Class-Package.php @@ -17,5 +17,5 @@ die('No direct access...'); } -class_alias('SMF\\PackageManager\\XmlArray', '\\xmlArray'); -class_alias('SMF\\PackageManager\\FtpConnection', '\\ftp_connection'); +class_alias(\SMF\PackageManager\XmlArray::class, '\\xmlArray'); +class_alias(\SMF\PackageManager\FtpConnection::class, '\\ftp_connection'); diff --git a/Sources/Class-Punycode.php b/Sources/Class-Punycode.php index 99614cc2fb4..f4a196aef99 100644 --- a/Sources/Class-Punycode.php +++ b/Sources/Class-Punycode.php @@ -17,4 +17,4 @@ die('No direct access...'); } -class_alias('SMF\\Punycode', '\\Punycode'); +class_alias(\SMF\Punycode::class, '\\Punycode'); diff --git a/Sources/Class-SearchAPI.php b/Sources/Class-SearchAPI.php index d46e9c3bd32..c2dc3999c7a 100644 --- a/Sources/Class-SearchAPI.php +++ b/Sources/Class-SearchAPI.php @@ -17,5 +17,5 @@ die('No direct access...'); } -class_alias('SMF\\Search\\SearchApiInterface', '\\search_api_interface'); -class_alias('SMF\\Search\\SearchApi', '\\search_api'); +class_alias(\SMF\Search\SearchApiInterface::class, '\\search_api_interface'); +class_alias(\SMF\Search\SearchApi::class, '\\search_api'); diff --git a/Sources/Class-TOTP.php b/Sources/Class-TOTP.php index cebdf62a3db..f0069c595e2 100644 --- a/Sources/Class-TOTP.php +++ b/Sources/Class-TOTP.php @@ -17,4 +17,4 @@ die('No direct access...'); } -class_alias('SMF\\TOTP\\Auth', '\\TOTP\\Auth'); +class_alias(\SMF\TOTP\Auth::class, '\\TOTP\\Auth'); diff --git a/Sources/Config.php b/Sources/Config.php index ab6141762f1..545df0e5877 100644 --- a/Sources/Config.php +++ b/Sources/Config.php @@ -1397,7 +1397,7 @@ public static function getAuthSecret(): string // It is important to store this in Settings.php, not the database. // If saving fails, we should alert, log, and set a static value. if (!self::updateSettingsFile(['auth_secret' => self::$auth_secret])) { - if (class_exists('SMF\\Utils', false)) { + if (class_exists(Utils::class, false)) { Utils::$context['auth_secret_missing'] = true; } @@ -1428,7 +1428,7 @@ public static function getSettingsDefs(): array // Allow mods the option to define comments, defaults, etc., for their settings. // Check if IntegrationHook exists, in case we are calling from installer or upgrader. - if (class_exists('SMF\\IntegrationHook', false)) { + if (class_exists(IntegrationHook::class, false)) { IntegrationHook::call('integrate_update_settings_file', [&self::$settings_defs]); } @@ -3087,7 +3087,7 @@ protected static function getTempDir(): string { // Can't rely on autoloading because this method may be // called before the autoloader exists. - if (!class_exists('\\SMF\\Sapi', false)) { + if (!class_exists(Sapi::class, false)) { require_once self::$sourcedir . DIRECTORY_SEPARATOR . 'Sapi.php'; } diff --git a/Sources/IntegrationHook.php b/Sources/IntegrationHook.php index 5695746781f..9a96e9d7cc0 100644 --- a/Sources/IntegrationHook.php +++ b/Sources/IntegrationHook.php @@ -87,8 +87,8 @@ public function __construct(string $name, ?bool $ignore_errors = null) { if ( !self::$enabled - || !class_exists('SMF\\Config', false) - || !class_exists('SMF\\Utils', false) + || !class_exists(Config::class, false) + || !class_exists(Utils::class, false) ) { return; } @@ -153,7 +153,7 @@ public function execute(array $parameters = []): array '$sourcedir' => Config::$sourcedir, ]); - if (str_contains($path, '$themedir') && class_exists('SMF\\Theme', false) && !empty(Theme::$current->settings['theme_dir'])) { + if (str_contains($path, '$themedir') && class_exists(Theme::class, false) && !empty(Theme::$current->settings['theme_dir'])) { $path = strtr($path, [ '$themedir' => Theme::$current->settings['theme_dir'], ]); diff --git a/Sources/ItemList.php b/Sources/ItemList.php index 4a2951890f7..fdb2e3e6ae9 100644 --- a/Sources/ItemList.php +++ b/Sources/ItemList.php @@ -416,11 +416,11 @@ protected function buildRows(): void // These are probably the most readable way of injecting complex data. elseif (isset($data['sprintf']) || isset($data['format_text']) || isset($data['get_txt'])) { $params = isset($data['sprintf']) ? [] : $list_item; - $call = 'SMF\Lang::formatText'; + $call = Lang::class . '::formatText'; $format = isset($data['format_text']) ? 'format_text' : 'sprintf'; if (isset($data['get_txt'])) { - $call = 'SMF\Lang::getTxt'; + $call = Lang::class . '::getTxt'; $format = 'get_txt'; } diff --git a/Sources/Mail.php b/Sources/Mail.php index df9f64a9f92..a1675208d25 100644 --- a/Sources/Mail.php +++ b/Sources/Mail.php @@ -688,7 +688,7 @@ public static function sendNotifications(int|array $topics, string $type, array while ($row = Db::$db->fetch_assoc($result)) { $task_rows[] = [ - 'SMF\\Tasks\\CreatePost_Notify', + Tasks\CreatePost_Notify::class, Utils::jsonEncode([ 'msgOptions' => [ 'id' => $row['id_msg'], @@ -767,7 +767,7 @@ public static function adminNotify(string $type, int $memberID, ?string $member_ ], [ [ - 'SMF\\Tasks\\Register_Notify', + Tasks\Register_Notify::class, Utils::jsonEncode([ 'new_member_id' => $memberID, 'new_member_name' => $member_name, diff --git a/Sources/Maintenance/Maintenance.php b/Sources/Maintenance/Maintenance.php index c42e9191a18..df93570fea3 100644 --- a/Sources/Maintenance/Maintenance.php +++ b/Sources/Maintenance/Maintenance.php @@ -374,7 +374,7 @@ public static function getSelf(): string */ public static function getBaseDir(): string { - if (class_exists('\\SMF\\Config')) { + if (class_exists(Config::class)) { if (!isset(Config::$boarddir)) { Config::load(); } diff --git a/Sources/Maintenance/Tools/Upgrade.php b/Sources/Maintenance/Tools/Upgrade.php index 2b3a6335353..648d65d4eff 100644 --- a/Sources/Maintenance/Tools/Upgrade.php +++ b/Sources/Maintenance/Tools/Upgrade.php @@ -31,6 +31,8 @@ use SMF\Sapi; use SMF\SecurityToken; use SMF\Session; +use SMF\Tasks\FetchSMFiles; +use SMF\Tasks\UpdateSpoofDetectorNames; use SMF\Themes\default\MaintenanceTemplate; use SMF\Time; use SMF\User; @@ -1226,7 +1228,7 @@ public function finalize(): bool ], [ [ - 'SMF\\Tasks\\FetchSMfiles', + FetchSMFiles::class, '', 0, ], @@ -1244,7 +1246,7 @@ public function finalize(): bool ], [ [ - 'SMF\\Tasks\\UpdateSpoofDetectorNames', + UpdateSpoofDetectorNames::class, json_encode(['last_member_id' => 0]), 0, ], diff --git a/Sources/Maintenance/Utf8ConverterStep.php b/Sources/Maintenance/Utf8ConverterStep.php index c22a63e673d..d95c02e72d3 100644 --- a/Sources/Maintenance/Utf8ConverterStep.php +++ b/Sources/Maintenance/Utf8ConverterStep.php @@ -20,6 +20,7 @@ use SMF\Db\Schema\Table; use SMF\Lang; use SMF\Sapi; +use SMF\Tasks\Utf8EntityDecode; use SMF\Utils; /** @@ -897,7 +898,7 @@ public function convertTable(string $table_name): bool ], [ [ - '\\SMF\\Tasks\\Utf8EntityDecode', + Utf8EntityDecode::class, json_encode([ 'table' => $table_name, 'offset' => 0, diff --git a/Sources/Msg.php b/Sources/Msg.php index a8d2e6fb42a..dfed4c4893f 100644 --- a/Sources/Msg.php +++ b/Sources/Msg.php @@ -984,7 +984,7 @@ public static function create(array &$msgOptions, array &$topicOptions, array &$ 'claimed_time' => 'int'], [ [ - 'SMF\\Tasks\\ApprovePost_Notify', + Tasks\ApprovePost_Notify::class, Utils::jsonEncode([ 'msgOptions' => $msgOptions, 'topicOptions' => $topicOptions, @@ -1009,7 +1009,7 @@ public static function create(array &$msgOptions, array &$topicOptions, array &$ ], [ [ - 'SMF\\Tasks\\ApproveReply_Notify', + Tasks\ApproveReply_Notify::class, Utils::jsonEncode([ 'msgOptions' => $msgOptions, 'topicOptions' => $topicOptions, @@ -1077,7 +1077,7 @@ public static function create(array &$msgOptions, array &$topicOptions, array &$ ], [ [ - 'SMF\\Tasks\\CreatePost_Notify', + Tasks\CreatePost_Notify::class, Utils::jsonEncode([ 'msgOptions' => $msgOptions, 'topicOptions' => $topicOptions, @@ -1297,7 +1297,7 @@ public static function modify(array &$msgOptions, array &$topicOptions, array &$ ], [ [ - 'SMF\\Tasks\\CreatePost_Notify', + Tasks\CreatePost_Notify::class, Utils::jsonEncode([ 'msgOptions' => $msgOptions, 'topicOptions' => $topicOptions, @@ -1540,7 +1540,7 @@ public static function approve(array|int $msgs, bool $approve = true, bool $noti foreach (array_merge($notification_topics, $notification_posts) as $topic) { $task_rows[] = [ - 'SMF\\Tasks\\CreatePost_Notify', + Tasks\CreatePost_Notify::class, Utils::jsonEncode([ 'msgOptions' => [ 'id' => $topic['msg'], diff --git a/Sources/Parsers/MarkdownParser.php b/Sources/Parsers/MarkdownParser.php index 2a1d0eeccde..fe5691c71e7 100644 --- a/Sources/Parsers/MarkdownParser.php +++ b/Sources/Parsers/MarkdownParser.php @@ -1778,8 +1778,8 @@ protected function testIsTable(array $line_info): bool return false; } - $thead_cells = array_map('\SMF\Utils::htmlTrim', preg_split('/(?open[$o]['content'][0], -1, PREG_SPLIT_NO_EMPTY)); + $cells = array_map(Utils::class . '::htmlTrim', preg_split('/(?open[$o]['content'][0], -1, PREG_SPLIT_NO_EMPTY)); $tr = []; @@ -2170,7 +2170,7 @@ protected function appendIndentedCode(array $line_info, int $last_container, int */ protected function appendTableRow(array &$line_info, int $last_container, int $o): void { - $cells = array_map('\SMF\Utils::htmlTrim', preg_split('/(? __METHOD__, 'start_id' => ($last_id ?? 0) + 1, diff --git a/Sources/SearchAPI-Custom.php b/Sources/SearchAPI-Custom.php index bb6e06daec1..f32650add41 100644 --- a/Sources/SearchAPI-Custom.php +++ b/Sources/SearchAPI-Custom.php @@ -19,4 +19,4 @@ die('No direct access...'); } -class_alias('SMF\\Search\\APIs\\Custom', '\\custom_search'); +class_alias(\SMF\Search\APIs\Custom::class, '\\custom_search'); diff --git a/Sources/SearchAPI-Fulltext.php b/Sources/SearchAPI-Fulltext.php index cd7e884fa57..863dd757675 100644 --- a/Sources/SearchAPI-Fulltext.php +++ b/Sources/SearchAPI-Fulltext.php @@ -19,4 +19,4 @@ die('No direct access...'); } -class_alias('SMF\\Search\\APIs\\Fulltext', '\\fulltext_search'); +class_alias(\SMF\Search\APIs\Fulltext::class, '\\fulltext_search'); diff --git a/Sources/SearchAPI-Standard.php b/Sources/SearchAPI-Standard.php index 3a379000dc1..d0b95bfa637 100644 --- a/Sources/SearchAPI-Standard.php +++ b/Sources/SearchAPI-Standard.php @@ -19,4 +19,4 @@ die('No direct access...'); } -class_alias('SMF\\Search\\APIs\\Standard', '\\standard_search'); +class_alias(\SMF\Search\APIs\Standard::class, '\\standard_search'); diff --git a/Sources/ServerSideIncludes.php b/Sources/ServerSideIncludes.php index a8f1ce292a5..f7ad70c21e8 100644 --- a/Sources/ServerSideIncludes.php +++ b/Sources/ServerSideIncludes.php @@ -244,7 +244,7 @@ public function __construct() } // Primarily, this is to fix the URLs... - ob_start('SMF\\QueryString::rewriteAsQueryless'); + ob_start(QueryString::class . '::rewriteAsQueryless'); // Start the session... known to scramble SSI includes in cases... if (!headers_sent()) { @@ -1715,7 +1715,7 @@ public static function whosOnline(string $output_method = 'echo'): ?array // Showing membergroups? if (!empty(Theme::$current->settings['show_group_key']) && !empty($return['online_groups'])) { - $membergroups = CacheApi::quickGet('membergroup_list', 'Group.php', 'SMF\\Group::getCachedList', []); + $membergroups = CacheApi::quickGet('membergroup_list', 'Group.php', Group::class . '::getCachedList', []); $groups = []; @@ -2217,7 +2217,7 @@ public static function todaysBirthdays(string $output_method = 'echo'): ?array 'include_birthdays' => true, 'num_days_shown' => empty(Config::$modSettings['cal_days_for_index']) || Config::$modSettings['cal_days_for_index'] < 1 ? 1 : Config::$modSettings['cal_days_for_index'], ]; - $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', 'SMF\\Actions\\Calendar::cache_getRecentEvents', [$eventOptions]); + $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', Actions\Calendar::class . '::cache_getRecentEvents', [$eventOptions]); // The self::todaysCalendar variants all use the same hook and just pass on $eventOptions so the hooked code can distinguish different cases if necessary IntegrationHook::call('integrate_ssi_calendar', [&$return, $eventOptions]); @@ -2259,7 +2259,7 @@ public static function todaysHolidays(string $output_method = 'echo'): ?array 'include_holidays' => true, 'num_days_shown' => empty(Config::$modSettings['cal_days_for_index']) || Config::$modSettings['cal_days_for_index'] < 1 ? 1 : Config::$modSettings['cal_days_for_index'], ]; - $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', 'SMF\\Actions\\Calendar::cache_getRecentEvents', [$eventOptions]); + $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', Actions\Calendar::class . '::cache_getRecentEvents', [$eventOptions]); $return['calendar_holidays'] = array_map(fn($h) => $h->title, $return['calendar_holidays']); @@ -2301,7 +2301,7 @@ public static function todaysEvents(string $output_method = 'echo'): ?array 'include_events' => true, 'num_days_shown' => empty(Config::$modSettings['cal_days_for_index']) || Config::$modSettings['cal_days_for_index'] < 1 ? 1 : Config::$modSettings['cal_days_for_index'], ]; - $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', 'SMF\\Actions\\Calendar::cache_getRecentEvents', [$eventOptions]); + $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', Actions\Calendar::class . '::cache_getRecentEvents', [$eventOptions]); // The self::todaysCalendar variants all use the same hook and just pass on $eventOptions so the hooked code can distinguish different cases if necessary IntegrationHook::call('integrate_ssi_calendar', [&$return, $eventOptions]); @@ -2352,7 +2352,7 @@ public static function todaysCalendar(string $output_method = 'echo'): array|str 'include_events' => true, 'num_days_shown' => empty(Config::$modSettings['cal_days_for_index']) || Config::$modSettings['cal_days_for_index'] < 1 ? 1 : Config::$modSettings['cal_days_for_index'], ]; - $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', 'SMF\\Actions\\Calendar::cache_getRecentEvents', [$eventOptions]); + $return = CacheApi::quickGet('calendar_index_offset_' . User::$me->time_offset, 'Actions/Calendar.php', Actions\Calendar::class . '::cache_getRecentEvents', [$eventOptions]); $return['calendar_holidays'] = array_map(fn($h) => $h->title, $return['calendar_holidays']); diff --git a/Sources/Services/ErrorHandlerService.php b/Sources/Services/ErrorHandlerService.php index 4a475f5ac67..793c7cb37ab 100644 --- a/Sources/Services/ErrorHandlerService.php +++ b/Sources/Services/ErrorHandlerService.php @@ -93,7 +93,7 @@ public function handleError(int $error_level, string $error_string, string $file $count = \count($array); for ($i = 0; $i < $count; $i++) { - if ($array[$i]['function'] != 'SMF\\Theme::loadSubTemplate') { + if ($array[$i]['function'] != Theme::class . '::loadSubTemplate') { continue; } diff --git a/Sources/TaskRunner.php b/Sources/TaskRunner.php index 054d5c15e82..2f0152bec2f 100644 --- a/Sources/TaskRunner.php +++ b/Sources/TaskRunner.php @@ -73,42 +73,42 @@ class TaskRunner */ public static array $scheduled_tasks = [ 'daily_maintenance' => [ - 'class' => 'SMF\\Tasks\\DailyMaintenance', + 'class' => Tasks\DailyMaintenance::class, ], 'weekly_maintenance' => [ - 'class' => 'SMF\\Tasks\\WeeklyMaintenance', + 'class' => Tasks\WeeklyMaintenance::class, ], 'daily_digest' => [ - 'class' => 'SMF\\Tasks\\SendDigests', + 'class' => Tasks\SendDigests::class, 'data' => ['is_weekly' => 0], ], 'weekly_digest' => [ - 'class' => 'SMF\\Tasks\\SendDigests', + 'class' => Tasks\SendDigests::class, 'data' => ['is_weekly' => 1], ], 'fetchSMfiles' => [ - 'class' => 'SMF\\Tasks\\FetchSMFiles', + 'class' => Tasks\FetchSMFiles::class, ], 'fetch_calendar_subs' => [ - 'class' => 'SMF\\Tasks\\FetchCalendarSubscriptions', + 'class' => Tasks\FetchCalendarSubscriptions::class, ], 'birthdayemails' => [ - 'class' => 'SMF\\Tasks\\Birthday_Notify', + 'class' => Tasks\Birthday_Notify::class, ], 'paid_subscriptions' => [ - 'class' => 'SMF\\Tasks\\PaidSubs', + 'class' => Tasks\PaidSubs::class, ], 'remove_temp_attachments' => [ - 'class' => 'SMF\\Tasks\\RemoveTempAttachments', + 'class' => Tasks\RemoveTempAttachments::class, ], 'remove_topic_redirect' => [ - 'class' => 'SMF\\Tasks\\RemoveTopicRedirects', + 'class' => Tasks\RemoveTopicRedirects::class, ], 'remove_old_drafts' => [ - 'class' => 'SMF\\Tasks\\RemoveOldDrafts', + 'class' => Tasks\RemoveOldDrafts::class, ], 'prune_log_topics' => [ - 'class' => 'SMF\\Tasks\\PruneLogTopics', + 'class' => Tasks\PruneLogTopics::class, ], ]; @@ -726,7 +726,7 @@ protected function getScheduledTaskDetails(int $id, string $task, bool $is_calla IntegrationHook::call('integrate_scheduled_tasks', [&self::$scheduled_tasks]); if ($is_callable) { - $class = 'SMF\\Tasks\\GenericScheduledTask'; + $class = Tasks\GenericScheduledTask::class; $data = [ 'callable' => $task, 'id_scheduled_task' => $id, @@ -872,5 +872,5 @@ protected static function getNextScheduledTime(int $regularity, string $unit, in } if (!empty(\SMF\Config::$backward_compatibility)) { - class_alias('\\SMF\\Tasks\\BackgroundTask', 'SMF_BackgroundTask'); + class_alias(Tasks\BackgroundTask::class, 'SMF_BackgroundTask'); } diff --git a/Sources/Tasks/WeeklyMaintenance.php b/Sources/Tasks/WeeklyMaintenance.php index dab4b26cdcb..ec643b7d6c8 100644 --- a/Sources/Tasks/WeeklyMaintenance.php +++ b/Sources/Tasks/WeeklyMaintenance.php @@ -236,7 +236,7 @@ public function execute(): bool ], [ [ - 'SMF\\Tasks\\UpdateTldRegex', + UpdateTldRegex::class, '', 0, ], @@ -254,7 +254,7 @@ public function execute(): bool 'claimed_time' => 'int'], [ [ - 'SMF\\Tasks\\UpdateUnicode', + UpdateUnicode::class, '', 0, ], diff --git a/Sources/User.php b/Sources/User.php index d41fdd7adba..ecdc3ab2de5 100644 --- a/Sources/User.php +++ b/Sources/User.php @@ -5958,7 +5958,7 @@ protected static function anonymize(int $member): void ], [ [ - 'SMF\\Tasks\\AnonymizeEditHistory', + Tasks\AnonymizeEditHistory::class, json_encode(['id' => $member]), 0, ], diff --git a/Sources/Utils.php b/Sources/Utils.php index 1a084825fe7..2b3841be4b2 100644 --- a/Sources/Utils.php +++ b/Sources/Utils.php @@ -2288,10 +2288,10 @@ public static function obExit(?bool $header = null, ?bool $do_footer = null, boo } // Start up the session URL fixer. - ob_start('SMF\\QueryString::obDebug'); + ob_start(QueryString::class . '::obDebug'); // More work needed if using "queryless" URLS. - ob_start('SMF\\QueryString::rewriteAsQueryless'); + ob_start(QueryString::class . '::rewriteAsQueryless'); // Force the browser not to collapse tabs inside posts, etc. ob_start(fn($buffer) => strtr($buffer, [self::TAB_SUBSTITUTE => '' . "\t" . ''])); diff --git a/proxy.php b/proxy.php index c9bc3fc1f1a..6a3b6a00646 100644 --- a/proxy.php +++ b/proxy.php @@ -27,5 +27,5 @@ } // In case an old mod included this file in order to load the ProxyServer class. else { - class_exists('SMF\\ProxyServer'); + class_exists(\SMF\ProxyServer::class); }