Skip to content

Instantly share code, notes, and snippets.

Embed
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"]
}
}
}
@mAAdhaTTah

This comment has been minimized.

Copy link
Owner Author

mAAdhaTTah commented Dec 10, 2014

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

"config": {
  "vendor-dir": "lib"
}
@richardtape

This comment has been minimized.

Copy link

richardtape commented Aug 11, 2015

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

@khromov

This comment has been minimized.

Copy link

khromov commented Jul 7, 2016

Awesome, thanks!

@jancbeck

This comment has been minimized.

Copy link

jancbeck commented Sep 19, 2016

  [Seld\JsonLint\ParsingException]
  "./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
@namncn

This comment has been minimized.

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
You can’t perform that action at this time.