Setup Laravel v10 Sail on PHP 8.3 and Windows

Setup Laravel v10 Sail on PHP 8.3 and Windows

laravel sail

Here is a full process step-by-step of how to setup Laravel Sail on Windows. You would think it’s easy as just following official docs, but not quite ;]

Small note to everybody who will be doing they first laravel setup for v10 + PHP 8.3:

  • updated your local php to match 8.3 at least. If you try to run it on something like 7.3 you will get old laravel v8 with sail maxed at php 8.2. If you do that without updating, well I warned you.

Steps to install laravel & run on docker via Sail

  • composer create-project laravel/laravel example-app
  • php artisan sail:install this will create you a docker_compose.yml file
  • Edit docker_compose.yml by updating sail to 8.3 in both: context and image aliases

Open composer.json update php version to: ^8.3

  • cd exmaple-app
  • composer update
  • ./vendor/bin/sail up -d

Now you can visit local server with: http://127.0.0.1/Ensure you have these versions:
Laravel v10.35.0 (PHP v8.3.0)