Invalid State Error after Upgrading from Auth0 PHP SDK v7 to v8

Ah, I guess it must be php-http/discovery causing it to be installed. I’ve never seen it cause issues quite like that, but I don’t recommend using it, anyway.

Go ahead and set php-http/discovery to false in your composer.json. Then repeat deleting your composer.lock file and vendor subdirectory, and then try re-running composer install. That should take care of that Guzzle error, at least.

Next, the SDK requires PSR-7, PSR-17, and PSR-18 dependencies for creating, sending, and handling network requests.

Right now, you have nyholm/psr7 imported, which is a great library and takes care of the PSR-7 and PSR-17 requirements. In addition, you’ll also require a dependency that handles PSR-18. There are plenty of options out there but I’m fond of kriswallsmith/buzz just because it’s so lightweight. You can add it to your project by running composer require kriswallsmith/buzz.

That should (fingers crossed) resolve those networking woes.