-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected
5.3.7
Description
We have multiple Symfony apps and to simplify setup of them we have one library (call it symfony-boot) where all common packages, code, settings etc. are. I wanted to add our custom runtime to this library and use across all projects.
However when I run composer install (or dump-autoload) in actual project I'm getting an error from \Symfony\Component\Runtime\Internal\ComposerPlugin::updateAutoloadFile
[InvalidArgumentException]
Class "\Websupport\Env\Symfony\WebSupportRuntime" listed under "extra.runtime.class" in your composer.json file not found.
The only way to get it working is to place runtime:
- directly in the project
- to symfony/runtime lib (which of course is not feasible, it was just a debugging experiment)
How to reproduce
Quick and dirty:
- Create custom runtime class (can be an empty class extending one of existing Symfony runtime classes)
- Move it to any vendor library beside symfony/runtime (namespace has to match)
- Update composer.json
extra.runtime.class
with your class - Run composer install
Right way:
- Create a library with runtime class (same as in
Quick and dirty
, but in separate library) - composer require your library
- Update composer.json
extra.runtime.class
with your class - Run composer install
Possible Solution
No response
Additional Context
No response