Site icon Hip-Hop Website Design and Development

Requiring latest version of GravityForms plugin using Composer [closed]

I’m using Composer to manage plugins as dependencies. I also want to allow the plugins to automatically update in WordPress and not get overwritten by Git, which is why I’m not just including plugin files in the repository. Most of them I am specifying like so in composer.json:

"require": {
  "wpackagist-plugin/akismet": "*",
  "wpackagist-plugin/fix-image-rotation": "*"
}

My site requires the GravityForms plugin, which I have a license for, but it does not appear in wpackagist like the others, since it is a premium plugin. I have worked around this by using this repository which claims to mirror the GravityForms plugin.

I included it like so in composer.json:

"require": {
  "wp-premium/gravityforms": "dev-master"
}    

"repositories":[
  {
    "type": "vcs",
    "url": "https://github.com/wp-premium/gravityforms"
  }
]

Which worked, but I realized that this repo has not been updated since October 1, 2020, and it has GravityForms version 2.4.0 (current version at the time of writing is 2.5.16).

And when I view the plugin in Admin, GravityForms does not give me the option to enable auto updates like other plugins do.

As another way around this, earlier, I used the Gravity Forms CLI plugin and in composer.json, added a script to run on post-install-cmd to install GravityForms:

wp gf install --key=xxxxx

Which did get the latest version of GravityForms, but this meant displaying my license key in my repository, which I don’t want to do for obvious reasons. I am on a free Github account, so only have so many repos I can make private.

How can I require the latest version of GravityForms using Composer without exposing my license key in my repository?

Is there another public Github repo that has an up-to-date version of GravityForms?