[wp-trac] [WordPress Trac] #54504: Update Requests library to version 2.0.0
WordPress Trac
noreply at wordpress.org
Thu Nov 25 15:50:41 UTC 2021
#54504: Update Requests library to version 2.0.0
-------------------------------------------------+-------------------------
Reporter: jrf | Owner:
| SergeyBiryukov
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.9
Component: External Libraries | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-dev-note php80 | Focuses:
php81 |
-------------------------------------------------+-------------------------
Comment (by jrf):
> Since PHP namespaces are case-insensitive, is there any chance to
capitalize that as `WPorg\Requests\`, so that the capitalization of WP is
consistent in lines like this and across the project in genera?
@SergeyBiryukov Good question. We did actually discuss that as well.
For the PSR-4 class name to path translation in the autoloaders (both the
supported Composer autoloader as well as the custom autoloader), the
namespace and class names have to be treated case-sensitively as otherwise
this would break when code is run on case-sensitive OS-es, like *nix and
MacOS.
To then treat the ''namespace prefix'' case-insensitively would be
inconsistent, especially as this could only be supported when using the
custom autoloader, but would break when using the Composer autoloader,
which is why it was decided to not support that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54504#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list