Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As someone maintaining multiple 10+ year old PHP applications - after the migration to 7 things have been super easy/simple. Especially if you get Rector [0] involved.

[0] https://github.com/rectorphp/rector



Whether it’s easy or not in your particular space isn’t the problem. The problem is that it breaks period.

Some applications might be easy to upgrade. Others will not. You are forced to do work, because for some minority it feels nicer when they get to use that new feature. And it has to look a certain way, no matter the cost! Some of the stuff that’s comming will be even worse.

The even bigger issue is that your underlying tool breaks, which has an impact on dependecies as well. Foo needs version N now, but you also depend on Bar which only works with N-1.

It’s not fun, and it’s expensive.


This makes no sense.

You are under no obligation to upgrade your php version as soon as released without being able to plan for it. PHP 8.1.17 was released alongside 8.2.4 for exemple.


I think PHP is missing some kind of LTS which adds another year (or two) of support or some more stability. I wanted to say Dotnet has a longer cycle, but they have 2 years for regular and 4 year for LTS releases, while PHP has 3 years for every minor. So not that much better.

However, I had to migrate some 30k LOC app from Dotnet 3 to 6 this year and it was quite straight forward. Not that many thinks broke, and when then they were in the bootstrapping of the app.

I'm not that much into PHP anymore, so my take might be wrong. I wouldn't like to upgrade each year to a new version which breaks syntax. I would be ok to migrate every 3 or 4 years from LTS to LTS.


PHP is mostly run on Linux, and the LTS version of PHP is essentially the one shipped with your distribution. They backport most security fixes.

To use the latest PHP 8.2 version Debian or Ubuntu users need to add an external package source, meant specifically to be "on the edge" for PHP, deb.sury.org


There's a point to discuss around the lack of any official LTS version.

But GP comment is not that, it reeks of "old man yells at cloud" with zero mention of what is an issue and what isn't.

5.x -> 7+ was a pain, mainly down to those projects being without composer or other really suspect practices that need fixing at the same time. Much of the actual issue was due to particular string concatenation methods or the mysql_* lib which is easily shimmed to something like PDO.


I understand but like I said, official PHP version in your distribution packages kind of act like an LTS anyway, people who use 8.2 are using Sury or similar.

> 5.x -> 7+ was a pain, mainly down to those projects being without composer or other really suspect practices that need fixing at the same time. Much of the actual issue was due to particular string concatenation methods or the mysql_* lib which is easily shimmed to something like PDO.

That's what I meant in my other comment, while it's true, mysql_ was already being removed in favor or PDO in PHP 5's time, and PHP 5 to PHP 7 was almost a decade of developpement, so I don't think it's fair to put these issues on "too fast a developpement cycle".


Even if not. I have a big project running since 2006 and only had to change a handful of lines in that time once (+350k loc).


Awesome, thanks for sharing this




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

Search: