Repository navigation
Conversation
WebScreenRunner::boot() invoked $component->mount() directly. NativeComponent deliberately declares no mount(); it exposes the guarded mountComponent() entrypoint (no-op when mount() is absent, route-binding + DI when present), which NativeRouter also calls. Any screen without mount() — e.g. the Super Stack starter's Home — fatally errored with 'Call to undefined method ...::mount()'. Call mountComponent() instead, matching the device router.
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.
What
WebScreenRunner::boot()invoked$component->mount()directly. Core'sNativeComponentdeliberately declares nomount(); it exposes the guardedmountComponent()entrypoint instead (a no-op when the component has nomount(), and route-binding + DI when it does), whichNativeRouteralso uses on device. Any screen without amount()method therefore fatals in the browser:Reproduction
Route a screen that defines no
mount():GET /returns 500 before this change, 200 after.Fix
Call
mountComponent()instead (parity withNativeRouter::preloadStack()/ the device run loop). Both mounting paths go throughboot(), so this covers the initial GET and the{type: 'lazy'}update.Also adds a
CHANGELOG.mdentry under[Unreleased].Verification
nativephp/superstackstarter,nativephp/mobile4.6.0.GET /renders<title>Super Stack</title>, HTTP 200; before the change, HTTP 500 with the trace above.Notes
nativephp/mobilesuite (tests/Feature/Edge/,Web*). Happy to add/link it — let me know where you'd like it.mountComponent()exists innativephp/mobile4.6.0. This package supports^4.4; ifmountComponent()is newer than that, amethod_exists()guard would be warranted. Flagging in case you'd prefer the guarded form.