You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug, but a question/feature request.
I'm using this client with Composer this way:
{
"require": {
"google/apiclient": "^2.0"
}
}
This require the client + all Google API services and add them to vendor/. While this is useful in most of cases I think, I'm working on a Wordpress plugin, which depends on Youtube API. To upload this plugin to the WP plugins repo, I need to keep vendor/ in the repo.
Right now, with my composer.json, vendor is about 12 000 files (it includes all Google services, when I actually don't use them).
The workaround I found is to simply remove all not Youtube related folders and files in src/Google/Service. But this doesn't sound clean to me.
Would it be possible to require the client only with the service needed?
The text was updated successfully, but these errors were encountered:
Currently the Composer library for services has all services in it, and you can't ask Composer to download part of the lib. This is not the intended behavior.
However, you could download the full release) on your computer, remove all services not needed, and upload to your host only relevant files.
What solution did you end up going for @enguerranws ? I have the same issue, I only need a few of the APIs and don't want to add ~20MB of files to my WordPress plugin.
Hi,
This is not a bug, but a question/feature request.
I'm using this client with Composer this way:
This require the client + all Google API services and add them to
vendor/
. While this is useful in most of cases I think, I'm working on a Wordpress plugin, which depends on Youtube API. To upload this plugin to the WP plugins repo, I need to keepvendor/
in the repo.Right now, with my composer.json, vendor is about 12 000 files (it includes all Google services, when I actually don't use them).
The workaround I found is to simply remove all not Youtube related folders and files in
src/Google/Service
. But this doesn't sound clean to me.Would it be possible to require the client only with the service needed?
The text was updated successfully, but these errors were encountered: