Skip to content

Conversation

@laborin
Copy link
Contributor

@laborin laborin commented Dec 22, 2023

Description

This PR adds the ability to use the plugin as a global WP-CLI Package, to make all GF CLI commands available to any site installed on the server without the need of installing the plugin on each site.

Closes https://github.com/gravityforms/backlog/issues/3983
Closes https://github.com/gravityforms/backlog/issues/3039 by updating the "Tested up to" version

Testing instructions

  1. Download this branch as a ZIP file from Github, not the package built with HAL because it removes the composer.json file.
  2. Using the command line, install the plugin as a global WP-CLI Package with this command: wp package install <full path to the zip file>
    a. What location should I be at? installed from within local/site/app/public (site didn't have gravityforms repo) and it installed to /Users/gosiapado/.wpcli/packages/local/gravityforms-gravityformscli
  3. Using the command line, change directory to a directory containing a WordPress site with Gravity Forms installed but NO gravityformscli installed.
    a. What location should I be at? any directory that is child of the root directory (any child of the directory containing your wp-config.php file)
  4. Try using a GF Cli command and confirm it works. For example, this should list all the forms: wp gf form list

Note: Once this PR is merged, users will be able to install this package directly from the public Git repository this way:
wp package install https://github.com/gravityforms/gravityformscli.git

QA issue tracking sheet

Screenshots

Checklist:

  • I've checked the error log to ensure my code doesn't throw any errors.
  • I've added a changelog entry (if necessary) and updated the version number in 4 places, run npm install and committed package-lock.json (if necessary).
  • My code follows the WordPress coding standards and inline documentation standards
  • My code follows the accessibility standards.
  • This PR has a related issue.
  • This PR has a related test.
  • I have given QA direction on which areas are most important to test.
  • I have considered what will happen when an existing user updates to this branch.
  • I have added a "Documentation Needed" label to this PR (if necessary).

@laborin laborin requested review from a team, SherifMesallam and gosiapado December 22, 2023 16:21
@laborin laborin marked this pull request as ready for review December 22, 2023 16:22
@laborin laborin removed the request for review from SherifMesallam December 22, 2023 17:50
@gosiapado
Copy link

@laborin, I need more details in the testing instructions, please. My local environment has multiple sites set up. I'm not sure where I'm supposed to be installing to/running commands from. I've added some subpoints with questions on no. 2 & 3 in testing instructions. Please provide examples or let me know when you're available and we can do a screenshare (or record one for me). Thank you!

Copy link

@gosiapado gosiapado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With guidance was able to install package at global level and test with multiple local sites. Besides listing forms also successfully added fields to forms using the CLI. 👍
Assuming, the warning about testing and minimum tested version on the wordpress.org page won't be resolved until this is merged and published.

Copy link
Contributor

@morganisok morganisok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@laborin laborin merged commit 07e868b into master Dec 26, 2023
@laborin laborin deleted the update-3983-allow-usage-as-wp-cli-package branch December 26, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants