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

Update to Guzzle 5 #10

Open
bakura10 opened this issue Jul 1, 2014 · 29 comments
Open

Update to Guzzle 5 #10

bakura10 opened this issue Jul 1, 2014 · 29 comments

Comments

@bakura10
Copy link
Member

bakura10 commented Jul 1, 2014

No description provided.

@mohdsadiq1
Copy link

i am having following error while calling StripeClientTest('My_Api_Key');

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /var/www/survival/vendor/zfr/zfr-stripe/tests/ZfrStripeTest/Client/StripeClientTest.php on line 29

please let me know what i am doing wrong

@bakura10
Copy link
Member Author

Why are you using the test client ? You should use the Stripe Client (\ZfrStripe\Client\StripeClient)

Envoyé de mon iPhone

Le 13 oct. 2014 à 12:55, mohdsadiq1 notifications@github.com a écrit :

i am having following error while calling StripeClientTest('My_Api_Key');

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /var/www/survival/vendor/zfr/zfr-stripe/tests/ZfrStripeTest/Client/StripeClientTest.php on line 29

please let me know what i am doing wrong


Reply to this email directly or view it on GitHub.

@mohdsadiq1
Copy link

as with the Stripe Client (\ZfrStripe\Client\StripeClient) i am not able the use the test credit cards and
i need to test all the param return by stripe so that i can update my
record on successful payment , i am very new to zf2 and stripe also

On Mon, Oct 13, 2014 at 4:38 PM, Michaël Gallego notifications@github.com
wrote:

Why are you using the test client ? You should use the Stripe Client
(\ZfrStripe\Client\StripeClient)

Envoyé de mon iPhone

Le 13 oct. 2014 à 12:55, mohdsadiq1 notifications@github.com a écrit
:

i am having following error while calling
StripeClientTest('My_Api_Key');

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in
/var/www/survival/vendor/zfr/zfr-stripe/tests/ZfrStripeTest/Client/StripeClientTest.php
on line 29

please let me know what i am doing wrong


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#10 (comment).

Regards:
MOHD SADIQ
8802720277

@bakura10
Copy link
Member Author

Testing an API is always hard. I think the simplest way is to simply "simulate" an API response by saving the response into an array.

I'm not sure to understand your problem actually :p

Envoyé de mon iPhone

Le 13 oct. 2014 à 15:33, mohdsadiq1 notifications@github.com a écrit :

i need to test all the param return by stripe so that i can update my
record on successful payment , i am very new to zf2 and stripe also

On Mon, Oct 13, 2014 at 4:38 PM, Michaël Gallego notifications@github.com
wrote:

Why are you using the test client ? You should use the Stripe Client
(\ZfrStripe\Client\StripeClient)

Envoyé de mon iPhone

Le 13 oct. 2014 à 12:55, mohdsadiq1 notifications@github.com a écrit
:

i am having following error while calling
StripeClientTest('My_Api_Key');

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in
/var/www/survival/vendor/zfr/zfr-stripe/tests/ZfrStripeTest/Client/StripeClientTest.php
on line 29

please let me know what i am doing wrong


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#10 (comment).

Regards:
MOHD SADIQ
8802720277

Reply to this email directly or view it on GitHub.

@Ocramius
Copy link
Member

He's using a test file in his own project, while that file shouldn't be used in first place except from zf-fr/zfr-stripe.

@Ocramius
Copy link
Member

Update to Guzzle 4

Artax plox :P

@bakura10
Copy link
Member Author

Especially when Guzzle 5 was released today :( :too_much_major_versions:

@bakura10 bakura10 changed the title Update to Guzzle 4 Update to Guzzle 5 Oct 13, 2014
@Ocramius
Copy link
Member

png image 600 x 600 pixels

@bakura10
Copy link
Member Author

Guzzle 4 was supposed to be "the major version for the next few years" :trollface:

@Ocramius
Copy link
Member

Major versions happen: 🎱 🎲

@bakura10
Copy link
Member Author

It's understandable for Guzzle (because of PSR-7... I hope the spec won't move now :/)

@Ocramius
Copy link
Member

The spec isn't stable yet :-\

@ukaner
Copy link

ukaner commented Feb 5, 2015

I get this as well;

zfr/zfr-stripe v2.9.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.6.0, v3.7.0, v3.7.1, v3.7.2, v3.7.3, v3.7.4, v3.8.0, v3.8.1, v3.9.0].

@bakura10
Copy link
Member Author

bakura10 commented Feb 6, 2015

hhmm this should work haha :p. I don't have any issue using ZfrStripe, can you please show me your full composer.json file ?

@joshhornby
Copy link

