mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 20:10:08 +02:00
Compare commits
56 Commits
Author | SHA1 | Date | |
---|---|---|---|
9e25254ec8 | |||
e623207844 | |||
f60ecb877c | |||
66393094b0 | |||
b5d2fef184 | |||
44bc07c9dc | |||
93790f3951 | |||
d3b1afe9fd | |||
2fa50a7dc4 | |||
18b62ecc3f | |||
2d59b8c6e8 | |||
450d7ec001 | |||
b6b1174ca3 | |||
e509f6b59d | |||
6014320441 | |||
a0d80423e9 | |||
35b19efc3e | |||
9a175e7291 | |||
d53e92ce94 | |||
3344fdb1dc | |||
020a0260f1 | |||
3ce7e8f48b | |||
ae7e13de9b | |||
c82ea1fac1 | |||
d6258f54a9 | |||
00cc6711a1 | |||
209244e162 | |||
e48d8ed98b | |||
834f76e5a1 | |||
7e48893247 | |||
e29ca9e1ad | |||
40e05d9445 | |||
3ebf51b319 | |||
4b8ad911f1 | |||
efd902b4f3 | |||
918e272da7 | |||
272a9182d3 | |||
63f85aff91 | |||
581c2d1974 | |||
4deef64537 | |||
bedabaa3bb | |||
9da3772212 | |||
e62b03d070 | |||
9a11d2efed | |||
b134e62328 | |||
5c69133c42 | |||
f4448e0640 | |||
7fd30d7c54 | |||
2c57dea97f | |||
a77fa5557a | |||
45704fc736 | |||
f28354e634 | |||
8055a32bde | |||
5b3054326e | |||
e7f3c7e59c | |||
a407515534 |
10
DEVELOPER.md
10
DEVELOPER.md
@ -14,6 +14,16 @@ It also automatically runs when you try to build the project. You'll get a warni
|
|||||||
swiftlint --fix
|
swiftlint --fix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## ⚙️ Preferences
|
||||||
|
|
||||||
|
You can find the persisted configuration file in `~/Library/Preferences/com.nicoverbruggen.phpmon.plist`
|
||||||
|
|
||||||
|
These values are cached by the OS. You can clear this cache by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
defaults delete com.nicoverbruggen.phpmon && killall cfprefsd
|
||||||
|
```
|
||||||
|
|
||||||
## 🔧 Build instructions
|
## 🔧 Build instructions
|
||||||
|
|
||||||
<img src="./docs/build.png" width="404px" alt="build button in Xcode"/>
|
<img src="./docs/build.png" width="404px" alt="build button in Xcode"/>
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2019-2022 Nico Verbruggen
|
Copyright (c) 2019-2023 Nico Verbruggen
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -118,6 +118,10 @@
|
|||||||
C44067FB27E25FD70045BD4E /* DomainListTLSCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067FA27E25FD70045BD4E /* DomainListTLSCell.swift */; };
|
C44067FB27E25FD70045BD4E /* DomainListTLSCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067FA27E25FD70045BD4E /* DomainListTLSCell.swift */; };
|
||||||
C44264BE2850B86C007400F1 /* SwiftUIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44264BD2850B86C007400F1 /* SwiftUIHelper.swift */; };
|
C44264BE2850B86C007400F1 /* SwiftUIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44264BD2850B86C007400F1 /* SwiftUIHelper.swift */; };
|
||||||
C44264C02850BD2A007400F1 /* VersionPopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44264BF2850BD2A007400F1 /* VersionPopoverView.swift */; };
|
C44264C02850BD2A007400F1 /* VersionPopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44264BF2850BD2A007400F1 /* VersionPopoverView.swift */; };
|
||||||
|
C4463FCC29804BCB007B93D5 /* RCFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4463FCB29804BCB007B93D5 /* RCFile.swift */; };
|
||||||
|
C4463FCD29804BCB007B93D5 /* RCFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4463FCB29804BCB007B93D5 /* RCFile.swift */; };
|
||||||
|
C4463FCE29804BCB007B93D5 /* RCFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4463FCB29804BCB007B93D5 /* RCFile.swift */; };
|
||||||
|
C4463FCF29804BCB007B93D5 /* RCFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4463FCB29804BCB007B93D5 /* RCFile.swift */; };
|
||||||
C449B4F027EE7FB800C47E8A /* DomainListTLSCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067FA27E25FD70045BD4E /* DomainListTLSCell.swift */; };
|
C449B4F027EE7FB800C47E8A /* DomainListTLSCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067FA27E25FD70045BD4E /* DomainListTLSCell.swift */; };
|
||||||
C449B4F127EE7FC200C47E8A /* DomainListNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067F427E2582B0045BD4E /* DomainListNameCell.swift */; };
|
C449B4F127EE7FC200C47E8A /* DomainListNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067F427E2582B0045BD4E /* DomainListNameCell.swift */; };
|
||||||
C449B4F227EE7FC400C47E8A /* DomainListPhpCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067F627E258410045BD4E /* DomainListPhpCell.swift */; };
|
C449B4F227EE7FC400C47E8A /* DomainListPhpCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44067F627E258410045BD4E /* DomainListPhpCell.swift */; };
|
||||||
@ -143,6 +147,9 @@
|
|||||||
C451AFF72969E40F0078E617 /* HelpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C451AFF52969E40F0078E617 /* HelpButton.swift */; };
|
C451AFF72969E40F0078E617 /* HelpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C451AFF52969E40F0078E617 /* HelpButton.swift */; };
|
||||||
C451AFF82969E40F0078E617 /* HelpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C451AFF52969E40F0078E617 /* HelpButton.swift */; };
|
C451AFF82969E40F0078E617 /* HelpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C451AFF52969E40F0078E617 /* HelpButton.swift */; };
|
||||||
C451AFF92969E40F0078E617 /* HelpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C451AFF52969E40F0078E617 /* HelpButton.swift */; };
|
C451AFF92969E40F0078E617 /* HelpButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C451AFF52969E40F0078E617 /* HelpButton.swift */; };
|
||||||
|
C4551657297AED18009B8466 /* ValetRcTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4551656297AED18009B8466 /* ValetRcTest.swift */; };
|
||||||
|
C4551659297AED7D009B8466 /* valetrc.valid in Resources */ = {isa = PBXBuildFile; fileRef = C4551658297AED7D009B8466 /* valetrc.valid */; };
|
||||||
|
C455165B297AEDB5009B8466 /* valetrc.broken in Resources */ = {isa = PBXBuildFile; fileRef = C455165A297AEDB5009B8466 /* valetrc.broken */; };
|
||||||
C4570C3A28FC355300D18420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473319E2470923A009A0597 /* Localizable.strings */; };
|
C4570C3A28FC355300D18420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473319E2470923A009A0597 /* Localizable.strings */; };
|
||||||
C4570C3B28FC355300D18420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473319E2470923A009A0597 /* Localizable.strings */; };
|
C4570C3B28FC355300D18420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473319E2470923A009A0597 /* Localizable.strings */; };
|
||||||
C4570C3C28FC355400D18420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473319E2470923A009A0597 /* Localizable.strings */; };
|
C4570C3C28FC355400D18420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C473319E2470923A009A0597 /* Localizable.strings */; };
|
||||||
@ -540,6 +547,10 @@
|
|||||||
C4B97B79275CF1B5003F3378 /* App+ActivationPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4B97B77275CF1B5003F3378 /* App+ActivationPolicy.swift */; };
|
C4B97B79275CF1B5003F3378 /* App+ActivationPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4B97B77275CF1B5003F3378 /* App+ActivationPolicy.swift */; };
|
||||||
C4B97B7B275CF20A003F3378 /* App+GlobalHotkey.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */; };
|
C4B97B7B275CF20A003F3378 /* App+GlobalHotkey.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */; };
|
||||||
C4B97B7C275CF20A003F3378 /* App+GlobalHotkey.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */; };
|
C4B97B7C275CF20A003F3378 /* App+GlobalHotkey.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */; };
|
||||||
|
C4BB39392981AFC700F8E797 /* PhpVersionSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BB39382981AFC700F8E797 /* PhpVersionSource.swift */; };
|
||||||
|
C4BB393A2981AFC700F8E797 /* PhpVersionSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BB39382981AFC700F8E797 /* PhpVersionSource.swift */; };
|
||||||
|
C4BB393B2981AFC700F8E797 /* PhpVersionSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BB39382981AFC700F8E797 /* PhpVersionSource.swift */; };
|
||||||
|
C4BB393C2981AFC700F8E797 /* PhpVersionSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BB39382981AFC700F8E797 /* PhpVersionSource.swift */; };
|
||||||
C4BF56AB2949381100379603 /* FakeValetInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BF56AA2949381100379603 /* FakeValetInteractor.swift */; };
|
C4BF56AB2949381100379603 /* FakeValetInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BF56AA2949381100379603 /* FakeValetInteractor.swift */; };
|
||||||
C4BF56AC2949381100379603 /* FakeValetInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BF56AA2949381100379603 /* FakeValetInteractor.swift */; };
|
C4BF56AC2949381100379603 /* FakeValetInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BF56AA2949381100379603 /* FakeValetInteractor.swift */; };
|
||||||
C4BF56AD2949381100379603 /* FakeValetInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BF56AA2949381100379603 /* FakeValetInteractor.swift */; };
|
C4BF56AD2949381100379603 /* FakeValetInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4BF56AA2949381100379603 /* FakeValetInteractor.swift */; };
|
||||||
@ -796,6 +807,7 @@
|
|||||||
C44067FA27E25FD70045BD4E /* DomainListTLSCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainListTLSCell.swift; sourceTree = "<group>"; };
|
C44067FA27E25FD70045BD4E /* DomainListTLSCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DomainListTLSCell.swift; sourceTree = "<group>"; };
|
||||||
C44264BD2850B86C007400F1 /* SwiftUIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIHelper.swift; sourceTree = "<group>"; };
|
C44264BD2850B86C007400F1 /* SwiftUIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIHelper.swift; sourceTree = "<group>"; };
|
||||||
C44264BF2850BD2A007400F1 /* VersionPopoverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionPopoverView.swift; sourceTree = "<group>"; };
|
C44264BF2850BD2A007400F1 /* VersionPopoverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionPopoverView.swift; sourceTree = "<group>"; };
|
||||||
|
C4463FCB29804BCB007B93D5 /* RCFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RCFile.swift; sourceTree = "<group>"; };
|
||||||
C44A874728905BB000498BC4 /* ProgressVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressVC.swift; sourceTree = "<group>"; };
|
C44A874728905BB000498BC4 /* ProgressVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressVC.swift; sourceTree = "<group>"; };
|
||||||
C44AD3F62912EF7100997FF4 /* RealFileSystemTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealFileSystemTest.swift; sourceTree = "<group>"; };
|
C44AD3F62912EF7100997FF4 /* RealFileSystemTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealFileSystemTest.swift; sourceTree = "<group>"; };
|
||||||
C44B3A4528E5C70100718CB1 /* TimeIntervalExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeIntervalExtension.swift; sourceTree = "<group>"; };
|
C44B3A4528E5C70100718CB1 /* TimeIntervalExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeIntervalExtension.swift; sourceTree = "<group>"; };
|
||||||
@ -806,6 +818,9 @@
|
|||||||
C44F868D2835BD8D005C353A /* phpmon-config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "phpmon-config.json"; sourceTree = "<group>"; };
|
C44F868D2835BD8D005C353A /* phpmon-config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "phpmon-config.json"; sourceTree = "<group>"; };
|
||||||
C450C8C528C919EC002A2B4B /* PreferenceName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferenceName.swift; sourceTree = "<group>"; };
|
C450C8C528C919EC002A2B4B /* PreferenceName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferenceName.swift; sourceTree = "<group>"; };
|
||||||
C451AFF52969E40F0078E617 /* HelpButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpButton.swift; sourceTree = "<group>"; };
|
C451AFF52969E40F0078E617 /* HelpButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpButton.swift; sourceTree = "<group>"; };
|
||||||
|
C4551656297AED18009B8466 /* ValetRcTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValetRcTest.swift; sourceTree = "<group>"; };
|
||||||
|
C4551658297AED7D009B8466 /* valetrc.valid */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valetrc.valid; sourceTree = "<group>"; };
|
||||||
|
C455165A297AEDB5009B8466 /* valetrc.broken */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = valetrc.broken; sourceTree = "<group>"; };
|
||||||
C459B4BC27F6093700E9B4B4 /* nginx-proxy.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "nginx-proxy.test"; sourceTree = "<group>"; };
|
C459B4BC27F6093700E9B4B4 /* nginx-proxy.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "nginx-proxy.test"; sourceTree = "<group>"; };
|
||||||
C45B9148295607F400F4EC78 /* Service.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Service.swift; sourceTree = "<group>"; };
|
C45B9148295607F400F4EC78 /* Service.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Service.swift; sourceTree = "<group>"; };
|
||||||
C45B914D295608E300F4EC78 /* ValetServicesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValetServicesManager.swift; sourceTree = "<group>"; };
|
C45B914D295608E300F4EC78 /* ValetServicesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValetServicesManager.swift; sourceTree = "<group>"; };
|
||||||
@ -865,6 +880,7 @@
|
|||||||
C4B97B74275CF08C003F3378 /* AppDelegate+MenuOutlets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+MenuOutlets.swift"; sourceTree = "<group>"; };
|
C4B97B74275CF08C003F3378 /* AppDelegate+MenuOutlets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+MenuOutlets.swift"; sourceTree = "<group>"; };
|
||||||
C4B97B77275CF1B5003F3378 /* App+ActivationPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "App+ActivationPolicy.swift"; sourceTree = "<group>"; };
|
C4B97B77275CF1B5003F3378 /* App+ActivationPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "App+ActivationPolicy.swift"; sourceTree = "<group>"; };
|
||||||
C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "App+GlobalHotkey.swift"; sourceTree = "<group>"; };
|
C4B97B7A275CF20A003F3378 /* App+GlobalHotkey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "App+GlobalHotkey.swift"; sourceTree = "<group>"; };
|
||||||
|
C4BB39382981AFC700F8E797 /* PhpVersionSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhpVersionSource.swift; sourceTree = "<group>"; };
|
||||||
C4BF56AA2949381100379603 /* FakeValetInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeValetInteractor.swift; sourceTree = "<group>"; };
|
C4BF56AA2949381100379603 /* FakeValetInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeValetInteractor.swift; sourceTree = "<group>"; };
|
||||||
C4C0E8DE27F88AEB002D32A9 /* FakeDomainScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeDomainScanner.swift; sourceTree = "<group>"; };
|
C4C0E8DE27F88AEB002D32A9 /* FakeDomainScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeDomainScanner.swift; sourceTree = "<group>"; };
|
||||||
C4C0E8E127F88B13002D32A9 /* ValetDomainScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValetDomainScanner.swift; sourceTree = "<group>"; };
|
C4C0E8E127F88B13002D32A9 /* ValetDomainScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValetDomainScanner.swift; sourceTree = "<group>"; };
|
||||||
@ -1226,6 +1242,14 @@
|
|||||||
path = Cells;
|
path = Cells;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
C4463FD029804C13007B93D5 /* Common */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
C4463FCB29804BCB007B93D5 /* RCFile.swift */,
|
||||||
|
);
|
||||||
|
path = Common;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
C44A874628905B8500498BC4 /* Onboarding */ = {
|
C44A874628905B8500498BC4 /* Onboarding */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -1287,6 +1311,8 @@
|
|||||||
C459B4C027F6096300E9B4B4 /* valet */ = {
|
C459B4C027F6096300E9B4B4 /* valet */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
C455165A297AEDB5009B8466 /* valetrc.broken */,
|
||||||
|
C4551658297AED7D009B8466 /* valetrc.valid */,
|
||||||
C4AF9F70275445FF00D44ED0 /* valet-config.json */,
|
C4AF9F70275445FF00D44ED0 /* valet-config.json */,
|
||||||
);
|
);
|
||||||
path = valet;
|
path = valet;
|
||||||
@ -1433,6 +1459,7 @@
|
|||||||
C4AF9F6B275445D300D44ED0 /* Integrations */ = {
|
C4AF9F6B275445D300D44ED0 /* Integrations */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
C4463FD029804C13007B93D5 /* Common */,
|
||||||
C4C0E8DA27F887CC002D32A9 /* Nginx */,
|
C4C0E8DA27F887CC002D32A9 /* Nginx */,
|
||||||
C4D89BC42783C98800A02B68 /* Composer */,
|
C4D89BC42783C98800A02B68 /* Composer */,
|
||||||
C4AF9F6C275445D900D44ED0 /* Homebrew */,
|
C4AF9F6C275445D900D44ED0 /* Homebrew */,
|
||||||
@ -1522,7 +1549,7 @@
|
|||||||
children = (
|
children = (
|
||||||
C4E4404527C56F4700D225E1 /* ValetSite.swift */,
|
C4E4404527C56F4700D225E1 /* ValetSite.swift */,
|
||||||
C41C02A827E61A65009F26CB /* FakeValetSite.swift */,
|
C41C02A827E61A65009F26CB /* FakeValetSite.swift */,
|
||||||
C4C0E8E427F88B1F002D32A9 /* SiteScanner */,
|
C4BB39382981AFC700F8E797 /* PhpVersionSource.swift */,
|
||||||
);
|
);
|
||||||
path = Sites;
|
path = Sites;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -1544,13 +1571,6 @@
|
|||||||
path = Nginx;
|
path = Nginx;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
C4C0E8E427F88B1F002D32A9 /* SiteScanner */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
);
|
|
||||||
path = SiteScanner;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
C4C1019727C65A11001FACC2 /* Parsers */ = {
|
C4C1019727C65A11001FACC2 /* Parsers */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -1559,6 +1579,7 @@
|
|||||||
C46FA98A2822F08F00D78807 /* PhpConfigurationTest.swift */,
|
C46FA98A2822F08F00D78807 /* PhpConfigurationTest.swift */,
|
||||||
C43A8A2325D9D20D00591B77 /* HomebrewPackageTest.swift */,
|
C43A8A2325D9D20D00591B77 /* HomebrewPackageTest.swift */,
|
||||||
C42CFB1927DFE8BD00862737 /* NginxConfigurationTest.swift */,
|
C42CFB1927DFE8BD00862737 /* NginxConfigurationTest.swift */,
|
||||||
|
C4551656297AED18009B8466 /* ValetRcTest.swift */,
|
||||||
);
|
);
|
||||||
path = Parsers;
|
path = Parsers;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -1920,6 +1941,7 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
C4551659297AED7D009B8466 /* valetrc.valid in Resources */,
|
||||||
C4570C3C28FC355400D18420 /* Localizable.strings in Resources */,
|
C4570C3C28FC355400D18420 /* Localizable.strings in Resources */,
|
||||||
54FCFD27276C883F004CE748 /* SelectPreferenceView.xib in Resources */,
|
54FCFD27276C883F004CE748 /* SelectPreferenceView.xib in Resources */,
|
||||||
54FCFD2E276C8D67004CE748 /* HotkeyPreferenceView.xib in Resources */,
|
54FCFD2E276C8D67004CE748 /* HotkeyPreferenceView.xib in Resources */,
|
||||||
@ -1933,6 +1955,7 @@
|
|||||||
C44C1992276E44CB0072762D /* ProgressWindow.storyboard in Resources */,
|
C44C1992276E44CB0072762D /* ProgressWindow.storyboard in Resources */,
|
||||||
C42F26762805FEE200938AC7 /* nginx-secure-proxy.test in Resources */,
|
C42F26762805FEE200938AC7 /* nginx-secure-proxy.test in Resources */,
|
||||||
C4F30B08278E195800755FCE /* brew-services.json in Resources */,
|
C4F30B08278E195800755FCE /* brew-services.json in Resources */,
|
||||||
|
C455165B297AEDB5009B8466 /* valetrc.broken in Resources */,
|
||||||
54A18D40282A566E000A0D81 /* nginx-secure-proxy-custom-tld.test in Resources */,
|
54A18D40282A566E000A0D81 /* nginx-secure-proxy-custom-tld.test in Resources */,
|
||||||
C42CFB1627DFDE7900862737 /* nginx-site.test in Resources */,
|
C42CFB1627DFDE7900862737 /* nginx-site.test in Resources */,
|
||||||
C459B4BD27F6093700E9B4B4 /* nginx-proxy.test in Resources */,
|
C459B4BD27F6093700E9B4B4 /* nginx-proxy.test in Resources */,
|
||||||
@ -2009,6 +2032,7 @@
|
|||||||
C4E2E85C28FC282B003B070C /* TestableConfiguration.swift in Sources */,
|
C4E2E85C28FC282B003B070C /* TestableConfiguration.swift in Sources */,
|
||||||
C4C0E8DF27F88AEB002D32A9 /* FakeDomainScanner.swift in Sources */,
|
C4C0E8DF27F88AEB002D32A9 /* FakeDomainScanner.swift in Sources */,
|
||||||
C44B3A4628E5C70100718CB1 /* TimeIntervalExtension.swift in Sources */,
|
C44B3A4628E5C70100718CB1 /* TimeIntervalExtension.swift in Sources */,
|
||||||
|
C4463FCC29804BCB007B93D5 /* RCFile.swift in Sources */,
|
||||||
C44264BE2850B86C007400F1 /* SwiftUIHelper.swift in Sources */,
|
C44264BE2850B86C007400F1 /* SwiftUIHelper.swift in Sources */,
|
||||||
C4E9D2C02878B336008FFDAD /* OnboardingView.swift in Sources */,
|
C4E9D2C02878B336008FFDAD /* OnboardingView.swift in Sources */,
|
||||||
C4F2E4372752F0870020E974 /* HomebrewDiagnostics.swift in Sources */,
|
C4F2E4372752F0870020E974 /* HomebrewDiagnostics.swift in Sources */,
|
||||||
@ -2025,6 +2049,7 @@
|
|||||||
C44067F727E258410045BD4E /* DomainListPhpCell.swift in Sources */,
|
C44067F727E258410045BD4E /* DomainListPhpCell.swift in Sources */,
|
||||||
C4FACE80288F1C0D00FC478F /* PreferencesWindowController+Hotkey.swift in Sources */,
|
C4FACE80288F1C0D00FC478F /* PreferencesWindowController+Hotkey.swift in Sources */,
|
||||||
C415D3B72770F294005EF286 /* Actions.swift in Sources */,
|
C415D3B72770F294005EF286 /* Actions.swift in Sources */,
|
||||||
|
C4BB39392981AFC700F8E797 /* PhpVersionSource.swift in Sources */,
|
||||||
C4C3643928AE4FCE00C0770E /* StatusMenu+Items.swift in Sources */,
|
C4C3643928AE4FCE00C0770E /* StatusMenu+Items.swift in Sources */,
|
||||||
C4AC51FC27E27F47008528CA /* DomainListKindCell.swift in Sources */,
|
C4AC51FC27E27F47008528CA /* DomainListKindCell.swift in Sources */,
|
||||||
C4CDA893288F1A71007CE25F /* Keys.swift in Sources */,
|
C4CDA893288F1A71007CE25F /* Keys.swift in Sources */,
|
||||||
@ -2136,6 +2161,7 @@
|
|||||||
C471E83028F9BB650021E251 /* Application.swift in Sources */,
|
C471E83028F9BB650021E251 /* Application.swift in Sources */,
|
||||||
C471E83128F9BB650021E251 /* LocalNotification.swift in Sources */,
|
C471E83128F9BB650021E251 /* LocalNotification.swift in Sources */,
|
||||||
C471E83228F9BB650021E251 /* MenuBarImageGenerator.swift in Sources */,
|
C471E83228F9BB650021E251 /* MenuBarImageGenerator.swift in Sources */,
|
||||||
|
C4BB393B2981AFC700F8E797 /* PhpVersionSource.swift in Sources */,
|
||||||
C471E83328F9BB650021E251 /* PMWindowController.swift in Sources */,
|
C471E83328F9BB650021E251 /* PMWindowController.swift in Sources */,
|
||||||
C471E83428F9BB650021E251 /* VersionExtractor.swift in Sources */,
|
C471E83428F9BB650021E251 /* VersionExtractor.swift in Sources */,
|
||||||
C471E83528F9BB650021E251 /* ValetProxy.swift in Sources */,
|
C471E83528F9BB650021E251 /* ValetProxy.swift in Sources */,
|
||||||
@ -2190,6 +2216,7 @@
|
|||||||
C471E86328F9BB650021E251 /* PMTableView.swift in Sources */,
|
C471E86328F9BB650021E251 /* PMTableView.swift in Sources */,
|
||||||
C471E86428F9BB650021E251 /* Warning.swift in Sources */,
|
C471E86428F9BB650021E251 /* Warning.swift in Sources */,
|
||||||
C40175BA2903108900763A68 /* ValetInteractor.swift in Sources */,
|
C40175BA2903108900763A68 /* ValetInteractor.swift in Sources */,
|
||||||
|
C4463FCE29804BCB007B93D5 /* RCFile.swift in Sources */,
|
||||||
C45B9150295608E300F4EC78 /* ValetServicesManager.swift in Sources */,
|
C45B9150295608E300F4EC78 /* ValetServicesManager.swift in Sources */,
|
||||||
C471E86528F9BB650021E251 /* WarningManager.swift in Sources */,
|
C471E86528F9BB650021E251 /* WarningManager.swift in Sources */,
|
||||||
C471E86628F9BB650021E251 /* WarningsWindowController.swift in Sources */,
|
C471E86628F9BB650021E251 /* WarningsWindowController.swift in Sources */,
|
||||||
@ -2401,6 +2428,7 @@
|
|||||||
C4CE7F9929683B43000102CF /* PhpVersionNumberCollection.swift in Sources */,
|
C4CE7F9929683B43000102CF /* PhpVersionNumberCollection.swift in Sources */,
|
||||||
C471E7FC28F9BACE0021E251 /* HomebrewPackage.swift in Sources */,
|
C471E7FC28F9BACE0021E251 /* HomebrewPackage.swift in Sources */,
|
||||||
C471E7CF28F9BA600021E251 /* ActiveShell.swift in Sources */,
|
C471E7CF28F9BA600021E251 /* ActiveShell.swift in Sources */,
|
||||||
|
C4BB393C2981AFC700F8E797 /* PhpVersionSource.swift in Sources */,
|
||||||
C471E7F628F9BAC80021E251 /* PhpHelper.swift in Sources */,
|
C471E7F628F9BAC80021E251 /* PhpHelper.swift in Sources */,
|
||||||
C471E7EE28F9BAC30021E251 /* Constants.swift in Sources */,
|
C471E7EE28F9BAC30021E251 /* Constants.swift in Sources */,
|
||||||
C471E80E28F9BAE80021E251 /* DateExtension.swift in Sources */,
|
C471E80E28F9BAE80021E251 /* DateExtension.swift in Sources */,
|
||||||
@ -2422,6 +2450,7 @@
|
|||||||
C4D3660E29113F20006BD146 /* System.swift in Sources */,
|
C4D3660E29113F20006BD146 /* System.swift in Sources */,
|
||||||
C471E80428F9BAD40021E251 /* PhpExtension.swift in Sources */,
|
C471E80428F9BAD40021E251 /* PhpExtension.swift in Sources */,
|
||||||
C471E7F728F9BACB0021E251 /* PhpSwitcher.swift in Sources */,
|
C471E7F728F9BACB0021E251 /* PhpSwitcher.swift in Sources */,
|
||||||
|
C4463FCF29804BCB007B93D5 /* RCFile.swift in Sources */,
|
||||||
C471E82C28F9BB340021E251 /* ValetListable.swift in Sources */,
|
C471E82C28F9BB340021E251 /* ValetListable.swift in Sources */,
|
||||||
C471E82828F9BB310021E251 /* HomebrewDiagnostics.swift in Sources */,
|
C471E82828F9BB310021E251 /* HomebrewDiagnostics.swift in Sources */,
|
||||||
C471E81E28F9BB260021E251 /* BetterAlert.swift in Sources */,
|
C471E81E28F9BB260021E251 /* BetterAlert.swift in Sources */,
|
||||||
@ -2532,6 +2561,7 @@
|
|||||||
C485707B28BF458900539B36 /* VersionPopoverView.swift in Sources */,
|
C485707B28BF458900539B36 /* VersionPopoverView.swift in Sources */,
|
||||||
C4E2E85D28FC282B003B070C /* TestableConfiguration.swift in Sources */,
|
C4E2E85D28FC282B003B070C /* TestableConfiguration.swift in Sources */,
|
||||||
C485706E28BF451C00539B36 /* OnboardingWindowController.swift in Sources */,
|
C485706E28BF451C00539B36 /* OnboardingWindowController.swift in Sources */,
|
||||||
|
C4BB393A2981AFC700F8E797 /* PhpVersionSource.swift in Sources */,
|
||||||
C4CB6E66292C362C002E9027 /* Homebrew.swift in Sources */,
|
C4CB6E66292C362C002E9027 /* Homebrew.swift in Sources */,
|
||||||
C43603A1275E67610028EFC6 /* AppDelegate+Notifications.swift in Sources */,
|
C43603A1275E67610028EFC6 /* AppDelegate+Notifications.swift in Sources */,
|
||||||
C4C3643A28AE4FCE00C0770E /* StatusMenu+Items.swift in Sources */,
|
C4C3643A28AE4FCE00C0770E /* StatusMenu+Items.swift in Sources */,
|
||||||
@ -2603,6 +2633,7 @@
|
|||||||
C44AD3F72912EF7100997FF4 /* RealFileSystemTest.swift in Sources */,
|
C44AD3F72912EF7100997FF4 /* RealFileSystemTest.swift in Sources */,
|
||||||
C4F30B0A278E1A1A00755FCE /* ComposerJson.swift in Sources */,
|
C4F30B0A278E1A1A00755FCE /* ComposerJson.swift in Sources */,
|
||||||
C4C0E8E027F88AEB002D32A9 /* FakeDomainScanner.swift in Sources */,
|
C4C0E8E027F88AEB002D32A9 /* FakeDomainScanner.swift in Sources */,
|
||||||
|
C4463FCD29804BCB007B93D5 /* RCFile.swift in Sources */,
|
||||||
C4AF9F7D275454A900D44ED0 /* ValetVersionExtractorTest.swift in Sources */,
|
C4AF9F7D275454A900D44ED0 /* ValetVersionExtractorTest.swift in Sources */,
|
||||||
C4B56362276AB0A500F12CCB /* VersionExtractorTest.swift in Sources */,
|
C4B56362276AB0A500F12CCB /* VersionExtractorTest.swift in Sources */,
|
||||||
C4B585452770FE3900DA4FBE /* RealCommand.swift in Sources */,
|
C4B585452770FE3900DA4FBE /* RealCommand.swift in Sources */,
|
||||||
@ -2628,6 +2659,7 @@
|
|||||||
C4A81CA528C67101008DD9D1 /* PMTableView.swift in Sources */,
|
C4A81CA528C67101008DD9D1 /* PMTableView.swift in Sources */,
|
||||||
C45E76152854A65300B4FE0C /* ServicesManager.swift in Sources */,
|
C45E76152854A65300B4FE0C /* ServicesManager.swift in Sources */,
|
||||||
C4D36602291132B7006BD146 /* ValetScanners.swift in Sources */,
|
C4D36602291132B7006BD146 /* ValetScanners.swift in Sources */,
|
||||||
|
C4551657297AED18009B8466 /* ValetRcTest.swift in Sources */,
|
||||||
C464ADAD275A7A3F003FCD53 /* DomainListWindowController.swift in Sources */,
|
C464ADAD275A7A3F003FCD53 /* DomainListWindowController.swift in Sources */,
|
||||||
C40C7F1F2772136000DDDCDC /* PhpEnv.swift in Sources */,
|
C40C7F1F2772136000DDDCDC /* PhpEnv.swift in Sources */,
|
||||||
C464ADB0275A7A6A003FCD53 /* DomainListVC.swift in Sources */,
|
C464ADB0275A7A6A003FCD53 /* DomainListVC.swift in Sources */,
|
||||||
@ -2799,7 +2831,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1020;
|
CURRENT_PROJECT_VERSION = 1030;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEBUG = YES;
|
DEBUG = YES;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
@ -2828,7 +2860,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1020;
|
CURRENT_PROJECT_VERSION = 1030;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEBUG = NO;
|
DEBUG = NO;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
@ -3056,7 +3088,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1020;
|
CURRENT_PROJECT_VERSION = 1030;
|
||||||
DEBUG = NO;
|
DEBUG = NO;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@ -3166,7 +3198,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1020;
|
CURRENT_PROJECT_VERSION = 1030;
|
||||||
DEBUG = YES;
|
DEBUG = YES;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
|
64
README.md
64
README.md
@ -27,22 +27,36 @@ PHP Monitor is a universal application that runs natively on Apple Silicon **and
|
|||||||
* macOS 11 Big Sur or later
|
* macOS 11 Big Sur or later
|
||||||
* Homebrew is installed in `/usr/local/homebrew` or `/opt/homebrew`
|
* Homebrew is installed in `/usr/local/homebrew` or `/opt/homebrew`
|
||||||
* Homebrew `php` formula is installed
|
* Homebrew `php` formula is installed
|
||||||
* Laravel Valet 3 recommended (but compatible with Valet 2)
|
* Laravel Valet (works with Valet v2, v3 and v4)
|
||||||
|
|
||||||
_You may need to update your Valet installation to keep everything working if a major version update of PHP has been released. You can do this by running `composer global update && valet install`. Some features are not supported when running Valet 2._
|
_You may need to update your Valet installation to keep everything working if a major version update of PHP has been released. You can do this by running `composer global update && valet install`. Some features are not supported when running Valet 2._
|
||||||
|
|
||||||
|
For more information, please see [SECURITY.md](./SECURITY.md) to find out which version of the app is currently supported.
|
||||||
|
|
||||||
## 🚀 How to install
|
## 🚀 How to install
|
||||||
|
|
||||||
Again, make sure you have **Laravel Valet** installed first. Once that's done, you can install via Homebrew (recommended), or may download the latest release on GitHub.
|
Again, make sure you have **[Laravel Valet](https://laravel.com/docs/master/valet)** installed first:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
composer global require laravel/valet
|
||||||
|
valet install
|
||||||
|
valet trust
|
||||||
|
```
|
||||||
|
|
||||||
|
Once that's done, you can install PHP Monitor via Homebrew (recommended), or (alternatively) you may download the latest release on GitHub.
|
||||||
|
|
||||||
To install via Homebrew, run:
|
To install via Homebrew, run:
|
||||||
|
|
||||||
brew tap nicoverbruggen/homebrew-cask
|
```sh
|
||||||
brew install --cask phpmon
|
brew tap nicoverbruggen/homebrew-cask
|
||||||
|
brew install --cask phpmon
|
||||||
|
```
|
||||||
|
|
||||||
To upgrade your existing installation, run:
|
To upgrade your existing installation, run:
|
||||||
|
|
||||||
brew upgrade phpmon
|
```sh
|
||||||
|
brew upgrade phpmon
|
||||||
|
```
|
||||||
|
|
||||||
(You may need to run `brew update` or `brew update-reset` first in order to update the cask file if you ran a Homebrew operation recently.)
|
(You may need to run `brew update` or `brew update-reset` first in order to update the cask file if you ran a Homebrew operation recently.)
|
||||||
|
|
||||||
@ -79,36 +93,14 @@ If you're still having issues, here's a few common questions & answers, as well
|
|||||||
<details>
|
<details>
|
||||||
<summary><strong>Which versions of PHP are supported?</strong></summary>
|
<summary><strong>Which versions of PHP are supported?</strong></summary>
|
||||||
|
|
||||||
The following versions of PHP are officially supported:
|
All stable and supported PHP versions are also supported by PHP Monitor. However, depending on which version of Valet you have installed, which versions of PHP that are made available for switching purposes may differ.
|
||||||
|
|
||||||
<ul>
|
> **Note**
|
||||||
<li>PHP 7.4</li>
|
> If you have versions of PHP installed that can be detected by PHP Monitor but is *not* supported by the currently active version of Valet, you will be alerted by an item in the menu with an exclamation mark emoji. (⚠️)
|
||||||
<li>PHP 8.0</li>
|
|
||||||
<li>PHP 8.1</li>
|
|
||||||
<li>PHP 8.2</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
The following versions have some support via backport and/or dev version:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>PHP 5.6 (Valet 2 only)</li>
|
|
||||||
<li>PHP 7.0 (Valet 2 and 3 only)</li>
|
|
||||||
<li>PHP 7.1 (Valet 2 and 3 only)</li>
|
|
||||||
<li>PHP 7.2 (Valet 2 and 3 only)</li>
|
|
||||||
<li>PHP 7.3 (Valet 2 and 3 only)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Additionally, the following dev version is also available:
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>PHP 8.3-dev (experimental)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
For more details, consult the [constants file](https://github.com/nicoverbruggen/phpmon/blob/main/phpmon/Common/Core/Constants.swift#L16) file to see which versions are supported.
|
|
||||||
|
|
||||||
Backports are available via [this tap](https://github.com/shivammathur/homebrew-php). For more information about those backports, please see the next FAQ entry.
|
Backports are available via [this tap](https://github.com/shivammathur/homebrew-php). For more information about those backports, please see the next FAQ entry.
|
||||||
|
|
||||||
For maximum compatibility with older PHP versions, you may wish to keep using Valet 2 or 3.
|
For maximum compatibility with older PHP versions, you may wish to keep using Valet 2 or 3. For more information, please see [SECURITY.md](./SECURITY.md) to find out which versions of PHP are supported with different versions of Valet.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -127,12 +119,12 @@ brew tap shivammathur/php
|
|||||||
|
|
||||||
You may find that this tap is already in use: if you've used Valet before, it automatically uses this tap for legacy versions of PHP.
|
You may find that this tap is already in use: if you've used Valet before, it automatically uses this tap for legacy versions of PHP.
|
||||||
|
|
||||||
You can then install those older versions:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install php@7.0
|
brew install shivammathur/php/php@7.4
|
||||||
brew install php@7.1
|
brew install shivammathur/php/php@7.3
|
||||||
...
|
brew install shivammathur/php/php@7.2
|
||||||
|
brew install shivammathur/php/php@7.1
|
||||||
|
brew install shivammathur/php/php@7.0
|
||||||
```
|
```
|
||||||
|
|
||||||
**Always make sure to restart PHP Monitor after installing or upgrading PHP versions!**
|
**Always make sure to restart PHP Monitor after installing or upgrading PHP versions!**
|
||||||
|
@ -6,7 +6,9 @@ Generally speaking, only the latest version of **PHP Monitor** is supported, exc
|
|||||||
|
|
||||||
| Version | Apple Silicon | Supported | Supported macOS | Deployment Target | Detected PHP Versions | Recommended Valet Version |
|
| Version | Apple Silicon | Supported | Supported macOS | Deployment Target | Detected PHP Versions | Recommended Valet Version |
|
||||||
| ------- | ------------- | ------------------ | ----- | ----- | ----- | ----
|
| ------- | ------------- | ------------------ | ----- | ----- | ----- | ----
|
||||||
| 6.x | ✅ Universal binary | ✅ Yes | Big Sur (11.0)<br/>Monterey (12.0)<br/>Ventura (13.0) | macOS 11+ | PHP 5.6—PHP 8.2 (w/ Valet 2.x)<br/>PHP 7.0—PHP 8.2 (w/ Valet 3.x)<br/>PHP 7.4-PHP 8.2 (w/ Valet 4.x) | 3.0 or higher recommended<br/> 2.16.2 minimum |
|
| 5.7 | ✅ Universal binary | ✅ Yes | Big Sur (11.0)<br/>Monterey (12.0)<br/>Ventura (13.0) | macOS 11+ | PHP 5.6—PHP 8.2 (w/ Valet 2.x)<br/>PHP 7.0—PHP 8.2 (w/ Valet 3.x)<br/>PHP 7.1-PHP 8.2 (w/ Valet 4.x*) | 3.0 or higher recommended<br/> 2.16.2 minimum |
|
||||||
|
|
||||||
|
(*) Preliminary listing. Valet 4 hasn't been released yet and the versions of PHP Valet can work with might still change.
|
||||||
|
|
||||||
## Legacy versions
|
## Legacy versions
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"alpha" : "1.000",
|
"alpha" : "1.000",
|
||||||
"blue" : "0.988",
|
"blue" : "0.988",
|
||||||
"green" : "0.580",
|
"green" : "0.580",
|
||||||
"red" : "0.277"
|
"red" : "0.278"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.501",
|
||||||
|
"green" : "0.697",
|
||||||
|
"red" : "0.247"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.501",
|
||||||
|
"green" : "0.765",
|
||||||
|
"red" : "0.247"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
38
phpmon/Assets.xcassets/StatusColorRed.colorset/Contents.json
Normal file
38
phpmon/Assets.xcassets/StatusColorRed.colorset/Contents.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.180",
|
||||||
|
"green" : "0.000",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.426",
|
||||||
|
"green" : "0.363",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.180",
|
||||||
|
"green" : "0.841",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.426",
|
||||||
|
"green" : "0.809",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 12/10/2022.
|
// Created by Nico Verbruggen on 12/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 12/10/2022.
|
// Created by Nico Verbruggen on 12/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Command.swift
|
// Command.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Services.swift
|
// Services.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Constants.swift
|
// Constants.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
@ -14,15 +14,24 @@ struct Constants {
|
|||||||
If the installed version is older, a notification will be shown
|
If the installed version is older, a notification will be shown
|
||||||
every time the app launches (with a recommendation to upgrade).
|
every time the app launches (with a recommendation to upgrade).
|
||||||
|
|
||||||
See also: https://github.com/laravel/valet/releases/tag/v3.1.10
|
See also: https://github.com/laravel/valet/releases/tag/v2.16.2
|
||||||
*/
|
*/
|
||||||
static let MinimumRecommendedValetVersion = "3.1.10"
|
static let MinimumRecommendedValetVersion = "2.16.2"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PHP versions supported by this application.
|
* The PHP versions supported by this application.
|
||||||
* Depends on what version of Valet is installed.
|
* Any other PHP versions are considered invalid.
|
||||||
*/
|
*/
|
||||||
static let ValetSupportedPhpVersionMatrix = [
|
static let DetectedPhpVersions: Set = [
|
||||||
|
"5.6",
|
||||||
|
"7.0", "7.1", "7.2", "7.3", "7.4",
|
||||||
|
"8.0", "8.1", "8.2", "8.3"
|
||||||
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
The PHP versions supported by each version of Valet.
|
||||||
|
*/
|
||||||
|
static let ValetSupportedPhpVersionMatrix: [Int: Set] = [
|
||||||
2: // Valet v2 has the broadest legacy support
|
2: // Valet v2 has the broadest legacy support
|
||||||
[
|
[
|
||||||
"5.6",
|
"5.6",
|
||||||
@ -32,12 +41,14 @@ struct Constants {
|
|||||||
3: // Valet v3 dropped support for v5.6
|
3: // Valet v3 dropped support for v5.6
|
||||||
[
|
[
|
||||||
"7.0", "7.1", "7.2", "7.3", "7.4",
|
"7.0", "7.1", "7.2", "7.3", "7.4",
|
||||||
"8.0", "8.1", "8.2", "8.3"
|
"8.0", "8.1", "8.2",
|
||||||
|
"8.3" // dev
|
||||||
],
|
],
|
||||||
4: // Valet v4 dropped support for <v7.4
|
4: // Valet v4 dropped support for v7.0
|
||||||
[
|
[
|
||||||
"7.4",
|
"7.1", "7.2", "7.3", "7.4",
|
||||||
"8.0", "8.1", "8.2", "8.3"
|
"8.0", "8.1", "8.2",
|
||||||
|
"8.3" // dev
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/01/2022.
|
// Created by Nico Verbruggen on 23/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 24/12/2021.
|
// Created by Nico Verbruggen on 24/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
// MARK: Common Shell Commands
|
// MARK: Common Shell Commands
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 21/11/2022.
|
// Created by Nico Verbruggen on 21/11/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 21/12/2021.
|
// Created by Nico Verbruggen on 21/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Paths.swift
|
// Paths.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/02/2022.
|
// Created by Nico Verbruggen on 23/02/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 06/02/2022.
|
// Created by Nico Verbruggen on 06/02/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 08/02/2022.
|
// Created by Nico Verbruggen on 08/02/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 11/06/2022.
|
// Created by Nico Verbruggen on 11/06/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/10/2022.
|
// Created by Nico Verbruggen on 16/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Date.swift
|
// Date.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 01/11/2022.
|
// Created by Nico Verbruggen on 01/11/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 14/04/2021.
|
// Created by Nico Verbruggen on 14/04/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 18/08/2022.
|
// Created by Nico Verbruggen on 18/08/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 17/02/2022.
|
// Created by Nico Verbruggen on 17/02/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// StringExtension.swift
|
// StringExtension.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
import Foundation
|
import Foundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 29/09/2022.
|
// Created by Nico Verbruggen on 29/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 04/02/2021.
|
// Created by Nico Verbruggen on 04/02/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 08/10/2022.
|
// Created by Nico Verbruggen on 08/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 08/10/2022.
|
// Created by Nico Verbruggen on 08/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 08/10/2022.
|
// Created by Nico Verbruggen on 08/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Alert.swift
|
// Alert.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 07/12/2021.
|
// Created by Nico Verbruggen on 07/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -33,8 +33,8 @@ class Application {
|
|||||||
Attempt to open a specific directory in the app of choice.
|
Attempt to open a specific directory in the app of choice.
|
||||||
(This will open the app if it isn't open yet.)
|
(This will open the app if it isn't open yet.)
|
||||||
*/
|
*/
|
||||||
@objc public func openDirectory(file: String) async {
|
@objc public func openDirectory(file: String) {
|
||||||
return await Shell.quiet("/usr/bin/open -a \"\(name)\" \"\(file)\"")
|
Task { await Shell.quiet("/usr/bin/open -a \"\(name)\" \"\(file)\"") }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks if the app is installed. */
|
/** Checks if the app is installed. */
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// LocalNotification.swift
|
// LocalNotification.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// ImageGenerator.swift
|
// ImageGenerator.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 05/12/2021.
|
// Created by Nico Verbruggen on 05/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 01/11/2022.
|
// Created by Nico Verbruggen on 01/11/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/12/2021.
|
// Created by Nico Verbruggen on 16/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 01/11/2022.
|
// Created by Nico Verbruggen on 01/11/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// ActivePhpInstallation.swift
|
// ActivePhpInstallation.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 01/05/2022.
|
// Created by Nico Verbruggen on 01/05/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// HomebrewPackage.swift
|
// HomebrewPackage.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 11/01/2022.
|
// Created by Nico Verbruggen on 11/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -44,7 +44,7 @@ final class HomebrewService: Sendable, Decodable {
|
|||||||
/**
|
/**
|
||||||
Dummy data for preview purposes.
|
Dummy data for preview purposes.
|
||||||
*/
|
*/
|
||||||
public static func dummy(named service: String, enabled: Bool) -> HomebrewService {
|
public static func dummy(named service: String, enabled: Bool, status: String? = nil) -> HomebrewService {
|
||||||
return HomebrewService(
|
return HomebrewService(
|
||||||
name: service,
|
name: service,
|
||||||
service_name: service,
|
service_name: service,
|
||||||
@ -52,7 +52,7 @@ final class HomebrewService: Sendable, Decodable {
|
|||||||
loaded: enabled,
|
loaded: enabled,
|
||||||
pid: nil,
|
pid: nil,
|
||||||
user: nil,
|
user: nil,
|
||||||
status: nil,
|
status: status,
|
||||||
log_path: nil,
|
log_path: nil,
|
||||||
error_log_path: nil
|
error_log_path: nil
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 21/12/2021.
|
// Created by Nico Verbruggen on 21/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -38,9 +38,12 @@ class PhpEnv {
|
|||||||
/** Whether the switcher is busy performing any actions. */
|
/** Whether the switcher is busy performing any actions. */
|
||||||
var isBusy: Bool = false
|
var isBusy: Bool = false
|
||||||
|
|
||||||
/** All available versions of PHP. */
|
/** All versions of PHP that are currently supported. */
|
||||||
var availablePhpVersions: [String] = []
|
var availablePhpVersions: [String] = []
|
||||||
|
|
||||||
|
/** All versions of PHP that are currently installed but not compatible. */
|
||||||
|
var incompatiblePhpVersions: [String] = []
|
||||||
|
|
||||||
/** Cached information about the PHP installations. */
|
/** Cached information about the PHP installations. */
|
||||||
var cachedPhpInstallations: [String: PhpInstallation] = [:]
|
var cachedPhpInstallations: [String: PhpInstallation] = [:]
|
||||||
|
|
||||||
@ -87,13 +90,14 @@ class PhpEnv {
|
|||||||
/**
|
/**
|
||||||
Detects which versions of PHP are installed.
|
Detects which versions of PHP are installed.
|
||||||
*/
|
*/
|
||||||
public func detectPhpVersions() async -> [String] {
|
public func detectPhpVersions() async -> Set<String> {
|
||||||
let files = await Shell.pipe("ls \(Paths.optPath) | grep php@").out
|
let files = await Shell.pipe("ls \(Paths.optPath) | grep php@").out
|
||||||
|
|
||||||
var versionsOnly = await extractPhpVersions(
|
let versions = await extractPhpVersions(from: files.components(separatedBy: "\n"))
|
||||||
from: files.components(separatedBy: "\n"),
|
|
||||||
supported: Constants.ValetSupportedPhpVersionMatrix[Valet.shared.version.major] ?? []
|
let supportedByValet = Constants.ValetSupportedPhpVersionMatrix[Valet.shared.version.major] ?? []
|
||||||
)
|
|
||||||
|
var supportedVersions = versions.intersection(supportedByValet)
|
||||||
|
|
||||||
// Make sure the aliased version is detected
|
// Make sure the aliased version is detected
|
||||||
// The user may have `php` installed, but not e.g. `php@8.0`
|
// The user may have `php` installed, but not e.g. `php@8.0`
|
||||||
@ -101,13 +105,18 @@ class PhpEnv {
|
|||||||
let phpAlias = homebrewPackage.version
|
let phpAlias = homebrewPackage.version
|
||||||
|
|
||||||
// Avoid inserting a duplicate
|
// Avoid inserting a duplicate
|
||||||
if !versionsOnly.contains(phpAlias) && FileSystem.fileExists("\(Paths.optPath)/php/bin/php") {
|
if !supportedVersions.contains(phpAlias) && FileSystem.fileExists("\(Paths.optPath)/php/bin/php") {
|
||||||
versionsOnly.append(phpAlias)
|
supportedVersions.insert(phpAlias)
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.info("The PHP versions that were detected are: \(versionsOnly)")
|
availablePhpVersions = Array(supportedVersions)
|
||||||
|
.sorted(by: { $0.versionCompare($1) == .orderedDescending })
|
||||||
|
|
||||||
availablePhpVersions = versionsOnly
|
incompatiblePhpVersions = Array(versions.subtracting(supportedByValet))
|
||||||
|
.sorted(by: { $0.versionCompare($1) == .orderedDescending })
|
||||||
|
|
||||||
|
Log.info("The PHP versions that were detected are: \(availablePhpVersions)")
|
||||||
|
Log.info("The PHP versions that were unsupported are: \(incompatiblePhpVersions)")
|
||||||
|
|
||||||
var mappedVersions: [String: PhpInstallation] = [:]
|
var mappedVersions: [String: PhpInstallation] = [:]
|
||||||
|
|
||||||
@ -117,7 +126,7 @@ class PhpEnv {
|
|||||||
|
|
||||||
cachedPhpInstallations = mappedVersions
|
cachedPhpInstallations = mappedVersions
|
||||||
|
|
||||||
return versionsOnly
|
return supportedVersions
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,11 +138,11 @@ class PhpEnv {
|
|||||||
*/
|
*/
|
||||||
public func extractPhpVersions(
|
public func extractPhpVersions(
|
||||||
from versions: [String],
|
from versions: [String],
|
||||||
supported: [String],
|
|
||||||
checkBinaries: Bool = true,
|
checkBinaries: Bool = true,
|
||||||
generateHelpers: Bool = true
|
generateHelpers: Bool = true
|
||||||
) async -> [String] {
|
) async -> Set<String> {
|
||||||
var output: [String] = []
|
let supported = Constants.DetectedPhpVersions
|
||||||
|
var output: Set<String> = []
|
||||||
versions.filter { (version) -> Bool in
|
versions.filter { (version) -> Bool in
|
||||||
// Omit everything that doesn't start with php@
|
// Omit everything that doesn't start with php@
|
||||||
// (e.g. something-php@8.0 won't be detected)
|
// (e.g. something-php@8.0 won't be detected)
|
||||||
@ -145,7 +154,7 @@ class PhpEnv {
|
|||||||
if !output.contains(version)
|
if !output.contains(version)
|
||||||
&& supported.contains(version)
|
&& supported.contains(version)
|
||||||
&& (checkBinaries ? FileSystem.fileExists("\(Paths.optPath)/php@\(version)/bin/php") : true) {
|
&& (checkBinaries ? FileSystem.fileExists("\(Paths.optPath)/php@\(version)/bin/php") : true) {
|
||||||
output.append(version)
|
output.insert(version)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 17/03/2022.
|
// Created by Nico Verbruggen on 17/03/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/01/2022.
|
// Created by Nico Verbruggen on 23/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 04/05/2022.
|
// Created by Nico Verbruggen on 04/05/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 31/01/2021.
|
// Created by Nico Verbruggen on 31/01/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 28/11/2021.
|
// Created by Nico Verbruggen on 28/11/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 24/12/2021.
|
// Created by Nico Verbruggen on 24/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 24/12/2021.
|
// Created by Nico Verbruggen on 24/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 15/05/2022.
|
// Created by Nico Verbruggen on 15/05/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 20/09/2022.
|
// Created by Nico Verbruggen on 20/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 21/09/2022.
|
// Created by Nico Verbruggen on 21/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 21/09/2022.
|
// Created by Nico Verbruggen on 21/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 12/10/2022.
|
// Created by Nico Verbruggen on 12/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/10/2022.
|
// Created by Nico Verbruggen on 16/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 04/10/2022.
|
// Created by Nico Verbruggen on 04/10/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 21/09/2022.
|
// Created by Nico Verbruggen on 21/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 05/12/2021.
|
// Created by Nico Verbruggen on 05/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 05/12/2021.
|
// Created by Nico Verbruggen on 05/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// StateManager.swift
|
// StateManager.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 20/12/2021.
|
// Created by Nico Verbruggen on 20/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 05/12/2021.
|
// Created by Nico Verbruggen on 05/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 06/12/2021.
|
// Created by Nico Verbruggen on 06/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// AppDelegate.swift
|
// AppDelegate.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 09/05/2022.
|
// Created by Nico Verbruggen on 09/05/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 10/05/2022.
|
// Created by Nico Verbruggen on 10/05/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 10/08/2022.
|
// Created by Nico Verbruggen on 10/08/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 14/09/2022.
|
// Created by Nico Verbruggen on 14/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 28/01/2022.
|
// Created by Nico Verbruggen on 28/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/12/2022.
|
// Created by Nico Verbruggen on 23/12/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -41,9 +41,14 @@ class FakeServicesManager: ServicesManager {
|
|||||||
|
|
||||||
private func reapplyServices() {
|
private func reapplyServices() {
|
||||||
let services = self.formulae.map {
|
let services = self.formulae.map {
|
||||||
|
let dummy = HomebrewService.dummy(
|
||||||
|
named: $0.name,
|
||||||
|
enabled: self.fixedStatus == .active,
|
||||||
|
status: self.fixedStatus == .error ? "error" : nil
|
||||||
|
)
|
||||||
let wrapper = Service(
|
let wrapper = Service(
|
||||||
formula: $0,
|
formula: $0,
|
||||||
service: HomebrewService.dummy(named: $0.name, enabled: self.fixedStatus == .active)
|
service: dummy
|
||||||
)
|
)
|
||||||
return wrapper
|
return wrapper
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/12/2022.
|
// Created by Nico Verbruggen on 23/12/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 11/06/2022.
|
// Created by Nico Verbruggen on 11/06/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -66,7 +66,7 @@ class ServicesManager: ObservableObject {
|
|||||||
|
|
||||||
public var statusColor: Color {
|
public var statusColor: Color {
|
||||||
if self.services.isEmpty || !self.firstRunComplete {
|
if self.services.isEmpty || !self.firstRunComplete {
|
||||||
return .yellow
|
return Color("StatusColorYellow")
|
||||||
}
|
}
|
||||||
|
|
||||||
let statuses = self.services[0...2].map { $0.status }
|
let statuses = self.services[0...2].map { $0.status }
|
||||||
@ -74,10 +74,10 @@ class ServicesManager: ObservableObject {
|
|||||||
if statuses.contains(.missing)
|
if statuses.contains(.missing)
|
||||||
|| statuses.contains(.inactive)
|
|| statuses.contains(.inactive)
|
||||||
|| statuses.contains(.error) {
|
|| statuses.contains(.error) {
|
||||||
return .red
|
return Color("StatusColorRed")
|
||||||
}
|
}
|
||||||
|
|
||||||
return .green
|
return Color("StatusColorGreen")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/12/2022.
|
// Created by Nico Verbruggen on 23/12/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
78
phpmon/Domain/App/ServicesManager.swift
Normal file
78
phpmon/Domain/App/ServicesManager.swift
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
//
|
||||||
|
// ServicesManager.swift
|
||||||
|
// PHP Monitor
|
||||||
|
//
|
||||||
|
// Created by Nico Verbruggen on 11/06/2022.
|
||||||
|
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
class ServicesManager: ObservableObject {
|
||||||
|
|
||||||
|
static var shared = ServicesManager()
|
||||||
|
|
||||||
|
@Published var rootServices: [String: HomebrewService] = [:]
|
||||||
|
@Published var userServices: [String: HomebrewService] = [:]
|
||||||
|
|
||||||
|
public static func loadHomebrewServices(completed: (() -> Void)? = nil) {
|
||||||
|
let rootServiceNames = [
|
||||||
|
Homebrew.Formulae.php,
|
||||||
|
Homebrew.Formulae.nginx,
|
||||||
|
Homebrew.Formulae.dnsmasq
|
||||||
|
]
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .background).async {
|
||||||
|
let data = Shell
|
||||||
|
.pipe("sudo \(Paths.brew) services info --all --json", requiresPath: true)
|
||||||
|
.data(using: .utf8)!
|
||||||
|
|
||||||
|
let services = try! JSONDecoder()
|
||||||
|
.decode([HomebrewService].self, from: data)
|
||||||
|
.filter({ return rootServiceNames.contains($0.name) })
|
||||||
|
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
ServicesManager.shared.rootServices = Dictionary(
|
||||||
|
uniqueKeysWithValues: services.map { ($0.name, $0) }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let userServiceNames = Preferences.custom.services ?? []
|
||||||
|
|
||||||
|
DispatchQueue.global(qos: .background).async {
|
||||||
|
let data = Shell
|
||||||
|
.pipe("\(Paths.brew) services info --all --json", requiresPath: true)
|
||||||
|
.data(using: .utf8)!
|
||||||
|
|
||||||
|
let services = try! JSONDecoder()
|
||||||
|
.decode([HomebrewService].self, from: data)
|
||||||
|
.filter({ return userServiceNames.contains($0.name) })
|
||||||
|
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
ServicesManager.shared.userServices = Dictionary(
|
||||||
|
uniqueKeysWithValues: services.map { ($0.name, $0) }
|
||||||
|
)
|
||||||
|
completed?()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func loadData() {
|
||||||
|
Self.loadHomebrewServices()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Dummy data for preview purposes.
|
||||||
|
*/
|
||||||
|
func withDummyServices(_ services: [String: Bool]) -> Self {
|
||||||
|
for (service, enabled) in services {
|
||||||
|
let item = HomebrewService.dummy(named: service, enabled: enabled)
|
||||||
|
self.rootServices[service] = item
|
||||||
|
}
|
||||||
|
|
||||||
|
return self
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
// Environment.swift
|
// Environment.swift
|
||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -261,7 +261,7 @@ class Startup {
|
|||||||
},
|
},
|
||||||
name: "valet version is supported",
|
name: "valet version is supported",
|
||||||
titleText: "startup.errors.valet_version_not_supported.title".localized,
|
titleText: "startup.errors.valet_version_not_supported.title".localized,
|
||||||
subtitleText: "startup.errors.valet_version_not_supported.subtitle".localized(Valet.shared.version.text),
|
subtitleText: "startup.errors.valet_version_not_supported.subtitle".localized,
|
||||||
descriptionText: "startup.errors.valet_version_not_supported.desc".localized
|
descriptionText: "startup.errors.valet_version_not_supported.desc".localized
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 24/01/2022.
|
// Created by Nico Verbruggen on 24/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 24/01/2022.
|
// Created by Nico Verbruggen on 24/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 03/12/2021.
|
// Created by Nico Verbruggen on 03/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/03/2022.
|
// Created by Nico Verbruggen on 16/03/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/03/2022.
|
// Created by Nico Verbruggen on 16/03/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/03/2022.
|
// Created by Nico Verbruggen on 16/03/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
@ -28,7 +28,7 @@ class DomainListPhpCell: NSTableCellView, DomainListCellProtocol {
|
|||||||
|
|
||||||
imageViewPhpVersionOK.toolTip = nil
|
imageViewPhpVersionOK.toolTip = nil
|
||||||
|
|
||||||
imageViewPhpVersionOK.contentTintColor = site.composerPhpCompatibleWithLinked
|
imageViewPhpVersionOK.contentTintColor = site.isCompatibleWithPreferredPhpVersion
|
||||||
? NSColor(named: "IconColorGreen")
|
? NSColor(named: "IconColorGreen")
|
||||||
: NSColor(named: "IconColorRed")
|
: NSColor(named: "IconColorRed")
|
||||||
|
|
||||||
@ -37,9 +37,9 @@ class DomainListPhpCell: NSTableCellView, DomainListCellProtocol {
|
|||||||
imageViewPhpVersionOK.image = NSImage(named: "Isolated")
|
imageViewPhpVersionOK.image = NSImage(named: "Isolated")
|
||||||
imageViewPhpVersionOK.toolTip = "domain_list.tooltips.isolated".localized(site.servingPhpVersion)
|
imageViewPhpVersionOK.toolTip = "domain_list.tooltips.isolated".localized(site.servingPhpVersion)
|
||||||
} else {
|
} else {
|
||||||
imageViewPhpVersionOK.isHidden = (site.composerPhp == "???" || !site.composerPhpCompatibleWithLinked)
|
imageViewPhpVersionOK.isHidden = (site.preferredPhpVersion == "???" || !site.isCompatibleWithPreferredPhpVersion)
|
||||||
imageViewPhpVersionOK.image = NSImage(named: "Checkmark")
|
imageViewPhpVersionOK.image = NSImage(named: "Checkmark")
|
||||||
imageViewPhpVersionOK.toolTip = "domain_list.tooltips.checkmark".localized(site.composerPhp)
|
imageViewPhpVersionOK.toolTip = "domain_list.tooltips.checkmark".localized(site.preferredPhpVersion)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ class DomainListPhpCell: NSTableCellView, DomainListCellProtocol {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
return PhpEnv.shared.validVersions(for: site.composerPhp).filter({ version in
|
return PhpEnv.shared.validVersions(for: site.preferredPhpVersion).filter({ version in
|
||||||
version.short != PhpEnv.phpInstall.version.short
|
version.short != PhpEnv.phpInstall.version.short
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/03/2022.
|
// Created by Nico Verbruggen on 16/03/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 16/03/2022.
|
// Created by Nico Verbruggen on 16/03/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
@ -25,7 +25,7 @@ class DomainListTypeCell: NSTableCellView, DomainListCellProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PHP version
|
// PHP version
|
||||||
labelPhpVersion.stringValue = site.composerPhp == "???" ? "Any PHP" : "PHP \(site.composerPhp)"
|
labelPhpVersion.stringValue = site.preferredPhpVersion == "???" ? "Any PHP" : "PHP \(site.preferredPhpVersion)"
|
||||||
}
|
}
|
||||||
|
|
||||||
func populateCell(with proxy: ValetProxy) {
|
func populateCell(with proxy: ValetProxy) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 23/12/2021.
|
// Created by Nico Verbruggen on 23/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -30,17 +30,17 @@ extension DomainListVC {
|
|||||||
NSWorkspace.shared.open(url)
|
NSWorkspace.shared.open(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func openInFinder() async {
|
@objc func openInFinder() {
|
||||||
await Shell.quiet("open '\(selectedSite!.absolutePath)'")
|
Task { return await Shell.quiet("open '\(selectedSite!.absolutePath)'") }
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func openInTerminal() async {
|
@objc func openInTerminal() {
|
||||||
await Shell.quiet("open -b com.apple.terminal '\(selectedSite!.absolutePath)'")
|
Task { await Shell.quiet("open -b com.apple.terminal '\(selectedSite!.absolutePath)'") }
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func openWithEditor(sender: EditorMenuItem) async {
|
@objc func openWithEditor(sender: EditorMenuItem) {
|
||||||
guard let editor = sender.editor else { return }
|
guard let editor = sender.editor else { return }
|
||||||
await editor.openDirectory(file: selectedSite!.absolutePath)
|
editor.openDirectory(file: selectedSite!.absolutePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - UI interaction
|
// MARK: - UI interaction
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 10/12/2021.
|
// Created by Nico Verbruggen on 10/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 30/03/2021.
|
// Created by Nico Verbruggen on 30/03/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 03/12/2021.
|
// Created by Nico Verbruggen on 03/12/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 05/09/2022.
|
// Created by Nico Verbruggen on 05/09/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 14/04/2022.
|
// Created by Nico Verbruggen on 14/04/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
48
phpmon/Domain/Integrations/Common/RCFile.swift
Normal file
48
phpmon/Domain/Integrations/Common/RCFile.swift
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
//
|
||||||
|
// RCFile.swift
|
||||||
|
// PHP Monitor
|
||||||
|
//
|
||||||
|
// Created by Nico Verbruggen on 24/01/2023.
|
||||||
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct RCFile {
|
||||||
|
let path: String?
|
||||||
|
let fields: [String: String]
|
||||||
|
|
||||||
|
static func fromPath(_ path: String) -> RCFile? {
|
||||||
|
do {
|
||||||
|
let text = try String(contentsOf: URL(fileURLWithPath: path), encoding: .utf8)
|
||||||
|
return RCFile(path: path, contents: text)
|
||||||
|
} catch {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
init(path: String? = nil, contents: String) {
|
||||||
|
var fields: [String: String] = [:]
|
||||||
|
|
||||||
|
contents
|
||||||
|
.split(separator: "\n")
|
||||||
|
.forEach({ line in
|
||||||
|
if line.contains("=") {
|
||||||
|
let content = line.split(separator: "=")
|
||||||
|
let key = String(content[0])
|
||||||
|
.trimmingCharacters(in: .whitespaces)
|
||||||
|
.replacingOccurrences(of: "\"", with: "")
|
||||||
|
if key.starts(with: "#") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let value = String(content[1])
|
||||||
|
.trimmingCharacters(in: .whitespaces)
|
||||||
|
.replacingOccurrences(of: "\"", with: "")
|
||||||
|
fields[key] = value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
self.path = path
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 04/01/2022.
|
// Created by Nico Verbruggen on 04/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
@ -40,7 +40,7 @@ struct ComposerJson: Decodable {
|
|||||||
Checks what the PHP version constraint is.
|
Checks what the PHP version constraint is.
|
||||||
Returns a tuple (constraint, location of constraint).
|
Returns a tuple (constraint, location of constraint).
|
||||||
*/
|
*/
|
||||||
public func getPhpVersion() -> (String, ValetSite.VersionSource) {
|
public func getPhpVersion() -> (String, PhpVersionSource) {
|
||||||
// Check if in platform
|
// Check if in platform
|
||||||
if configuration?.platform?.php != nil {
|
if configuration?.platform?.php != nil {
|
||||||
return (configuration!.platform!.php!, .platform)
|
return (configuration!.platform!.php!, .platform)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 08/02/2022.
|
// Created by Nico Verbruggen on 08/02/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 26/01/2022.
|
// Created by Nico Verbruggen on 26/01/2022.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// PHP Monitor
|
// PHP Monitor
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 28/11/2021.
|
// Created by Nico Verbruggen on 28/11/2021.
|
||||||
// Copyright © 2022 Nico Verbruggen. All rights reserved.
|
// Copyright © 2023 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user