Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error when loading route annotation with glob pattern #29747

Copy link
Copy link
Closed
@snoob

Description

@snoob
Issue body actions

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'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.