Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicts on new fresh laravel application (11.5) #474

Open
ces27 opened this issue Dec 29, 2024 · 12 comments
Open

Conflicts on new fresh laravel application (11.5) #474

ces27 opened this issue Dec 29, 2024 · 12 comments

Comments

@ces27
Copy link

ces27 commented Dec 29, 2024

composer require saloonphp/laravel-plugin "^3.0" does not work anymore on Laravel 11.5 version, giving conflicts.

@juse-less
Copy link
Contributor

Hey, @ces27.
Could you just post the output you get?

I haven't tried running the command, but just to ensure you don't get different conflicts than others, and, what conflicts you actually do get.

@jzpeepz
Copy link

jzpeepz commented Jan 3, 2025

@juse-less just got this myself...

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires saloonphp/laravel-plugin 3.0 -> satisfiable by saloonphp/laravel-plugin[v3.0.0].
- saloonphp/laravel-plugin v3.0.0 requires illuminate/console ^9.52 || ^10.0 -> found illuminate/console[v9.52.0, ..., v9.52.16, v10.0.0, ..., v10.48.25] but these were not loaded, likely because it conflicts with another require.

@ces27
Copy link
Author

ces27 commented Jan 3, 2025

Yes, that's exactly the conflicts I had

@juse-less
Copy link
Contributor

juse-less commented Jan 5, 2025

Hmm. Unfortunately I'm unable to replicate this one.

I've attached a recording, where I'm running below command, and then just hit enter on each question for the default options.

laravel new saloon-laravel-plugin-test && cd $_ && composer require saloonphp/laravel-plugin "^3.0"
Recording
CleanShot.2025-01-05.at.04.49.05-converted.3.mp4

In the recording, I'm running PHP 8.3, Laravel Installer 5.11.0, and Composer 2.8.4.
However, I also tested with all combinations of below, as I had some old Composer-, and Laravel Installer laying around:

  • Composer 2.7.8
  • Composer 2.8.3
  • Laravel Installer 5.8.5
  • Laravel Installer 5.11.0
  • PHP 8.2
  • PHP 8.3
  • PHP 8.4

Is it possible to write down the steps you're taking, and version of software involved (like Composer, Laravel Installer, PHP, ...)?
Maybe you could create a repo with the fresh Laravel installation and post in here so I can clone it and go from there.

@jzpeepz
Copy link

jzpeepz commented Jan 5, 2025

Here are some of my details:

  • Windows 11
  • Powershell for terminal
  • Laravel 11.35.1
  • PHP 8.3.15
  • Composer 2.8.3
  • Laravel Installer 5.10.0

I will work on seeing if I can reproduce, but I figure this might be helpful in the meantime. Especially if @ces27 has something in common. I only mentioned Windows and Powershell because it is my first time to ever use Windows for Laravel development without giving up in frustration. 🙂

@jzpeepz
Copy link

jzpeepz commented Jan 5, 2025

Edit 2: Deleting this to avoid confusion. See my other comment.

@jzpeepz
Copy link

jzpeepz commented Jan 5, 2025

@juse-less here is a simple repo with the issue: https://github.com/jzpeepz/saloon-laravel-plugin-test

Here is how I set it up:

laravel new saloon-laravel-plugin-test

  • No starter kit
  • sqlite
  • Run migrations now? No

cd saloon-laravel-plugin-test

composer require saloonphp/laravel-plugin "^3.0"

@jzpeepz
Copy link

jzpeepz commented Jan 5, 2025

@ces27 Here is how I got it working in my project.

I updated my composer.json from:

"saloonphp/saloon": "3.0",

to

"saloonphp/saloon": "^3.0",

Then I ran composer update.

After that I ran composer require saloonphp/laravel-plugin "^3.5.0"

Boom!

@juse-less
Copy link
Contributor

juse-less commented Jan 5, 2025

@jzpeepz I'll have a look a bit later today.

I'm scratching my head on this one a bit.
The versions of software, and installation steps both of us take aren't too far off.
So I can't really see that there'd be an issue related to that.
I can partly see how platform difference could be an issue, but kinda feels far-fetched in this case.

One thing I didn't test was to clear my Composer cache, which I'll play with later.

composer clear-cache

I'll also try a few Linux-based machines, to see if there's anything different there.

@juse-less
Copy link
Contributor

juse-less commented Jan 5, 2025

@jzpeepz I guess you can disregard my previous message.
I didn't see you had posted the solution in your case, until I posted my message.

But that would explain why Composer really wanted to target Saloon 3.0, rather than 3.5.

Just so you know, when installing the Laravel plugin, you don't need to install Saloon itself.
The Laravel plugin already requires Saloon.
https://github.com/saloonphp/laravel-plugin/blob/15be0d587e61f11076f93d6df30561b88ff837c1/composer.json#L25

Maybe the documentation needs some clarification around that.

@Sammyjo20
Copy link
Member

Thanks for your help on this one @juse-less it sounds like setting it to 3.0 and not ^3.0 was the issue. There's been a lot of changes since 3.0 exactly and perhaps it was limiting the Laravel Plugin to a specific version as well, causing it to expect an older Laravel version.

@juse-less
Copy link
Contributor

@Sammyjo20 I'm not quite sure what happened.
But I also think it's related to transitive dependencies.

saloonphp/laravel-plugin updated from saloonphp/saloon ^3.0 to ^3.5 in version 3.3, so it makes sense to not be able to install the Laravel Plugin 3.3 and above.

But I'm still curious why the output is for Laravel Plugin 3.0.0, rather than, say, 3.2.0.
I guess it's probably just that the output is truncated by Composer itself in situations like these.
It probably tried all versions, but since

  • Laravel Plugin gained Laravel 11 support in version 3.5.0
  • Laravel Plugin requiring Saloon 3.5, and above, in version 3.3
  • The root package (app) requiring Saloon 3.0, explicitly

It couldn't resolve a version of all constraints.

Hopefully this is the issue for @ces27, as well.

But ultimately; install saloonphp/saloon, or, saloonphp/laravel-plugin.
Less risk of conflicts, and the Laravel Plugin already requires Saloon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants