Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme with info on services repo #1823

Merged
merged 4 commits into from
May 4, 2020

Conversation

jdpedrie
Copy link
Contributor

This change adds a warning to users to pin to a specific version of google/apiclient-services and also a guide to how they can skip installation of services if they don't need them.

@jdpedrie jdpedrie requested a review from bshaffer April 21, 2020 13:52
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 21, 2020
README.md Outdated
@@ -41,6 +41,18 @@ Finally, be sure to include the autoloader:
require_once '/path/to/your-project/vendor/autoload.php';
```

This library relies on `google/apiclient-services`. That library provides up-to-date API wrappers for a large number of Google APIs. In order that users may make use of the latest API clients, this library does not pin to a specific version of `google/apiclient-services`. **In order to prevent the accidental installation of API wrappers with breaking changes**, it is highly recommended that you pin to the latest version yourself prior to using this library in production.

If you're installing this library for authentication or other purposes which do not require the API wrappers, you may prevent their installation by adding the following to your project's `composer.json` file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing to me, as it does not actually prevent their installation. Also, what is the use case for preventing their installation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, should have been replace not provide. There are a lot of examples of people using this library for convenience in authenticating HTTP clients (e.g. #1818, #1701) without actually using the services.

@dwsupplee dwsupplee merged commit 19c033f into googleapis:master May 4, 2020
@jdpedrie jdpedrie deleted the docs/readme-composer branch May 4, 2020 19:31
@veperr
Copy link

veperr commented May 11, 2020

If this is wrong place for this comment/question, sorry, it seemed to close to what I needed, so....
In the install instructions and the text of this issue it says "In order to prevent the accidental installation of API wrappers with breaking changes, it is highly recommended that you pin to the latest version yourself prior to using this library in production." But there's no explanation (references, links, etc.) on how to do this. Can this be added?
Also, can you simply give me a link, or some other clue as to how to do this?

@bshaffer
Copy link
Contributor

bshaffer commented May 11, 2020

@veperr You can find the latest release of the google/apiclient-services package here:

https://github.com/googleapis/google-api-php-client-services/releases

Then you can pin to the latest version by running the following command:

composer require google/apiclient-services:0.134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants