Skip to content

Inconsistent percent encoding behavior on polyfill #177

@jnoordsij

Description

@jnoordsij

Bug Report

(Fill in the relevant information below to help triage your issue.)

Information Description
Package polyfill
Version 7.7.0
PHP version 8.4 vs 8.5
OS Platform n/a

Summary

(Please explain in plain english your bug)
While working on an upstream PR on Laravel to implement the Uri polyfill to allow for modern code at laravel/framework#58132, I noticed some failing tests due to an inconsistency of behavior in the encoding/decoding of an encoded percent sign (%25) inside user credentials. See e.g. https://github.com/laravel/framework/actions/runs/20230789450/job/58072954830?pr=58132#step:7:269.

Standalone code, or other way to reproduce the problem

(Please complete the text below to help us fix the issue)

I'll provide a follow-up PR that introduces a test behaving differently between polyfill (PHP 8.4 and below) and PHP 8.5 native implementation: see #178.

Expected result

(What was the expected (correct) behavior?)

From what I can gather, the native implementation seems to be correct and the polyfill should match this.

Actual result

(What is the current (buggy) behavior?)

Inconsistent behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions