-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
$cakeRequest->url((string) $request->getUri()); | ||
$cakeRequest->version($request->getProtocolVersion()); | ||
$cakeRequest->body($request->getBody()->getContents()); | ||
$cakeRequest = new Request( |
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.
Do we need to create a new Request if CachePHP 3.4 supports PHP7?
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.
Yes unfortunately Cake's HTTP client's method argument is typehinted as the concrete class Cake\Http\Client\Request
instead of PSR7's interface. So for the time being this is required.
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.
Hm, okej. Thanks.
Thank you. I think this is a good idea. Just make sure the tests are green and I'll be happy to review and merge. |
composer.json
Outdated
@@ -14,7 +14,7 @@ | |||
"php": "^5.5 || ^7.0", | |||
"php-http/httplug": "^1.0", | |||
"php-http/discovery": "^1.0", | |||
"cakephp/cakephp": "^3.1" | |||
"cakephp/cakephp": "^3.4" |
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.
Use 3.4.5 and the test will pass.
Versions before 3.4.5 had wrong dependencies.
hm, more errors. Try bumping the versions even more then =) |
🎉 |
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.
Awesome. There is just a code style fix.
I think this looks good and I will merge this one if not @joelwurtz disagrees
src/Client.php
Outdated
|
||
if (null === $cakeRequest->header('Content-Type')) { | ||
if ($cakeRequest->header('Content-Type') === null) { |
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.
We should use "yoda" syntax. Please revert this change.
Also. It would be great if you added a comment in the changelog for 0.2.0 |
I'll leave it to use guys to add appropriate info to changelog 😄 |
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.
Thank you
What's in this PR?
CakePHP dependency has been updated to 3.4
Why?
CakePHP 3.4 supports PSR7 so lesser code is required by this adapter. Easier maintenance :)
Checklist