From 363942fad45d3d45737f3ba05553e0b149cf308d Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 9 Oct 2026 03:52:43 -0400 Subject: [PATCH 1/2] Align documented PHP minimum with the PHP 8.4 requirement composer.json.dist requires PHP ^8.4, but the README still said 7.2, the installer accepted 7.1, and the bug-report template listed 7.2-8.3. - README: require PHP 8.4 - Installer: flag PHP versions below 8.4 on the requirements page - Bug-report template: offer only the supported 8.4 and 8.5 --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- README.md | 2 +- htdocs/install/include/functions.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 299f7849..5b61d18c 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -14,7 +14,7 @@ body: attributes: label: PHP Version description: Provide the PHP version that you are using. - options: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5 (pre-release)'] + options: ['8.4', '8.5'] multiple: true validations: required: true diff --git a/README.md b/README.md index d2b32103..5c49ba73 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It's under development currently. If you want to build a web site using XOOPS, v Here is an outline of what you need to participate in XOOPS development: -You will need a development environment with at least PHP 7.2 and MySQL 5.6 or equivalent MariaDB. +You will need a development environment with at least PHP 8.4 and MySQL 5.6 or equivalent MariaDB. You will need to interact with [GitHub.com](https://guides.github.com/) diff --git a/htdocs/install/include/functions.php b/htdocs/install/include/functions.php index c9d385a8..6bf36350 100644 --- a/htdocs/install/include/functions.php +++ b/htdocs/install/include/functions.php @@ -230,7 +230,7 @@ function xoDiagIfWritable($path) */ function xoPhpVersion() { - if (version_compare(phpversion(), '7.1.0', '>=')) { + if (version_compare(phpversion(), '8.4.0', '>=')) { return xoDiag(1, phpversion()); } else { return xoDiag(-1, phpversion()); From d514ee76d2f7e0d1a308e3e6588cd54cabb9ee93 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 9 Oct 2026 04:24:44 -0400 Subject: [PATCH 2/2] Update review bot instructions to PHP 8.4 .coderabbit.yaml and copilot-instructions.md still described a PHP 7.2-8.5 target, so reviewers flagged PHP 8 syntax as errors. --- .coderabbit.yaml | 12 +++++------- .github/copilot-instructions.md | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index acd95a64..19befb6b 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -2,9 +2,9 @@ language: "en-US" early_access: false tone_instructions: >- - Expert PHP reviewer. Focus on type safety, PSR-12, PHP 7.2 - compatibility, and security. XOOPS Core supports PHP 7.2-8.5; - avoid PHP 8.0+ language features. + Expert PHP reviewer. Focus on type safety, PSR-12, and security. + XOOPS Core 2.6 requires PHP 8.4 or later (composer.json.dist), so + PHP 8.x language features are allowed. reviews: profile: "assertive" @@ -19,14 +19,12 @@ reviews: path_instructions: - path: "xoops_lib/**/*.php" instructions: >- - Review for PHP 7.2 compatibility (no union types, named arguments, - match expressions, enums, readonly, constructor promotion, fibers, - intersection types, never return type, or first-class callable syntax). + Code targets PHP 8.4+; do not flag PHP 7.x or 8.0-8.3 compatibility. Check for proper use of declare(strict_types=1), self:: for class constants, and PSR-12 code style. - path: "htdocs/kernel/**/*.php" instructions: >- - Review legacy kernel code for PHP 7.2 compatibility and security. + Review legacy kernel code for security. Check for SQL injection, XSS, and proper input sanitization. - path: "tests/**/*.php" instructions: >- diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a4e97dff..aea82ab8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -37,7 +37,7 @@ Composer vendors install to `xoops_lib/vendor/` (non-standard path). PHPUnit con ## PHP Compatibility -Code must run on PHP 7.2 through 8.5. Do not use language features introduced after PHP 7.2, including but not limited to PHP 7.3+ (trailing commas in function calls, flexible heredoc/nowdoc), PHP 7.4+ (typed properties, arrow functions, null coalescing assignment `??=`, numeric literal separators, spread operator in arrays), and 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, constructor promotion). CI tests all versions in the matrix. +Code must run on PHP 8.4 and later, the minimum in `composer.json.dist`. PHP 8.x language features are allowed; do not flag PHP 7.x or 8.0-8.3 compatibility. CI tests PHP 8.4. ## Coding Conventions @@ -79,7 +79,7 @@ XOOPS 2.6 uses `\Xoops::getInstance()` for core access. Libraries check `class_e 1. Code follows PSR-12 and passes code style checks. 2. Static analysis passes with no new errors beyond the baseline. -3. Tests pass on all supported PHP versions (7.2-8.5). +3. Tests pass on PHP 8.4. 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 the changelog.