|
I have a project which is currently locked to PHP 7.0 for various reasons. I've always wanted to try phpactor but saw on the homepage that it is only compatible with 8.1+, but then I took a look at the current release notes and it directly mentions PHP 7.0 https://github.com/phpactor/phpactor/releases/tag/2025.04.17.0 Is it possible to use phpactor on a codebase that uses an older version of PHP (i.e. 7.0). If it helps, I do run it in a docker container and I can install a different version (i.e. 8.1) on my host if necessary. I just want some clarity on whether or not that is even possible before I try it. Thanks in advance. |
Replies: 1 comment 1 reply
|
The phpactor tool is using php 8.2 but it can help you with writing code in php 7 and 8. You would need to have to different versions of php installed if you want to use it with php 7 projects. |
Got it. Thanks.
I was able to figure it out.
For those looking to do this, what you will need to do is ensure that you have PHP 8.1+ installed and use that to run phpactor.
I ended up installing it but keeping 7.0 as my default and configuring my IDE (nevoim) to run phpactor using the 8.1 binary.
Then in your project, you can create a
.phpactor.jsonfile with something like this: