groundhoggwp / groundhogg-appointments

GNU General Public License v3.0
3 stars 1 forks source link

Treeshaking google-api-php-client-services? #3

Open myselfhimself opened 3 months ago

myselfhimself commented 3 months ago

Hello,

the amount of libraries in groundhogg-appointments/includes/lib/google/vendor/google/apiclient-services/ is much too big (almost a thousand files, many unused sub libraries).

I realized that when downloading a website containing the groundhogg-appointments plugin over FTP.

What about reworking the composer.json file and using only the necessary libraries from there https://cloud.google.com/php/docs/reference ?

This Github page itself mentions explicitly https://github.com/googleapis/google-api-php-client-services?tab=readme-ov-file :
NOTE: please check to see if the package you'd like to install is available in our list of [Google cloud packages](https://cloud.google.com/php/docs/reference) first, as these are the recommended libraries.

🌴 ▶️ 🥥

myselfhimself commented 3 months ago
find wp-content/plugins/groundhogg-appointments/includes/lib | wc -l
# ->   17799 files
BrianHenryIE commented 3 months ago

Calendar doesn't exist in the Google list of "recommended libraries", unfortunately.

There's an unmerged branch where the Google\Task\Composer::cleanup is working correctly, by running it on post-install-cmd and post-update-cmd rather than pre-autoload-dump.

https://github.com/groundhoggwp/groundhogg-appointments/compare/93980744c0b3e97ffb897a139495d1835cc174ab...prefix-namespace

https://github.com/groundhoggwp/groundhogg-appointments/tree/prefix-namespace

I don't know why the branch has diverged from master.