My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it
Recorded: Sept. 17, 2026, 7:09 a.m.
| Original | Summarized |
My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it. — Jake A. Smith Jake A. Smith Home Blog ← All posts My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it. September 15, 2026 Twelve years ago, I wrote 174 lines of PHP as a stopgap for AOL’s content management system. I put it on Packagist in case anyone else needed the same patch, and somehow it’s been installed nearly 20 million times since. Today I marked it deprecated. And it turns out Composer is only part of the picture. WPML, the market-leading multilingual plugin for WordPress, bundles the polyfill directly in its codebase, and WPML says it’s installed on over 1.5 million sites. The domain-name library idna-convert depends on it too, which is how it ships inside the source of SPIP, a French content management system, and how it ended up packaged in Debian and Ubuntu. Between all of them, there’s a pretty good chance you’ve visited a website that is still running my code. |
A developer is deprecating a temporary PHP fix created in 2014, which has amassed nearly twenty million installations since its creation. This code was initially written as a stopgap measure during an upgrade of AOL’s Content Management System from PHP 5.2 to 5.3 to handle the loss of the http_build_url() function, which was necessitated by dropping the pecl_http extension. The original intent was for this fix to be temporary, relying on the expectation that the PHP community would transition to superior solutions. The package has achieved significant widespread adoption far beyond its initial context. It is installed through Packagist nearly twenty million times and continues to receive over four hundred thousand monthly installations. This proliferation stems from its indirect dependency within larger systems; for instance, the multilingual plugin WPML bundles the polyfill directly into its codebase, which has been installed on over one and a half million sites. Furthermore, it is relied upon by libraries such as domain-name library idna-convert, which is utilized within the source code of SPIP, a French content management system, and consequently within Debian and Ubuntu distributions. This demonstrates that the code has permeated various software ecosystems indirectly. The author later became aware of the package's extensive reach, noting several related issues on GitHub, including bugs concerning path manipulation and trailing slashes. One specific bug involved how the code handled URL paths ending with a slash, where a modification to the path could inadvertently affect the structure of the URL. Despite these issues, the author faced a decision regarding the code's future, weighing the option of returning to PHP development against retiring the package. The author concluded that the code should be deprecated because superior alternatives now exist. The PHP League’s URI library and the inclusion of a standards-compliant URI API within PHP 8.5 fulfill the necessary functionality, rendering the original shim obsolete. Maintaining the existing package would delay the community’s necessary migration, and handing the package to a new maintainer introduced a significant risk, particularly given its wide installation base, which could expose potential security vulnerabilities, referencing concerns raised by incidents such as the xz Utils backdoor. Therefore, the decision was made to retire the package, acknowledging the contributions of the community who offered to take over maintenance, and ensuring that future development focuses on modern, vetted standards rather than legacy code. |