The CiviCRM Installation Guide for Drupal 9 says to run these three lines of code:

composer config extra.enable-patching true
composer require civicrm/civicrm-asset-plugin:'~1.1'
composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.29'

The last one should end with the latest version of CiviCRM, which today is 5.34, but anyhow if you run these commands today, on the second and third you will see this error:

$ composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.34'
./composer.json has been updated
Running composer update civicrm/civicrm-core civicrm/civicrm-packages civicrm/civicrm-drupal-8
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires civicrm/civicrm-core ~5.34 -> satisfiable by civicrm/civicrm-core[5.34.0].
    - civicrm/civicrm-core 5.34.0 requires pear/validate_finance_creditcard dev-master -> found pear/validate_finance_creditcard[dev-master] but it does not match your minimum-stability.
  Problem 2
    - civicrm/civicrm-core 5.34.0 requires pear/validate_finance_creditcard dev-master -> found pear/validate_finance_creditcard[dev-master] but it does not match your minimum-stability.
    - civicrm/civicrm-drupal-8 5.34.0 requires civicrm/civicrm-core >=5.21.0 -> satisfiable by civicrm/civicrm-core[5.34.0].
    - Root composer.json requires civicrm/civicrm-drupal-8 ~5.34 -> satisfiable by civicrm/civicrm-drupal-8[5.34.0].


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

which is confusing. The issue is complicated, but we have a simple solution.

The solution is to require the “dev-master” version of the Pear packge “validate_finance_creditcard” like this:

composer require pear/validate_finance_creditcard:dev-master

After that, you can run the normal commands as above, and the CiviCRM code will be in place, ready for installation.

Leave a Reply

Your email address will not be published. Required fields are marked *