Rewrite to be based on php-build
TLDR; to solve https://github.com/asdf-community/asdf-php/issues/198, https://github.com/asdf-community/asdf-php/issues/72 and https://github.com/asdf-community/asdf-php/issues/194
This pull request introduces significant improvements to the PHP plugin's development workflow, documentation, and compatibility with modern dependencies. The most notable changes include a complete overhaul of the GitHub Actions CI workflow for better cross-platform and legacy PHP support, new documentation for manual local testing, compatibility patches for ICU 74 and libxml2 2.12, and a script for installing OpenSSL 1.1. Additionally, a new submodule for php-build is added to the repository.
CI/CD and Development Workflow Improvements
- Major rewrite of
.github/workflows/workflow.ymlto use a single, matrix-based job supporting both Ubuntu and macOS, legacy and modern PHP versions, with improved dependency management and diagnostics. Adds linting and formatting jobs with more robust dependency installation and caching. - Adds
vendor/php-buildas a submodule, ensuring consistent build tooling. (.gitmodules)
Documentation Enhancements
- Expands
README.mdwith clearer installation, update, and usage instructions for the asdf PHP plugin. - Adds
docs/local-testing-manually.mdwith detailed, step-by-step guides for installing, uninstalling, and troubleshooting various PHP versions locally, including custom build flags and log monitoring.
Compatibility and Build Fixes
- Adds patch for PHP 7.4 to fix compatibility with ICU 74 (
patches/php-7.4-icu-74-compat.patch). - Adds patch for PHP 8.0 to fix compatibility with ICU 74 (
patches/php-8.0-icu-74-compat.patch). - Adds patch for PHP 8.0 to fix compatibility with libxml2 2.12 (
patches/php-8.0-libxml2-2.12-compat.patch).
Utility Scripts
- Introduces
lib/install-openssl11.sh, a robust script for building and installing OpenSSL 1.1 locally, with dependency checks, colored output, and instructions for environment configuration.
[!NOTE]
Modernizes the plugin around php-build, expanding CI/test coverage and improving legacy compatibility.
- Add
vendor/php-build submodule and bin/post-plugin-add to auto-initialize it; new bin/latest-stable for resolving latest
- Rewrite
bin/install to drive php-build, auto-detect/auto-install OpenSSL 1.1 (lib/install-openssl11.sh), set compilers/flags for legacy PHP, install Composer, optional Xdebug, and patch definitions for ICU 74 and libxml2 2.12
- Add runtime env tweaks in
bin/exec-env to set LD_LIBRARY_PATH for OpenSSL 1.1 when required
- Overhaul CI workflow to a single matrix job across Ubuntu/macOS and legacy/modern versions; add
lint and format jobs
- Add compatibility patches:
patches/php-7.4-icu-74-compat.patch, patches/php-8.0-icu-74-compat.patch, patches/php-8.0-libxml2-2.12-compat.patch
- Update
README.md and add docs/local-testing-manually.md; add .gitmodules and expand .gitignore
Written by Cursor Bugbot for commit 349250600b3f2994079ae8532561cb082b36544f. This will update automatically on new commits. Configure here.