How to install Google APIs Client Library for PHP using Composer

These are the steps I followed to install the Google APIs Client Library for PHP using Composer.

Installing PHP dependencies in production using Composer

How I install the PHP dependencies on the production server using Composer.

[Solution] Composer: openssl and curl extensions errors

How to resolve openssl and curl errors when installing a package in Composer.