symfony-hexagonal-architecture — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited symfony-hexagonal-architecture (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 Symfony hexagonal architecture (ports & adapters). Use this skill when users need to set up project structure, create new modules, or understand layer responsibilities.
Presentation → Application → Domain ← InfrastructureInfrastructure depends on Domain (implements ports), but Domain NEVER depends on Infrastructure.
Every module follows this structure under src/:
Domain/{Module}/
├── Entity/ # Aggregates and entities (pure PHP)
├── ValueObject/ # Immutable value objects
├── Event/ # Domain events (past-tense)
├── Exception/ # Domain-specific exceptions
└── Port/ # Interfaces for external dependencies
Application/{Module}/
├── Command/ # Write operations (final readonly)
├── Query/ # Read operations (final readonly)
├── DTO/ # Data transfer objects
└── EventHandler/ # Domain event handlers
Infrastructure/{Module}/
├── Persistence/ # Doctrine repositories, mappings
├── Messaging/ # Messenger handlers, transports
└── ExternalService/ # HTTP clients, third-party APIs
Presentation/{Module}/
├── API/ # REST controllers
├── CLI/ # Console commands
└── GraphQL/ # GraphQL resolvers/typesWhen working on an existing project that doesn't follow hexagonal architecture:
Before writing any code, check:
- Is src/ organized by layer (Domain/, Application/, etc.) or by traditional Symfony (Controller/, Entity/, Repository/)?
- Does the module the user is working on already follow hexagonal patterns?
- Are there Doctrine annotations directly on entities?When the user requests a feature/change in a non-hexagonal module, ALWAYS ask:
"Bu modül ({Module}) şu anda hexagonal yapıda değil. Şu seçeneklerden birini tercih edebilirsiniz: 1. Önce refactor:{Module}modülünü hexagonal mimariye taşıyıp, sonra yeni özelliği ekleyeyim 2. Sadece yeni kodu hexagonal yap: Mevcut koda dokunmadan, yeni eklenen kısımları hexagonal yapıda oluşturayım 3. Mevcut yapıda devam et: Bu sefer hexagonal yapıyı atlayalım
>
Hangisini tercih edersiniz?"
Migrate one layer at a time, in this order:
Domain/{Module}/Entity/, create value objects, define port interfacesInfrastructure/{Module}/Persistence/, extract mappingsApiResponseTrait, apply #[IsGranted]After each layer, verify the code still works before moving to the next.
When user asks to create a new module, generate ALL directories and base files:
Domain/{Module}/Port/Infrastructure/{Module}/Persistence/services.yamluse Symfony\... or use Doctrine\... in any Domain fileApp\Domain\{Module}\..., App\Application\{Module}\..., etc.See references/ for detailed guides:
directory-structure.md — Full directory layout with file exampleslayer-responsibilities.md — What belongs in each layerdependency-rules.md — Import rules and PHPStan enforcement~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.