Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API

From: Date: Mon, 28 Apr 2025 07:05:29 +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  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Maté,

I found another typo in the RFC examples due to the use of boolean as
parameters

// The fragment component of Uri\WhatWg\Url can also be taken into
account$url = new
Uri\WhatWg\Url("https://example.com#foo");$url->equals(new
Uri\WhatWg\Url("https://example.com"), true); //
false

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.

Best regards,
Ignace Nyamagana Butera


On Mon, Apr 28, 2025 at 12:35 AM Tim Düsterhus <[email protected]> wrote:

> Hi
>
> On 4/27/25 23:47, Máté Kocsis wrote:
> > […]
>
> Thank you. I have just given the RFC another full read (the 2025/04/27
> 21:44 version) and I do not have any further remarks. I'm happy with
> everything that is said in the RFC and I'm really looking forward to
> vote “Yes” :-)
>
> Best regards
> Tim Düsterhus
>


Thread (139 messages)

« previous php.internals (#127218) next »