Upgrading to PHP 8?

Hi there, I have a Laravel app that I set up on Render that I set up following the Render Laravel tutorial. That tutorial launches a 5.8 application. I’d like to upgrade my Render server to run PHP 8 as it’s a requirement for Laravel 8 and we’re upgrading to Laravel 8 :slight_smile:

I’ve upgraded my composer.json file to use PHP 8. Is there anything else we need to do to make sure the Render service will run PHP 8? On my local machine I upgraded PHP version with Homebrew…

Hi @connor11528! The base Docker image in our guide is richarvey/nginx-php-fpm:1.9.1, which uses PHP version 7.4.5. I believe Laravel 8 is compatible with this version of PHP. So you shouldn’t have to do anything extra other than changing your composer.json file. I should emphasize that I haven’t tested this myself so I could very well be missing something. Don’t hesitate to follow up if there are any unexpected hurdles to clear.

1 Like

Okay cool thanks! I’d really like to try out Laravel Octane which uses Swoole / Road Runner to serve requests really fast. It does require PHP 8. It’s in testing phase though so can wait on it. For now can run PHP 7.4 and Laravel 8 :slight_smile:

For the record, this is an example Dockerfile that new Laravel apps use (with Laravel Sail). Might try switching up my Dockerfile and/or adding a docker-compose file. Still learning bout things though lol