I've got a problem here, which I have a feeling got a simple and clean solution which I haven't found yet... My Cake-PHP-Application looks like this:
- Projectfolder
- app
- vendors
- composer.json
Cake-PHP and the external file I want to use are installed inside the vendors-folder. In vendors I have a package for twitter bootstrap, which has a css- and a js-file I want to include inside my view, but it ain't accessable, since those file don't remain inside the webroot-Folder of my Cake-PHP project. Now my question is - How do I make those both files accessable inside my Cake-PHP project, WITHOUT copying them to the webroot-folder? Using symlinks looks a bit like a dirty hack to me... There has to be a clean solution, since otherwise using Cake-PHP with Composer would make no sence. My composer.json looks like this:
{
"name": "MyProject",
"version": "0.0.0",
"require": {
"php": ">=5.5.11",
"cakephp/cakephp": "2.6.3",
"composer/installers": "*",
"twbs/bootstrap": "3.3.4",
"components/jquery": "2.1.3"
},
"extra" : {
"installer-paths":{
"plugins/{$name}":["type:cakephp-plugin"],
"app/webroot/bootstrap":["twbs/bootstrap"]
}
},
"config": {
"vendor-dir": "vendors"
}
Btw: composer ignores the given installpath for bootstrap, since the package has no type...