Hacker News new | past | comments | ask | show | jobs | submit login
Big Sur: “Warning: PHP is not recommended” (twitter.com/grahamjcampbell)
33 points by neovive 6 months ago | hide | past | favorite | 15 comments

What’s with the people in the twitter thread taking this as an insult to PHP itself, or a sign that PHP will no longer run on macOS? It’s clearly neither.

Seems to be more about Apple telling people what is and isn't recommended software.

It's easier to understand this if you know that the `php` binary bring invoked is the one shipped with the operating system. They've introduced similar messages for other interpreter binaries. I think the intent here is to say "relying on this copy of PHP is not recommended", or maybe "shipping a standalone PHP script to end users is not recommended".

Yeah, like, pretend you're looking at a message in a FreeBSD base system's documentation or something. They're just saying "don't write new shit that relies on macOS system PHP, because it's going away"—it is... not recommended!

As pointed out in the thread, it says the same thing for Python2 (though only if you run it bare for some reason, not with --version, and obviously only if you're invoking the system Python2, not something from e.g. Homebrew) so it seems to just be the message they use for anything that's deprecated and expected to vanish from macOS installations in the future. I bet the same message is used a bunch of other places.

I'd be kind of horrified if anyone's writing PHP on a mac that is not targeting the system's PHP specifically, but is using it. You want whatever version's gonna be on your deployment target, not what happens to ship with your OS installation. Included scripting languages are there so you can write scripts targeting the OS, not develop with them generally. You could, but it's not what most people are going to want.

The intent is clearly stated: MacOS provided php is deprecated and slated for removal. Quit using it before it quits you.

I'm pretty sure this is just bad wording, and what they mean is "using the bundled PHP version isn't recommended".

People are really bringing up the pitchforks over nothing...

What was the original intent of bundling php + ruby on rails in a workstation OS?

I think it was a good idea in principle, but worked out poorly in practice.

Pro: You don't have to download it, it is already there

Con: It is always going to be an old and outdated version, since Apple can't keep up with the open source developers, so you probably need to download it anyway, and then deal with the confusion of having both the old and new versions installed

They probably didn't foresee how it was going to work out in practice, in hindsight they probably wish they'd made a different decision. You learn from experience.

Also, Unix OS vendors have had a historical culture of bundling things. Back in the old days, before widespread availability of the Internet, it made sense to bundle as much with the OS as possible, since if it wasn't bundled it was hard to get. Even after the Internet became widely available, back in the dark ages of dial-up, downloads were so slow, it made sense to include as much as possible out of the box. It is a different world now. But keep in mind that Mac OS X Server 1.0 was released all the way back in 1999, and back then those times were still the reality for many people, and a recent memory for many more.

MacOS X was invented before package managers and virtual machines/containers and the whole cloud thing became popular on Mac. Mac ships with Apache too.

A bicycle for the mind

And perl and python2 and gcc among others.

Are people writing a lot of scripts in PHP? I'm surprised to see it came preinstalled to begin with.

Apache is also preinstalled. I use it to host some PHP scripts on my local network. The annoying thing is that every OS upgrade causes all the configuration files to get reset so I need to fix it every time. But it's just small enough of an annoyance that I haven't migrated to installing my own.

Same message is used for the bundled Python 2.7:

`WARNING: Python 2.7 is not recommended. This version is included in macOS for compatibility with legacy software. Future versions of macOS will not include Python 2.7. Instead, it is recommended that you transition to using 'python3' from within Terminal.`

Similar message for Ruby, but without the "not recommended" part:

`WARNING: This version of ruby is included in macOS for compatibility with legacy software. In future versions of macOS the ruby runtime will not be available by default, and may require you to install an additional package.`

Hmmm, I wonder if Apple is going to distribute Homebrew as part of Mac OS or are they planning on creating their own package manager?

Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact