‹ BackHN Continuity

Thread

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

341 points · 107 comments · jakeasmith

  1. jakeasmith · · focus · HN ↗
    Author here, happy to answer any questions. I never imagined a polyfill for http_build_url would gain so much traction. After 12 years, deprecating it feels like the right move, especially given the new options from the community and PHP itself.
    1. HackerThemAll · · focus · HN ↗
      The JavaScript world is littered with stuff comparing to which your patch seems like a complex project. See those examples:

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-odd" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-odd

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-even" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-even

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;left-pad" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;left-pad

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-whitespace-character" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;is-whitespace-character

      <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;isarray" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;isarray

      1. domh · · focus · HN ↗
        These packages are basically memes at this point... Those download figures cannot be accurate for real production usage.

        I don&#x27;t believe any programmer is actually using these. isarray and left-pad are at least functions that didn&#x27;t used to be in the standard library, to slightly excuse them.

        1. sumtechguy · · focus · HN ↗
          I would not bet on that assumption. I have seen some wild code over the years from devs. With &#x27;ai&#x27; type coding going on now too you may see them be used even more.
          1. domh · · focus · HN ↗
            I would&#x27;ve actually thought AI would slightly improve upon this situation. At least in my experience claude seems to write a lot more little utility functions itself rather than reaching for a package from npm to do something. Requiring an `npm install` before getting something working risks triggering a permissions gate.
          2. brookst · · focus · HN ↗
            Opus and fable both are pretty judicious about bringing in dependencies, at least for me. They often argue against and and write even decently large modules to avoid pulling stuff in.
            1. sire-vc · · focus · HN ↗
              They never install packages for me and love handrolling large amounts of e.g. parsing code where a library exists. I have to keep telling them &#x27;look for a large popular dependency&#x27; when they start writing huge functions that obviously already exist.

              Was doing something with OSM the other day and Opus basically started reimplementing NetTopologySuite.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.