Conversation
| namespace Uri; | ||
|
|
||
| if (\PHP_VERSION_ID < 80500) { | ||
| class Rfc3986Uri extends \Symfony\Polyfill\Php85\Uri\Rfc3986Uri |
There was a problem hiding this comment.
The classes in core don't have a parent. Shall we alias the class instead?
There was a problem hiding this comment.
I can see class Rfc3986Uri extends Uri in the RFC. Do I miss your point?
There was a problem hiding this comment.
Yes, but Symfony\Polyfill\Php85\Uri\Rfc3986Uri does not appear in the original inheritance chain. What is the point of the Symfony namespaced classes anyway? Do we need them?
There was a problem hiding this comment.
Having all the logic being in internal namespaced classes allows to test the logic of those classes even on versions where the polyfill is not applied because the native class exist. That's why all our polyfill classes have such internal parent class.
71c40c0 to
fdbffb2
Compare
|
Thank you everyone for reviewing this first draft! I applied the requested changes. I'll continue the work soon. |
fdbffb2 to
4a28267
Compare
|
see https://github.com/bakame-php/aide-uri for a complete userland implementation of the RFC. /cc @nyamsprod |
|
Let me close here, thanks for proposing. |
ext-uriintroduced in PHP 8.5 (or 9.0, whichever comes first). It isn't complete yet.Follow-up of symfony/symfony#57192 (comment)
I used TDD on this one, using php/php-src#14461 test cases. There's a lot to do still. I'm publishing this PR if one wants to track progress on this, but also to get potential feedback during development. Keep in mind that "everything" is subject to change if you take a look at it 😄
RFC: https://wiki.php.net/rfc/url_parsing_api
Implementation: php/php-src#14461