-
Notifications
You must be signed in to change notification settings - Fork 93
Http adapter update #22
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
Conversation
…ion. Updated all examples and compatibility later to reflect these changes.
…ation for using HTTP Adapters.
* The new resource is attached to this object as well as returned | ||
* @return SparkPost\APIResource - the unwrapped resource | ||
*/ | ||
public function setupUnwrapped (string $endpoint) { |
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.
@jasonrhodes: For what its worth, I don't really like the name of this function. Especially since its an externally facing function, I think we should change it but I don't really know what to call it.
@@ -22,25 +22,53 @@ After installing, you need to require Composer's autoloader: | |||
require 'vendor/autoload.php'; | |||
``` | |||
|
|||
## Setting up a Request Adapter |
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 would put an example composer.json file here too so people can just grab it if they want to use these deps, ie
{
"require": {
"sparkpost/php-sparkpost": "~1.0",
"egeloen/http-adapter": "0.8.0",
"guzzlehttp/guzzle": "6.1.0",
"php-http/guzzle6-adapter": "0.1.0"
}
}
For all of the "triple backtick" code blocks, if you use "triple backtick" + php like |
ok this time I promise all of the \t's are gone |
'from'=>'From Envelope <from@sparkpostbox.com>', | ||
'html'=>'<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>', | ||
'text'=>'Congratulations, {{name}}!! You just sent your very first mailing!', | ||
'substitutionData'=>['name'=>'YOUR FIRST NAME'] |
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.
Still missing trailing comma here
@@ -2,6 +2,7 @@ | |||
"name": "sparkpost/php-sparkpost", | |||
"description": "SDK for interfacing with SparkPost APIs", | |||
"license": "Apache 2.0", | |||
"version": "0.2.0", |
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.
This is going to be 1.0 right?
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'm not sure, I want to talk to @richleland and @aydrian about that. I personally think it should be just because this breaks everything existing. But since its still a 0.* I'm not sure, we may be ok with that.
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.
0.* versions have all kinds of problems, the sooner we get to 1.x the better imo, for everything (npm init defaults to 1.0.0 now because of how volatile and weird the semver rules are around 0.x versions)
…coverage filters in phpunit.xml to ignore test files because a utility function wasn't being used
OK tested this locally, still works for sending transmissions, I say |
Major rework including removing dependencies on Guzzle and updating to use an instance based approach instead of a static one. Closes #12 and #20.