I have a dim and distant memory of a post here where we discussed automated code review tools. PHP Mess Detector seems to have been updated recently. I'm currently updating a site from PHP 7.0 to PHP 8.something (either .1 or hopefully .2) and was wondering if anyone makes use of such tools regularly, and which folks might recommend. Or do folks use tools in their IDE to automate this sort of code checking?

    I have not tried them. Let me know if they help, though. 🙂

    Updating from 8.1 to 8.2 for an app I work on is on this month's to-do list. So far it's just been some deprecation warnings I'm dealing with. 5.x to 8.1 was much hairier. 😉

      PS: I found that VS Code with the "PHP Intelephense" plug-in did a pretty nice job of highlighting some of the issues, in that it's not just lint-ing the current file, but also looking at included functions and classes, too.

        I've found PHP Intelephense to be pretty indispensable in my VSCode installs - be warned though, if you use primarily docker but not the remote connection plugin and don't have php installed locally, it will throw some warning at you. Although I may be one of few people that work that way.

        Another tool I came across just the other day that may be helpful is PHP CS Fixer. I could well be just terribly behind the times on it and I've not used it yet, but it does look interesting.

          Write a Reply...