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

2025-03-30 Thread Tim Düsterhus
Hi Apologies for getting back to you just now. On 3/2/25 23:00, Máté Kocsis wrote: What happens for Rfc3986 when passing an invalid URI to the constructor? Will an exception be thrown? What will the error array contain? Is it perhaps necessary to subclass Uri\InvalidUriException for use with W

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

2025-03-30 Thread Tim Düsterhus
Hi On 3/12/25 23:00, Máté Kocsis wrote: I'm not sure if I'm entirely correct, but it's possible that a 3rd party URI implementation won't (or cannot) use PHP's memory manager, and it relies on the regular malloc: in this case, even memory errors could lead to failures. We already discussed thi

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

2025-03-30 Thread Tim Düsterhus
Hi Am 2025-03-27 23:49, schrieb Ignace Nyamagana Butera: Hi Máté, for RFC 3986: https://datatracker.ietf.org/doc/html/rfc3986#section-5.3), and then this string is parsed and validated. Unfortunately, I recently realized that this approach may leave room for some kind of parsing

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

2025-03-30 Thread Tim Düsterhus
Hi On 3/22/25 15:01, Paul M. Jones wrote: However, WHATWG-URL consistently calls it `username`, putting the URL portion of the RFC at odds with the WHATWG-URL spec. Calling it `username` would be more in line with the spec. That would likely mean calling it `username` in the URI portion of th

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

2025-03-30 Thread Ignace Nyamagana Butera
On 30/03/2025 14:42, Tim Düsterhus wrote: Hi Am 2025-03-27 23:49, schrieb Ignace Nyamagana Butera: Hi Máté,    for RFC 3986: https://datatracker.ietf.org/doc/html/rfc3986#section-5.3), and then    this string is parsed and validated. Unfortunately, I recently    realized that this approach ma