Code Monkey home page Code Monkey logo

Comments (6)

vredeling avatar vredeling commented on August 25, 2024

This will need to happen eventually anyway. So yes, let's do a quick scan of the outdated code so we have a sense of the scope. Looks quite involved at first glance.

from stravaphp.

djjavo avatar djjavo commented on August 25, 2024

The diff might look very big but 95% of Guzzle users will be able to upgrade without modification. Please see the upgrade document that describes all BC breaking changes.

It seems like the diff from 6.x to 7 looks large, but the actual changes to the implementation will be small - we might not even need any.

Out of the upgrade guide linked above, as the only main method used in the codebase is request() I can only see the following as changes that may impact StravaPHP:

  • Request option exception is removed. Please use http_errors.
  • Request option save_to is removed. Please use sink.
  • The get, head, put, post, patch, delete, getAsync, headAsync, putAsync, postAsync, patchAsync, and deleteAsync methods are now implemented as genuine methods on GuzzleHttp\Client, with strong typing. The original __call implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation.

from stravaphp.

djjavo avatar djjavo commented on August 25, 2024

The only issue I am seeing so far is on the getRouteAsGPX and getRouteAsTCX methods as request() should now return a ResponseInterface, whereas these apparently return a String.

from stravaphp.

vredeling avatar vredeling commented on August 25, 2024

I'm using this library with Drupal exclusively and Drupal core 8 and 9 are using Guzzle 6. The upgrade to Guzzle 7 is postponed to Drupal 10. That will be released somewhere in the second half of 2022.
I can merge and review your MRs but I don't see myself putting a lot of effort in porting it to Guzzle 7 right now. I'm happy to accept patches though. And in the meantime I propose we use a different branch and separate version numbers for tagging the Guzzle 7 compatible releases of stravaphp. We could maintain 2 separate versions of the code base if necessary so long as the code doesn't differ all that much.

from stravaphp.

vredeling avatar vredeling commented on August 25, 2024

@djjavo I've created a separate guzzle7 branch and updated packagist. You can require basvandorst/stravaphp:^dev-guzzle https://packagist.org/packages/basvandorst/stravaphp#dev-guzzle7
Hope that will suffice for now.

from stravaphp.

vredeling avatar vredeling commented on August 25, 2024

@djjavo The Drupal upgrade path came earlier than expected. So I'm going to merge this into a 2.x release when I finally get around to fixing #21.

from stravaphp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.