Uh oh!
There was an error while loading. Please reload this page.
[6.x] Allow addon settings blueprints to be registered lazily - #15286
Merged
Conversation
registerSettingsBlueprint now accepts a closure in addition to an array, so addons can defer expensive work until the blueprint is actually needed rather than on every request. The binding is scoped so the closure is only evaluated once per request, and hasSettingsBlueprint no longer resolves the blueprint just to check whether one exists. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jasonvarga
enabled auto-merge (squash)
August 27, 2026 00:49
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
registerSettingsBlueprintonly accepted an array, so any work needed to build the blueprint happened on every request, whether or not the settings screen was ever visited. An addon passing a container to an assets field might doAssetContainer::all()->first(), for instance.It now accepts a closure too, evaluated only when the blueprint is needed:
Passing an array still works as before.