Skip to content
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

More classes planned to be made final #866

Open
schlessera opened this issue Mar 25, 2024 · 0 comments
Open

More classes planned to be made final #866

schlessera opened this issue Mar 25, 2024 · 0 comments

Comments

@schlessera
Copy link
Member

In the next major version of Requests (v3.x), we plan on making more classes final, to simplify the process of keeping in line with the accelerating pace of PHP changes without always incurring the overhead of a BC break.

The v3.x release is still far away on the horizon, but we'd like to get the discussion started as early as possible on this to give affected people a heads-up and hopefully gather more feedback before we pull the trigger on this.

If you can provide any feedback on why or why not some of these classes should be made final, please add a comment on this issue. We're happy to consider valid use cases and make sure we can respect any reasonable extension scenarios.

The following classes are UNDER CONSIDERATION to be made final

We think these are not currently being extended, and making them final will simplify the long-term maintenance work on this package.

Make final? Class name in v2.x Class name in v1.x Notes
no WpOrg\Requests\Requests Requests Keep extensible as last-resort fallback
yes WpOrg\Requests\Cookie Requests_Cookie Direct coupling in WpOrg\Requests\Cookie\Jar
yes WpOrg\Requests\IdnaEncoder Requests_IDNAEncoder Direct coupling in WpOrg\Requests\Requests & WpOrg\Requests\Cookie
yes WpOrg\Requests\Iri Requests_IRI Direct coupling in WpOrg\Requests\Requests & WpOrg\Requests\Cookie\Jar & WpOrg\Requests\Session
yes WpOrg\Requests\Cookie\Jar Requests_Cookie_Jar Direct coupling in WpOrg\Requests\Requests & WpOrg\Requests\Response & WpOrg\Requests\Session
yes WpOrg\Requests\Response\Headers Requests_Response_Headers Direct coupling in WpOrg\Requests\Response

The following classes will NOT be made final

These classes are known to be already extended at this time and will remain as-is for that reason.

Class name in v2.x Class name in v1.x
WpOrg\Requests\Exception Requests_Exception
WpOrg\Requests\Hooks Requests_Hook
WpOrg\Requests\Response Requests_Response
WpOrg\Requests\Session Requests_Session
WpOrg\Requests\Auth\Basic Requests_Auth_Basic
WpOrg\Requests\Utility\CaseInsensitiveDictionary Requests_Utility_CaseInsensitiveDictionary
WpOrg\Requests\Exception\Http Requests_Exception_HTTP
WpOrg\Requests\Exception\Transport Requests_Exception_Transport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant