From e2fbceef46a85eb87dae7352589179c70868b0b6 Mon Sep 17 00:00:00 2001 From: siddiqar Date: Sat, 10 Oct 2026 18:02:09 +0700 Subject: [PATCH] Fix fatal error booting screens without a mount() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- CHANGELOG.md | 4 ++++ src/Protocol/WebScreenRunner.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cab833..fdbcfd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +- Fix a fatal `Call to undefined method ...::mount()` error for screens that +define no `mount()`: the web boot lifecycle now calls the guarded core +entrypoint `mountComponent()` instead of invoking `mount()` directly +(parity with `NativeRouter`). - Fix browser input and action events on NativePHP versions that expose `dispatchUiEvent()`, retaining the legacy dispatcher for older versions. diff --git a/src/Protocol/WebScreenRunner.php b/src/Protocol/WebScreenRunner.php index f0ea8e7..59ab2c2 100644 --- a/src/Protocol/WebScreenRunner.php +++ b/src/Protocol/WebScreenRunner.php @@ -438,7 +438,7 @@ protected static function boot(string $componentClass, array $params, ?string $l // still needed to render the placeholder, but mount() — the slow // work being deferred — is skipped until the {type:'lazy'} update. if ($mount) { - $component->mount(); + $component->mountComponent(); } return $component;