Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP version upgrade 5.3.25 to 5.6

We have a requirement for upgrading the PHP version (5.3.25) to current stable version which is 5.6.17. So, for this we need to find which approach would be best.

  1. Step by step approach, in which we can upgrade from 5.3.X to 5.4.X, 5.4.X to 5.5.X and so on.
  2. Direct upgrade, in this we will directly upgrade from 5.3.X to 5.6.X.

Apart from the upgrade, what all things we should keep in mind while doing this.

It would be good, if any of you have any documents which we can refer to.

like image 341
uday8486 Avatar asked Mar 26 '15 06:03

uday8486


2 Answers

PHP maintainers upload list of incompatible changes of every release. Here are the documents you may want to read:

  • 5.4 incompatible changes
  • 5.5 incompatible changes
  • 5.6 incompatible changes

If you have regression tests, you're the lucky man; if you don't, i strongly recommend test every change in virtual environment before real environment update on main server. If you're brave enough, you can try to setup vagrant - this will allow developers to easily share their environment and to reproduce server state as it should be after upgrade to 5.6.

I also wouldn't recommend partial upgrades, i think it's better to target for 5.6 at the first (and only) migration step.

like image 165
Etki Avatar answered Sep 28 '22 22:09

Etki


On my experience, we upgraded our PHP version from 5.3.28 to 5.6.6 directly because of server upgrades, and one more reason is you can easily check all your modules faster if there's an error rather than checking it on every version.

What you should keep in mind:

  • deprecated functions
  • if you're using PHP frameworks (CodeIgniter, Laravel, etc.), consider upgrading them too
  • current code implementations
like image 38
Cedric Avatar answered Sep 29 '22 00:09

Cedric