Repository navigation
Fix upgrade/Install issues post setup refactor - #393
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved schema repair and remote initialization defects can block upgrades, delete legacy reports, and leave replication tables nontransactional.
5 open findings
What changed in this PR
Improves Syslog installation and upgrade recovery after the setup-module refactor.
Changes:
- Adds schema repair helpers and completeness checks.
- Moves upgrade work to explicit lifecycle callbacks and updates permission mappings.
- Bumps the version to 4.11 and adjusts regression tests.
| File | Description |
|---|---|
| tests/Unit/SetupModuleBoundaryTest.php | Checks lifecycle and module boundaries. |
| tests/Security/TraditionalTableDeprecationTest.php | Updates upgrade-notice expectations. |
| tests/Security/SavedSearchRealmUpgradeTest.php | Removes per-migration replication assertions. |
| tests/Security/RemoteCollectorInstallOptionsTest.php | Updates setup-call expectations. |
| tests/Security/ItemShareVisibilityTest.php | Adds schema repair checks. |
| tests/Security/DashboardRealmUpgradeTest.php | Removes per-migration replication assertions. |
| tests/regression/rule_realm_upgrade_test.php | Covers device-rule permissions. |
| setup.php | Refactors upgrade orchestration and hook migration. |
| INFO | Updates version to 4.11. |
| includes/settings.php | Updates permissions and retires callback work. |
| includes/schema.php | Adds repair mode and table completeness checks. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
TheWitness
approved these changes
Oct 8, 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 pull request introduces significant improvements to the syslog plugin’s database schema management and upgrade processes, making schema repairs safer, more robust, and modular. The changes add explicit repair functions for saved searches, dashboards, and dashboard panels, introduce a new repair mode for schema setup, and refactor the upgrade hooks to be more maintainable. Additionally, the plugin’s version is updated and legacy upgrade code is cleaned up.
Schema repair and upgrade improvements:
syslog_ensure_saved_search_tables,syslog_ensure_dashboard_tables, and updatedsyslog_ensure_share_tablesto explicitly repair and create missing or outdated tables and columns for saved searches, dashboards, and sharing, ensuring safer upgrades without dropping data. [1] [2]repairmode tosyslog_setup_table_newand a newsyslog_ensure_table_structuresfunction to complete interrupted installs/upgrades without dropping existing data, improving resilience and reliability during upgrades. [1] [2]Plugin upgrade and hook management:
syslog_upgrade_hook_module_pathsfunction, which updates hook file paths and functions, making the codebase more modular and maintainable.syslog_config_insertupgrade callback and its registration, as upgrades are now handled explicitly. [1] [2]Permission and realm updates:
syslog_device_rules.php, ensuring correct access control after schema or feature upgrades. [1] [2] [3]Other improvements and maintenance:
INFO.api_plugin_replicate_configand dead code in upgrade-related functions. [1] [2] [3] [4] [5] [6]These changes make the syslog plugin’s schema management more robust, minimize risk during upgrades, and improve code maintainability.