Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API
| From: | Tim Düsterhus | Date: | Sun, 23 Feb 2025 15:05:25 +0000 |
| Subject: | Re: [RFC] [Discussion] Add WHATWG compliant URL parsing API | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126479@lists.php.net to get a copy of this message | ||
Hi
[dropping Dennis from the Cc list]
Am 2025-02-21 13:06, schrieb Tim Düsterhus:
We already had extensive off-list discussion about the RFC and I agree it's in a good shape now. I've given it another read and here's my remarks:One more thing that came to my mind, but where I'm not sure what the correct choice is: Naming of
WhatWgError and WhatWgErrorType. They are placed within the Uri\WhatWg namespace, making the WhatWg in their name a little redundant.
For Exceptions the recommendation is to use this kind of redundant naming, to make implicit imports for catch blocks more convenient compared to needing to alias each and every Exception class. The same reasoning *could* also apply here, but here I find it less obvious.
The alternative would probably be Uri\WhatWg\Error and Uri\WhatWg\Error\Type.
No strong opinion from my side, but wanted to mention it nevertheless.
Best regards
Tim Düsterhus