Repository navigation
Bump version to 1.7 so the upgrade-time file prune runs (fixes audit_functions.php redeclare) - #95
Merged
Merged
Conversation
…rune The develop-cycle tombstone/prune work (audit_prune_files()) only runs when INFO version differs from the stored plugin_config version. It shipped under the same 1.6 string, so installs never prune the stale audit_functions.php/audit_syslog.php, which fatally redeclare functions now in includes/. Bump to 1.7 to trigger the prune on upgrade.
TheWitness
requested review from
bmfmancini and
xmacan
and
a balanced review from Copilot
October 14, 2026 13:20
There was a problem hiding this comment.
🟢 Approval recommended
The consistent version bump correctly activates the existing upgrade and pruning path.
0 open findings
What changed in this PR
Bumps the plugin version to trigger upgrade-time pruning of obsolete files and prevent function redeclaration failures.
Changes:
- Updates the plugin version from 1.6 to 1.7.
- Creates the 1.7 changelog section.
- Synchronizes version assertions in security tests.
| File | Description |
|---|---|
INFO |
Sets the plugin version to 1.7. |
CHANGELOG.md |
Documents the 1.7 release and prune trigger. |
tests/Security/ControllerSecurityTest.php |
Updates version synchronization assertions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
xmacan
approved these changes
Oct 14, 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.
Summary
Bumps the plugin version from
1.6to1.7so the upgrade-time file prune actually runs.Why
The
developcycle addedmanifest.jsontombstones plusaudit_prune_files(), which deletes files that older layouts shipped (notablyaudit_functions.phpandaudit_syslog.php, whose functions now live underincludes/).audit_prune_files()is only invoked fromaudit_check_upgrade(), and that path is gated on a version change:Because the tombstone work shipped under the same
1.6version string that installs already had recorded,$current == $old, the prune never fires, and the staleaudit_functions.phpstays on disk. It then redeclaresaudit_user_is_admin()(now defined inincludes/functions.php), producing a fatalCOMPILE_ERRORthat disables the plugin:The version was never bumped when the prune mechanism landed — an accidental oversight. Bumping to
1.7makes$current != $oldon upgrade from1.6, soaudit_check_upgrade()re-registers hooks and runsaudit_prune_files(), removing the tombstoned files.Changes
INFO:version = 1.6->1.7.CHANGELOG.md: cut the accumulated--- develop ---entries to a new--- 1.7 ---section and document the version bump.tests/Security/ControllerSecurityTest.php: update the version-sync assertions to1.7.Note for already-broken installs
A server that already hit the fatal must have
plugins/audit/audit_functions.php(andaudit_syslog.php) removed manually once and the plugin re-enabled; the fatal can pre-empt the upgrade path from completing. The version bump is what makes every other install self-heal via the prune on upgrade.