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

PSR4 service loader causes failure for dev dependencies and --no-dev #25929

Copy link
Copy link
Closed
@weaverryan

Description

@weaverryan
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3

Originally reported here: doctrine/DoctrineFixturesBundle#225 (comment)

The problem: when the PSR4 service loader scans for services, if it opens a class whose parent class is missing, it fails with a fatal error. Iirc, that was by design to help show errors faster. But, it's a problem with dev dependencies, like fixtures. In that case, when you deploy with --no-dev, cache warmup fails because suddenly the parent class/interface for those classes are missing. Instead, those services should just become not available.

Actually, I think we could possibly still load a "dummy" Definition object in these cases, and add the error to it via Definition::addError(). Then, if the service IS referenced, we can get a better error than "service does not exist".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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.