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

[DI] PSR4 loader suggestion #22397

Copy link
Copy link
Closed
Closed
Copy link
@kbond

Description

@kbond
Issue body actions
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 3.3.0 (master)

I'm really enjoying the new PSR4 loader but have a suggestion. It would be nice if I could declare multiple definitions with the same prefix. Example:

services:
    command_handlers:
        psr4_prefix: App\Domain\
        resource: ../../src/Domain/*/CommandHandler
        tags: [command_handler]

    event_subscribers:
        psr4_prefix: App\Domain\
        resource: ../../src/Domain/*/EventSubscriber
        tags: [event_subscriber]

I can't use instanceof here because my handlers/subscribers don't have interfaces.

Ref: #22016 (comment)

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.