Skip to content

Restore PHPBridge.kt API dropped in Jump merge (#111)#120

Merged
shanerbaner82 merged 1 commit into
mainfrom
fix/android-restore-phpbridge-api
May 8, 2026
Merged

Restore PHPBridge.kt API dropped in Jump merge (#111)#120
shanerbaner82 merged 1 commit into
mainfrom
fix/android-restore-phpbridge-api

Conversation

@shanerbaner82
Copy link
Copy Markdown
Contributor

Summary

Fixes the 3.3.0 regression where Android builds fail to compile in apps using the firebase plugin (or any plugin that drives the ephemeral PHP runtime):

PushNotificationService.kt: Unresolved reference 'nativeEphemeralBoot'
PushNotificationService.kt: Unresolved reference 'nativeEphemeralArtisan'
PushNotificationService.kt: Unresolved reference 'nativeEphemeralShutdown'
WebViewManager.kt:          Unresolved reference 'consumePostData'

Five public members existed in PHPBridge.kt as of 866a6dd (the Apr 4 Android POST-body fix) and are still required by current code:

  • external fun nativeEphemeralBoot/Artisan/Shutdown — registered as JNI methods in php_bridge.c:1354-1356 and called from plugin code such as nativephp/mobile-firebase's PushNotificationService.
  • storePostData(key, data) / consumePostData(key) — used by the bundled WebViewManager.kt (lines 268, 272, 275, 531, 544, 547) to correlate POST bodies stashed by the injected JS XHR/fetch hook with the intercepted request on the native side.

The Jump merge (#111, commit 026a1b7) accidentally dropped these declarations from PHPBridge.kt while leaving the JNI registrations and all callers in place. Restored verbatim from the canonical jump-playground copy that Jump itself runs against, including the 50 ms wait loop on consumePostData that #84 added to handle the race where the WebView fires the network request before the injected JS hook has finished stashing the body — important for concurrent Livewire \$wire bursts to the same endpoint.

Test plan

  • Build Android against an app with nativephp/mobile-firebase (or any plugin invoking the ephemeral runtime) — confirm compile succeeds
  • Submit a Livewire form post in the running app — confirm POST body reaches Laravel populated (no spurious "field is required" errors)
  • Run a few concurrent \$wire calls to the same endpoint — confirm none drop the body (50 ms wait loop covers JS-stash race)
  • Confirm Jump's live preview still works against an app on this branch

🤖 Generated with Claude Code

Symptom: Android builds in apps using the firebase plugin (or any plugin
that drives the ephemeral PHP runtime) fail to compile against 3.3.0:

    PushNotificationService.kt: Unresolved reference 'nativeEphemeralBoot'
    PushNotificationService.kt: Unresolved reference 'nativeEphemeralArtisan'
    PushNotificationService.kt: Unresolved reference 'nativeEphemeralShutdown'
    WebViewManager.kt:        Unresolved reference 'consumePostData'

Five public members existed in PHPBridge.kt as of 866a6dd (the Apr 4
Android POST-body fix) and are still required by current code:

  - external fun nativeEphemeralBoot/Artisan/Shutdown — registered as JNI
    methods in php_bridge.c:1354-1356 and called from plugin code such as
    nativephp/mobile-firebase's PushNotificationService.

  - storePostData(key, data) / consumePostData(key) — used by the bundled
    WebViewManager.kt (lines 268, 272, 275, 531, 544, 547) to correlate
    POST bodies stashed by the injected JS XHR/fetch hook with the
    intercepted request on the native side.

The Jump merge (#111, commit 026a1b7) accidentally dropped these
declarations from PHPBridge.kt while leaving the JNI registrations and
all callers in place. Restored verbatim from the canonical
jump-playground copy that Jump itself runs against, including the 50 ms
wait loop on consumePostData that #84 added to handle the race where the
WebView fires the network request before the injected JS hook has
finished stashing the body — important for concurrent Livewire $wire
bursts to the same endpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shanerbaner82 shanerbaner82 merged commit 1bf4db7 into main May 8, 2026
0 of 5 checks passed
@shanerbaner82 shanerbaner82 deleted the fix/android-restore-phpbridge-api branch May 8, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant