Skip to content

refactor: safe PHP 7.4 modernization - #53

Draft
somethingwithproof wants to merge 7 commits into
Cacti:developfrom
somethingwithproof:refactor/modernization
Draft

refactor: safe PHP 7.4 modernization#53
somethingwithproof wants to merge 7 commits into
Cacti:developfrom
somethingwithproof:refactor/modernization

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

This PR adds strict typing, short array syntax, and null coalescing operators across the plugin. Standalone infrastructure files were removed per architectural mandate.

Copilot AI review requested due to automatic review settings April 9, 2026 21:15

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.

Pull request overview

This PR modernizes the Cacti “maint” plugin PHP files by enabling strict typing across key entry points, aiming to improve type safety and consistency within the plugin.

Changes:

  • Added declare(strict_types=1); to multiple plugin PHP entry points.
  • (Unintended) Introduced PHP syntax errors in setup.php affecting device maintenance actions.
  • Added .omc/sessions/*.json session metadata files to the repo.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
setup.php Adds strict typing but currently contains syntax-breaking changes in device action hooks/handlers.
maint.php Adds strict typing declaration.
functions.php Adds strict typing declaration.
index.php Adds strict typing declaration to the redirect stub.
locales/index.php Adds strict typing declaration to the redirect stub.
locales/LC_MESSAGES/index.php Adds strict typing declaration to the redirect stub.
locales/po/index.php Adds strict typing declaration to the redirect stub.
.omc/sessions/fc9af2ff-7ef1-4e14-af43-2eb9d4741f10.json New session artifact file committed (likely accidental).
.omc/sessions/76281449-e05c-4ccd-a666-0e5c56e6d38b.json New session artifact file committed (likely accidental).

Comment thread setup.php Outdated
Comment thread setup.php Outdated
Comment thread setup.php Outdated
Comment thread setup.php Outdated
Comment thread setup.php Outdated
Comment thread .omc/sessions/fc9af2ff-7ef1-4e14-af43-2eb9d4741f10.json Outdated
Comment thread .omc/sessions/76281449-e05c-4ccd-a666-0e5c56e6d38b.json Outdated
Revert bulk array()->[] rewrite damage affecting:
- is_array, in_array, xml2array
- call_user_func_array, filter_var_array
- Function declarations with _array suffix

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@somethingwithproof
somethingwithproof marked this pull request as draft April 11, 2026 00:10
@somethingwithproof

Copy link
Copy Markdown
Member Author

Converted to draft to serialize the stack in this repo. Blocked by #49; will un-draft after that merges to avoid cross-PR merge conflicts.

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.

2 participants