1

I am upgrading to CiviCRM 5.56.1 on a Drupal 9 application. I started getting errors on files missing and I realized that the following PEAR packages were missing:

  • DB_DataObject
  • HTML_QuickForm
  • HTML_QuickForm_Controller

I installed the packages with pear install since these are old packages that are not on packagist.

Question 1: Is there a documentation page listing all PEAR packages required?

Right now, I get a few PHP syntax errors related to those packages, running on PHP 7.4. For example, "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? DataObject.php:4255 and syntax error, unexpected 'new' (T_NEW) in /usr/local/lib/php/HTML/QuickForm/Controller.php on line 213. These make sense since, for example, HTML_QuickForm_Controller had its last release in 2009.

Question 2: Am I missing something here? Does CiviCRM has dependencies that do not support recent version of PHP, even though CiviCRM core states that it supports PHP 7.4?

1
  • 1
    When you say they were missing, I'm not clear what you mean. On drupal 9 they should be in <install_root>/vendor/civicrm/civicrm-packages. They are not managed with pear but are managed with composer (package civicrm/civicrm-packages), and ultimately pull from github.com/civicrm/civicrm-packages.git. How are you upgrading civi?
    – Demerit
    Commented Dec 28, 2022 at 4:08

1 Answer 1

2

I was updating from an early version of CiviCRM (4.7.30) to the latest one, together with an upgrade from Drupal 8.7 to 9.4. I had to do progressive updates i.e. to 5.26.2/8.8, then 5.51.3/8.8, then 5.56.1/9.4.

I was initially missing the civicrm/civicrm-packages in composer - I thought if it is required it should be a dependency of civicrm/civicrm-core. Apparently that's not the case, so I had to add it as a dependency of the application.

I still had some issues due to civicrm/civicrm-core not properly declaring its dependencies in earlier versions e.g. 5.26.2, so I had to add 1 or 2 PEAR packages in the application's composer.json to go through that step and then remove it after moving to the latest version that does declare its dependencies correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.