Laravel returns numeric strings when an int is saved to cache, which breaks a lot of the logic here. Fixed by removing cache everywhere except rss and middleware, and in those two spots, caching the whole group and not just the id of the group.
Cleans up the code to remove null coalescing on user_settings when it doesn't exist. Sometimes null was unintentionally being cast to false. Allowing the user_setting remain optional allows the site administration to configure and change defaults for their users without it affecting users who have explicitly chosen their existing user settings.
Alternative to #4789
I missed some more from the other times (#4744 and #4749). The json check in Authenticate.php has since been upstreamed into laravel, so we don't need to modify that explicitly anymore and can swap it out for laravel's middleware. The RedirectIfAuthenticated middleware now has an option to set the route to redirect to, so we can call that method directly instead of overwriting the method in the middleware. The TrimStrings middleware also now has an option to exclude certain attributes, so we can call that method directly instead of overwriting the method in the middleware.
TrustProxies.php is the only remaining Laravel middleware that is customized, but that can only be replaced with the laravel 11 app structure.
These middlewares are the same as what exists in laravel. We can directly use Laravel's middlewares in Kernel.php instead of importing them and not overwriting anything.
Use a 1-1 relation. Cache it indefinitely to reduce queries for every http request. This will make it much easier to add additional user settings for various site features without sacrificing clean code or performance.
If there are no users in the list, null is returned, so we have to check against null.
Since we cache users for 30 seconds, checking their last action time is pointless.
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request