The API Guys
NativePHP v3.1 persistent runtime brings 10x faster response times and Android 8+ support
·2 min read·The API Guys

NativePHP v3.1: Persistent Runtime, 10x Faster Response Times, and Android 8+ Support

laravelphpQuick Bytes

NativePHP v3.1 is out, and the headline change is a significant one: a persistent Laravel runtime that eliminates the full boot cycle on every request. If you have been building or evaluating NativePHP for mobile or desktop applications, this release addresses the performance concern that made it feel un-native.

Persistent Runtime

Previously, every request in a NativePHP app triggered a full Laravel boot cycle, adding 200-300ms of overhead per interaction. In v3.1, Laravel boots once and the kernel is reused across all subsequent requests.

The result is response times of 5-30ms - a 10x improvement in the typical case. Livewire state, router state, and facade instances are all handled automatically within the persistent runtime. If something does not work in persistent mode, the runtime falls back to classic single-boot mode gracefully.

This is the change that makes NativePHP apps feel native rather than web-in-a-wrapper. The difference between 250ms and 15ms per tap is perceptible.

Background Queue Workers

v3.1 ships with ZTS (Thread-Safe) PHP and a dedicated background queue worker running on its own thread. Configuration is minimal:

QUEUE_CONNECTION=database

Dispatch jobs as you normally would in a Laravel application. The worker starts automatically, long-running tasks no longer block the UI, and jobs survive app restarts. Both iOS and Android are supported.

Android 8+ Support

The minimum Android SDK requirement drops from Android 13 (API level 33) to Android 8 (API level 26). This significantly expands the device base that can run NativePHP applications. SDK versions are configurable in your application config:

'Android' => [
    'compile_sdk' => env('NATIVEPHP_ANDROID_COMPILE_SDK', 36),
    'min_sdk' => env('NATIVEPHP_ANDROID_MIN_SDK', 33),
    'target_sdk' => env('NATIVEPHP_ANDROID_TARGET_SDK', 36),
]

Full ICU Support on iOS

iOS builds now include full ICU (International Components for Unicode) support, meaning the PHP intl extension works on both iOS and Android without workarounds. Practically, this means Filament works on both platforms out of the box - a meaningful milestone for teams considering NativePHP for admin or data-entry applications.

Other Changes

  • PHP 8.3 to 8.5 support - version is auto-detected from composer.json and binaries are cached locally
  • Plugin multi-register - discover and register all plugins in a single pass
  • Platform shorthand - ios/i and android/a accepted everywhere instead of full platform names
  • Removed unused dependencies - react/http and react/socket have been removed

Upgrading

v3.1 is a drop-in upgrade with no breaking changes:

composer require nativephp/mobile:~3.1.0
php artisan native:install --force

Ready to Start Your Project?

Get in touch with our Leeds-based team to discuss your Laravel or API development needs.