[php-src] Issue #19896: Uri::withPath is not compliant with RFC3986 - example1

From: Date: Sat, 20 Sep 2025 11:35:49 +0000
Subject: [php-src] Issue #19896: Uri::withPath is not compliant with RFC3986 - example1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250864@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19896 Author: nyamsprod ### Description The following code: ```php <?php use Uri\Rfc3986\Uri; echo (new Uri(''))->withPath(':/')->toString(); ``` Resulted in this output: ``` ./:/ ``` But I expected this output instead: ``` Uri\InvalidUriException should be thrown because in absence of a scheme and an authority the first path segment cannot contain a colon (":") character ``` ### PHP Version ```plain Runtime: PHP 8.5.0-dev ``` ### Operating System _No response_

« previous php.bugs (#250864) next »