Hacker News new | past | comments | ask | show | jobs | submit login

problem is that a lot of code is written using older PHP versions, and it is not that easy to upgrade from say PHP 7.0 to 7.3. Lots of refactoring deprecations involved (if you want to keep for example debug logs without breaking backend output).

I find it hard to trust a language that changes so much between minor versions. If I am wrong please tell me where so I can stop my grief at work and finally upgrade the PHP version we use.




>it is not that easy to upgrade from say PHP 7.0 to 7.3

Is that true?


No. My employer upgraded from PHP 5.4 to 7.0 with minimal fuss (we spent about a week on the migration, testing, and deployment, and it went smoothly), and 7.0 to 7.3 is trivial in comparison.

There are a few edge cases out there of course. Maybe your code base has basically been in stasis since the early days of PHP 5.x, may not even be using composer or namespaces, relies on tons of abandoned or horribly outdated dependencies, doesn't have good test coverage, etc., and then suddenly someone gets a bee in their bonnet about PHP 7.x and wants to upgrade. That's often not going to work out very well, but that's not really a PHP 7.x (or even a PHP thing). :) If you've been maintaining the code, have tests, no ancient vulnerable libraries, using current framework versions, etc, the process is going to be easy. If you're trying a big bang upgrade straight from the medieval period, not so much!


No, definetly not true. The backwards-compatability of PHP is insanely good, so upgrading is usually super trivial.


it's so good i am not able to install phpbb on php 7.3 because they're not allowing it...


There are compatibility checkers that can analyse the code and tell you what needs to be taken care of. Fixing is not automatic but it takes a few minutes to confirm each issue and upgrade it. If you have unit tests then it's all straight forward.


everything has to be upgraded. Older version of composer doesn't work with php 7.3, cakephp must be carefully upgraded. In my tests we even got different query results.

So maybe upgrading PHP itself might not be that bad, something I can't tell you for sure, but in my experience nobody uses vanilla PHP, they all wrap it in frameworks, and those must all be carefully upgraded too.


It is if your web host doesn’t allow you to upgrade your software because they control the machine




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

Search: