kennethormandy / craft-marketplace

Make your Craft Commerce site a Marketplace, via Stripe
https://plugins.craftcms.com/marketplace
Other
7 stars 0 forks source link

Composer dependencies #20

Open AndrewMac opened 2 years ago

AndrewMac commented 2 years ago

Hello there, I'd really love to try Marketplace, but I can't install it because of a composer dependency issue:

    - venveo/craft-oauthclient[2.1.7, ..., 2.1.9] require league/oauth2-google ^2.2 -> found league/oauth2-google[2.2.0] but the package is fixed to 3.0.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - kennethormandy/craft-marketplace[1.5.0, ..., 1.5.1] require venveo/craft-oauthclient ^2.1.7 -> satisfiable by venveo/craft-oauthclient[2.1.7, 2.1.8, 2.1.9].
    - Root composer.json requires kennethormandy/craft-marketplace ^1.5 -> satisfiable by kennethormandy/craft-marketplace[1.5.0, 1.5.1].

Is that something you might be able to help with? Or would I have to contact the developer for venveo/craft-oauthclient?

Thanks in advance for any help or advice you may be able to give with this.

Andrew Macpherson

kennethormandy commented 2 years ago

@AndrewMac Hi, thanks for opening an issue. I’m happy to try and help, with a few more details.

I’m wondering if you already had league/oauth2-google v3.0.4 installed, maybe as dependency of another plugin you already had installed? And venveo/craft-oauthclient wants v2.2.x.

Would you mind sharing some or all of your composer.json require object, or seeing what that package might be an existing dependency of?

With a fresh install of Craft CMS, I’m able to setup everything without that warning.

# Install Craft Commerce
composer require craftcms/commerce craftcms/commerce-stripe
craft plugin/install commerce
craft plugin/install commerce-stripe

# Install Marketplace
composer require kennethormandy/craft-marketplace
craft plugin/install oauthclient
craft plugin/install marketplace

Here’s what I ended up with, in the composer.json:

  "require": {
    "craftcms/cms": "^3.7.26",
    "craftcms/commerce": "^3.4",
    "craftcms/commerce-stripe": "^2.4",
    "kennethormandy/craft-marketplace": "^1.5",
    "vlucas/phpdotenv": "^5.4.0"
  },

Let me know if that’s helpful at all, and otherwise happy to look into it further.

AndrewMac commented 2 years ago

Hi Kenneth, and thanks for the quick reply!

There do indeed seem to be other plugins that list "league/oauth2-google": "^3.0.0" as a dependency. Very sorry to have left that information out!

One is Dukt Video: https://github.com/dukt/videos/blob/master/composer.json https://plugins.craftcms.com/videos

The other is Dukt Social: https://github.com/dukt/social/blob/master/composer.json

According to my composer.lock file, Verbb Formie also requires ^3.0, although it's actually not listed in the plugin's composer file in GitHub.

Anyway, I hope that gives you a bit more insight into what might be happening.

Cheers, Andrew

AndrewMac commented 2 years ago

Hi Kenneth

Yes, I found and ran this useful command:

nitro composer depends league/oauth2-google
… checking /Users/andrew/Sites/craft/composer.json ✓
dukt/social     2.0.3   requires  league/oauth2-google (^3.0.0)
dukt/videos     2.0.15  requires  league/oauth2-google (^3.0.0)
verbb/formie    1.5.9   requires  league/oauth2-google (^3.0)
composer depends completed 🤘
AndrewMac commented 2 years ago

HI Kenneth

Apologies again, but does this mean that we have to wait to see if Venveo can (and then is also prepared to) update the venveo/craft-oauthclient dependencies to at least " ^2.0 || ^3.0"?

I can see that it currently has "league/oauth2-github": "^2.0" https://github.com/venveo/craft-oauthclient/blob/master/composer.json

If so, I'm guessing we might have a bit of a wait on our hands?

Cheers, Andrew

kennethormandy commented 2 years ago

@AndrewMac

update the venveo/craft-oauthclient dependencies to at least " ^2.0 || ^3.0"?

I’ve forked the plugin to make this change, and will open a Pull Request. In the meantime, you should be able to do this. It’s working for me, and I have both the dukt plugins installed as well.

Add this to your composer.json:

{
  // …

  "minimum-stability": "dev",
  "prefer-stable": true,
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/kennethormandy/craft-oauthclient.git"
    }
  ]
}

Add this to the require portion of your composer.json:

"require": {
  // …

  "venvo/craft-oauthclient": "dev-ko-update-league-oauth-deps",

  // …
}

Then, you should be able to install my fork, rather than the currently live version of the plugin:

composer require venvo/craft-oauthclient:dev-ko-update-league-oauth-deps

Once the fork is merged and the OAuth Client plugin is updated, this can all be removed.


Let me know if that works for you to try out the plugin. I also have the Pro version of the plugin that has been in beta for a while, but is more than ready to be used. Feel free to send me an email about that, and I can give you the details on how to try that out too.

AndrewMac commented 2 years ago

Hi Kenneth, and thanks for all your help with this. I noticed that Venveo had accepted your pull request (although they hadn't issued an update), but I was able to install by requiring venveo/craft-oauthclient: "dev-master as 2.1.9". So when I have a bit more free time I'm certainly going to explore your plugin!

One thing, though, is that the client we're hoping to get for this project doesn't want their payees/users logging in to the system, and wants them to enter and edit their products through a front-end form. And sadly, from what I've looked at in the past few days, that front-end approach to Commerce looks really difficult to set up. So if we ended up going ahead with that project we might have to look at using normal Entries rather than Products. But your Marketplace plugin wouldn't support that, would it?

I still might have a different, smaller project where we could use Marketplace, though, and in that project we could definitely use Commerce Products, because the business employees would be entering all data. So I would be interested to know a bit more about your Pro version — how it differs from Lite, and when it might be available.

Thanks heaps, for everything! Andrew