fix: #3618734 Restore the report view on sites where an install profile skipped it

Issue: https://www.drupal.org/project/admin_audit_trail/issues/3618734

Adds AdminAuditTrailReportView::ensure() (the view-repair logic moved from admin_audit_trail_update_10002() into a class, per the module's OOP conventions; update hooks stay procedural per core standards and now delegate to it) and a new admin_audit_trail_update_10003() so existing sites where an install-profile (distribution) install skipped the optional view get it restored by drush updb.

Verified: 3 new Kernel tests (creates when missing, keeps an existing customized view untouched, update hook delegates), full kernel+unit suite + PHPStan level 7 green, and a live check on a distribution-installed DDEV site: deleted the view, reset the schema to 10002, drush updb restored it.

AI-Generated: Yes

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release

Merge request reports

Loading