Skip to content

P2.6: drop @deprecated AuditService delegators, move @internal helpers to AuditRecorder#112

Draft
sjelfull wants to merge 1 commit into
docs-escape-hatchfrom
p2.6-drop-bc-shim
Draft

P2.6: drop @deprecated AuditService delegators, move @internal helpers to AuditRecorder#112
sjelfull wants to merge 1 commit into
docs-escape-hatchfrom
p2.6-drop-bc-shim

Conversation

@sjelfull
Copy link
Copy Markdown
Owner

@sjelfull sjelfull commented Apr 28, 2026

P2.6: drop @deprecated AuditService delegators, move @internal helpers to AuditRecorder

Removes the backward-compatibility shim layer that was keeping the old AuditService API alive. The delegator methods (AuditService::record(), AuditService::getRecords(), etc.) were marked @deprecated in P1.1 and have been dead weight since P2.3 finished rewiring all event listeners to the handler services. This branch deletes them and moves the @internal helper methods that legitimately belong on AuditRecorder (where they were always called from).

The result: AuditService drops from ~500 LOC to a thin service-locator shell. AuditRecorder gains the helpers it was already using via cross-service calls.

What changed

  • src/services/AuditService.php — 427 lines deleted. All @deprecated delegator methods removed. The class now only wires up the service container.
  • src/services/AuditRecorder.php (+116 LOC) — absorbs the @internal helpers previously living in AuditService: applyOverrides(), buildSnapshot(), and related utilities. No behavior change — these were already called from AuditRecorder via $this->audit->auditService->helper().
  • 8 handler files (BackupHandler, ElementHandler, PluginHandler, RouteHandler, SchemaHandler, SettingsHandler, UserGroupHandler, UserHandler) — update internal calls from $this->audit->auditService->helper() to $this->recorder->helper() now that the helpers live on AuditRecorder.
  • 8 test files — update any remaining AuditService:: references to the correct AuditRecorder:: surface.

Tests

  • Test count unchanged (refactor — no new behavior)
  • ECS clean
  • PHPStan clean
  • Fresh-DB green

Stacked on

p2.5-ci-php-matrix-hygiene (#111)

@sjelfull
Copy link
Copy Markdown
Owner Author

sjelfull commented Apr 28, 2026

This change is part of the following stack:

Change managed by git-spice.

@sjelfull sjelfull force-pushed the docs-escape-hatch branch from bd44821 to 8f9b5e7 Compare May 14, 2026 09:25
@sjelfull sjelfull force-pushed the p2.6-drop-bc-shim branch from 6185ea0 to 24c70f2 Compare May 14, 2026 09:25
@sjelfull sjelfull force-pushed the docs-escape-hatch branch from 8f9b5e7 to bd44821 Compare May 15, 2026 17:33
@sjelfull sjelfull force-pushed the p2.6-drop-bc-shim branch from 24c70f2 to 6185ea0 Compare May 15, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant