Skip to content

Conversation

@foxycode
Copy link
Contributor

Fixes this warning:

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

Fixes this warning:
```
User Deprecated: Method League\Uri\Http::createFromString()
    is deprecated since league/uri:7.0.0, use League\Uri\Http::new() instead
```
@kelunik
Copy link
Member

kelunik commented Jun 5, 2025

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

@foxycode
Copy link
Contributor Author

foxycode commented Jun 9, 2025

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

@eduwass
Copy link

eduwass commented Aug 24, 2025

@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: pestphp/pest#1470

@kelunik kelunik merged commit dc033fd into amphp:2.x Aug 24, 2025
6 checks passed
@kelunik
Copy link
Member

kelunik commented Aug 24, 2025

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

@eduwass
Copy link

eduwass commented Aug 24, 2025

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

@kelunik
Copy link
Member

kelunik commented Aug 24, 2025

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

@eduwass
Copy link

eduwass commented Aug 24, 2025

Just tested!

The issue I was running into ( pestphp/pest#1470 ) is now fixed, thanks for the quick turnaround @kelunik 👏

@foxycode
Copy link
Contributor Author

Awesome, thank you guys

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants