Reputation: 1099
Background
I have implemented user authentication using Google services in client and server side successfully. I've used Google APIs Client Library for PHP on the server side for this purpose (get the token from the client and save the result on the server after further authentication).
What the doc is said
There is a section in readme.md entitled Cleaning up unused services :
There are over 200 Google API services. The chances are good that you will not want them all. In order to avoid shipping these dependencies with your code, you can run the Google\Task\Composer::cleanup task and specify the services you want to keep in composer.json
Another answer
It seems that I can get rid of (at least) some of that huge lib, but there is an answer in StackOverflow that doesn't agree (the comment specially):
... And you should probably not try to remove unused dependencies that were included by the google api, that might break things now or in the future
Question
I need to get rid of any unnecessary dependencies successfully peacefully. Is it possible? If yes then how about the comment? If not then what is the purpose of the "cleaning" section in the readme?
What answers I am looking for
In the first place I want to know the Why and the How (learning composer). In the second place any workaround is accepted. I really don't like to upload all of the lib.
Upvotes: 2
Views: 775
Reputation: 11829
In the first place I want to know the Why and the How (learning composer).
https://github.com/googleapis/google-api-php-client/blob/master/src/Task/Composer.php#L31
I really don't like to upload all of the lib.
You can't: google/apiclient
has dependency google/apiclient-services
(https://github.com/googleapis/google-api-php-client-services) containing all packages
Upvotes: 1