0
votes

I've created my laravel project as follows:

laravel new my_app

This creates my project using laravel version 8. As I want to use Laravel 7, I modified composer.json:

 "laravel/framework": "^7.0",

After that I run:

composer update

which ends with the error described (Class Illuminate\Support\Facades\RateLimiter not found )

In fact, that class doesn't exist in Support facade. Shouldn't downgrade process correct this?

1
any particular reason you don't want to use Laravel 8? Laravel 7 will no longer be receiving bug fixes shortly (in 2 weeks) - lagbox
I was asked to. Not my choice - user3770963

1 Answers

4
votes

No, this is from code in your application; specifically your App\Providers\RouteServiceProvider. Everything that isn't in vendor is considered your application and is not touched by any upgrade or downgrade. The laravel/laravel package only sets up your application skeleton for you. You can install Laravel 7 specifically with composer create-project --prefer-dist laravel/laravel:^7.0 yourproject; you can find the instructions in the install guide for Laravel 7.

Otherwise you will need to potentially copy the Service Providers from laravel/laravel version 7 into your application so you are not using providers from Laravel 8 as some things have changed and some new features were introduced. And there would be other changes as well.

Laravel 7.x Docs - Installation - via Composer Create-Project composer create-project