refactor: safe PHP 7.4 modernization#212
Open
somethingwithproof wants to merge 7 commits intoCacti:developfrom
Open
refactor: safe PHP 7.4 modernization#212somethingwithproof wants to merge 7 commits intoCacti:developfrom
somethingwithproof wants to merge 7 commits intoCacti:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to “modernize” the Monitor plugin by adding declare(strict_types=1); across many PHP entrypoints (including theme/sounds/locales directories) as part of a broader refactor.
Changes:
- Added
declare(strict_types=1);headers to many plugin PHP files (including redirect-onlyindex.phpfiles). - Introduced (unintentionally) multiple PHP parse/fatal errors (duplicate
strict_typesdeclarations, corrupted function name, corruptedin_arraycalls). - Added
.omc/sessions/*.jsonartifacts to the repository.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
themes/sunrise/index.php |
Adds strict_types directive to theme directory index. |
themes/paw/index.php |
Adds strict_types directive to theme directory index. |
themes/paper-plane/index.php |
Adds strict_types directive to theme directory index. |
themes/modern/index.php |
Adds strict_types directive to theme directory index. |
themes/midwinter/index.php |
Adds strict_types directive to theme directory index. |
themes/index.php |
Adds strict_types directive to themes index. |
themes/dark/index.php |
Adds strict_types directive to theme directory index. |
themes/classic/index.php |
Adds strict_types directive to theme directory index. |
sounds/index.php |
Adds strict_types directive to sounds index. |
setup.php |
Adds strict_types and contains a corrupted function declaration (parse error). |
poller_monitor.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
poller_functions.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
monitor.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
monitor_render.php |
Adds strict_types, duplicates strict_types, and corrupts in_array calls (parse errors). |
monitor_controller.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
locales/LC_MESSAGES/index.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
locales/index.php |
Adds strict_types directive to locales index. |
index.php |
Adds strict_types directive to plugin root index. |
images/index.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
db_functions.php |
Adds strict_types but now has duplicate strict_types declarations (fatal error). |
.omc/sessions/a22869a1-89d7-4361-99da-c0e9ddd0c107.json |
Adds generated session artifact file (should not be committed). |
.omc/sessions/a1a9193b-aae0-43d7-bd1f-726d20d95ee8.json |
Adds generated session artifact file (should not be committed). |
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>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
TheWitness
previously approved these changes
Apr 24, 2026
xmacan
approved these changes
Apr 24, 2026
TheWitness
approved these changes
Apr 24, 2026
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.