Skip to main content

Migrating PHP 7.4 Code to 8.1 on Platform.sh

Comments

3 comments

  • Luc Bezier

    Just a small typo on “composer add .platform.app.yaml composer.lock”, you meant “git add .platform.app.yaml composer.lock”. Thanks

    0
  • Paul Gilzow

    you are correct! Thanks for letting me know. Updated!

    0
  • Thomas Schmitt

    Hi Paul,

    thanks a lot for your article which I found here https://opensource.com/article/22/12/migrate-php-code when searching for a way to migrate an old php website to PHP 8.1 to make it run on a up-to-date webserver of one of the big providers here in Germany. 

    As I'm just a hobby developer I tried to get the tools to work on my Win 10 PC but I got nothing but error messages. So I switched to a Ubuntu 22.04 Server VM and installed everything using composer. I didn't see any need to use the dev branch, I just installed the most recent versions. That worked just fine except for two steps that were missing. I had to add the path to PHPComaptibility to the phpcs.conf manually (hints can be found on the github pages of PHPCompatibility) and I had to include the path to the PATH variable to make it work from any directory.  

    Perhaps you might want to update your description and include these hints? If not, at least this comment can save people some time when searching for the reason why phpcs -i refuses to show them PHPCompatibility.

    Anyway, your work will save me hours or days of work compared to debugging that old code on a new machine. Thanks for introducing and describing these tools.

    0

Please sign in to leave a comment.