refactor: safe PHP 7.4 modernization - #252
Draft
somethingwithproof wants to merge 6 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the FlowView plugin PHP code for PHP 7.4 by enabling strict typing and updating legacy array syntax across the plugin and bundled Net_DNS2 library.
Changes:
- Added
declare(strict_types=1);to many PHP entrypoints and library files. - Replaced
array(...)with[...]across plugin code (and some helper defaults). - Updated various prepared-statement parameter arrays to short syntax.
Reviewed changes
Copilot reviewed 111 out of 111 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| themes/index.php | Adds strict types declaration. |
| setup.php | Adds strict types; converts several arrays to short syntax. |
| service/index.php | Adds strict types declaration. |
| run_schedule.php | Converts CLI option arrays and prepared-statement params to short syntax. |
| repair_tables.php | Adds strict types declaration. |
| Net/DNS2/Updater.php | Adds strict types; modifies duplicate-RR checks (currently introduces syntax errors). |
| Net/DNS2/Socket.php | Adds strict types declaration. |
| Net/DNS2/RR/ZONEMD.php | Adds strict types declaration. |
| Net/DNS2/RR/X25.php | Adds strict types declaration. |
| Net/DNS2/RR/WKS.php | Adds strict types declaration. |
| Net/DNS2/RR/URI.php | Adds strict types declaration. |
| Net/DNS2/RR/TYPE65534.php | Adds strict types declaration. |
| Net/DNS2/RR/TXT.php | Adds strict types declaration. |
| Net/DNS2/RR/TSIG.php | Adds strict types declaration. |
| Net/DNS2/RR/TLSA.php | Adds strict types declaration. |
| Net/DNS2/RR/TKEY.php | Adds strict types declaration. |
| Net/DNS2/RR/TALINK.php | Adds strict types declaration. |
| Net/DNS2/RR/TA.php | Adds strict types declaration. |
| Net/DNS2/RR/SSHFP.php | Adds strict types declaration. |
| Net/DNS2/RR/SRV.php | Adds strict types declaration. |
| Net/DNS2/RR/SPF.php | Adds strict types declaration. |
| Net/DNS2/RR/SOA.php | Adds strict types declaration. |
| Net/DNS2/RR/SMIMEA.php | Adds strict types declaration. |
| Net/DNS2/RR/SIG.php | Adds strict types declaration. |
| Net/DNS2/RR/RT.php | Adds strict types declaration. |
| Net/DNS2/RR/RRSIG.php | Adds strict types declaration. |
| Net/DNS2/RR/RP.php | Adds strict types declaration. |
| Net/DNS2/RR/PX.php | Adds strict types declaration. |
| Net/DNS2/RR/PTR.php | Adds strict types declaration. |
| Net/DNS2/RR/OPT.php | Adds strict types declaration. |
| Net/DNS2/RR/OPENPGPKEY.php | Adds strict types declaration. |
| Net/DNS2/RR/NSEC3PARAM.php | Adds strict types declaration. |
| Net/DNS2/RR/NSEC3.php | Adds strict types declaration. |
| Net/DNS2/RR/NSEC.php | Adds strict types declaration. |
| Net/DNS2/RR/NSAP.php | Adds strict types declaration. |
| Net/DNS2/RR/NS.php | Adds strict types declaration. |
| Net/DNS2/RR/NIMLOC.php | Adds strict types declaration. |
| Net/DNS2/RR/NID.php | Adds strict types declaration. |
| Net/DNS2/RR/NAPTR.php | Adds strict types declaration. |
| Net/DNS2/RR/MX.php | Adds strict types declaration. |
| Net/DNS2/RR/LP.php | Adds strict types declaration. |
| Net/DNS2/RR/LOC.php | Adds strict types declaration. |
| Net/DNS2/RR/L64.php | Adds strict types declaration. |
| Net/DNS2/RR/L32.php | Adds strict types declaration. |
| Net/DNS2/RR/KX.php | Adds strict types declaration. |
| Net/DNS2/RR/KEY.php | Adds strict types declaration. |
| Net/DNS2/RR/ISDN.php | Adds strict types declaration. |
| Net/DNS2/RR/IPSECKEY.php | Adds strict types declaration. |
| Net/DNS2/RR/HIP.php | Adds strict types declaration. |
| Net/DNS2/RR/HINFO.php | Adds strict types declaration. |
| Net/DNS2/RR/EUI64.php | Adds strict types declaration. |
| Net/DNS2/RR/EUI48.php | Adds strict types declaration. |
| Net/DNS2/RR/EID.php | Adds strict types declaration. |
| Net/DNS2/RR/DS.php | Adds strict types declaration. |
| Net/DNS2/RR/DNSKEY.php | Adds strict types declaration. |
| Net/DNS2/RR/DNAME.php | Adds strict types declaration. |
| Net/DNS2/RR/DLV.php | Adds strict types declaration. |
| Net/DNS2/RR/DHCID.php | Adds strict types declaration. |
| Net/DNS2/RR/CSYNC.php | Adds strict types declaration. |
| Net/DNS2/RR/CNAME.php | Adds strict types declaration. |
| Net/DNS2/RR/CERT.php | Adds strict types declaration. |
| Net/DNS2/RR/CDS.php | Adds strict types declaration. |
| Net/DNS2/RR/CDNSKEY.php | Adds strict types declaration. |
| Net/DNS2/RR/CAA.php | Adds strict types declaration. |
| Net/DNS2/RR/AVC.php | Adds strict types declaration. |
| Net/DNS2/RR/ATMA.php | Adds strict types declaration. |
| Net/DNS2/RR/APL.php | Adds strict types declaration. |
| Net/DNS2/RR/ANY.php | Adds strict types declaration. |
| Net/DNS2/RR/AMTRELAY.php | Adds strict types declaration. |
| Net/DNS2/RR/AFSDB.php | Adds strict types declaration. |
| Net/DNS2/RR/AAAA.php | Adds strict types declaration. |
| Net/DNS2/RR/A.php | Adds strict types declaration. |
| Net/DNS2/RR.php | Adds strict types declaration. |
| Net/DNS2/Resolver.php | Adds strict types declaration. |
| Net/DNS2/Question.php | Adds strict types declaration. |
| Net/DNS2/PrivateKey.php | Adds strict types declaration. |
| Net/DNS2/Packet/Response.php | Adds strict types declaration. |
| Net/DNS2/Packet/Request.php | Adds strict types declaration. |
| Net/DNS2/Packet.php | Adds strict types declaration. |
| Net/DNS2/Notifier.php | Adds strict types; modifies duplicate-RR checks (currently introduces syntax errors). |
| Net/DNS2/Names.php | Adds strict types declaration. |
| Net/DNS2/Lookups.php | Adds strict types declaration. |
| Net/DNS2/Header.php | Adds strict types declaration. |
| Net/DNS2/Exception.php | Adds strict types declaration. |
| Net/DNS2/Cache/Shm.php | Adds strict types; adjusts cache decode checks (currently introduces syntax errors). |
| Net/DNS2/Cache/File.php | Adds strict types; adjusts cache decode checks (currently introduces syntax errors). |
| Net/DNS2/Cache.php | Adds strict types declaration. |
| Net/DNS2/BitMap.php | Adds strict types declaration. |
| Net/DNS2.php | Adds strict types; updates servers input-type check (currently introduces syntax errors). |
| locales/po/index.php | Adds strict types declaration. |
| locales/LC_MESSAGES/index.php | Adds strict types declaration. |
| locales/index.php | Adds strict types declaration. |
| irr_tables.php | Adds strict types declaration. |
| index.php | Adds strict types declaration. |
| images/index.php | Adds strict types declaration. |
| functions.php | Adds strict types; large-scale short array syntax refactor (currently introduces syntax errors in array/type checks). |
| functions-pre13.php | Adds strict types; updates default params and prepared-statement arrays to short syntax. |
| flowview.php | Adds strict types; converts override/validation arrays to short syntax. |
| flowview_upgrade.php | Converts prepared statement params and array_rekey args to short syntax. |
| flowview_schedules.php | Adds strict types; converts UI/validation arrays and prepared-statement params to short syntax. |
| flowview_runner.php | Converts prepared-statement params to short syntax. |
| flowview_process.php | Converts CLI option arrays and various arrays to short syntax. |
| flowview_filters.php | Adds strict types; converts filter validation arrays and prepared-statement params to short syntax. |
| flowview_devices.php | Adds strict types; converts UI/validation arrays and prepared-statement params to short syntax. |
| flowview_databases.php | Adds strict types; converts many arrays to short syntax (currently introduces syntax errors in membership checks). |
| flowview_cleanup.php | Converts prepared-statement params to short syntax. |
| flowview_bulkarin.php | Converts working arrays and prepared-statement params to short syntax. |
| flow_collector.php | Converts CLI option arrays and large field-map arrays to short syntax. |
| fixprivate.php | Adds strict types declaration. |
| database.php | Adds strict types; converts default params/arrays to short syntax (currently introduces syntax errors in membership checks). |
| arrays.php | Adds strict types; converts numerous mapping arrays and form config arrays to short syntax. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
somethingwithproof
marked this pull request as draft
April 11, 2026 00:09
Member
Author
|
Converted to draft to serialize the stack in this repo. Blocked by #250; will un-draft after that merges to avoid cross-PR merge conflicts. |
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>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
refactor/modernization
branch
from
July 14, 2026 10:37
8fe59dc to
678a431
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.