Skip to content

overhawl#71

Merged
zeriyoshi merged 2 commits intomainfrom
overhawl
Apr 21, 2026
Merged

overhawl#71
zeriyoshi merged 2 commits intomainfrom
overhawl

Conversation

@zeriyoshi
Copy link
Copy Markdown
Collaborator

@zeriyoshi zeriyoshi commented Apr 21, 2026

fix: #70
fix: #18

Copilot AI review requested due to automatic review settings April 21, 2026 01:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a broad “overhaul” release update that (a) tightens supported PHP versions (dropping PHP 8.0), (b) switches Ubuntu 22.04 packaging from checkinstall to standard Debian packaging, (c) updates CI/release automation, and (d) refactors some extension internals and test/config scaffolding to align with newer PHP/PHPUnit behavior.

Changes:

  • Enforce “PHP 7.4 or PHP ≥ 8.1” support boundaries across library/runtime checks and test scripts.
  • Replace checkinstall-based Ubuntu 22.04 builds with Debian packaging (debian/ rules + dpkg-buildpackage) and document it.
  • Add/adjust release automation (tag-triggered GitHub Actions, PIE binaries, Windows builds, deb artifacts) and introduce an in-tree static debug test flow in pskel.sh.

Reviewed changes

Copilot reviewed 39 out of 47 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Extension/PHP70Test.php Updates test comment to clarify explicit null-to-zero casting behavior.
pskel.sh Adds in-tree extension sync, build cache keying, and a debug-static test mode.
phpunit.xml Updates PHPUnit schema/config and enables cache directory.
library_test.sh Fails fast on PHP 8.0; builds extension only for PHP ≥ 8.1.
library.php Hard-errors on PHP 8.0; requires extension only for PHP ≥ 8.1.
ext/php_colopl_bc_php74.h License header update to BSD-3-Clause.
ext/php_colopl_bc_php70.h License header update; removes old macro block from header.
ext/php_colopl_bc.h Introduces MT state sizing constants; updates MT state array sizing.
ext/description-pak Removes checkinstall-generated packaging artifact file.
ext/colopl_bc_php74.c Replaces a macro with an inline helper function for object casting.
ext/colopl_bc_php70.c Refactors rand/mt_rand helpers and date_create wrappers toward newer APIs.
ext/colopl_bc.c License header update to BSD-3-Clause.
composer.json Changes package license metadata to BSD-3-Clause; updates dev requirements.
build/ubuntu2204_sury84/debian/source/format Adds Debian source format for sury84 build target.
build/ubuntu2204_sury84/debian/rules Adds debhelper rules to build/test/install php8.4 package.
build/ubuntu2204_sury84/debian/php8.4-colopl-bc.prerm Adds module disable hook on package removal.
build/ubuntu2204_sury84/debian/php8.4-colopl-bc.postinst Adds module enable hook on install/upgrade.
build/ubuntu2204_sury84/debian/copyright Adds Debian copyright file (BSD-3-Clause text).
build/ubuntu2204_sury84/debian/control Adds Debian control metadata for php8.4 binary package.
build/ubuntu2204_sury84/debian/changelog.in Adds changelog template for version substitution.
build/ubuntu2204_sury84/build.sh Builds debs via dpkg-buildpackage and collects artifacts.
build/ubuntu2204_sury84/Dockerfile Installs Debian packaging toolchain; stages sources for dpkg build.
build/ubuntu2204/debian/source/format Adds Debian source format for Ubuntu 22.04 PHP 8.1 target.
build/ubuntu2204/debian/rules Adds debhelper rules for php8.1 + meta package build.
build/ubuntu2204/debian/php8.1-colopl-bc.prerm Adds module disable hook on package removal.
build/ubuntu2204/debian/php8.1-colopl-bc.postinst Adds module enable hook on install/upgrade.
build/ubuntu2204/debian/copyright Adds Debian copyright file (BSD-3-Clause text).
build/ubuntu2204/debian/control Adds control for meta package + php8.1 binary package.
build/ubuntu2204/debian/changelog.in Adds changelog template for version substitution.
build/ubuntu2204/build.sh Builds debs via dpkg-buildpackage and collects artifacts.
build/ubuntu2204/Dockerfile Installs Debian packaging toolchain; stages sources for dpkg build.
build/library/test.sh Aligns test behavior with “no PHP 8.0” and gates static analysis to ≥ 8.1.
README.md Updates supported versions, documents new Debian packaging build flow, adds license section.
LICENSE Replaces PHP-3.01 license text with BSD-3-Clause license text.
CHANGELOG.md Adds 12.0.0 release notes describing license/support/packaging changes.
.idea/* Removes IDE project files from the repository.
.gitignore Adds .idea and .phpunit.cache to ignore list.
.github/workflows/release.yaml New unified release workflow building PIE, Windows, and deb artifacts from tags.
.github/workflows/pie_release.yaml Removes old dedicated PIE release workflow (superseded).
.github/workflows/ci_native_linux.yaml Switches debug test mode to new debug-static flow.
.dockerignore Ensures README/LICENSE are included in Docker build context for packaging images.
Files not reviewed (7)
  • .idea/.gitignore: Language not supported
  • .idea/inspectionProfiles/Project_Default.xml: Language not supported
  • .idea/modules.xml: Language not supported
  • .idea/php-colopl_bc.iml: Language not supported
  • .idea/php.xml: Language not supported
  • .idea/phpunit.xml: Language not supported
  • .idea/vcs.xml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pskel.sh
Comment on lines +145 to +147
if test -n "${TEST_PHP_ARGS}"; then
eval "set -- ${TEST_PHP_ARGS}"
else
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run_in_tree_static_tests uses eval "set -- ${TEST_PHP_ARGS}", which allows command substitution / arbitrary shell execution if TEST_PHP_ARGS is attacker-controlled (or even accidentally contains $() etc). Prefer parsing args without eval (e.g., plain set -- ${TEST_PHP_ARGS} with intended word-splitting, or a safer delimiter-based approach), or explicitly document that this variable must be trusted.

Copilot uses AI. Check for mistakes.
Comment thread ext/php_colopl_bc.h Outdated
Comment on lines +39 to +44
#define PHP_COLOPL_BC_VERSION "12.0.1"

enum {
COLOPL_BC_MT_N = 624,
COLOPL_BC_MT_STATE_SIZE = COLOPL_BC_MT_N + 1
};
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension version constant is set to 12.0.1, but the changelog and README in this PR introduce 12.0.0. This mismatch will make releases / package metadata confusing; please align PHP_COLOPL_BC_VERSION with the intended release version (or update the docs/changelog to match).

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +47 to +61
```bash
$ docker build -f "build/ubuntu2204/Dockerfile" -t "colopl-bc-u2204-php81" .
$ mkdir -p "artifacts"
$ docker run --rm -e VERSION="12.0.0" -v "$(pwd)/artifacts:/tmp/artifacts" "colopl-bc-u2204-php81"
```

This target produces `php-colopl-bc` and `php8.1-colopl-bc` binary packages together with the corresponding `.changes` and `.buildinfo` files.

Build packages for Ubuntu 22.04 with the Ondrej Sury PHP 8.4 repository:

```bash
$ docker build -f "build/ubuntu2204_sury84/Dockerfile" -t "colopl-bc-u2204-php84" .
$ mkdir -p "artifacts"
$ docker run --rm -e VERSION="12.0.0" -v "$(pwd)/artifacts:/tmp/artifacts" "colopl-bc-u2204-php84"
```
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build command examples hardcode VERSION="12.0.0", but this PR sets/mentions other versions elsewhere (e.g., extension reports 12.0.1). To avoid stale docs, consider using the current release tag version consistently (or make the example use a placeholder like $VERSION).

Copilot uses AI. Check for mistakes.
@zeriyoshi zeriyoshi merged commit 5546f30 into main Apr 21, 2026
139 checks passed
@zeriyoshi zeriyoshi deleted the overhawl branch April 21, 2026 02:44
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.

Improve package distro specific package build

2 participants