Answers.Body: <p>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.</p>
  <p>I was initially missing the <code>civicrm/civicrm-packages</code> in composer - I thought if it is required it should be a dependency of <code>civicrm/civicrm-core</code>. Apparently that's not the case, so I had to add it as a dependency of the application.</p>
  <p>I still had some issues due to <code>civicrm/civicrm-core</code> 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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-04T15:13:19.713Z
Answers.LastActivityDate: 2023-01-04T15:13:19.713Z
Answers.UserDisplayName: krystalcode
Body: <p>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:</p>
  <ul>
  <li>DB_DataObject</li>
  <li>HTML_QuickForm</li>
  <li>HTML_QuickForm_Controller</li>
  </ul>
  <p>I installed the packages with <code>pear install</code> since these are old packages that are not on packagist.</p>
  <p>Question 1: Is there a documentation page listing all PEAR packages required?</p>
  <p>Right now, I get a few PHP syntax errors related to those packages, running on PHP 7.4. For example, <code>&quot;continue&quot; targeting switch is equivalent to &quot;break&quot;. Did you mean to use &quot;continue 2&quot;? DataObject.php:4255</code> and <code>syntax error, unexpected 'new' (T_NEW) in /usr/local/lib/php/HTML/QuickForm/Controller.php on line 213</code>. These make sense since, for example, <code>HTML_QuickForm_Controller</code> had its last release in 2009.</p>
  <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-28T04:08:01.633Z
Comments.Text: 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 https://github.com/civicrm/civicrm-packages.git. How are you upgrading civi?
Comments.UserDisplayName: Demerit
Tags: <quickform><php7>
Title: PEAR packages and PHP 7.4
ThreadText: # PEAR packages and PHP 7.4
  
  (Asked by: username_0 on 2022-12-27)
  
  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?
  
  **Tags:** quickform, php7
  
  > **Comments:**
  > **username_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 https://github.com/civicrm/civicrm-packages.git. How are you upgrading civi?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-01-04. Score: 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.
  
  
  ---
  
  