When execute composer for install cmb2/cmb2 create a wp-content/plugins/cm2 folder in the main path and not in vendor/cmb2
Before
/
|-vendor (empty)
composer file:
"require": {
"cmb2/cmb2": "dev-master",
"composer/installers": "v1.0.12"
},
"extra": {
"installer-paths": {
"vendor/{$name}/": ["cmb/cmb2"]
}
}
Actual Result
/
|-vendor
|--composer
|-wp-content
|--plugins
|---cmb2 (the cmb2 content)
When execute composer store te cmb2 in vendor folder
/
|-vendor
|--composer
|--cmb2 (the cmb2 content)
@cehojac
I had this same problem. My issue came up when I also required the composer/installers package (I'm guessing you're requiring this package too).
The solution was to add
"extra": {
"installer-paths": {
"vendor/cmb2/cmb2": ["cmb2/cmb2"]
}
}
to my composer.json.
I have more information about how I figured this out in my blog post, CMB2 as a Dependency with Composer.
@salcode Thank You, I deleted the composer/installers and work !
@cehojac I'm glad this is working for you now. I'm going to mark this issue as closed.
Feel free to re-open, if you think we should do anything further with this.
Thanks!
Most helpful comment
@cehojac
I had this same problem. My issue came up when I also required the
composer/installerspackage (I'm guessing you're requiring this package too).The solution was to add
to my
composer.json.I have more information about how I figured this out in my blog post, CMB2 as a Dependency with Composer.