Skip to content

arnaud-ritti/gravityforms-composer-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gravity Forms Composer Bridge

Build Status

This repository acts as a bridge to use the excellent Gravity Forms Wordpress plugin together with Composer/Bedrock.

⚠️ Your are using dependabot to manage your dependencies ?

Please check the related documention file.

How to install

1. Add the desired repository to the repositories field in composer.json

Select one of the following repositories based on the desired plugin type:

Wordpress Packagist plugin

Use this version if you are unsure which version to use.

{
  "type": "composer",
  "url": "https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/wordpress-plugin/"
}

Wordpress Packagist Must-Use plugin

Use this version if you want Gravity Forms installed as MU-plugin.

{
  "type": "composer",
  "url": "https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/wordpress-muplugin/"
}

Wordpress wpackagist plugin type

Use this repository URL if you use the wpackagist-plugin plugin type.

{
  "type": "composer",
  "url": "https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/wpackagist-plugin/"
}

As regular composer dependency

To install the plugin in the vendor directory.

{
  "type": "composer",
  "url": "https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/library/"
}

2. Make your ACF PRO key available

Set the environment variable GRAVITYFORMS_KEY.

Alternatively you can add an entry to your .env file:

# .env (same directory as composer.json)
GRAVITYFORMS_KEY=Your-Key-Here

3. Require Gravity Forms

You can now use composer as usual

composer require gravityforms/gravityforms

3.b. Require an add-on

composer require gravityforms/<slug>

How does it work

This Github repository is a 'Composer repository'. Actually a composer repository is simply a packages.json served from a webserver. This repository uses Github Actions to periodically create a packages.json that references the files provided by Gravity Forms. Please note that these files require a valid license key that is not provided by this repository. In order to append this license key to the files, https://github.com/arnaud-ritti/gravityforms-installer is used. This installer detects that you want to install advanced custom fields, and then appends the provided private key (via environment variable) to the actual download URL on servers (so the key is never send to this composer repository).

Available versions

See https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/wpackagist-plugin/packages.json

Example(s)

  1. Installs Gravity Forms as mu-plugin in web/app/mu-plugins/gravityforms
{
  "name": "example/test",
  "repositories": [
    {
      "type": "composer",
      "url": "https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/wordpress-muplugin/"
    },
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    }
  ],
  "require": {
      "gravityforms/gravityforms": "^2.6.3"
  },
  "extra": {
    "installer-paths": {
      "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"]
    }
  }
}
  1. Installs Gravity Forms as plugin in wp-content/plugins/gravityforms
{
    "name": "example/test",
    "repositories": [
      {
        "type": "composer",
        "url": "https://arnaud-ritti.github.io/gravityforms-composer-bridge/composer/v1/wordpress-plugin/"
      },
      {
        "type": "composer",
        "url": "https://wpackagist.org"
      }
    ],
    "require": {
      "gravityforms/gravityforms": "^2.6.3"
    },
    "extra": {
      "installer-paths": {
        "wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
      }
    }
  }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages