Skip to content

Call to undefined method Uri\Rfc3986\Uri::withScheme() #19532

Closed

Description

@arshidkv12

Description

The following code:

$uri1 = new Uri\Rfc3986\Uri("HTTPS://example.com");
 
$uri1 = $uri1->withScheme('http');

echo $uri1->getScheme();

Resulted in this output:

Fatal error: Uncaught Error: Call to undefined method Uri\Rfc3986\Uri::withScheme() in /Users/arshid/Desktop/php85-src/test.php:13
Stack trace:
#0 {main}
  thrown in /Users/arshid/Desktop/php85-src/test.php on line 13

But I expected this output instead:

http

PHP Version

PHP 8.5.0-dev (cli) (built: Aug 20 2025 17:13:41) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.0-dev, Copyright (c), by Zend Technologies

Operating System

Mac

Activity

  1. iluuu1994 commented on Aug 20, 2025

    @iluuu1994
    Member

    I believe wither support is still missing. Reference: #14461 (comment) /cc @kocsismate

  2. kocsismate commented on Aug 20, 2025

    @kocsismate
    Member

    Yes, it is still in progress. We are waiting for the third party library to implement the feature first, and then I'll add support for it in ext/uri.

  3. TimWolla commented on Aug 20, 2025

    @TimWolla
    Member

    I don't think it is useful to keep this issue open, since it's not really a bug that can be fixed and missing with-ers for RFC 3986 are known.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions