Skip to content

ci: Drop PHP 8.2, add PHP 8.5, and fix coding standards - #151

Merged
TheWitness merged 3 commits into
developfrom
ci/restore-php82-and-fix-cs
Oct 7, 2026
Merged

TheWitness merged 3 commits into
developfrom
ci/restore-php82-and-fix-cs

Conversation

@TheWitness

@TheWitness TheWitness commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

What

  • Drop PHP 8.2 from the CI matrix and add PHP 8.5: matrix is now ['8.3', '8.4', '8.5'].
  • Keep the coding-standards fix from the original change (ran php-cs-fixer over tests/bin/check-i18n-pot.php, which was added by ci: gate cacti.pot updates on i18n diff instead of regenerating #150 and failed the phpcsfixer job).
  • Add a plugin-local composer.json declaring the supported floor "php": ">=8.3" (declarative; CI runs Composer against the Cacti core tree).
  • Restore the documented PHP 8.3 floor in tests/Security/PhpCompatibilityTest.php.

Why

Cacti develop requires "php": "^8.3" and its generated platform_check.php enforces PHP_VERSION_ID >= 80300. PHP 8.2 therefore can never install Cacti's Composer dependencies (the 8.2 job failed at Install Cacti via CLI with "Your Composer dependencies require a PHP version >= 8.3.0"). 8.5 satisfies the floor and no locked dependency caps below it, so it is a valid target to add.

PR #150 merged with a failing 'Checking coding standards' job and had
dropped PHP 8.2 from the CI matrix.

- Re-add php 8.2 to the integration-test matrix and lower the documented
  floor back to 8.2, adding the canonical PHP 8.3-only-syntax guards
  (#[Override], json_validate(), typed class constants, dynamic class
  constant fetch) to tests/Security/PhpCompatibilityTest.php so the 8.2
  floor is actually enforced. The plugin source is already 8.2-clean.
- Run php-cs-fixer over tests/bin/check-i18n-pot.php (added by #150) so
  'composer run-script phpcsfixer' passes.
Copilot AI balanced review requested due to automatic review settings October 5, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The PHP 8.2 integration environment is incompatible with Cacti develop, and several compatibility guards miss valid PHP 8.3 syntax.

Review effort: Balanced
Findings: 1 High severity · 3 Medium severity

Open (4)
What changed in this PR

Restores PHP 8.2 CI coverage and resolves coding-standard violations introduced by PR #150.

Changes:

  • Adds PHP 8.2 to the integration matrix.
  • Adds PHP 8.3 compatibility guards.
  • Reformats the i18n template checker.
File Description
.github/​workflows/​plugin-ci-workflow.yml Adds PHP 8.2 integration coverage.
tests/​Security/​PhpCompatibilityTest.php Adds PHP 8.3 syntax checks.
tests/​bin/​check-i18n-pot.php Applies coding-standard formatting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/plugin-ci-workflow.yml Outdated
Comment thread tests/Security/PhpCompatibilityTest.php Outdated
Comment thread tests/Security/PhpCompatibilityTest.php Outdated
Comment thread tests/Security/PhpCompatibilityTest.php Outdated
Add a plugin-local composer.json documenting the supported PHP floor
(>=8.2) to match the CI matrix. This is declarative metadata; CI runs
Composer against the Cacti core tree, so this file is inert for the
test harness.
Cacti develop requires PHP ^8.3, so 8.2 can never install its Composer dependencies (platform_check enforces >= 8.3.0). Remove 8.2 and add 8.5 instead; 8.5 satisfies the >= 8.3.0 floor and no locked dependency caps below it. Restore the documented 8.3 floor and bump composer.json to >=8.3.
@TheWitness TheWitness changed the title ci: Restore PHP 8.2 to the matrix and fix coding standards ci: Drop PHP 8.2, add PHP 8.5, and fix coding standards Oct 5, 2026
@TheWitness
TheWitness merged commit 7af4e15 into develop Oct 7, 2026
3 checks passed
@TheWitness
TheWitness deleted the ci/restore-php82-and-fix-cs branch October 7, 2026 22:22
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.

3 participants