mirror of
https://github.com/ivuorinen/phpenv.fish.git
synced 2026-01-25 18:54:04 +00:00
feat: add Ubuntu support via provider-based architecture (#112)
* feat: add Ubuntu support via provider-based architecture Implement multi-system support using a provider pattern that enables phpenv to work with both Homebrew (macOS/Linux) and APT (Ubuntu/Debian with Ondřej Surý PPA). - Add provider infrastructure with auto-detection and PHPENV_PROVIDER override - Refactor existing Homebrew code into __phpenv_provider_homebrew_* functions - Implement APT provider with PPA setup, shim-based version switching - Update doctor, versions, and help commands to be provider-aware - Use XDG-compliant shim directory (~/.local/share/phpenv/shims) * fix: address PR #112 code review feedback - Fix semver parsing for complex constraints like ">=8.1 <9.0" - Add input validation for APT commands to prevent injection - Use atomic symlink creation to prevent race conditions - Fix extension uninstall to mirror install package mappings - Replace unsafe glob with explicit binary list in cleanup - Remove redundant PATH filtering logic - Validate PHPENV_PROVIDER against supported providers - Use exact matching for Homebrew tap names - Use Fish's string escape for regex escaping * fix: validate dpkg output before passing to sudo apt-get Validates package names follow Debian naming rules before using them in the sudo apt-get remove command. This prevents potential command injection if dpkg output contains unexpected characters. Addresses remaining Copilot feedback from PR #112.
This commit is contained in:
@@ -3,6 +3,13 @@
|
||||
|
||||
# Set default configuration using session variables for most settings
|
||||
# Only PHPENV_GLOBAL_VERSION needs to persist across shells
|
||||
|
||||
# Provider override (empty = auto-detect)
|
||||
# Valid values: homebrew, apt
|
||||
if not set -q PHPENV_PROVIDER
|
||||
set -g PHPENV_PROVIDER ""
|
||||
end
|
||||
|
||||
if not set -q PHPENV_AUTO_INSTALL
|
||||
set -g PHPENV_AUTO_INSTALL false
|
||||
end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user