-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
I have a WordPress theme which uses Timber via Composer. Timber has a dependency of a version of Twig that has the following autoloader in their composer.json.
"autoload": {
"psr-0" : {
"Twig_" : "lib/"
},
"psr-4" : {
"Twig\\" : "src/"
}
},
When I attempt to run vendor\bin\mozart compose, I get an error, File already exists at path: lib/Dependencies/Twig/Extension/InitRuntimeInterface.php. I understand why this error happens, because in the twig package they have the same set of files in different directories to support both psr-0 and psr-4 and mozart is trying to process it twice.
I attempted to override this autoloader behavior in the mozart configuration, but I don't think I'm doing it right. I tried the following:
"override_autoload": {
"twig/twig": {
"psr-0" : {
"Twig_" : "src/"
},
"psr-4" : {
"Twig\\" : "src/"
}
}
},
When compose ran, it copied my dependent namespace on every line of the processed files. I also tried having psr-0 with empty curly braces and got the same behavior. I am using mozart version 0.7.1.
Am I going about this the wrong way?