You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Node integration disabled by default](#security-defaults)
16
16
17
-
## Upgrading To 2.0 From 1.x
17
+
### Low Impact Changes
18
+
19
+
-[Modifying the Electron backend](#modifying-the-electron-backend)
18
20
19
-
NativePHP for Desktop v2 is a significant architecture overhaul & security release. The package has moved to a new repository with a new name; `nativephp/desktop`.
21
+
## Upgrading To 2.0 From 1.x
20
22
21
-
Please replace `nativephp/electron` from your `composer.json` with the new package.
23
+
NativePHP for Desktop v2 is a significant architecture overhaul and security release. The package has moved to a new repository with a new name: `nativephp/desktop`.
24
+
Please replace `nativephp/electron` in your `composer.json` with the new package.
22
25
23
26
```json
24
27
"require": {
@@ -29,21 +32,20 @@ Please replace `nativephp/electron` from your `composer.json` with the new packa
29
32
```
30
33
31
34
If you're requiring `nativephp/laravel` as well, please remove that too.
35
+
Then run `composer update` and `php artisan native:install` and you're good to go.
32
36
33
-
Then run `composer update` & `php artisan native:install` and you're good to go.
34
-
35
-
Afterwards the `native:install` script will be automatically installed as a `post-update-cmd`, so you won't have to manually run it after a composer update.
37
+
After installation, the `native:install` script will be automatically registered as a `post-update-cmd`, so you won't have to manually run it after a composer update.
36
38
37
39
## Update class imports
38
40
39
-
With the package rename the root namespace has also changed. Please update all occurances of `Native\Laravel` to `Native\Desktop`.
41
+
With the package rename, the root namespace has also changed. Please update all occurrences of `Native\Laravel` to `Native\Desktop`.
40
42
41
43
```php
42
44
use Native\Laravel\Facades\Window; // [tl! remove]
43
45
use Native\Desktop\Facades\Window; // [tl! add]
44
46
```
45
47
46
-
## MacOS support
48
+
## macOS support
47
49
48
50
v2 drops support for macOS **_Catalina_** and **_Big Sur_**. This change comes from the Electron v38 upgrade and aligns with Apple's supported OS versions. Most users should be unaffected, but please check your deployment targets before upgrading.
49
51
@@ -58,3 +60,9 @@ Please update the `composer native:dev` command to use the new name.
58
60
## Security defaults
59
61
60
62
`nodeIntegration` is now disabled by default. While this improves security, it may affect applications that rely on this functionality. You can easily re-enable it using `Window::webPreferences()` where needed.
63
+
64
+
## Modifying the Electron backend
65
+
66
+
If you need to make any specific adjustments to the underlying Electron app, you can publish it using `php artisan native:install --publish`. This will export the Electron project to `{project-root}/nativephp/electron` and allow you to fully control all of NativePHP's inner workings.
67
+
68
+
Additionally, this will modify your `post-update-cmd` script to keep your project up to date, but note that you may need to cherry-pick any adjustments you've made after a `composer update`.
0 commit comments