Skip to content

Refuse to run below PHP 8.2 without breaking Cacti #26

Closed

Description

@somethingwithproof

Summary

Cacti includes plugin files on every request, so a parse error in this plugin would break the whole Cacti UI. A 1.2.31 site can still run PHP 8.0 or 8.1. Entry points must parse there and refuse to run.

Requirements

  • REQ-COMPAT-001 setup.php, INFO, and every file Cacti includes before the version check MUST use only PHP 8.0 syntax.
  • REQ-COMPAT-002 plugin_cloud_check_config() and plugin_cloud_install() MUST refuse when PHP_VERSION is below 8.2.0, with a message naming the required version.
  • REQ-COMPAT-003 Hook shims MUST return before registering the autoloader when PHP_VERSION is below 8.2.0.
  • REQ-COMPAT-004 Code loaded after the check MUST NOT use features from PHP 8.3 or later.
  • REQ-COMPAT-005 Every class property MUST be declared; the code MUST NOT rely on dynamic properties.
  • REQ-COMPAT-006 The plugin MUST NOT require a PHP extension that Cacti 1.2.31's composer.json does not require, unless the transport decision records one; check_config MUST refuse with a message when a required extension is missing.

Acceptance criteria

  • CI lints setup.php and shim files under PHP 8.0.
  • CI runs PHPStan with phpVersion 8.2.
  • On PHP 8.1 with Cacti 1.2.31, enabling the plugin shows the refusal and every core page still loads.
  • On PHP 8.2, install succeeds.

References

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions