refactor: safe PHP 7.4 modernization - #53
Draft
somethingwithproof wants to merge 7 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
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.phpaffecting device maintenance actions. - Added
.omc/sessions/*.jsonsession 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). |
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
marked this pull request as draft
April 11, 2026 00:10
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds strict typing, short array syntax, and null coalescing operators across the plugin. Standalone infrastructure files were removed per architectural mandate.