git-updater: Composer install failed

I have the following error when i try to install with composer:

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

  Problem 1
    - afragen/github-updater 8.8.2 requires afragen/wordpress-plugin-readme-parser dev-master -> satisfiable by afragen/wordpress-plugin-readme-parser[dev-master] but these conflict with your requirements or minimum-stability.
    - afragen/github-updater 8.8.1 requires afragen/wordpress-plugin-readme-parser dev-master -> satisfiable by afragen/wordpress-plugin-readme-parser[dev-master] but these conflict with your requirements or minimum-stability.
    - afragen/github-updater 8.8.0 requires afragen/wordpress-plugin-readme-parser dev-master -> satisfiable by afragen/wordpress-plugin-readme-parser[dev-master] but these conflict with your requirements or minimum-stability.
    - Installation request for afragen/github-updater ^8.8 -> satisfiable by afragen/github-updater[8.8.0, 8.8.1, 8.8.2].

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Add a wp-dependencies.json file to your plugin root with the following.

Just a note, as of April 2021, the github-updater repo was renamed to git-updater

So if you’re using the code example above, you should use the code sample below instead, which changes github-updater to git-updater (otherwise you’ll end up with some weirdness when it downloads the plugin twice)

[
  {
    "name": "Git Updater",
    "host": "github",
    "slug": "git-updater/git-updater.php",
    "uri": "afragen/git-updater",
    "branch": "master",
    "optional": false,
    "token": null
  }
]

If you wanted to use my framework all you would need to do is the following.

composer require afragen/wp-dependency-installer:"^2"

Add a wp-dependencies.json file to your plugin root with the following.

[
  {
    "name": "GitHub Updater",
    "host": "github",
    "slug": "github-updater/github-updater.php",
    "uri": "afragen/github-updater",
    "branch": "master",
    "optional": false,
    "token": null
  }
]

Put the following after you have done your require_once( __DIR__ . '/vendor/autoload.php' );

WP_Dependency_Installer::instance()->run( __DIR__ );