How to install Laravel 10.x-dev(dev)

If you want to play with the upcoming new version of Laravel (10.x-dev) you can easily install it.

This is a way just to start to play with some new things in master branch. It is because we love to “live on the edge” but it is not recommended for “production” project. So try this only in your local machine, because you are curious.

On packagist, if you look at “laravel/laravel” packages, you can see that there is a version named “dev-master”.

The Laravel team are planning to release Laravel 10 on February 2023 (February 7th, 2023). (https://laravel.com/docs/master/releases#support-policy)

This version includes the upcoming new version of the “laravel/framework” packages.

The “laravel/laravel” package includes “laravel/framework 10.x-dev and it requires PHP version ≥ 8.1 and PHPunit 9 and PHPstan.

You can discover more thing on the release on this packagist URL: https://packagist.org/packages/laravel/laravel#dev-master that has a dependency: https://packagist.org/packages/laravel/framework#10.x-dev

To install Laravel 10.0 you need to launch composer create-project as usual and then you need to set the “dev-develop” version of the “laravel/laravel” package:

composer create-project --prefer-dist laravel/laravel laravel-dev dev-master

Where:

  • laravel/laravel: is the package for the Laravel installation;
  • laravel-dev: is the new directory for your new project (you can change it);
  • dev-master: is the next version of Laravel.

OR If you prefer to use the “laravel” command you can achieve the same goal with:

laravel new laravel-dev --dev

Once you have installed Laravel 10.x-dev, you can jump into the new directory (laravel-dev) and execute the artisan command:

$ cd laravel-dev
$ php artisan --version
Laravel Framework 10.x-dev

Now you can start to play with the new features of Laravel 10.0 (the features that are already pushed on master branch).

You can launch the local web server:

php artisan serve

Issues installing Laravel 10.x-dev

If during the installation you are facing following errors, I’m going to suggest you some fix.

Call to undefined method Laravel\Sanctum\Sanctum::currentApplicationUrlWithPort()

If you are facing this issue, my suggestion is to go to config/sanctum.php file and replace “Sanctum::currentApplicationUrlWithPort()” with 'http://127.0.0.1:8000'

If starting your application, you have the error in the browser:

No application encryption key has been specified

launch from the command line:

php artisan key:generate

Choose your hosting provider (with affiliate code)

If you need a Cloud Server with a Web Server, PHP8 and MySQL (MariaDB), I would like to suggest you to use a Cloud Hosting Providers for example:

I wrote a quick tutorial for installing your LEMP server on Ubuntu https://medium.com/@robertodev/how-to-setup-your-lemp-server-on-ubuntu-17-04-6910b18a3679

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store