Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CMB2 as Composer Library
"require": {
"php": ">=5.3.0",
"composer/installers": "v1.0.12",
"webdevstudios/cmb2": "dev-master",
"autoload": {
"files": ["vendor/cmb2/init.php"]
"extra": {
"installer-paths": {
"vendor/{$name}/": ["webdevstudios/cmb2"]
Copy link

mAAdhaTTah commented Dec 10, 2014

You can change vendor if you use a custom vendor-dir:

"config": {
  "vendor-dir": "lib"

Copy link

richardtape commented Aug 11, 2015

Thanks for putting this up. Saved me some time :)

Copy link

khromov commented Jul 7, 2016

Awesome, thanks!

Copy link

jancbeck commented Sep 19, 2016

  "./composer.json" does not contain valid JSON
  Parse error on line 5:
  ...2": "dev-master",  },  "autoload": {
  Expected: 'STRING' - It appears you have an extra trailing comma

Copy link

namncn commented Sep 24, 2017

Just delete "," on line 5 to fix this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment