• Resolved smarterdigitalltd

    (@smarterdigitalltd)


    Hello

    This is possibly related to: https://github.com/bporcelli/simplesalestax/issues/139

    We started using TaxCloud + Simple Sales Tax recently. Initially, it seemed fine, but in the last few days we’ve started to get this error – perhaps an update elsewhere.

    My understanding of the issue is that SST includes Guzzle version 6, but somewhere in my codebase exists Guzzle version 7. In both instances, the namespace is likely the same: GuzzleHttp\\etc and various conflicts are happening.

    I’ve seen similar syntax-only issues with other plugins where there is a conflict between dependencies simply because a return type wasn’t specified on a method, even if the body of the method is no different between versions.

    We’ve worked around it by essentially making our own plugin comprised of Simple Sales Tax and a manually-included phptaxcloud library, but with Guzzle’s version set to > v7 in it’s composer.json. This seems to work fine – but of course we’re now maintaining a custom plugin which isn’t ideal.

    Is there a plan to update the Guzzle dep to v7+? I can see your repo for phptaxcloud it is deprecated in favor of official SDKs but from what I can see they use the older version of Guzzle too!

    One idea that I also wanted to propose – though I’ve not tested with your plugin – is to use https://github.com/coenjacobs/mozart

    It scopes the namespace of your Composer dependencies (which in a perfect world all WP plugins would have to abide by!); the idea being the bundled version of Guzzle would no longer have a namespace of GuzzleHttp but instead SimpleSalesTax\\GuzzleHttp.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Brett Porcelli

    (@bporcelli)

    Hi,

    Just wanted to let you know that I have a new version of SST in the works that drops the dependency on Guzzle completely. It should resolve this conflict. I’m hoping to get it released sometime next week.

    Brett

    Thread Starter smarterdigitalltd

    (@smarterdigitalltd)

    Thanks for taking a look at this Brett! Let me know if I can help test (though the issue we were getting was, ostensibly, intermittent..)

    Plugin Author Brett Porcelli

    (@bporcelli)

    Update: The Guzzle dependency was dropped in SST v8.0.0, which was just released. Upgrading to v8.0.0 or later should resolve any Guzzle version conflicts between SST and other plugins or themes.

    Thread Starter smarterdigitalltd

    (@smarterdigitalltd)

    Thanks very much for the update + heads up @bporcelli – we will check it out in due course.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal Error: Declaration of GuzzleHttp\Psr7\Uri::getScheme() must be…’ is closed to new replies.