woocommerce / wc-smooth-generator

Smooth product, customer and order generation for WooCommerce
315 stars 49 forks source link

Composer v2 Support #47

Closed adrianduffell closed 3 years ago

adrianduffell commented 3 years ago

An error occurs in the installation steps running composer install with using Composer v2.

$ composer install
Class WooCommerce\GitHooks\Hooks is not autoloadable, can not call pre-install-cmd script
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - composer/installers is locked to version v1.6.0 and an update of this package was not requested.
    - composer/installers v1.6.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - dealerdirect/phpcodesniffer-composer-installer is locked to version v0.5.0 and an update of this package was not requested.
    - dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 3
    - dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - woocommerce/woocommerce-sniffs 0.0.9 requires dealerdirect/phpcodesniffer-composer-installer 0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
    - woocommerce/woocommerce-sniffs is locked to version 0.0.9 and an update of this package was not requested.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

I was able to resolve it by running composer update.

timmyc commented 3 years ago

I hit this problem today too on a JN site, @adrianduffell's workaround did the trick for me... Also, wondering if this is why checking the box to include wc-smooth-generator on a JN site is currently failing.

rrennick commented 3 years ago

@adrianduffell Thanks for reporting and including work around instructions for others.