🔄 Refactor: standardise service binding patterns in service providers#4577
Open
MrAdder wants to merge 3 commits intoVATSIM-UK:mainfrom
Open
🔄 Refactor: standardise service binding patterns in service providers#4577MrAdder wants to merge 3 commits intoVATSIM-UK:mainfrom
MrAdder wants to merge 3 commits intoVATSIM-UK:mainfrom
Conversation
5 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Standardises Laravel service container registration in core service providers by shifting direct bindings into the framework-supported $bindings / $singletons properties while keeping the Discord OAuth factory binding explicit, and removing no-op provider boilerplate.
Changes:
- Moved simple container bindings in
AppServiceProviderfromregister()into$bindingsand$singletons. - Kept the Discord OAuth provider binding as an explicit factory singleton in
AppServiceProvider::register(). - Removed the empty
register()method fromAuthServiceProvider, leaving thePermissionRegistraroverride inboot().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/Providers/AppServiceProvider.php | Refactors simple bindings into $bindings/$singletons; keeps Discord OAuth provider factory singleton in register(). |
| app/Providers/AuthServiceProvider.php | Removes empty no-op register() method; keeps permission override behavior in boot(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
8 tasks
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
Standardises service provider binding patterns where safe, while preserving permission security behavior and removing no-op provider boilerplate.
Refs #4550
Changes
AppServiceProvider$bindings/$singletonsregister()AuthServiceProviderPermissionRegistraroverride inboot()(not moved to$singletons) to avoid package boot-order override riskregister()override (no-op)Impact
No intended functional change.
Permission registration behaviour remains explicitly unchanged/safe.