Skip to content

feat: add PIE (PHP Installer for Extensions) support#16860

Merged
Jeckerson merged 8 commits into5.0.xfrom
feature/pie-support
Apr 2, 2026
Merged

feat: add PIE (PHP Installer for Extensions) support#16860
Jeckerson merged 8 commits into5.0.xfrom
feature/pie-support

Conversation

@Jeckerson
Copy link
Copy Markdown
Member

Add PIE (PHP Installer for Extensions) support

Closes #16832

This PR adds PIE support to phalcon/cphalcon, making the extension installable via pie install phalcon/cphalcon on Linux/macOS (source build) and Windows (pre-built DLLs from GitHub Releases).

Changes

1. composer.json — PIE metadata

  • Set "type": "php-ext" so PIE recognizes this as an extension package
  • Added "php-ext" block with extension-name: "phalcon" and build-path: "build/phalcon" (required because the Composer package name phalcon/cphalcon doesn't match the extension name phalcon, and the build root is not the repo root)
  • Removed hardcoded "version": "5.10.0" — Git tags will drive versions on Packagist

2. package.xml — PHP version alignment

  • Changed <min>8.0.0</min><min>8.1.0</min> to align with composer.json and CI matrix
  • Removed <max>8.5.99</max> to keep upper bound open-ended — no metadata release needed for new PHP minors
  • package.xml is kept for PECL coexistence during transition

3. .github/workflows/release-windows.yml — Windows DLLs for PIE

  • New workflow triggered on release.published
  • Builds Windows DLLs for PHP 8.1–8.4, x64/x86, NTS/TS using php/setup-php-sdk
  • Uploads PIE-compatible ZIPs (containing php_phalcon.dll + LICENSE.txt) to the GitHub Release

4. .github/workflows/main.yml — CI guardrails

  • build_freshness job: regenerates build/phalcon from Zephir sources and asserts git diff --exit-code — catches generated-build drift that would break PIE source installs
  • pie_smoke_test job: runs pie build phalcon/cphalcon from the local checkout on PHP 8.1 and 8.4 to validate PIE compatibility end-to-end

5. README.md — install docs

  • Added PIE as the recommended install method
  • Added PECL as an alternative
  • Kept link to full installation docs

Post-merge ops (not in this PR)

  • Enable Packagist auto-update webhook so new tags refresh metadata automatically
  • After validation, submit upstream PR to php/pie to move Phalcon to "Supported" in their migration tracker

- composer.json: add type php-ext, php-ext metadata block with
  extension-name and build-path, remove hardcoded version
- package.xml: align PHP minimum to 8.1.0, remove upper bound cap
- Add .github/workflows/release-windows.yml for building and publishing
  Windows DLLs to GitHub Releases on release.published
- main.yml: add build_freshness job to detect generated-build drift,
  add pie_smoke_test job to validate PIE source builds
- README.md: add PIE and PECL install instructions
Closes #16832
…alcon

Instead of running 'pie build phalcon/cphalcon' which fetches from
Packagist (where the old metadata without type:php-ext still lives),
validate the PIE metadata from local composer.json and build the
extension from build/phalcon/ — the exact path PIE will use via
the build-path directive.
@Jeckerson Jeckerson requested a review from niden April 1, 2026 16:57
@Jeckerson Jeckerson linked an issue Apr 2, 2026 that may be closed by this pull request
@Jeckerson Jeckerson merged commit b47c7fc into 5.0.x Apr 2, 2026
6 checks passed
@Jeckerson Jeckerson deleted the feature/pie-support branch April 2, 2026 13:41
@niden niden mentioned this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NFR]: Add pie support as it replaces deprecated pecl

2 participants