Skip to content

ext-uri removing the host #20431

Closed
Closed

Description

@nyamsprod

Description

The following code:

<?php
echo Uri\Rfc3986\Uri::parse("https://example.com")->withHost(null)->toRawString(), PHP_EOL;
echo Uri\Rfc3986\Uri::parse("https://example.com/")->withHost(null)->toRawString(), PHP_EOL;

Resulted in this output:

http:/
http:/

But I expected this output instead:

http:
http:/

PHP Version

not relevant

Operating System

No response

Activity

  1. TimWolla commented on Nov 9, 2025

    @TimWolla
    Member

    This is quite similar, but not exactly the same as: uriparser/uriparser#249 (comment)

  2. TimWolla commented on Nov 9, 2025

    @TimWolla
    Member

    Filed an upstream issue at uriparser/uriparser#275 and marking this as a duplicate of the upstream issue.

  3. added a commit that references this issue on Nov 11, 2025
    dc845f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions