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

Investigate after-resolution overrides #59

Closed
ollieread opened this issue Nov 17, 2024 · 1 comment
Closed

Investigate after-resolution overrides #59

ollieread opened this issue Nov 17, 2024 · 1 comment
Assignees
Labels
status: investigating The issue is being investigated type: refactor Refactoring of code
Milestone

Comments

@ollieread
Copy link
Member

ollieread commented Nov 17, 2024

Service overrides are currently registered and booted during the boot phase of the framework, which has caused issues where the session override is attempting to make sessions tenant-specific when outside of tenant context (#56). This caused the need for a flag to mark multitenanted context (#57), which could be used within this.

Laravel uses Application::afterResolving() to register view namespaces, as well as several other things.

I think this approach would be beneficial because:

  • Service overrides would ONLY be registered IF the relevant service is resolved.
  • Service overrides would ONLY be registered IF it's within the multitenanted context when the service is resolved.
  • Service overrides would NOT register unnecessarily.
  • Service overrides would NOT have the side effect of causing Laravel core services to load.
@ollieread ollieread converted this from a draft issue Nov 17, 2024
@ollieread ollieread self-assigned this Nov 17, 2024
@ollieread ollieread added status: investigating The issue is being investigated type: refactor Refactoring of code labels Nov 17, 2024
@ollieread ollieread added this to the V1 Release milestone Nov 17, 2024
@ollieread
Copy link
Member Author

This could possibly be achieved by introducing a DeferredServiceOverride that'll only override a service when X, or X, Y.... have been resolved.

@ollieread ollieread moved this from In review to Done in Sprout Development Nov 18, 2024
@ollieread ollieread closed this as completed by moving to Done in Sprout Development Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: investigating The issue is being investigated type: refactor Refactoring of code
Projects
Status: Done
Development

No branches or pull requests

1 participant