Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate settings page back-end code to controllers #2596

Merged

Conversation

wescopeland
Copy link
Member

This PR migrates the user settings page (controlpanel.php) back-end code to use Laravel controllers. As a result, almost all of the legacy public/request files used by the page have been deleted.

There should be almost no functional changes as part of this PR. This is a precursor to migrating the UI of the page to React.

Where feasible, code coverage has been added. Some methods are a bit difficult to test, such as those for resetting progress, as these still use legacy SQL queries.

Additionally, a migration is included for EmailConfirmations to add an incrementing primary key and a user_id column.

For controller tests, I deliberately kept these as separate test cases. In my opinion, the trade-off of longer test execution times for easier-to-maintain tests is worth it. I think our focus should be on speeding up test execution time.

@wescopeland wescopeland requested a review from a team August 7, 2024 21:51
@wescopeland wescopeland merged commit 9d67b54 into RetroAchievements:master Aug 17, 2024
5 checks passed
@wescopeland wescopeland deleted the settings-controllers branch August 17, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants