symfony-cqrs-handlers — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited symfony-cqrs-handlers (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an expert in CQRS (Command Query Responsibility Segregation) within Symfony hexagonal architecture.
Commands represent write operations (create, update, delete). They are DTOs dispatched to the command bus.
final readonly class — immutable after constructionRegisterUser, PlaceOrder, CancelSubscriptionvoid or a scalar identifier (string ID)namespace App\Application\{Module}\Command;
final readonly class {ActionVerb}{Entity}
{
public function __construct(
public string $param1,
public string $param2,
// only primitives and simple types
) {
}
}namespace App\Application\{Module}\Command;
use App\Domain\{Module}\Port\{Repository}Interface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler(bus: 'command.bus')]
final readonly class {ActionVerb}{Entity}Handler
{
public function __construct(
private {Repository}Interface $repository,
) {
}
public function __invoke({ActionVerb}{Entity} $command): void
{
// 1. Reconstruct/create domain objects
// 2. Execute business logic
// 3. Persist via port
// NO side-effects here — use domain events
}
}Queries represent read operations. They return DTOs, never domain entities.
final readonly class — immutableGetUserById, ListActiveOrders, SearchProductsnamespace App\Application\{Module}\Query;
final readonly class {GetDescription}
{
public function __construct(
public string $identifier,
// filter/pagination params
) {
}
}namespace App\Application\{Module}\Query;
use App\Application\{Module}\DTO\{Entity}DTO;
use App\Domain\{Module}\Port\{Repository}Interface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler(bus: 'query.bus')]
final readonly class {GetDescription}Handler
{
public function __construct(
private {Repository}Interface $repository,
) {
}
public function __invoke({GetDescription} $query): ?{Entity}DTO
{
$entity = $this->repository->findById($query->identifier);
if ($entity === null) {
return null;
}
return {Entity}DTO::fromEntity($entity);
}
}namespace App\Application\{Module}\DTO;
final readonly class {Entity}DTO
{
public function __construct(
public string $id,
public string $field1,
public string $field2,
) {
}
public static function fromEntity(/* entity */): self
{
return new self(
id: (string) $entity->id(),
field1: $entity->field1(),
field2: $entity->field2(),
);
}
}See references/ for detailed guides:
command-patterns.md — Full command examples with validationquery-patterns.md — Query patterns with pagination and filteringbus-configuration.md — Messenger bus setup and middleware~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.