Closed joshuapaling closed 10 years ago
So you're installing the plugin with a composer file located in the app
folder ? And CakeResque is a dependency in that composer file ?
Pretty much... the composer file is actually just above my app directory. (I downloaded the default cake zip file, and just went with that - so my top level folder has /app, /Config, /lib, index.php and more - including my composer.json.)
I've pasted my composer.json below. Since I've specified that app/Vendor/
is my vendor-dir
, it installs all of Cake-Resque's dependencies in there. Make sense?
{
"name": "the-big-vault",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/joshuapaling/cakephp-upload.git"
}
],
"require": {
"josegonzalez/cakephp-upload": "dev-feature-honour-exif-data as 1.0.0",
"cakedc/migrations": "2.2.2",
"cakedc/search": "1.1.1",
"cakephp/debug_kit": "2.2.1",
"kamisama/cake-resque": "4.0.2"
},
"config": {
"vendor-dir": "app/Vendor/"
},
"extra": {
"installer-paths": {
"app/Plugin/Upload": ["josegonzalez/cakephp-upload"],
"app/Plugin/Migrations": ["cakedc/migrations"],
"app/Plugin/Search": ["cakedc/search"],
"app/Plugin/DebugKit": ["cakephp/debug_kit"],
"app/Plugin/CakeResque": ["kamisama/cake-resque"]
}
}
}
What's your local machine config ?
The tests are failing on Cake 2.2, since Configure::check() was not implemented yet
OK I'll fix that now, sorry
OK done - I just changed 'check' to 'read'. Should work the same.
Done.
done.
Thanks
It's already done correctly for the 'php-resque-ex' and 'php-resque-ex-scheduler' packages. I've just added the ability to specify a path to the 'resque-status' package via the configs, so it's consistent with the other two.
The reason I need it is because I'm using Composer to install the Cake-Resque plugin itself - not just its dependencies. So, Composer installs ALL dependent packages in /Vendors - not in the
CakePlugin::path('CakeResque') . 'vendor' . DS;
directory. So, I need to be able to specify the correct path to that via a config option.You'll see in my comments that I've done a work around so as not to break things for existing users, but really I think this config option should probably be required in the next major version.
Also, on another note, I think the
$pluginVendorPath
itself should probably be configurable for the same reason - people using composer may have different vendor paths. However, I I haven't changed that in this PR.FYI, my own custom bootstrap file looks like this:
Since I'm having composer install them with the exact same name but just at a different location, if there was a config option for the $pluginVendorPath then all I'd need to do is this:
(of course, anyone using Composer to install their Cake plugins is in the same situation)
Signed-off-by: Joshua Paling joshua.paling@gmail.com