From 42fc0e36980ed137637ad1f39ed937c55d952021 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Sun, 23 Jan 2022 20:06:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Due=20to=20closing=20#34,=20remo?= =?UTF-8?q?ved=20switcher=20pref?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon-common/PHP/PHP Version/PhpEnv.swift | 2 -- phpmon/Domain/Preferences/Preferences.swift | 5 +---- phpmon/Domain/Preferences/PrefsVC.swift | 8 -------- phpmon/Localizable.strings | 4 ---- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/phpmon-common/PHP/PHP Version/PhpEnv.swift b/phpmon-common/PHP/PHP Version/PhpEnv.swift index 8c5d1d7..bcac813 100644 --- a/phpmon-common/PHP/PHP Version/PhpEnv.swift +++ b/phpmon-common/PHP/PHP Version/PhpEnv.swift @@ -78,8 +78,6 @@ class PhpEnv { // MARK: - Methods public static var switcher: PhpSwitcher { - // Based on the setting, use a particular switcher - // For now, we'll hardcode the internal switcher though return InternalSwitcher() } diff --git a/phpmon/Domain/Preferences/Preferences.swift b/phpmon/Domain/Preferences/Preferences.swift index ec3df1e..2b411e4 100644 --- a/phpmon/Domain/Preferences/Preferences.swift +++ b/phpmon/Domain/Preferences/Preferences.swift @@ -15,7 +15,6 @@ enum PreferenceName: String { case fullPhpVersionDynamicIcon = "full_php_in_menu_bar" case autoServiceRestartAfterExtensionToggle = "auto_restart_after_extension_toggle" case autoComposerGlobalUpdateAfterSwitch = "auto_composer_global_update_after_switch" - case useInternalSwitcher = "use_phpmon_switcher" case globalHotkey = "global_hotkey" } @@ -54,8 +53,7 @@ class Preferences { PreferenceName.shouldDisplayPhpHintInIcon.rawValue: true, PreferenceName.fullPhpVersionDynamicIcon.rawValue: false, PreferenceName.autoServiceRestartAfterExtensionToggle.rawValue: true, - PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue: false, - PreferenceName.useInternalSwitcher.rawValue: false, + PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue: false ]) if UserDefaults.standard.bool(forKey: PreferenceName.wasLaunchedBefore.rawValue) { @@ -98,7 +96,6 @@ class Preferences { .fullPhpVersionDynamicIcon: UserDefaults.standard.bool(forKey: PreferenceName.fullPhpVersionDynamicIcon.rawValue) as Any, .autoServiceRestartAfterExtensionToggle: UserDefaults.standard.bool(forKey: PreferenceName.autoServiceRestartAfterExtensionToggle.rawValue) as Any, .autoComposerGlobalUpdateAfterSwitch: UserDefaults.standard.bool(forKey: PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue) as Any, - .useInternalSwitcher: UserDefaults.standard.bool(forKey: PreferenceName.useInternalSwitcher.rawValue) as Any, // Part 2: Always Strings .globalHotkey: UserDefaults.standard.string(forKey: PreferenceName.globalHotkey.rawValue) as Any, diff --git a/phpmon/Domain/Preferences/PrefsVC.swift b/phpmon/Domain/Preferences/PrefsVC.swift index a4208e4..04c9fb9 100644 --- a/phpmon/Domain/Preferences/PrefsVC.swift +++ b/phpmon/Domain/Preferences/PrefsVC.swift @@ -90,14 +90,6 @@ class PrefsVC: NSViewController { preference: .autoComposerGlobalUpdateAfterSwitch, action: {} ), - /* DISABLED UNTIL VALET SWITCHING IS OK (see #34) - CheckboxPreferenceView.make( - sectionText: "", - descriptionText: "prefs.use_internal_switcher_desc".localized, - checkboxText: "prefs.use_internal_switcher".localized, - preference: .useInternalSwitcher, - action: {} - ), */ HotkeyPreferenceView.make( sectionText: "prefs.global_shortcut".localized, descriptionText: "prefs.shortcut_desc".localized, diff --git a/phpmon/Localizable.strings b/phpmon/Localizable.strings index 7246903..198d6ae 100644 --- a/phpmon/Localizable.strings +++ b/phpmon/Localizable.strings @@ -114,10 +114,6 @@ "prefs.display_full_php_version" = "Display full PHP version everywhere"; "prefs.display_full_php_version_desc" = "Display the full version instead of the major version displayed in the menu bar and the dropdown menu. (This may be undesirable on smaller displays, so this is disabled by default.)"; -"prefs.use_internal_switcher" = "Use PHP Monitor’s own version switcher"; -"prefs.use_internal_switcher_desc" = -"By default, PHP Monitor will attempt to use Laravel Valet in order to switch PHP versions. If you prefer a different switcher or are having issues with `valet use php`, you may use PHP Monitor's own switcher which is slightly faster, but might cause issues with permissions in your Homebrew directories, since PHP Monitor controls the services."; - "prefs.auto_composer_update_title" = "Automatically update global dependencies"; "prefs.auto_composer_update_desc" = "When checked, will automatically ask Composer to run `composer global update` whenever you switch between different PHP versions. You will be able to see what changes are being made, or should this fail.";