websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

Fix League\Uri\Http deprecation warning

Open foxycode opened this issue 10 months ago • 2 comments

Fixes this warning:

User Deprecated: Method League\Uri\Http::createFromString()
    is deprecated since league/uri:7.0.0, use League\Uri\Http::new() instead

foxycode avatar Apr 10 '25 12:04 foxycode

This needs a change in composer.json to drop 6.x support, no?

kelunik avatar Jun 05 '25 19:06 kelunik

@kelunik You are right. Didn't notice that earlier. Should I add the change?

foxycode avatar Jun 09 '25 05:06 foxycode

@foxycode @kelunik

The fix looks good, but it's missing the required composer.json change that @kelunik mentioned.

To complete this PR, line 39 in composer.json needs to change from:

"league/uri": "^6.8|^7.1",

to:

"league/uri": "^7.1",

This change is necessary because Uri\Http::new() was only introduced in league/uri 7.0.0.

I've documented this issue thoroughly here: https://github.com/eduwass/deprecated-repro

@foxycode Would you like to add this change to your PR, or would you prefer if I submitted the complete fix in a new PR?

This is affecting Pest v4 browser testing users, so it would be great to get this resolved. See: https://github.com/pestphp/pest/issues/1470

eduwass avatar Aug 24 '25 16:08 eduwass

@eduwass Just made the required changes. @foxycode Thanks!

kelunik avatar Aug 24 '25 17:08 kelunik

Awesome, thanks so much to both of you @kelunik @foxycode !

eduwass avatar Aug 24 '25 17:08 eduwass

And tagged a new release, v2.0.2 is out now. :-)

kelunik avatar Aug 24 '25 17:08 kelunik

Just tested!

The issue I was running into ( https://github.com/pestphp/pest/issues/1470 ) is now fixed, thanks for the quick turnaround @kelunik 👏

eduwass avatar Aug 24 '25 17:08 eduwass

Awesome, thank you guys

foxycode avatar Aug 25 '25 09:08 foxycode