Composer won't update

I’m trying to add a new plugin but keep running into issues. I already have a number of plugins that were installed via composer using

composer require wpackagist-plugin/plugin-name-here

I also have a couple of private repo plugins in bitbucket where I added them to my composer.json file and ran

composer update -v --prefer-source

Now I have tried both of these methods on this new plugin and nothing works. The plugin is very-simple-event-list. Using method 1 I keep getting the error

[InvalidArgumentException]                                                   
Could not find package wpackagist-plugin/very-simple-event-list at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

So I tried method 2, even though this isn’t a premium plugin. But I keep getting the message

Nothing to install or update

Even though I’ve definitely added the new package to my json file exactly as I have done in the past.

Just for the record I’ve also tried addimg the plugin to my json file as

"require": {
    "wpackagist-plugin/very-simple-event-list": "^4.3"
}

But I still just get

Nothing to install or update

Whatever I seem to do I can’t update the .lock file or add anything. Can anyone see where I’m going wrong?!

I should also ad that I have tried clearing the composer cache but that didnt work.

This is likely to be a bug with wpackagist and an on-going issue: https://github.com/outlandishideas/wpackagist/issues/145

Hi @swalkinshaw ,

Thanks for the tip.

Would it still be a bug if I’ve tried to add the plugin by creating my own bitbucket repo? IE nothing to do with wpackagist?

Thanks

Nope, bug is only for wpackagist-* packages. It would be a different issue if other types weren’t working.

@swalkinshaw Hmm, ok thats strange then… Can I post what I have for you to take a look?

In my bitbucket repo I have a composer.json file with:

{
    "name": "myaccount/very-simple-event-list",
    "version": "master",
    "type": "wordpress-plugin",
    "dist": {
        "url": "git@bitbucket.org:myaccount/very-simple-event-list.git",
        "type": "git"
    }
}

Then in my bedrock composer.json I have

under repositories

{
      "type": "vcs",
       "url": "git@bitbucket.org:myaccount/gravityforms.git"
    }

under require

"myaccount/gravityforms":"dev-master"

And running composer update gives the errors I mentioned above.

These are the exact same steps I took to install gravity forms and acf-pro, which work fine. Is there any other tips you can give to help me debug the problem?

Thanks

I’m confused.

So you have a repo that’s just the very-simple-event-list plugin? And you added that composer.json to it?

If so, that composer.json should look like this:

{
  "name": "myaccount/very-simple-event-list",
  "type": "wordpress-plugin",
  "require": {
    "php": ">=5.3.2",
    "composer/installers": "v1.0.6"
  }
}

edit: see https://roots.io/wordpress-plugins-with-composer/ for more details.

Hi Scott,

OK thanks! I got the original piece of code from another post on here somewhere, and it has worked fine for both Gravity Forms and ACF-Pro in private bitbucket repos. So I found it strange not to work this time.

Thanks for the links, I’ll revisit my current setup and modify accordingly, including my existing premium private repos!