Closed blocka closed 10 years ago
Use Custom Install Paths to redirect their packages into desired folder.
I tried
"extra": {
"installer-paths": {
"public/content/mu-plugins/{$name}": ["wpackagist/unfiltered-mu"]
}
and then
composer update wpackagist/unfiltered-mu
But it insists on sticking it in the plugins folder...
I tried removing the plugin completely, and trying again, and that didn't work either.
Quick test with this worked fine for me on install.
{
"name" : "rarst/mu-test",
"repositories": [
{
"type": "composer",
"url" : "http://wpackagist.org"
}
],
"require" : {
"wpackagist/unfiltered-mu": "*"
},
"extra" : {
"installer-paths": {
"public/content/mu-plugins/{$name}": ["wpackagist/unfiltered-mu"]
}
}
}
You're starting from scratch, and I'm starting from an existing composer.json.
Is it not working because i'm calling update instead or install? I can't run install because of my composer.lock file. Is there a way to just run the install part of this again?
It might be since paths are probably captured in lock. If deleting plugin's folder isn't helping I'd try deleting lock and running install.
Sorry about this...I had another entry in installer-paths for "public/content/mu-plugins/{$name}"
Just in case anyone had the same issue: If you want force a plugin to be a mu-plugin you need to add the line before the normal plugin path:
"installer-paths" : {
"public/wp-content/mu-plugins/{$name}": ["wpackagist-plugin/disable-google-fonts"],
"public/wp-content/plugins/{$name}" : ["type:wordpress-plugin"],
"public/wp-content/mu-plugins/{$name}": ["type:wordpress-muplugin"],
"public/wp-content/themes/{$name}" : ["type:wordpress-theme"]
}
As this won't work:
"installer-paths" : {
"public/wp-content/plugins/{$name}" : ["type:wordpress-plugin"],
"public/wp-content/mu-plugins/{$name}": ["type:wordpress-muplugin", "wpackagist-plugin/disable-google-fonts"],
"public/wp-content/themes/{$name}" : ["type:wordpress-theme"]
}
@kraftner But this works:
"installer-paths" : {
"public/wp-content/plugins/{$name}" : ["type:wordpress-plugin"],
"public/wp-content/mu-plugins/{$name}": ["wpackagist-plugin/disable-google-fonts", "type:wordpress-muplugin"],
"public/wp-content/themes/{$name}" : ["type:wordpress-theme"]
}
Actually you should put "wpackagist-plugin/disable-google-fonts"
prior to "type:wordpress-muplugin"
.
How would you handle a situation where you wanted a plugin to land in mu instead of plugins?