-
Notifications
You must be signed in to change notification settings - Fork 625
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: Reduce excessive comments in code examples #984
docs: Reduce excessive comments in code examples #984
Conversation
Updated code base from upstream repository
Update repository using sendgrid/master
Sync local repository using original
Update repository using sendgrid/master
Sync local repository using original
Sync local repository using original
Sync forked repository using original
PHP CS Fixer fixes Docs: Import classes instead of namespace\class Line length reductions Prece(n)dence typos Remove PHP tailing '?>' tags Examples pending for migration: senderauthentication, contactdb
README.md
Outdated
// replacing <PATH TO> with the path to the sendgrid-php.php file, | ||
// which is included in the download: | ||
// https://github.com/sendgrid/sendgrid-php/releases | ||
// Uncomment next line if you're not using a dependency loader (such as Composer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, a bit of context. We had a period where were getting a steady stream of issues at our support channel with confusion on installation, which virtually went away with this updated content. So I'm nervous about removing it entirely, but I do agree it's still verbose and likely not necessary for the majority of use cases.
Above this line, I think we should still include:
require 'vendor/autoload.php'; // If you're using Composer (recommended)
Then, something like:
// Comment out the above line and uncomment the next line if you're not using a dependency loader (such as Composer)
And for this part:
// download sendgrid-php.zip from the latest release here,
// replacing <PATH TO> with the path to the sendgrid-php.php file,
// which is included in the download:
// https://github.com/sendgrid/sendgrid-php/releases
we can move those instructions to https://github.com/sendgrid/sendgrid-php/blob/master/README.md#install-package where we can then link from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and made the changes.
// Uncomment next line if you're not using a dependency loader (such as Composer) | ||
// require_once '<PATH TO>/sendgrid-php.php'; | ||
|
||
use SendGrid\Mail\Mail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes
Fixes #981
As mentioned, a lot of excessive comments are in example files and docs. I've reduced comments as much as possible.
Also:
sendgrid-php.php
in project root, instead of requiring an adjustment in the file to adjust path tovendor/autoload.php
- which may not exists ifcomposer install
isn't executed after pulling library from Git repository.sendgrid-php.php
Checklist