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` 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