Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

anjanesh's avatar

Laravel v10.3.3 and not version 11 is getting installed on a new create-project

php .\composer.phar create-project laravel/laravel example-app
Installing laravel/laravel (v10.3.3)

Do I have to set some config to set it to version 11 ?

0 likes
3 replies
LaryAI's avatar
Level 58

When you run the create-project command without specifying a version, Composer will install the latest stable version of Laravel that is compatible with your environment. If Laravel 11 is not being installed, it could be due to a few reasons:

  1. Laravel 11 has not been released yet at the time of your command.
  2. Your PHP version might not meet the minimum requirement for Laravel 11.
  3. Your Composer cache might be outdated.

To ensure you get the latest version of Laravel that is compatible with your environment, you can do the following:

  1. Check the PHP version requirement for Laravel 11 and ensure your PHP version meets or exceeds that requirement. Laravel 11 requires PHP 8.0 or higher.

  2. Clear your Composer cache by running the following command:

composer clear-cache
  1. You can explicitly require a specific version of Laravel when creating a new project by adding the version number to the create-project command. For example, if you want to install Laravel 11, you would run:
php .\composer.phar create-project laravel/laravel example-app "^11.0"

Replace ^11.0 with the specific version of Laravel 11 you want to install, if necessary.

  1. Update Composer to the latest version to ensure it has the latest repository data:
php .\composer.phar self-update
  1. If you're still having issues, check the Laravel documentation or the packagist.org website to see if Laravel 11 has been officially released and is available for installation.

Remember that if Laravel 11 requires a PHP version that is not available on your system, you will need to upgrade your PHP installation before you can install Laravel 11.

Tray2's avatar

Or if you want to play around already you can install the dev version.

composer create-project --prefer-dist laravel/laravel laravel-dev dev-master
php artisan -V
Laravel Framework 11.x-dev

Please or to participate in this conversation.