Reputation: 55
I'll be working soon on a project and I just wanted to ask this before. The project is on symfony 2.8 with php 5.4. The goal is to upgrade symfony to 3.4 (maybe 4.x later) and php to 7.x (probably 7.2). So here is my question : is there a better order to do this? Php 5.4 to 7.2 first or symfony 2.8 to 3.4 (or it doesn't matter)? Thanks for your advices.
Upvotes: 2
Views: 855
Reputation: 24280
I'd go with PHP first as long as Symfony allows you to. It's much easier to follow changes in PHP code then changes in big PHP framework.
The best way is to use an instant upgrade with Rector (a tool I wrote):
vendor/bin/rector process src --level php53
vendor/bin/rector process src --level php54
vendor/bin/rector process src --level symfony30
vendor/bin/rector process src --level php55
vendor/bin/rector process src --level symfony31
vendor/bin/rector process src --level php56
vendor/bin/rector process src --level symfony32
vendor/bin/rector process src --level php70
vendor/bin/rector process src --level php71
vendor/bin/rector process src --level symfony33
vendor/bin/rector process src --level symfony34
Always one minore version at a time.
I summed my experience with many upgraded websites in this post: How to Upgrade Symfony 2.8 to 3.4
Upvotes: 0
Reputation: 1394
First of all – you won't be able to run Symfony 3.4 project on PHP5.4.
As of 2018-11-26
The latest Symfony ^3.4 version is v3.4.19
which requires php: ^5.5.9|>=7.0.8
.
On the other hand latest Symfony ^2.8 version is v2.8.48
which requires php: >=5.3.9
.
Conclusion
You won't be able to run Symfony 3.4 project on PHP 5.4, but in theory you will be able to run Symfony 2.8 project with PHP 7.2.
You should also consider taking a look at: http://php.net/manual/en/migration70.incompatible.php
Upvotes: 1