coolsam726 / jetstream-inertia-generator

Laravel 8 Admin CRUD generator built with Jetstream, Inertia js, Vue 3 and Tailwindcss 2
MIT License
119 stars 30 forks source link

Dependency Issue #35

Closed dany-eudes closed 2 years ago

dany-eudes commented 2 years ago

Describe the bug I'm setting a new project using this package jetstream-inertia-generator and I got a dependency issue.

To Reproduce Steps to reproduce the behavior:

  1. New Laravel 8 instalation
  2. Add Laravel Jetstream using Inertia https://jetstream.laravel.com/2.x/introduction.html
  3. Requeriments listed in README.md: :: spatie/laravel-permission composer require spatie/laravel-permission php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" php artisan optimize:clear php artisan migrate :: laravel/sanctum composer require laravel/sanctum php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider" php artisan migrate
  4. Finaly, install: composer require savannabits/jetstream-inertia-generator --with-all-dependencies
  5. See error

Expected behavior This error message:

composer require savannabits/jetstream-inertia-generator --with-all-dependencies
Using version ^3.0 for savannabits/jetstream-inertia-generator
./composer.json has been updated
Running composer update savannabits/jetstream-inertia-generator --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - savannabits/jetstream-inertia-generator[v3.0.0-beta.0, ..., v3.0.4] require spatie/laravel-permission ^4.2 -> found spatie/laravel-permission[4.2.0, ..., v4.x-dev] but it conflicts with your root composer.json require 
(^5.3).
    - Root composer.json requires savannabits/jetstream-inertia-generator ^3.0 -> satisfiable by savannabits/jetstream-inertia-generator[v3.0.0-beta.0, ..., v3.0.4].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require savannabits/jetstream-inertia-generator:*" to figure out if any version is installable, or "composer require savannabits/jetstream-inertia-generator:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Desktop (please complete the following information):

Update 1: I see this is related to the conflict between the required spatie/laravel-permission:^4.2 and my compose which requires the latest ^5.3 version. Could you please upgrade it to the new spatie/laravel-permission series?

coolsam726 commented 2 years ago

@dany-eudes thanks for noting this. It is true, JIG uses Laravel Permission ^4.2 and that is where the conflict comes from. I hope you found the work around (composer require spatie/laravel-permission:^4.2) but I will do a dependency check and release do a minor release that upgrades the dependency to ^5.

dany-eudes commented 2 years ago

Words are powerless to express my gratitude! Thank you so much for giving us such a wonderful code.

coolsam726 commented 2 years ago

You are much welcome @dany-eudes

dany-eudes commented 2 years ago

Thanks! We are looking forward to the upgrade. Downgrade to Laravel Permission ^4.2 results in new issues.

coolsam726 commented 2 years ago

@dany-eudes I have done a v3.1.0-beta.0 pre-release which supports laravel permission v5. However, I haven't tested the changes. Kindly install it by running composer require savannabits/jetstream-inertia-generator:^3.1 and if everything works I will do v3.1.0 final release with the changes.

coolsam726 commented 2 years ago

I have tested and released v3.1.0 which officially supports spatie/laravel-permissions:^4.2|^5

dany-eudes commented 2 years ago

Thank you very very much, @coolsam726. We really appreciate it. Keep it moving forward.