Remove remaining forum DB access - #119
Merged
Merged
Conversation
Public news/events endpoints, User::lastActivityForum, and SMFHelper all still queried the forum DB connection, which pointed at the now-deleted vatusa-old-forum database. Forums are retired for good (replaced by Discord, and by Cobalt/Mithril for events/news), so this removes the forum connection and all its callers rather than restoring it: - PublicController::getEvents/getNews now return an empty array - Deleted ForumCalendar, ForumMessages models and SMFHelper - Removed User::lastActivityForum and its dead SMFHelper::createPost calls - Removed the forum connection block from config/database.php and its DB_FORUM_* env vars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vatusa-old-forumDB deletion broke Academy login viaSSOController(fixed separately onmaster, commitd7e6789). This PR removes the rest of the app's dependency on that DB, since forums are retired for good (Discord replaced them, Cobalt/Mithril replaced the events/news feeds).PublicController::getEvents()/getNews()now return an empty array instead of querying the forum DB.ForumCalendar,ForumMessages,SMFHelper(all dead/unreferenced now).User::lastActivityForum()(no callers anywhere) and the 3 deadSMFHelper::createPost()calls inUser::addToFacility()/removal flow (that method's body was already a commented-out no-op).forumconnection block fromconfig/database.phpand theDB_FORUM_*env vars from.env/.env.example.Left untouched (redirect-only, no DB access):
SSOController'slogoutand?forumsdestination branches, andULSHelper::doHandleLogin()'sdestination == "forums"branch (still builds a signed redirect URL viaFORUM_SECRET, doesn't touch a DB).Test plan
php -lon all changed PHP filesconnection('forum'),SMFHelper,ForumMessages,ForumCalendar,DB_FORUM— no hits leftGET /api/v2/public/events/1and/public/news/1return200with an empty array in a deployed environment./vendor/bin/phpunit