Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Reset request headers after send - #164

Merged
sanpii merged 1 commit into
Behatch:masterfrom
vincentchalamon:master
Jul 24, 2017
Merged

Reset request headers after send#164
sanpii merged 1 commit into
Behatch:masterfrom
vincentchalamon:master

Conversation

@vincentchalamon

@vincentchalamon vincentchalamon commented Mar 26, 2016

Copy link
Copy Markdown
Contributor
Q A
Bug fix? yes
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #163
License BEER-WARE

Requires FriendsOfPHP/Goutte#261

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

Ping @sanpii

@MLKiiwy

MLKiiwy commented Apr 4, 2016

Copy link
Copy Markdown

looks good 👍

@sanpii

sanpii commented Apr 4, 2016

Copy link
Copy Markdown
Member

Can you add a scenario to prevent regression?

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

@sanpii OK I'm on it. Do you have an idea how can I test with different Behat configurations? I would like to test with different clients (Goutte vs BrowserKit)

@sanpii

sanpii commented Apr 4, 2016

Copy link
Copy Markdown
Member

@vincentchalamon you can create a second behat configuration and use -c option to load it.

@ihorsamusenko

Copy link
Copy Markdown

Why can't we create new instance of Sanpi\Behatch\HttpCall\Request each time it is requested ?

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

@samusenkoiv You mean in RestContext?

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

@samusenkoiv Originally, Sanpi\Behatch\HttpCall\Request::getClient method recreates a request each time it's Sanpi\Behatch\HttpCall\Request receive any action (__call magic method). But if you request 2 methods on it (e.g. to add 2 headers), the first one will be lost as Request is recreated…

@webaaz

webaaz commented Nov 10, 2016

Copy link
Copy Markdown

Need this fix!

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

Still waiting for FriendsOfPHP/Goutte#261

fabpot added a commit to FriendsOfPHP/Goutte that referenced this pull request Nov 15, 2016
This PR was squashed before being merged into the 3.1-dev branch (closes #261).

Discussion
----------

Reset headers

Required by Behatch/contexts#164
See Behatch/contexts#163

Commits
-------

08724f1 Reset headers
@vincentchalamon

vincentchalamon commented Nov 15, 2016

Copy link
Copy Markdown
Contributor Author

@sanpii @webaaz Current project requires PHP >=5.4, but fabpot/goutte requires PHP >=5.5. Can I upgrade this dependency in .travis.yml & composer.json files for production, or should I only force it for testing?

@webaaz

webaaz commented Nov 16, 2016

Copy link
Copy Markdown

http://php.net/supported-versions.php

@webaaz

webaaz commented Nov 16, 2016

Copy link
Copy Markdown

There's a 3.2 tag for goutte

@vincentchalamon

vincentchalamon commented Nov 17, 2016

Copy link
Copy Markdown
Contributor Author

Scrutinizer failed to analyze atoum/atoum and recommended me to exclude it from analysis. @sanpii @webaaz Maybe is there a better way?

capture d ecran 2016-11-17 a 13 26 34

capture d ecran 2016-11-17 a 13 26 44

@elkangaroo

Copy link
Copy Markdown

Is there still anything preventing this fix from getting merged? This would also make PR #157 obsolete (which we currently use in our fork).

@sanpii sanpii added this to the 3.x milestone Mar 2, 2017
@elkangaroo

elkangaroo commented Mar 31, 2017

Copy link
Copy Markdown

@vincentchalamon would you mind rebasing your branch against master and solve the conflict again? It would be really great to get this PR merged :)

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

@elkangaroo Fixed

@elkangaroo

Copy link
Copy Markdown

@sanpii I see that the only failing test has been failing occasionally on other builds too (and should probably be adjusted, because it makes the build unstable):

001 Scenario: Wait before seeing                                # tests/features/browser.feature:63
      Then the total elapsed time should be less than 6 seconds # tests/features/browser.feature:69

But other than that, do you think this PR can be merged?

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

@elkangaroo I'll try to update this PR today to remove deprecated warnings: https://travis-ci.org/Behatch/contexts/jobs/217980052

@vincentchalamon

vincentchalamon commented Apr 11, 2017

Copy link
Copy Markdown
Contributor Author

@elkangaroo @sanpii Deprecated warnings fixed on Travis, I think it was due to forgotten namespaces on 86d0b77.
Please review to check I didn't break something bad ^^'

@elkangaroo

Copy link
Copy Markdown

Nice :)
But this 6 seconds test really sucks...
First it failed for PHP 5.5, now 5.5 is green and 5.6 - 7.1 fail. LOL

@sanpii

sanpii commented Apr 13, 2017

Copy link
Copy Markdown
Member

But this 6 seconds test really sucks...

It sucks less now: c9ec184

@vincentchalamon

Copy link
Copy Markdown
Contributor Author

Ping @sanpii

@sanpii
sanpii self-requested a review April 28, 2017 12:31
@razbakov

razbakov commented May 9, 2017

Copy link
Copy Markdown
Contributor

Any update here? FriendsOfPHP/Goutte#261 is merged.

@razbakov razbakov mentioned this pull request May 9, 2017
Comment thread src/HttpCall/Request/Goutte.php
@sanpii
sanpii merged commit 4cc6cfc into Behatch:master Jul 24, 2017
@razbakov

razbakov commented Aug 21, 2017

Copy link
Copy Markdown
Contributor

@vincentchalamon @sanpii can you please add a new release tag?

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.

7 participants