Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API
| From: | ignace nyamagana butera | Date: | Mon, 28 Apr 2025 21:31:02 +0000 |
| Subject: | Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127234@lists.php.net to get a copy of this message | ||
Hi Maté,
> I fiddled a little bit with the implementation, and I went with the
Uri\UriComparisonMode enum name at last. I hope that it is OK on your side.
If no one objects with your name choice I am fine with it, as long as it is
not a boolean :) I will adapt my polyfill. I think I have no more
remarks from my side of things, great job! Since I do not have the right
to vote I hope this one will pass when time for voting comes!
On Mon, Apr 28, 2025 at 11:21 PM Máté Kocsis <kocsismate90@gmail.com> wrote:
> Hi Ignace,
>
> The $excludeFragment is
true by default so in the example it
> should be
>> false instead. Perhaps using an Enum instead would make the
>> DX easier than using a boolean ?
>> I believe the same issue is in all examples regarding the use of that
>> parameter.
>>
>
> You are right, I completely messed up the value of the $excludeFragment
> variables in the examples. After having thought about your suggestion, I'm
> fine with adding the enum.
> It's a bit verbose indeed, but at least it properly conveys the meaning of
> the parameter, so hopefully it will reduce the number of WTFs when people
> start to use the new API. :)
>
> I fiddled a little bit with the implementation, and I went with the
> Uri\UriComparisonMode enum name at last. I hope that it is OK on your side.
>
> Regards,
> Máté
>