I'm try using CakePHP for the first time with composer, but I have some problems.
I have this composer.json
:
{
"name": "example.com.br",
"repositories": [
{
"type": "pear",
"url": "http://pear.cakephp.org"
}
],
"config": {
"vendor-dir": "Vendor/"
},
"require": {
"php": ">=5.4",
"pear-cakephp/cakephp": ">=2.4.3",
"cakephp/debug_kit": "2.2.*",
"smottt/wideimage": "dev-master"
},
"extra": {
"installer-paths": {
"app/Plugin/DebugKit": ["cakephp/debug_kit"],
"app/Vendor/Wideimage": ["smottt/wideimage"]
}
}
}
When I run composer install (or update) --prefer-dist
, everything works except smottt/wideimage
.
This package is being installed in the /Vendor
folder instead /app/Vendor
, so, installer-paths was ignored.
Of course, what Danack has said is true: the composer-installers plugin only supports a select list of package types.
In response to that, I have written an extension for the composer-installers plugin which allows any arbitrary package type to be handled by the "installer-paths"
directive.
Simply require oomphinc/composer-installers-extender
in your composer.json and add support for any additional arbitrary package types:
"extra": {
"installer-types": ["library"],
"installer-paths": {
"special/package/": ["my/package"],
"path/to/libraries/{$name}/": ["type:library"]
}
}
For packages that don't specify a type, use the default type library
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With