I'm am trying to organize my controllers a bit more in a Symfony 5.3 application. They are in a couple of subdirectories and use annotations for their routing. Here are some samples:
- ../src/StuffA/Controller/ControllerA.php
- ../src/StuffB/Controller/ControllerB.php
I now want to specify both inside my annotations.yaml
. I tried several approaches, but could not find anything that works:
Wildcards - Does not work
controllers:
resource: '../../src/*/Controller'
type: annotation
Multiple Paths - Does not work
controllers:
resource: '../../src/{StuffA,StuffB}/Controller'
type: annotation
Single Paths - Works but only for one Controller
controllers:
resource: '../../src/StuffA/Controller'
type: annotation
Any hint on what I'm doing wrong?