guymclarenza Posted February 6, 2023 Share Posted February 6, 2023 I have a working website that I need to upgrade to php 8 or whatever is latest, Is there some kind of script or app that can be used to check my existing script and tell me what is breaking it? Alternatively, where can I see a list of deprecated tags that need to be changed to become compliant. I am not a beginner but I don't do php full time, my main job is making stuff with wood. Quote Link to comment https://forums.phpfreaks.com/topic/315884-upgrade-website-from-73-to-8/ Share on other sites More sharing options...
Solution requinix Posted February 6, 2023 Solution Share Posted February 6, 2023 4 minutes ago, guymclarenza said: Is there some kind of script or app that can be used to check my existing script and tell me what is breaking it? Sure: upgrade to PHP 8 and see what it complains about. Not on the real site, of course, but in some development version of it. That's really the most effective method. 4 minutes ago, guymclarenza said: Alternatively, where can I see a list of deprecated tags that need to be changed to become compliant. I don't know what "tags" are, but the online documentation has migration guides. Go through each guide in sequence; if you want to upgrade to latest, which is 8.2, then you need the 7.3->7.4 and 7.4->8.0 and 8.0->8.1 and 8.1->8.2 guides. Quote Link to comment https://forums.phpfreaks.com/topic/315884-upgrade-website-from-73-to-8/#findComment-1605419 Share on other sites More sharing options...
guymclarenza Posted February 6, 2023 Author Share Posted February 6, 2023 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/315884-upgrade-website-from-73-to-8/#findComment-1605432 Share on other sites More sharing options...
gizmola Posted February 7, 2023 Share Posted February 7, 2023 I don't disagree with requinix's advice here, as you need to be aware of what breaking changes are, but there are some popular tools that can help you understand the quality and inherent issues in your code. In general, one category of these tools is "static analysis" which evaluate your source files and report on a variety of problems or things that violate best practices or a particular coding standard. There are a number of these tools, with one of the most popular currently, being phpstan. Depending on what editor you use, there may be a phpstan integration available that helps with evaluating and fixing problems it finds. There's also a nice article, albeit a bit old now, about php8 migration with a lot of good information I would encourage you to check out: https://haydenjames.io/php-8-compatibility-check-and-performance-tips/ Quote Link to comment https://forums.phpfreaks.com/topic/315884-upgrade-website-from-73-to-8/#findComment-1605457 Share on other sites More sharing options...
maxxd Posted February 7, 2023 Share Posted February 7, 2023 Fair warning, I've not tried it but I've heard some good whispers about Rector. 1 Quote Link to comment https://forums.phpfreaks.com/topic/315884-upgrade-website-from-73-to-8/#findComment-1605481 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.