Skip to content

Conversation

@robertoarruda
Copy link

@robertoarruda robertoarruda commented May 18, 2019

PHP Guzzle generator #132

}

module.exports.info = {
key: 'guzzle6',
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not typical to specify a library version in the target name. Would remove, while you could keep it in the description. If we ever need to support other versions of guzzle, we can decide how best to support them, possibly via options if the syntax isn't too different

Copy link
Author

Choose a reason for hiding this comment

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

Okay, I agree too!
I'll do it

@darrenjennings
Copy link
Contributor

If you are able, it would also be nice to install guzzle on our CI and add it to these files so that we can run the snippets in a real environment to ensure they are working (currently only doing this for a few targets):

https://github.com/Kong/httpsnippet/blob/master/test/fixtures/cli.json#L14
https://github.com/Kong/httpsnippet/blob/master/.travis.yml#L10

@darrenjennings
Copy link
Contributor

@robertoarruda looking good! though the php clients array in cli.json needs to be updated so that the request validations run for guzzle. It's been a while since I've done PHP but, looks like you might need a bootstrap script which invokes the fixtures, so it can run composer's vendor autoload.php file, in order that the GuzzleHttp\Client class will be available. It looks like the scripts are indeed passing if this is the case.

@CLAassistant
Copy link

CLAassistant commented Dec 6, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@reynolek
Copy link
Contributor

@robertoarruda Hi! I saw @erunion approved this PR today and it drew my attention to it. Is this still something that you would like to get merged in? If so, would you mind resolving conflicts, and signing the above CLA and I can get it merged.

Thanks!

@robertoarruda
Copy link
Author

@robertoarruda Hi! I saw @erunion approved this PR today and it drew my attention to it. Is this still something that you would like to get merged in? If so, would you mind resolving conflicts, and signing the above CLA and I can get it merged.

Thanks!

Sure! It's solved.

Copy link
Contributor

@erunion erunion left a comment

Choose a reason for hiding this comment

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

Super minor thing to clean up some of these snippets with no params but otherwise this still looks good!


$client = new \GuzzleHttp\Client();

$response = $client->request('PROPFIND', 'http://mockbin.com/har', [
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update the target to only add the third param if it's got content? Should clean this example up a touch.

@erunion
Copy link
Contributor

erunion commented May 1, 2021

@robertoarruda Sorry, could you update the Guzzle target as well with this change? Tests are currently failing because they're generating snapshots that match the old style.

@dimitropoulos
Copy link
Contributor

#253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants