From c2b4ad4c14f3990f840497bcb74d0d6454edbdbe Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 24 Feb 2026 20:49:35 -0500 Subject: [PATCH 1/2] Update copilot-instructions.md to reflect PHP 8.2+ minimum The project requires PHP ^8.2 (composer.json) and CI tests 8.2-8.5. The instructions incorrectly referenced PHP 7.4, which caused CodeRabbit to flag first-class callable syntax as incompatible. Aligns copilot-instructions.md with xoops-copilot-template.md and the actual project configuration. Co-Authored-By: Claude Opus 4.6 --- .github/copilot-instructions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 9a61200..acf9073 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -31,7 +31,7 @@ PHPUnit uses a single `phpunit.xml.dist` with `` element (compatible wit ## PHP Compatibility -Code must run on PHP 7.4 through 8.5. Do not use features exclusive to PHP 8.0+ (named arguments, match expressions, union type hints in signatures, enums, fibers, readonly properties, intersection types, `never` return type, first-class callable syntax). CI tests all versions in the matrix. +Code must run on PHP 8.2 through 8.5. PHP 8.0+ and 8.1+ features (named arguments, match expressions, union type hints, enums, fibers, readonly properties, intersection types, `never` return type, first-class callable syntax, constructor promotion, attributes `#[...]`, nullsafe operator `?->`, explicit `mixed` type) are allowed. CI tests all versions in the matrix. ## Coding Conventions @@ -83,17 +83,17 @@ Stubs in `stubs/` define XOOPS framework classes (`Xoops`, `XoopsModule`, `Xoops GitHub Actions runs a single consolidated job on every push and PR: -- **PHP matrix:** 7.4–8.5, plus lowest-deps on 7.4 +- **PHP matrix:** 8.2–8.5, plus lowest-deps on 8.2 - **Each run:** lint (non-blocking, pre-existing issues) + analyse + test - **Coverage:** PHP 8.3 with Xdebug, uploaded to Codecov -Scrutinizer runs its own `php_analyzer` tool plus `composer ci` on PHP 7.4–8.5. It excludes `_archive/`, `tests/`, `vendor/`, `docs/`, and `stubs/`. +Scrutinizer runs its own `php_analyzer` tool plus `composer ci` on PHP 8.2–8.5. It excludes `_archive/`, `tests/`, `vendor/`, `docs/`, and `stubs/`. ## Pull Request Checklist 1. Code follows PSR-12 and passes `composer lint` (or `composer fix`). 2. `composer analyse` passes with no new errors beyond the baseline. -3. `composer test` passes on all PHP versions (7.4-8.5). +3. `composer test` passes on all PHP versions (8.2-8.5). 4. New public methods have PHPDoc with `@param`, `@return`, and `@throws` tags. 5. New functionality has corresponding unit tests in `tests/unit/`. 6. Changes are documented in `CHANGELOG.md` under `[Unreleased]`. From 481d9ba4cf19d913f12f6add4f9673881a558b05 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 24 Feb 2026 23:10:35 -0500 Subject: [PATCH 2/2] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index acf9073..babce50 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -87,7 +87,7 @@ GitHub Actions runs a single consolidated job on every push and PR: - **Each run:** lint (non-blocking, pre-existing issues) + analyse + test - **Coverage:** PHP 8.3 with Xdebug, uploaded to Codecov -Scrutinizer runs its own `php_analyzer` tool plus `composer ci` on PHP 8.2–8.5. It excludes `_archive/`, `tests/`, `vendor/`, `docs/`, and `stubs/`. +Scrutinizer runs its own `php_analyzer` tool plus `composer ci` on PHP 8.2. It excludes `_archive/`, `tests/`, `vendor/`, `docs/`, and `stubs/`. ## Pull Request Checklist