Lomkit / laravel-rest-api

Generate Api in seconds
https://laravel-rest-api.lomkit.com/
MIT License
297 stars 18 forks source link

Laravel 9 Interface "Illuminate\Contracts\Validation\ValidationRule" not found #76

Closed warmwhisky closed 7 months ago

warmwhisky commented 8 months ago

Laravel Rest Api Version

2.2.0

Laravel Version

9.52.4

PHP Version

8.1.18

Database Driver & Version

8.0.32 - MySQL Community Server - GPL

Description

When installing on an older project and using the search endpoint I receive an Interface "Illuminate\Contracts\Validation\ValidationRule" not found error

The stack traces points to lomkit/laravel-rest-api/src/Http/Requests/SearchRequest.php with use Lomkit\Rest\Rules\SearchRules; Inside of vendor/lomkit/laravel-rest-api/src/Rules/SearchRules.php there is a call to use use Illuminate\Contracts\Validation\ValidationRule; which does not exist in Laravel 9.52.4

I have double checked my controllers, resources and route many times, but still get the error. I do need to upgrade this project to 10, but am thinking to wait for 11.

Steps To Reproduce

Install lomkit on Laravel 9 and use the search endpoint.

GautierDele commented 8 months ago

Hello,

I'm kinda worried because I have tests running for those versions but it seems like effectively the file didn't exists before ...

I'm gonna have a look at that, either way you should upgrade to 10 before upgradind to 11, could you please do so, I don't think i'll be able to support laravel 8 + 9 if effectively my tests wern't covering those versions because it'll need to downgrade my code logic