CiviCRM's use of PEAR/Log causes Drupal 8.6+ and 9.* compatibility issues.
Currently CiviCRM Core requires the
pear/log library. This library in turn requires
pear/pear_exception:1.0.0. The library itself is unmaintained at present.
Drupal 8/9 require
pear/pear_exception:1.0.1. This introduces an additional extra step for composer installs (that it would be nice to move away from!)
- Create a Drupal 8 (or 9) site:
composer create-project drupal/recommended-project d8site
- Attempt to install/require CiviCRM:
composer require civicrm/civicrm-core:'^5.25' civicrm/civicrm-packages:'^5.25' civicrm/civicrm-drupal-8:'^5.25' civicrm/civicrm-asset-plugin:'^1.0.0'
- You will receive a composer error regarding the inability to evaluate the correct version of
We could fix this by forking
pear/log and bumping it's version requirement for
pear/pear_exception. We could keep the current composer workaround (
composer require pear/pear_exception:'1.0.1 as 1.0.0'). We could propose an upstream patch and hope that repo is, in fact, maintained despite appearances?
I'm planning to explore option 3 above by filing an issue against
pear/log here: https://github.com/pear/Log