googleapis / googleapis/google-api-php-client-services
Split packages for the sake of bandwidth disk space and the environnement
- Dominant language
- PHP
- Stars
- 1.3k
- Forks
- 320
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 193
Description
This package is the biggest composer package I have ever seen: 40Mb => 73Mb real (because a lot of small files)
Just by itself it weights 50% of all my dependencies, and yet I only use it to call 4 api endpoints...

This single package by itself is using more than 20Go on our pipelines artifacts and an easy 1Go of bandwith per month which is insane in term of carbon footprint considered it's a popular package made by such a big company as google. In comparison, https://github.com/fzaninotto/Faker was shutdown by it's author for environmental concerns for much less
I think it's time to be responsible and to split this package into multiple smaller packages that can be independantly installed based on what users need (eg maybe I'll install a combo of Analytics and Youtube, but I don't want to have the 100's of other subfolders that come with this currently)
Related #222
It is possible to use a monorepo with a private packagist as documented there https://blog.packagist.com/installing-composer-packages-from-monorepos/
Or using a different registry than packagist
If this is not ideal because of the need to add the registry to the composer.json (which isn't that hard) or the high asking price of a private packagist (a bigger issue, in which case I'd recommend a free alternative where it automatically creates multiple github projects https://packagist.org/packages/symplify/monorepo-builder)
Then alternatively I'd consider just separating the really big folders into separate packages, in their respective order:
1. Compute
2. ShoppingContent
3. DialogFlow
4. Dfareporting
5. DisplayVideo
6. Apigee
7. Vision
8. Sheets & Documents
9. Youtube
And keep all the rest in one package, this will help alleviate the size of the main package by 25%, which isn't that much but is already 20 real Mb
Contributor guide
Assessment
This issue has not been assessed yet.