On Mon, Apr 28, 2025 at 9:05 AM ignace nyamagana butera <nyamsp...@gmail.com>
wrote:

> 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 <t...@bastelstu.be> 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
>>
>
Hi I would propose to use the following Enum in the Uri namespace

 enum UriComparison {

    case IncludeFragment;
    case ExcludeFragment;
}

It is a bit verbose for less error prone and by default the equals
method on both class would use `UriComparison::ExcludeFragment` PS:
naming can change as long

as the enum reduces the errors.

Reply via email to