Skip to content

uri_percent_encode is missing #25866

Todo

Description

@nyamsprod

Description

According to the The RFC
The following function and Enum should be present in PHP8.6

namespace Uri\Rfc3986 {
    enum UriPercentEncodingMode
    {
        case UserInfo;
        case RegisteredNameHost;
        case Path;
        case PathSegment;
        case Query;
        case FormQuery;
        case Fragment;
        case AllReservedCharacters;
        case AllButUnreservedCharacters;
    }
 
    function uri_percent_encode(string $input, \Uri\Rfc3986\UriPercentEncodingMode $mode): string {}
}

But when I check the source code I fail to see the Enum, the function or any tests for them ?

PHP Version

PHP 8.6

Operating System

No response

Activity

  1. kocsismate commented on Nov 28, 2026

    @kocsismate
    Member

    Hi @nyamsprod ,

    Yes, unfortunately, my initial PR to the upstream uriparser library struck in review phase (uriparser/uriparser#337), so this feature was not implemented after all :( That's why I had to keep the RFC in a pending phase... But I'll definitely want to address this shortcoming in the next minor PHP version.

  2. nyamsprod commented on Nov 28, 2026

    @nyamsprod
    ContributorAuthor

    Thanks for the response I will keep my polyfill present in the package but I will remove the PHP version constraint for now else my tests are failing on PHP8.6+ .
    I will re-add the constraint once your implementation lands in the source code

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