Skip to content

feat: added PIE support (PHP 8.1+) and restructure extension management (PECL/PIE)#45

Merged
rozsazoltan merged 8 commits intomasterfrom
feat/pie
Apr 17, 2026
Merged

feat: added PIE support (PHP 8.1+) and restructure extension management (PECL/PIE)#45
rozsazoltan merged 8 commits intomasterfrom
feat/pie

Conversation

@rozsazoltan
Copy link
Copy Markdown
Contributor

@rozsazoltan rozsazoltan commented Apr 17, 2026

Resolves #39

Summary

This PR introduces full support for PIE (PHP Installer for Extensions) alongside existing PECL support, and refactors extension handling to align with modern PHP version requirements.

Key Changes

PIE Integration (PHP ≥ 8.1)

  • Automatically installs PIE for supported PHP versions
    • Linux
    • macOS
    • Windows
  • Adds support for installing extensions via PIE during PHP installation
  • Supports persistent configuration via PHP_PIE_EXTENSIONS / mise.toml
  • Ensures each PHP version has its own isolated PIE executable
  • Mirrors Composer-style behavior (versioned per PHP runtime)

Extension Strategy Update

  • PHP ≤ 8.4 → uses PECL
  • PHP ≥ 8.5 → uses PIE (PECL no longer supported)
  • PHP 8.1–8.4 → supports both, but PIE is available

OS-specific Implementation

  • Refactored PIE installation into:
    • install_pie_for_linux
    • install_pie_for_windows
  • Same separation applied for PIE extensions
  • Matches existing Composer structure for consistency

Stability Improvements

  • Fixed crash when PIE_EXTENSIONS was nil
  • Added safe parsing for:
    • PHP_PECL_EXTENSIONS
    • PHP_PIE_EXTENSIONS
  • Default to empty tables instead of nil

README Improvements

  • Added PIE for PHP section
  • Clarified PECL deprecation for PHP 8.5+
  • Documented:
    • persistent extension configuration
    • usage examples (redis, xdebug)
    • pie install, pie show
    • Composer-like behavior of PIE
  • Improved command consistency and structure

Why

  • PECL is deprecated for newer PHP versions
  • PIE is the official future for PHP extension management
  • Users expect automatic, reproducible extension setup per PHP version
  • Aligns plugin behavior with Composer-like workflows

Notes

  • Existing PECL functionality remains unchanged for older PHP versions
  • No breaking changes for current users
  • PIE is only used where supported

Example

# Persist extensions globally
mise config set env._.php.pie_extensions "redis/phpredis xdebug/xdebug"

# Install PHP
mise install php@8.5

# Extensions installed automatically via PIE, check:
pie show

@rozsazoltan rozsazoltan added the needs-ci Triggers the CI test workflow label Apr 17, 2026
@rozsazoltan rozsazoltan merged commit 7a6858b into master Apr 17, 2026
@rozsazoltan rozsazoltan deleted the feat/pie branch April 17, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci Triggers the CI test workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use PHP/PIE instead of PECL starting with PHP 8.5

1 participant