PHP版本升级5.3.25到5.6

时间:2021-10-02 04:50:10

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.

我们要求将PHP版本(5.3.25)升级到当前稳定版本5.6.17。因此,为此我们需要找到哪种方法最好。

  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. 一步一步的方法,我们可以从5.3.X升级到5.4.X,5.4.X升级到5.5.X等等。

  3. Direct upgrade, in this we will directly upgrade from 5.3.X to 5.6.X.
  4. 直接升级,在此我们将直接从5.3.X升级到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.

如果您有任何我们可以参考的文件,那将是件好事。

2 个解决方案

#1


21  

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

PHP维护者上传每个版本的不兼容更改列表。以下是您可能想要阅读的文件:

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.

如果你有回归测试,你就是幸运的人;如果不这样做,我强烈建议在主服务器上进行真实环境更新之前测试虚拟环境中的每个更改。如果你足够勇敢,你可以尝试设置vagrant - 这将允许开发人员轻松共享他们的环境并重现服务器状态,因为它应该在升级到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.

我也不建议部分升级,我认为最好在第一个(也是唯一一个)迁移步骤中定位5.6。

#2


2  

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.

根据我的经验,我们将PHP版本从5.3.28直接升级到5.6.6,因为服务器升级,还有一个原因是如果出现错误而不是在每个版本上检查它,您可以更快地检查所有模块。

What you should keep in mind:

你应该记住什么:

  • deprecated functions
  • if you're using PHP frameworks (CodeIgniter, Laravel, etc.), consider upgrading them too
  • 如果您正在使用PHP框架(CodeIgniter,Laravel等),请考虑升级它们

  • current code implementations
  • 当前的代码实现

#1


21  

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

PHP维护者上传每个版本的不兼容更改列表。以下是您可能想要阅读的文件:

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.

如果你有回归测试,你就是幸运的人;如果不这样做,我强烈建议在主服务器上进行真实环境更新之前测试虚拟环境中的每个更改。如果你足够勇敢,你可以尝试设置vagrant - 这将允许开发人员轻松共享他们的环境并重现服务器状态,因为它应该在升级到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.

我也不建议部分升级,我认为最好在第一个(也是唯一一个)迁移步骤中定位5.6。

#2


2  

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.

根据我的经验,我们将PHP版本从5.3.28直接升级到5.6.6,因为服务器升级,还有一个原因是如果出现错误而不是在每个版本上检查它,您可以更快地检查所有模块。

What you should keep in mind:

你应该记住什么:

  • deprecated functions
  • if you're using PHP frameworks (CodeIgniter, Laravel, etc.), consider upgrading them too
  • 如果您正在使用PHP框架(CodeIgniter,Laravel等),请考虑升级它们

  • current code implementations
  • 当前的代码实现