Skip to content

♻️ Replace Sonata UserNotification admin with native settings view#1121

Merged
0x46616c6b merged 1 commit intomainfrom
native-user-notification-admin
Mar 7, 2026
Merged

♻️ Replace Sonata UserNotification admin with native settings view#1121
0x46616c6b merged 1 commit intomainfrom
native-user-notification-admin

Conversation

@0x46616c6b
Copy link
Member

@0x46616c6b 0x46616c6b commented Mar 7, 2026

Summary

Replaces the Sonata Admin implementation for UserNotification with a native read-only list view under /settings/user-notifications/, consistent with the existing settings page patterns. This is part of the ongoing effort to migrate away from Sonata Admin.

Bildschirmfoto am 2026-03-07 um 13 08 07

Closes #1086

Changes

  • New controller (UserNotificationController): Single index GET action with pagination, email search, and type filter
  • New manager (UserNotificationManager): findPaginated(page, email, type) returning PaginatedResult DTO
  • New repository methods: countByFilters() and findPaginatedByFilters() on UserNotificationRepository
  • New template: Extends base_settings.html.twig with sidebar navigation, inline filters (type dropdown + email search), table, and inline pagination
  • Navigation: Added "Notifications" entry with heroicons:bell-alert icon
  • Translations: Full EN and DE translations for all new keys
  • Sonata removal: Deleted UserNotificationAdmin class, removed service definition from services.yaml, removed 3 role groups (5 leaf roles) from security.yaml
  • Tests: 4 Behat scenarios (admin list, non-admin 403, filter by email, filter by type) and 4 PHPUnit tests for the manager

Verification

  • PHP CS Fixer: clean
  • Rector: clean
  • Psalm: no errors
  • PHPUnit (780 tests): all pass
  • Behat settings_user_notification.feature (4 scenarios): all pass
  • Behat admin.feature (21 scenarios): all pass

The changes and the PR were generated by OpenCode.

…1086)

Replace the Sonata Admin implementation for UserNotification with a native
read-only list view under /settings/user-notifications/, consistent with
the existing settings page patterns (DomainController, ReservedNameController,
WebhookDeliveryController).

- Add UserNotificationController with paginated index action
- Add UserNotificationManager service with filter support (email, type)
- Add repository methods countByFilters() and findPaginatedByFilters()
- Add template extending base_settings.html.twig with sidebar navigation
- Add navigation entry for user notifications
- Add EN/DE translations for all new keys
- Add Behat feature tests (4 scenarios) and PHPUnit tests (4 tests)
- Remove UserNotificationAdmin Sonata class
- Remove Sonata service definition from services.yaml
- Remove Sonata security roles from security.yaml

Closes #1086

Co-Authored-By: OpenCode <noreply@opencode.ai>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2026

@0x46616c6b 0x46616c6b marked this pull request as ready for review March 7, 2026 12:09
@0x46616c6b 0x46616c6b merged commit ecede03 into main Mar 7, 2026
10 checks passed
@0x46616c6b 0x46616c6b deleted the native-user-notification-admin branch March 7, 2026 12:09
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.

Implement native admin for UserNotification (read-only list)

1 participant