Closed
Description
Symfony version(s) affected: 4,1 & 4.2
Description
Loading routes (annotation) with glob pattern triggers an error if one of the targetted directory contains an abstract class
How to reproduce :
Scenario 1 :
# config/routes/annotation.yaml
directory1_controllers:
resource: '../../src/Directory1/Controller'
type: 'annotation'
directory2_controllers:
resource: '../../src/Directory2/Controller'
type: 'annotation'
Works as attended
Scenario 2 :
# config/routes/annotation.yaml
controllers:
resource: '../../src/*/Controller/*'
type: 'annotation'
Triggers an error (Annotations from class "%s" cannot be read as it is abstract.) if one of the directory contains an abstract class.
I wasn't able to exclude classes starting with Abstract using the glob pattern
# config/routes/annotation.yaml
controllers:
resource: '../../src/*/Controller/!(Abstract)*'
type: 'annotation'