-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce PHP 8.5 polyfill #498
base: 1.x
Are you sure you want to change the base?
Conversation
src/Php85/Uri/Uri.php
Outdated
|
||
public function __toString(): string | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yet to come 😄
namespace Uri; | ||
|
||
if (\PHP_VERSION_ID < 80500) { | ||
class Rfc3986Uri extends \Symfony\Polyfill\Php85\Uri\Rfc3986Uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The classes in core don't have a parent. Shall we alias the class instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see class Rfc3986Uri extends Uri
in the RFC. Do I miss your point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ext-uri
introduced 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