Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Updates for new Buzz lib and PSR-7 requests & responses #168

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

NoelLH
Copy link

@NoelLH NoelLH commented Apr 5, 2018

  • Updates to work with Buzz v0.17+, PSR-7 requests & responses, and middleware over listeners
  • Specify more explicit dependency versions
  • Minor tidying

Fixes #167

@NoelLH
Copy link
Author

NoelLH commented Apr 5, 2018

@richsage I see that Buzz now also require PHP 7.1+. While this is a bit aggressive they had also already moved to 5.4+ previously so the requirements were already out of sync. For now I'm going to propose moving this lib to PHP 7.1+ in this PR too, since supporting both old & new Buzz versions in the same branch would require a lot of duplicate logic.

// We'll need to set this per-request if `$client` was provided in constructor.
$this->clientOptions = array(
'timeout' => $timeout,
'verify_peer' => false,
Copy link

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Good spot @jhkchan. I see here this option is actually also being used to toggle CURLOPT_SSL_VERIFYHOST too. This means the result is actually a further weakening of security checks vs. the old setVerifyPeer(false) call.

But since the new Buzz doesn't let you separate the two, and I am assuming there was a reason for the old option call, changing to the new option seems like the only safe fix for now.

This will disable both peer and host SSL verification by cURL
"psr/log": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27",
"symfony/symfony": "^2.0 || ^3.0"
Copy link

@GenieTim GenieTim Aug 1, 2018

Choose a reason for hiding this comment

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

Can we have || ^4.0 too, when we are on it, or are there too many breaks?

(Even better, to support Flex, remove symfony/symfony and restrict to the relevant components...)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants