Reputation: 6913
With Symfony 2.0.x I store all my client side dependencies (jQuery, etc) in the deps file so I can easily update them all at once with vendor/install, with the switch to composer in 2.1 this is not possible. My options appear to be:
Does anyone have a solution for handling this, or am I going about it all wrong?
Upvotes: 3
Views: 1741
Reputation: 3284
Composer does have support for downloading libraries that are not Composer-aware. It's a little more work, but you can define each of your dependencies like this:
{
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.8.1",
"dist": {
"url": "http://code.jquery.com/jquery-1.8.1.min.js",
"type": "file"
}
}
}
],
"require": {
"jquery/jquery": "1.8.1"
}
}
Read more about it here: http://getcomposer.org/doc/05-repositories.md#package-2.
This will download jQuery to vendors/jquery/jquery
by default. I don't think there's a way to specify a directory outside of vendors
at the moment, so that may considerably limit the usefulness of this suggestion.
FWIW, I would consider submitting a pull request/issue to the Composer Github project. This actually would make a whole lot of sense.
Upvotes: 8