I am also getting the issue that @ukaner mentioned.

    "require": {
        "laravel/framework": "4.2.*",
        "dingo/api": "0.8.*",
        "lucadegasperi/oauth2-server-laravel": "3.*",
        "league/flysystem": "~1.0",
        "aws/aws-sdk-php": "~2.7",
        "league/flysystem-aws-s3-v2": "~1.0",
        "aws/aws-sdk-php-laravel": "~1.1",
        "league/commonmark": "0.6.*",
        "laravel/cashier": "2.0.*"
    },
zfr/zfr-stripe v2.12.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.6.0, v3.7.0, v3.7.1, v3.7.2, v3.7.3, v3.7.4, v3.8.0, v3.8.1, v3.9.0].

@bakura10
Copy link
Member Author

Grrr I don't understnad, it's working perfectly here. V3.9 should indeed match isn't it ? :(

@bakura10
Copy link
Member Author

Can you try forcing guzzle to 3.9 in your composer JSON? I'm wondering if another dependency of yours does not force a guzzle version prior 3.6 (if that's the case, you should ask those maintainers to allow newer versions)

@joshhornby
Copy link

Very odd, I have updated my composer like so:

"guzzle/guzzle": "3.9.*"

And I now get this

 Problem 1
    - zfr/zfr-stripe v2.0.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.0.1 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.0.2 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.0.3 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.0.4 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.1.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.10.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.10.1 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.10.2 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.11.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.11.1 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.12.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.2.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.2.1 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.2.2 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.2.3 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.2.4 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.1 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.2 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.3 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.4 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.5 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.3.6 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.4.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.5.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.6.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.7.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.8.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.8.1 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - zfr/zfr-stripe v2.9.0 requires guzzle/guzzle >=3.6,<=3.9 -> satisfiable by guzzle/guzzle[v3.9.0].
    - Conclusion: don't install guzzle/guzzle v3.9.0
    - Installation request for zfr/zfr-stripe 2.* -> satisfiable by zfr/zfr-stripe[v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.1.0, v2.10.0, v2.10.1, v2.10.2, v2.11.0, v2.11.1, v2.12.0, v2.2.0, v2.2.1, v2.2.2, v2.2.3, v2.2.4, v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.4.0, v2.5.0, v2.6.0, v2.7.0, v2.8.0, v2.8.1, v2.9.0].

@bakura10
Copy link
Member Author

Mehhhh... There is some black magic happening.

Can you try to remove zfr-stripe from your composer.josn and instead add "zfr/zfr-stripe-module": ~3.0 ?

This is exactly what I have in my application and it's working correctly. I honestly don't explain it myself. the strangest is that it does not report any conflicting libraries. Only that zfr stripe request 3.9, but cannot use 3.9 u_u

@joshhornby
Copy link

Same error again, one of these packages must be breaking it.

@bakura10
Copy link
Member Author

I had a look at all your direct dependencies, and none of them require Guzzle directly (except the AWS SDK but it requires Guzzle ~3.7, which should resolve). I'm going to push an update of ZfrStripe to have a simpler dependency to Guzzle (~3.6 instead of an explicit range). I did that in the past because Guzzle used to introduce BC even if minor versions, but as Guzzle 5 is out, I suspect they won't change it now.

@bakura10
Copy link
Member Author

I've just tagged v2.12.1, which requires guzzle ~3.6 instead of >=3.6,<=3.9.

Can you try again (just wait a few minutes so that Packagist correctly update everything)

@joshhornby
Copy link

Seems to be working now 👍

@bakura10
Copy link
Member Author

Yeah \o/. Thanks!

@lunetics
Copy link

what about guzzle6? 💃

@bakura10
Copy link
Member Author

Still waiting for Guzzle services to be available in v6 :). Guzzle commands have been updated to v6 but Guzzle services (which ZfrStripe relies on) not yet. You can see their branch here: https://github.com/guzzle/guzzle-services/tree/guzzle6

@sisve
Copy link

sisve commented Jan 2, 2017

Huzzah! guzzle/guzzle-services@3bdd887

@bakura10
Copy link
Member Author

bakura10 commented Jan 2, 2017

Not tagged yet isn't it ? But definitely seeems on good tracks :D

@bakura10
Copy link
Member Author

Oh sorry @sisve , I've didn't realized it was tagged.

Indeed, this means that this package could now be upgraded to Guzzle Services 1.0.0 which rely on Guzzle 6 :). unfortuantely at the moment I really don't have any availability as it's pretty long to upgrade it.

However if anyone would like to take the lead of that, I've already upgraded another package of mine that I need currently to this new version: https://github.com/zf-fr/zfr-shopify. That could serve as a reference for anyone wanting to tackle an upgrade.

The only small problem is that there are still some issues like this one (guzzle/guzzle-services#129) that make me think we should wait a bit :). But if anyone has time, please go on and submit a PR :).

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

No branches or pull requests

7 participants