5 Commits

Author SHA1 Message Date
dbce6f9fa3 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.
2026-01-24 21:04:52 +02:00
35634af17e chore: linting updates, fixes (#85)
* chore: linting fixes

* chore(deps): update github workflows

* fix(ci): pr-lint permissions

* fix(ci): add missing UID

* fix(ci): pr-lint permissions

* fix(ci): cr tweak
2025-11-28 16:49:12 +02:00
Atef Ramadan
d1e435caaa fix: add Linuxbrew Cellar path detection and fix variable checking syntax (#82)
add detecting cellar when using linux homebrew
2025-11-22 09:23:21 +02:00
Copilot
6e6d1c785b chore(deps): update pre-commit hooks and implement repository improvements (#38)
* Initial plan

* Implement code refactoring, pre-commit enhancements, and documentation improvements

Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>

* chore(deps): update pre-commit hooks to latest versions

Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>

* docs: fix markdown linting issues in README and CONTRIBUTING

Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>

* feat(pre-commit): add editorconfig-checker for code style validation

- Add editorconfig-checker hook to validate .editorconfig rules
- Update .editorconfig to allow 200 char lines in markdown files (aligns with markdownlint config)
- Fix .secrets.baseline to have proper final newline
- All files now pass editorconfig validation

Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>

* chore: copilot cr fix in phpenv.fish

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ivuorinen <11024+ivuorinen@users.noreply.github.com>
Co-authored-by: Ismo Vuorinen <ismo@ivuorinen.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-11 19:51:09 +03:00
785a158451 Initial commit 2025-07-29 12:53:51 +03:00