Description
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".