[php-src] Issue #19532: Call to undefined method Uri\Rfc3986\Uri::withScheme()

From: Date: Wed, 20 Aug 2025 12:17:51 +0000
Subject: [php-src] Issue #19532: Call to undefined method Uri\Rfc3986\Uri::withScheme()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250584@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19532 Author: arshidkv12 ### Description The following code: ```php $uri1 = Uri\Rfc3986\Uri::parse("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 ```plain 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

« previous php.bugs (#250584) next »