Skip to content

Composer require specific service #1343

@enguerranws

Description

@enguerranws

Hi,

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?

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions