Skip to content
Back to skills

Register Cqrs Services

ASecurity

Register all domain handlers and the repository in the Symfony DI container. Handlers are auto-discovered via #[AsCommandHandler] / #[AsQueryHandler] attributes. Trigger: "register CQRS services for {Domain}".

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 29, 2026
ai-agentsphp

Security analysis

A100/100

Scanned May 29, 2026

npx -y skills add jeffsenso/prestashop-skills --skill register-cqrs-services --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Register Cqrs Services?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Register Cqrs Services
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeffsenso-register-cqrs-services/badge)](https://www.skillsdirectory.com/skills/jeffsenso-register-cqrs-services)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: register-cqrs-services
description: >
  Register all domain handlers and the repository in the Symfony DI container.
  Handlers are auto-discovered via #[AsCommandHandler] / #[AsQueryHandler] attributes.
  Trigger: "register CQRS services for {Domain}".
needs: [create-cqrs-commands, create-cqrs-queries, implement-cqrs-handlers, create-doctrine-repository]
produces: "DI YAML service registrations for repository and handler interface bindings"
---

# register-cqrs-services

## Instructions

1. Find the correct YAML file (check where other domain services are registered — typically per-domain or grouped by layer).
2. Register `{Domain}Repository` with `autowire: true` and `autoconfigure: true`.
3. Bind handler interfaces to their concrete implementations.
4. Handlers with `#[AsCommandHandler]` / `#[AsQueryHandler]` attributes are automatically registered with the Symfony Messenger bus — no manual tags needed. Just ensure `autoconfigure: true` is set.
5. Run `php bin/console debug:container | grep {domain}` to verify registration.

## Rules

Handler auto-registration via attributes is documented in [CQRS/CONTEXT.md](../../CONTEXT.md#handlers). Skill-specific reminders:

- Register handler interface → concrete class bindings so DI can resolve them
- Each handler must have exactly one attribute — duplicate registration causes errors

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.