Skip to content
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

add getter for response object #10

Closed
wants to merge 2 commits into from
Closed

Conversation

dready
Copy link

@dready dready commented Jun 22, 2014

so people may introduce their own assertions

so people may introduce their own assertions
@norberttech
Copy link

I believe you should follow PSR-2 standard and use 4 spaces instead of tabs for indention.

@dready
Copy link
Author

dready commented Jun 26, 2014

hi, thanks for the tip. changed all my pull requests to PSR-2 standards.

@arnolanglade
Copy link

What status of this ? Is there a another way to add custom check ?

@dready
Copy link
Author

dready commented Nov 4, 2014

Hi Guys, still waiting for the pull request to be merged. what's the hold up?

@BruceWouaigne
Copy link

Can somebody merge this one please :)

@klaussilveira
Copy link

I'm also interested in this merge. I don't see a reason for the response attribute to be private, also. It should be protected, so child contexts can work with it.

@dready
Copy link
Author

dready commented Feb 5, 2015

hey guys.. come on it's been months and we are only talking about a getter.. i mean, it's just one click away...

what's the hold up?

@StephenGillCoop
Copy link

This would be really useful for me as well.

@dantleech
Copy link
Contributor

This is pretty esential for writing custom assertions I think .. //cc @stof

@@ -59,6 +59,14 @@ public function setClient(Client $client)
}

/**
* @return \GuzzleHttp\Message\ResponseInterface
*/
public function getResponse()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be protected?

Copy link
Author

Choose a reason for hiding this comment

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

why? everything else is public and i see no harm in that.

bests

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I know it is not required outside of the scope of this class, in which case it is always better to encapsulate functionality.

Choose a reason for hiding this comment

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

Protected probably would make sense

Choose a reason for hiding this comment

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

Maybe you could do the same of #27 here:

protected function getResponse()
{
    if (! $this->response) {
        throw new Exception("You must first make a request to check a response.");
    }

    return $this->response;
}

I don't understand why this was not even reviewed, it has 23 comments and almost a year here.
This feature is very useful for custom contexts... Any way, I will probably copy WebApiContext and use it as my base context until this merge... 😢

@tomaszhanc
Copy link

Is there any reason why you don't wanna merged this one?

@klaussilveira
Copy link

Any news on this, @stof?

@AndyWendt
Copy link

Please merge 😄

@mathop
Copy link

mathop commented Mar 25, 2015

It would be very useful for me too. Is there any reason to not merge it?

@AndyWendt
Copy link

The fact that it is public may be an issue since public visibility is probably not needed. But either way it needs to be accessible. I ended up writing my own. I should probably share it.

@dbaltas
Copy link

dbaltas commented Apr 1, 2015

+1 with protected

@ferodss
Copy link

ferodss commented Apr 2, 2015

Please merge 😄 [2]

@RTodorov
Copy link

RTodorov commented Apr 2, 2015

Jun 2014 and it's still not merged? Really?

👍 here.......

@klaussilveira
Copy link

This PR will make anniversary soon. 🎂

@AlmogBaku
Copy link

+1 for that!

@katalisha
Copy link

As a temporary solution you can always fork this project and fix it, then add the fork to your composer.json

"repositories": [{
    "type": "vcs",
    "url": "https://github.com/your-fork-here"
}],

Simply remove the repository when this gets merged/closed to go back to the source.

@farconada
Copy link

merge please

@AndyWendt
Copy link

🍰 Been over a year. Happy birthday.

@yokomizor
Copy link

🍰

@ferodss
Copy link

ferodss commented Jul 20, 2015

Happy birthday 🍰

@dbaltas
Copy link

dbaltas commented Jul 20, 2015

Dear @stof , I consider it professional courtesy to at least reply to this thread.

@mathop
Copy link

mathop commented Jul 20, 2015

🍰 🎉 🎈

@dready
Copy link
Author

dready commented Jul 20, 2015

thx 🍰

@AlmogBaku
Copy link

IMO this PR should not approve, and we need to change this vars/methods to protected

@AndyWendt
Copy link

Changing the vars to protected would be ideal but there hasn't been ANY guidance given from the package maintainer.

@klaussilveira
Copy link

Happy birthday! 🍰

@fernandocarletti
Copy link

Hey guys, we are using this fork with Guzzle 6 support and protected client: https://github.com/LinioIT/behat-web-api-extension :)

@kipelovets
Copy link

🍰

I believe getResponse() should be public so that assertions could be added by other Context classes without inheritance.

Why isn't this PR merged yet?

@mattjanssen
Copy link

👍

Please make the response object available to child classes. Protected or getter; doesn't matter either way. I've had to copy/paste the entire WebApiContext into my own code. Yuck! 🙊

@mattrlong
Copy link

Heres a +1 from 2016. Approaching a two year old PR!

@AlmogBaku
Copy link

AlmogBaku commented May 9, 2016

All these email notification about this issue just reminding me why I ditched PHP

@klaussilveira
Copy link

Should we organize a party on Jun 22?

@jkirkby91
Copy link

@AlmogBaku what because one library is being long about merging a pull request? if you want it that bad just fork it

@dready
Copy link
Author

dready commented Jun 25, 2019

Since nobody cares i close this. It's been too long for just i minor merge. It really shows how to ignore the community. Sorry, but imho this really sucked.

@dready dready closed this Jun 25, 2019
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.