Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 22:39
· 337 commits to main since this release
85ea3c6

Nativella runs a Symfony, Laravel or plain PHP app as a desktop app, with PHP inside the app process.

What's new since 0.3

  • A barcode scanner, on phones. Nativella\BarcodeScanner shows the camera and returns the code it reads: QR codes, EAN, UPC, Code 128, Data Matrix, PDF417 and more. The application asks for it with barcodeScanner in its permissions.

    use Nativella\BarcodeScanner\Format;
    
    $barcode = $barcodeScanner->scan([Format::Ean13, Format::QrCode]);
    $barcode?->content; // "3017620422003"

    On Android, the template APK bundles the ML Kit model (about 6 MB per ABI, under Google's ML Kit terms): no Google Play services, no download. Tried on an emulator and on a device (Android 11), not on iOS. With Laravel, the BarcodeScanner facade. See Phone APIs.

  • The camera and the microphone, in the pages. With camera and microphone in its permissions, the pages of an application can call navigator.mediaDevices.getUserMedia(), on phones and on computers. A page that asks for what the application did not gets a NotAllowedError. Tried on Linux and Android, not on macOS, Windows or iOS. See Camera and microphone in the pages.

  • nativella build from the project directory. The dist/ at the root of the project is no longer packed, so the builds of earlier runs do not ship in the next one. A public/dist still does.

  • What runs where. A new page of the documentation lists every native API, on computers and on phones. See What runs where.

Under the hood

  • The third-party notices read the POMs of the Java libraries in Castor again: developing Nativella needs Castor 1.9.
  • Symfony Notes scans a barcode or a QR code into a note.

Upgrading from 0.3

Require the packages with ^0.4: before 1.0, ^0.3 does not accept 0.4. With Symfony, for example:

composer require nativella/nativella:^0.4 nativella/symfony-bundle:^0.4

With Laravel, nativella/laravel:^0.4. Take the nativella command and the templates from the same release.