PHPackages                             fojlerabbirabib/apiclient-drive-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. fojlerabbirabib/apiclient-drive-service

ActiveLibrary

fojlerabbirabib/apiclient-drive-service
=======================================

A slim, auto-synced, Drive-only subset of google/apiclient-services (unofficial, not affiliated with Google).

v1.1.0(1mo ago)020[4 PRs](https://github.com/FojleRabbiRabib/apiclient-drive-service/pulls)Apache-2.0PHPPHP ^8.1CI failing

Since Jul 11Pushed 2w agoCompare

[ Source](https://github.com/FojleRabbiRabib/apiclient-drive-service)[ Packagist](https://packagist.org/packages/fojlerabbirabib/apiclient-drive-service)[ Docs](https://github.com/FojleRabbiRabib/apiclient-drive-service)[ RSS](/packages/fojlerabbirabib-apiclient-drive-service/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

apiclient-drive-service
=======================

[](#apiclient-drive-service)

A slim, auto-synced, **Drive-only** subset of [`google/apiclient-services`](https://github.com/googleapis/google-api-php-client-services).

> **Unofficial.** Not affiliated with, endorsed by, or supported by Google. See [NOTICE](NOTICE).

Why
---

[](#why)

`google/apiclient-services` ships generated PHP classes for **200+ Google APIs** in a single package — 200MB+ on disk — even if your project only ever talks to Google Drive. This package extracts just the `Google\Service\Drive` classes (~670 KB) and keeps them in sync with upstream automatically, on a weekly schedule, opening a pull request for review.

Install
-------

[](#install)

```
composer require fojlerabbirabib/apiclient-drive-service google/apiclient
```

This package ships the Drive service classes; `google/apiclient` ships the `Google\Client` / HTTP / auth base layer they extend. This package `provide`s `google/apiclient-services` and `conflict`s the real one, so Composer installs `google/apiclient` **without** the 200MB full service catalog — only the Drive classes ship.

> Don't also require `google/apiclient-services` directly — it registers the same `Google\Service\Drive` namespace from a different file and Composer will refuse the combination. If you need other Google services, use `google/apiclient-services` instead of this package.

Usage
-----

[](#usage)

```
use Google\Client;
use Google\Service\Drive;

$client = new Client();
$client->setAuthConfig('/path/to/credentials.json');
$client->addScope(Drive::DRIVE_READONLY);

$drive = new Drive($client);
$files = $drive->files->listFiles();
```

Use with masbug/flysystem-google-drive-ext
------------------------------------------

[](#use-with-masbugflysystem-google-drive-ext)

[`masbug/flysystem-google-drive-ext`](https://github.com/masbug/flysystem-google-drive-ext)is a popular Flysystem adapter for Google Drive. It depends on `google/apiclient`, which normally drags in the full 200MB `google/apiclient-services` catalog — even though the adapter only uses Drive. Pair it with this package and the catalog never gets installed.

Require both in one command so Composer sees this package's `provide` up front:

```
composer require masbug/flysystem-google-drive-ext fojlerabbirabib/apiclient-drive-service
```

That installs `masbug/flysystem-google-drive-ext` + `google/apiclient` + this slim package, and excludes `google/apiclient-services` entirely (~200MB saved). The adapter works unchanged — it uses `Google\Service\Drive\*` classes, which this package ships at the same namespace.

> If you require `masbug/flysystem-google-drive-ext` alone first, Composer pulls the full catalog immediately; you'd then need a second `composer require fojlerabbirabib/apiclient-drive-service` to swap it out. Require both together to avoid downloading the 200MB at all.

The same pattern works for any package that depends on `google/apiclient` for Drive only — just don't use it if the project also needs other Google services (Sheets, Calendar, …), whose classes won't be present.

How this stays up to date
-------------------------

[](#how-this-stays-up-to-date)

A weekly GitHub Action pulls only the Drive-relevant files from upstream (via a scoped `git sparse-checkout`, not a full clone), runs the test suite and 95% coverage gate on the synced code, and **opens a pull request for manual review** — it never auto-tags or publishes. A daily staleness check fails loudly if the sync hasn't run successfully in 7 days.

> BC checking is **not** automated. Roave/BackwardCompatibilityCheck could not resolve the `google/apiclient` base classes (this package only `suggest`s them, and `conflict`s `google/apiclient-services`), so it emitted only spurious breaks. Review the sync PR's diff for breaking API surface before merging.

See [CHANGELOG.md](CHANGELOG.md) for the exact upstream commit each sync was based on.

Versioning
----------

[](#versioning)

Standard SemVer, decided manually when a sync PR is merged:

ChangeBumpNo breaking changes, no new public API surfacePATCHNo breaking changes, new public API addedMINORBreaking change (removed/renamed class, method, property; incompatible signature)MAJORLicense
-------

[](#license)

Apache-2.0, same as upstream. See [LICENSE](LICENSE) and [NOTICE](NOTICE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance93

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36526962?v=4)[Fojle Rabbi](/maintainers/FojleRabbiRabib)[@FojleRabbiRabib](https://github.com/FojleRabbiRabib)

---

Top Contributors

[![FojleRabbiRabib](https://avatars.githubusercontent.com/u/36526962?v=4)](https://github.com/FojleRabbiRabib "FojleRabbiRabib (17 commits)")

---

Tags

googlegoogle apigoogle-drivedriveapiclient

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fojlerabbirabib-apiclient-drive-service/health.svg)

```
[![Health](https://phpackages.com/badges/fojlerabbirabib-apiclient-drive-service/health.svg)](https://phpackages.com/packages/fojlerabbirabib-apiclient-drive-service)
```

###  Alternatives

[google/cloud

Google Cloud Client Library

1.2k17.1M58](/packages/google-cloud)[skagarwal/google-places-api

Google Places Api

1973.4M10](/packages/skagarwal-google-places-api)[x-fran/g-trends

Google Trends API for PHP

11858.7k](/packages/x-fran-g-trends)[tomshaw/google-api

A Laravel Google API Client.

601.9k](/packages/tomshaw-google-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
