From bff848e52ea53724e136e7209d2d411f51ee099a Mon Sep 17 00:00:00 2001 From: gwleuverink Date: Tue, 21 Oct 2025 14:55:54 +0200 Subject: [PATCH 1/2] fix code example formatting --- resources/views/docs/desktop/2/the-basics/system.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/views/docs/desktop/2/the-basics/system.md b/resources/views/docs/desktop/2/the-basics/system.md index dd6e5e21..11090305 100644 --- a/resources/views/docs/desktop/2/the-basics/system.md +++ b/resources/views/docs/desktop/2/the-basics/system.md @@ -93,8 +93,11 @@ it give you any special privileges to their system.** You can list all available printers: ```blade -@@use(Native\Desktop\Facades\System) @@foreach(System::printers() as $printer) -@{{ $printer->displayName }} @@endforeach +@@use(Native\Desktop\Facades\System) + +@@foreach(System::printers() as $printer) + @{{ $printer->displayName }} +@@endforeach ``` Each item in the printers array is a `\Native\Desktop\DataObjects\Printer` which contains various device details and From 95c93dc889053a502aeb26f2c3d982e0e42428ea Mon Sep 17 00:00:00 2001 From: gwleuverink Date: Tue, 21 Oct 2025 15:02:23 +0200 Subject: [PATCH 2/2] add breaking change to the Printer object to upgrade guide --- .../views/docs/desktop/2/getting-started/upgrade-guide.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/views/docs/desktop/2/getting-started/upgrade-guide.md b/resources/views/docs/desktop/2/getting-started/upgrade-guide.md index b76d0bb8..d9ee9486 100644 --- a/resources/views/docs/desktop/2/getting-started/upgrade-guide.md +++ b/resources/views/docs/desktop/2/getting-started/upgrade-guide.md @@ -13,6 +13,7 @@ order: 1200 - [Serve command renamed](#renamed-codenativeservecode-command) - [Node integration disabled by default](#security-defaults) +- [Changes to the Printer object](#changes-to-the-codeprintercode-object) ### Low Impact Changes @@ -64,6 +65,12 @@ v2 drops support for macOS **_Catalina_** and **_Big Sur_**. This change comes f The `artisan native:serve` command has been deprecated and renamed to `artisan native:run` for better symmetry with the mobile package. Please update the `composer native:dev` script to reference the new run command. +## Changes to the `Printer` object + +Electron removed the `isDefault` and `status` properties from their `PrinterInfo` object. See their docs regarding this change (here)[https://www.electronjs.org/docs/latest/breaking-changes#removed-isdefault-and-status-properties-on-printerinfo]. + +To stay in step we had to remove these properties from our `\Native\Desktop\DataObjects\Printer` class as well. If you are using `System::printers()` make sure you are not referencing the `isDefault` and `status` properties. + ## New `dist` location The build output has moved to `nativephp/electron/dist`