Repository navigation
Register back-end navigation, widgets and settings in a worker from the plugin - #2
Merged
Merged
Conversation
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.
Moves the change from wintercms/winter#1511 into this plugin, so core needs no Octane-specific check.
Winter's System, Backend and Cms providers register back-end navigation, widgets and settings only for back-end requests. A worker registers its providers once, against a request that is not a back-end request, so a worker served every back-end page with empty menus and settings. The plugin now makes those registrations itself in a worker. It runs them from a
bootingcallback, after every provider has registered and before any provider or plugin boots, so core's callbacks run in the same order as under PHP-FPM. Outside a worker it does nothing.Also:
wintercms/winterandwintercms/stormwip/1.3instead of the #1511 fork branches.App::runningInBackend(), because a worker never registers anything behind that check.Testing
OctaneRegistrationTestchecks that the registrations are made in a worker and not outside one. The suite (44 tests), phpcs and PHPStan pass against Winterwip/1.3. A cold boot through Octane'sApplicationFactorywith the client bound registers 3 navigation, 3 settings and 2 form widget callbacks, and none without it.