refactor: safe PHP 7.4 modernization - #71
Open
somethingwithproof wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the gexport plugin’s PHP code for PHP 7.4 by enabling strict typing and updating legacy array syntax/DB call parameter arrays, while also introducing two new session artifact files under .omc/.
Changes:
- Added
declare(strict_types=1);to multiple PHP entrypoints/index files. - Replaced
array(...)with[...]in various places (including DB prepared statement parameter arrays). - Added
.omc/sessions/*.jsonfiles (appear to be tooling artifacts).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.php | Adds strict types and updates some arrays to short syntax. |
| gexport.php | Adds strict types and updates prepared-statement arg arrays and some other arrays. |
| functions.php | Adds strict types and modernizes arrays, but introduces two parse errors (is_[$var]). |
| locales/index.php | Adds strict types to directory index file. |
| locales/po/index.php | Adds strict types to directory index file. |
| locales/LC_MESSAGES/index.php | Adds strict types to directory index file. |
| .omc/sessions/50dc249e-8391-4ccd-8092-ddd3dd0e3a65.json | New session JSON artifact committed. |
| .omc/sessions/4bfc95aa-eb89-43b1-af1f-3a9d70edf9bd.json | New session JSON artifact committed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Revert corrupted function calls introduced by refactoring tool: - is_[$x] -> is_array($x) - in_[$x, ...] -> in_array($x, ...) - xml2[$x] -> xml2array($x) Also remove accidentally committed .omc session files and add .omc/ to .gitignore. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
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>
Sites with no hosts produced 'IN()' SQL syntax errors. Return empty graphs array when device list is empty for site_gt, site_dq, and site_dqi export types. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
refactor/modernization
branch
from
July 14, 2026 10:46
afcb72a to
a070850
Compare
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.