piotrpress/composer-gravityforms

This composer plugin enables installation of GravityForms WordPress plugin and its addons.

v1.0.0 2023-12-11 14:50 UTC

This package is auto-updated.

Last update: 2024-12-11 17:14:26 UTC


README

This composer plugin enables installation of GravityForms WordPress plugin and its addons.

Example

$ composer require gravityforms/gravityforms:*
$ composer require gravityforms/gravityformscli:*

NOTE: Package name can be any GravityForms addon slug.

Installation

  1. Add the plugin as a global composer requirement:
$ composer global require piotrpress/composer-gravityforms
  1. Allow the plugin execution:
$ composer config -g allow-plugins.piotrpress/composer-gravityforms true
  1. Provide GravityForms license key:
$ composer config --global http-basic.gravityapi.com key <license_key>

NOTE: using --global option is recommended to keep credentials outside of project's files.

Usage

The GravityForms plugin and its addons have a type set to wordpress-plugin and can be installed in custom location using for example Composer Installers:

{
  "require": {
    "gravityforms/gravityforms": "*",
    "gravityforms/gravityformscli": "*",
    "composer/installers": "^2.0"
  },
  "config": {
    "allow-plugins": {
      "composer/installers": true
    }
  },
  "extra": {
    "installer-paths": {
      "wp-content/plugins/{$name}/": [
        "type:wordpress-plugin"
      ]
    }
  }
}

Requirements

  • PHP >= 7.4 version.
  • Composer ^2.0 version.

License

MIT