Skip to content

Conversation

@SherifMesallam
Copy link
Contributor

@SherifMesallam SherifMesallam commented Jul 1, 2021

Description

This PR fixes gravityforms/backlog#386 by updating the package type to wordpress-plugin

Testing Instructions

  1. Outside of your WordPress installation, in another directory, create a composer.json file with the following contents:
{
	"repositories": [
		{
			"type": "git",
			"url": "git@github.com:gravityforms/gravityformscli.git"
		}
	],
	"require": {
		"composer/installers": "^1.11",
		"gravityforms/gravityformscli": "^1.4"
	}
}
  1. Run composer install.
  2. Review the contents of the directory. You should see a composer.lock file and a vendor directory. The vendor directory should contain a directory named gravityforms, which itself contains a directory named gravityformscli, which contains the contents of this repository.
  3. Run rm --rf vendor composer.lock in the command line.
  4. Run composer require gravityforms/gravityformscli:dev-fix-386-package-type.
  5. Review your directory contents again. You should now have a vendor directory and a wp-content directory. The wp-content directory should contain the gravityformscli package within the plugins directory.

@SherifMesallam
Copy link
Contributor Author

@jmichaelward not sure how to write the testing instructions for this one?

@jmichaelward
Copy link

@jmichaelward not sure how to write the testing instructions for this one?

I messaged you in Slack about this, but letting you know here, too, that I added testing instructions above.

Copy link

@jmichaelward jmichaelward left a comment

Choose a reason for hiding this comment

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

It's unclear whether we need a version bump right now, but I'd assume not and that this is probably just an administrative change that will go out with the next release.

@michelle-bauer michelle-bauer requested a review from ajmorris July 1, 2021 16:39
@jmichaelward jmichaelward marked this pull request as ready for review July 1, 2021 21:59
@michelle-bauer
Copy link

I ran into an error while running composer install. Maybe I could pair with someone tomorrow to test this?

@jmichaelward
Copy link

I ran into an error while running composer install. Maybe I could pair with someone tomorrow to test this?

@michelle-bauer I can help walk you through it. My assumption is that you don't have an SSH key attached to your GitHub account, so the git@github.com URL in the composer.json file doesn't work for you (because our repositories are private). We can approach it a couple of different ways: walk through the process of getting you set up with an SSH key (so you can test similar stuff like this in the future), do a screenshare where show you how it works, or we can update the composer.json file to point to your local file system instead of the GitHub repo, just for the purposes of demonstrating the difference between a wordpress-plugin type package and a package type.

@michelle-bauer
Copy link

@jmichaelward I may just be doing it wrong. Here's the error I am getting: Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///Applications/Local.app/Contents/Resources/extraResources/bin/composer/composer.phar/src/Composer/DependencyResolver/DefaultPolicy.php:84

I'd love to walk through the testing steps together in the am.

@SherifMesallam
Copy link
Contributor Author

It's unclear whether we need a version bump right now, but I'd assume not and that this is probably just an administrative change that will go out with the next release.

Agreed.

@SherifMesallam
Copy link
Contributor Author

@jmichaelward I may just be doing it wrong. Here's the error I am getting: Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///Applications/Local.app/Contents/Resources/extraResources/bin/composer/composer.phar/src/Composer/DependencyResolver/DefaultPolicy.php:84

I'd love to walk through the testing steps together in the am.

Hi @michelle-bauer I think this has something to do with the PHP version, are you using 8 ?

You can try updating composer, first try
composer self-update --stable
If that didn't workout, try
composer self-update --snapshot

Happy to have a call anytime to go through it together

@michelle-bauer
Copy link

Ah, that worked! Thanks, Sherif! 🎉

@michelle-bauer michelle-bauer removed the request for review from ajmorris July 2, 2021 12:16
@SherifMesallam SherifMesallam merged commit 91505fd into master Jul 2, 2021
@richardW8k richardW8k deleted the fix-386-package-type branch July 27, 2021 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants