From a724eab14feb4ac4520522f139fc724c53875ed5 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Tue, 18 Dec 2018 14:27:29 -0500
Subject: [PATCH] 5.8.2 release

---
 civicrm.php                                   |  3 +-
 civicrm/CRM/Case/Form/CaseView.php            |  3 +-
 civicrm/CRM/Case/XMLProcessor/Process.php     |  1 -
 .../CRM/Contribute/Form/AdditionalInfo.php    |  1 -
 .../CRM/Contribute/Page/ManagePremiums.php    |  2 +-
 civicrm/CRM/Contribute/Page/Premium.php       |  2 +-
 civicrm/CRM/Core/Form/EntityFormTrait.php     |  2 +-
 civicrm/CRM/Financial/DAO/FinancialType.php   |  7 +--
 .../Upgrade/Incremental/sql/5.8.2.mysql.tpl   |  1 +
 civicrm/CRM/Utils/System/WordPress.php        | 10 ++--
 civicrm/Civi/CCase/SequenceListener.php       |  7 ++-
 civicrm/api/v3/Contact.php                    |  2 +-
 civicrm/api/v3/FinancialType.php              |  2 -
 civicrm/civicrm-version.php                   |  2 +-
 civicrm/release-notes/5.8.1.md                | 10 ++--
 civicrm/release-notes/5.8.2.md                | 53 +++++++++++++++++++
 civicrm/sql/civicrm_data.mysql                |  2 +-
 civicrm/sql/civicrm_generated.mysql           |  2 +-
 civicrm/vendor/autoload.php                   |  2 +-
 civicrm/vendor/composer/autoload_real.php     | 14 ++---
 civicrm/vendor/composer/autoload_static.php   | 10 ++--
 .../xml/schema/Financial/FinancialType.xml    |  5 --
 civicrm/xml/version.xml                       |  2 +-
 23 files changed, 95 insertions(+), 50 deletions(-)
 create mode 100644 civicrm/CRM/Upgrade/Incremental/sql/5.8.2.mysql.tpl
 create mode 100644 civicrm/release-notes/5.8.2.md

diff --git a/civicrm.php b/civicrm.php
index 40d4d87dac..8abfbf57d7 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -2,11 +2,10 @@
 /*
 Plugin Name: CiviCRM
 Description: CiviCRM - Growing and Sustaining Relationships
-Version: 5.8.1
+Version: 5.8.2
 Author: CiviCRM LLC
 Author URI: https://civicrm.org/
 Plugin URI: https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress
-GitHub Plugin URI: https://github.com/tadpolecc/civicrm.git
 License: AGPL3
 Text Domain: civicrm
 Domain Path: /languages
diff --git a/civicrm/CRM/Case/Form/CaseView.php b/civicrm/CRM/Case/Form/CaseView.php
index ba7814ec0f..d27c87d61f 100644
--- a/civicrm/CRM/Case/Form/CaseView.php
+++ b/civicrm/CRM/Case/Form/CaseView.php
@@ -208,8 +208,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
 
     $aTypes = $xmlProcessor->get($this->_caseType, 'ActivityTypes', TRUE);
 
-    $allActTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'name');
-
+    $allActTypes = CRM_Activity_BAO_Activity::buildOptions('activity_type_id', 'validate');
     $emailActivityType = array_search('Email', $allActTypes);
     $pdfActivityType = array_search('Print PDF Letter', $allActTypes);
 
diff --git a/civicrm/CRM/Case/XMLProcessor/Process.php b/civicrm/CRM/Case/XMLProcessor/Process.php
index 1929c38fb7..b6f58dd898 100644
--- a/civicrm/CRM/Case/XMLProcessor/Process.php
+++ b/civicrm/CRM/Case/XMLProcessor/Process.php
@@ -99,7 +99,6 @@ class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor {
   public function process($xml, &$params) {
     $standardTimeline = CRM_Utils_Array::value('standardTimeline', $params);
     $activitySetName = CRM_Utils_Array::value('activitySetName', $params);
-    $activityTypeName = CRM_Utils_Array::value('activityTypeName', $params);
 
     if ('Open Case' == CRM_Utils_Array::value('activityTypeName', $params)) {
       // create relationships for the ones that are required
diff --git a/civicrm/CRM/Contribute/Form/AdditionalInfo.php b/civicrm/CRM/Contribute/Form/AdditionalInfo.php
index 0b543656d1..2ea1d7d54d 100644
--- a/civicrm/CRM/Contribute/Form/AdditionalInfo.php
+++ b/civicrm/CRM/Contribute/Form/AdditionalInfo.php
@@ -154,7 +154,6 @@ class CRM_Contribute_Form_AdditionalInfo {
 
     $statusName = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
     if ($form->_id && $form->_values['contribution_status_id'] == array_search('Cancelled', $statusName)) {
-      $netAmount->freeze();
       $feeAmount->freeze();
     }
 
diff --git a/civicrm/CRM/Contribute/Page/ManagePremiums.php b/civicrm/CRM/Contribute/Page/ManagePremiums.php
index 462e8b33eb..9d0f5e711f 100644
--- a/civicrm/CRM/Contribute/Page/ManagePremiums.php
+++ b/civicrm/CRM/Contribute/Page/ManagePremiums.php
@@ -152,7 +152,7 @@ class CRM_Contribute_Page_ManagePremiums extends CRM_Core_Page_Basic {
       );
       // Financial Type
       if (!empty($dao->financial_type_id)) {
-        $premiums[$dao->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Financial_BAO_FinancialType', 'financial_type', $dao->financial_type_id);
+        $premiums[$dao->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Product', 'financial_type_id', $dao->financial_type_id);
       }
     }
     $this->assign('rows', $premiums);
diff --git a/civicrm/CRM/Contribute/Page/Premium.php b/civicrm/CRM/Contribute/Page/Premium.php
index 0028036acb..acbbeda30d 100644
--- a/civicrm/CRM/Contribute/Page/Premium.php
+++ b/civicrm/CRM/Contribute/Page/Premium.php
@@ -168,7 +168,7 @@ class CRM_Contribute_Page_Premium extends CRM_Core_Page_Basic {
         );
         // Financial Type
         if (!empty($premiumsProductDao->financial_type_id)) {
-          $premiums[$productDAO->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Financial_BAO_FinancialType', 'financial_type', $premiumsProductDao->financial_type_id);
+          $premiums[$productDAO->id]['financial_type'] = CRM_Core_PseudoConstant::getLabel('CRM_Contribute_BAO_Product', 'financial_type_id', $premiumsProductDao->financial_type_id);
         }
       }
     }
diff --git a/civicrm/CRM/Core/Form/EntityFormTrait.php b/civicrm/CRM/Core/Form/EntityFormTrait.php
index 30e81b7b3d..c4c12a00b7 100644
--- a/civicrm/CRM/Core/Form/EntityFormTrait.php
+++ b/civicrm/CRM/Core/Form/EntityFormTrait.php
@@ -146,7 +146,7 @@ trait CRM_Core_Form_EntityFormTrait {
     }
     foreach ($this->entityFields as $fieldSpec) {
       $value = CRM_Utils_Request::retrieveValue($fieldSpec['name'], $this->getValidationTypeForField($fieldSpec['name']));
-      if ($value !== FALSE) {
+      if ($value !== FALSE && $value !== NULL) {
         $defaults[$fieldSpec['name']] = $value;
       }
     }
diff --git a/civicrm/CRM/Financial/DAO/FinancialType.php b/civicrm/CRM/Financial/DAO/FinancialType.php
index dd2a48f7ce..725b24db91 100644
--- a/civicrm/CRM/Financial/DAO/FinancialType.php
+++ b/civicrm/CRM/Financial/DAO/FinancialType.php
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Financial/FinancialType.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6d85bc0675253407de19ac9226ba4478)
+ * (GenCodeChecksum:63ed31fcf35a0d36439e4947ceb3473f)
  */
 
 /**
@@ -118,11 +118,6 @@ class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO {
             'type' => 'Text',
             'label' => ts("Name"),
           ],
-          'pseudoconstant' => [
-            'table' => 'civicrm_financial_type',
-            'keyColumn' => 'id',
-            'labelColumn' => 'name',
-          ]
         ],
         'description' => [
           'name' => 'description',
diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.8.2.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.8.2.mysql.tpl
new file mode 100644
index 0000000000..aee80fd441
--- /dev/null
+++ b/civicrm/CRM/Upgrade/Incremental/sql/5.8.2.mysql.tpl
@@ -0,0 +1 @@
+{* file to handle db changes in 5.8.2 during upgrade *}
diff --git a/civicrm/CRM/Utils/System/WordPress.php b/civicrm/CRM/Utils/System/WordPress.php
index 09b79d672c..493e174f79 100644
--- a/civicrm/CRM/Utils/System/WordPress.php
+++ b/civicrm/CRM/Utils/System/WordPress.php
@@ -815,13 +815,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
     $contactCreated = 0;
     $contactMatching = 0;
 
-    // previously used $wpdb - which means WordPress *must* be bootstrapped
-    $wpUsers = get_users(array(
-      'blog_id' => get_current_blog_id(),
-      'number' => -1,
-    ));
+    global $wpdb;
+    $wpUserIds = $wpdb->get_col("SELECT $wpdb->users.ID FROM $wpdb->users");
 
-    foreach ($wpUsers as $wpUserData) {
+    foreach ($wpUserIds as $wpUserId) {
+      $wpUserData = get_userdata($wpUserId);
       $contactCount++;
       if ($match = CRM_Core_BAO_UFMatch::synchronizeUFMatch($wpUserData,
         $wpUserData->$id,
diff --git a/civicrm/Civi/CCase/SequenceListener.php b/civicrm/Civi/CCase/SequenceListener.php
index 2709749a94..cd60e81575 100644
--- a/civicrm/Civi/CCase/SequenceListener.php
+++ b/civicrm/Civi/CCase/SequenceListener.php
@@ -120,7 +120,12 @@ class SequenceListener implements CaseChangeListener {
       'activity_date_time' => \CRM_Utils_Time::getTime('YmdHis'),
       'case_id' => $analyzer->getCaseId(),
     );
-    $r = civicrm_api3('Activity', 'create', $params);
+    $case = $analyzer->getCase();
+    if (!empty($case['contact_id'])) {
+      $params['target_id'] = \CRM_Utils_Array::first($case['contact_id']);
+    }
+
+    civicrm_api3('Activity', 'create', $params);
     $analyzer->flush();
   }
 
diff --git a/civicrm/api/v3/Contact.php b/civicrm/api/v3/Contact.php
index 5e2dddc1b2..259881da8d 100644
--- a/civicrm/api/v3/Contact.php
+++ b/civicrm/api/v3/Contact.php
@@ -953,7 +953,7 @@ function civicrm_api3_contact_getquick($params) {
     $customOptionsWhere = $customOptionsWhere ?: [0];
     $whereClause = " WHERE (" . implode(' OR ', $customOptionsWhere) . ") $where";
   }
-  elseif (!empty($params['field_name']) && !empty($params['table_name'])) {
+  elseif (!empty($params['field_name']) && !empty($params['table_name']) && $params['field_name'] != 'sort_name') {
     $whereClause = " WHERE ( $table_name.$field_name LIKE '$strSearch') {$where}";
     // Search by id should be exact
     if ($field_name == 'id' || $field_name == 'external_identifier') {
diff --git a/civicrm/api/v3/FinancialType.php b/civicrm/api/v3/FinancialType.php
index 59f0d8fe34..ce89e5dbc3 100644
--- a/civicrm/api/v3/FinancialType.php
+++ b/civicrm/api/v3/FinancialType.php
@@ -44,8 +44,6 @@ function civicrm_api3_financial_type_create($params) {
 
 function _civicrm_api3_financial_type_create_spec(&$params) {
   $params['name']['api.required'] = 1;
-  $params['name']['type'] = CRM_Utils_Type::T_STRING;
-  unset($params['name']['pseudoconstant']);
 }
 
 /**
diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php
index a1fde5e885..9dcaff169e 100644
--- a/civicrm/civicrm-version.php
+++ b/civicrm/civicrm-version.php
@@ -1,7 +1,7 @@
 <?php
 /** @deprecated */
 function civicrmVersion( ) {
-  return array( 'version'  => '5.8.1',
+  return array( 'version'  => '5.8.2',
                 'cms'      => 'Wordpress',
                 'revision' => '' );
 }
diff --git a/civicrm/release-notes/5.8.1.md b/civicrm/release-notes/5.8.1.md
index fec398532a..93e0be2590 100644
--- a/civicrm/release-notes/5.8.1.md
+++ b/civicrm/release-notes/5.8.1.md
@@ -36,13 +36,17 @@ Released December 12, 2018
   NOTE: Users of Mosaico/Flexmailer should upgrade to Flexmailer `v1.0-beta1+`
   for a complete fix ([#28](https://github.com/civicrm/org.civicrm.flexmailer/pull/28)).
 
+- **([dev/core#591](https://lab.civicrm.org/dev/core/issues/591))
+  Fix regression in which temp tables display unnecessary warning
+  (Backport [13258](https://github.com/civicrm/civicrm-core/pull/13258))**
+
 ## <a name="credits"></a>Credits
 
 This release was developed by the following authors and reviewers:
 
-Wikimedia Foundation - Eileen McNaughton; Megaphone Technology Consulting -
-Jon Goldberg; Fuzion - Luke Stewart; CiviCRM - Tim Otten, Coleman Watts;
-Australian Greens - Seamus Lee
+Wikimedia Foundation - Eileen McNaughton; Squiffle Consulting - Aidan
+Saunders; Megaphone Technology Consulting - Jon Goldberg; Fuzion - Luke
+Stewart; CiviCRM - Tim Otten, Coleman Watts; Australian Greens - Seamus Lee
 
 ## <a name="feedback"></a>Feedback
 
diff --git a/civicrm/release-notes/5.8.2.md b/civicrm/release-notes/5.8.2.md
new file mode 100644
index 0000000000..96d76d8592
--- /dev/null
+++ b/civicrm/release-notes/5.8.2.md
@@ -0,0 +1,53 @@
+# CiviCRM 5.8.2
+
+Released December 17, 2018
+
+- **[Synopsis](#synopsis)**
+- **[Bugs resolved](#bugs)**
+- **[Credits](#credits)**
+- **[Feedback](#feedback)**
+
+## <a name="synopsis"></a>Synopsis
+
+| *Does this version...?*                                         |         |
+|:--------------------------------------------------------------- |:-------:|
+| Fix security vulnerabilities?                                   |   no    |
+| Change the database schema?                                     |   no    |
+| Alter the API?                                                  |   no    |
+| Require attention to configuration options?                     |   no    |
+| Fix problems installing or upgrading to a previous version?     |   no    |
+| Introduce features?                                             |   no    |
+| **Fix bugs?**                                                   | **yes** |
+
+## <a name="bugs"></a>Bugs resolved
+
+- **([dev/core#585](https://lab.civicrm.org/dev/core/issues/585)) CiviCase - Fix target contact when using activity sequence
+  ([13305](https://github.com/civicrm/civicrm-core/pull/13305))**
+
+- **([dev/core#593](https://lab.civicrm.org/dev/core/issues/593)) Quick Search - Fix search by email
+  ([13297](https://github.com/civicrm/civicrm-core/pull/13297))**
+
+- **([dev/core#595](https://lab.civicrm.org/dev/core/issues/595)) CiviMember - Fix "Label" field on membership status form
+  ([13288](https://github.com/civicrm/civicrm-core/pull/13288))**
+
+- **([dev/core#597](https://lab.civicrm.org/dev/core/issues/597)) Financial Type API - Fix search by "name"
+  ([13302](https://github.com/civicrm/civicrm-core/pull/13302))**
+
+- **([dev/core#552](https://lab.civicrm.org/dev/core/issues/552)) CiviContribute - Fix editing of cancelled contribution
+  ([13300](https://github.com/civicrm/civicrm-core/pull/13300))**
+
+## <a name="credits"></a>Credits
+
+This release was developed by the following authors and reviewers:
+
+Australian Greens - Seamus Lee; Caltha - Tomasz Pietrzkowski; Circle
+Interactive - Dave Jenkins; CiviCRM - Coleman Watts; iXiam - Luciano Spiegel;
+JMA Consulting - Monish Deb; Korlon - Stuart Gaston; Lighthouse Design and
+Consulting - Brian Shaughnessy; Megaphone Technology Consulting - Jon Goldberg;
+MJW Consulting - Matthew Wire; Wikimedia Foundation - Eileen McNaughton
+
+## <a name="feedback"></a>Feedback
+
+These release notes are edited by Tim Otten and Andrew Hunt.  If you'd like to
+provide feedback on them, please login to https://chat.civicrm.org/civicrm and
+contact `@agh1`.
diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql
index 1a68fb63eb..570d07e051 100644
--- a/civicrm/sql/civicrm_data.mysql
+++ b/civicrm/sql/civicrm_data.mysql
@@ -23979,4 +23979,4 @@ INSERT INTO `civicrm_report_instance`
     ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`)
 VALUES
     (  @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}');
-UPDATE civicrm_domain SET version = '5.8.1';
+UPDATE civicrm_domain SET version = '5.8.2';
diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql
index 426fec6e5d..6f96e29da4 100644
--- a/civicrm/sql/civicrm_generated.mysql
+++ b/civicrm/sql/civicrm_generated.mysql
@@ -399,7 +399,7 @@ UNLOCK TABLES;
 
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
-INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'5.8.1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'5.8.2',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php
index 3d4e53e73a..db9c767f5a 100644
--- a/civicrm/vendor/autoload.php
+++ b/civicrm/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109::getLoader();
+return ComposerAutoloaderInit7ef7eaeb2c2287be02ee813d8afe8b9d::getLoader();
diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php
index a24e02dded..b6134d287c 100644
--- a/civicrm/vendor/composer/autoload_real.php
+++ b/civicrm/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109
+class ComposerAutoloaderInit7ef7eaeb2c2287be02ee813d8afe8b9d
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit7ef7eaeb2c2287be02ee813d8afe8b9d', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit7ef7eaeb2c2287be02ee813d8afe8b9d', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         $includePaths[] = get_include_path();
@@ -31,7 +31,7 @@ class ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109
         if ($useStaticLoader) {
             require_once __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -52,19 +52,19 @@ class ComposerAutoloaderInitb30539b2f2932ca683bf6e6faaf16109
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequireb30539b2f2932ca683bf6e6faaf16109($fileIdentifier, $file);
+            composerRequire7ef7eaeb2c2287be02ee813d8afe8b9d($fileIdentifier, $file);
         }
 
         return $loader;
     }
 }
 
-function composerRequireb30539b2f2932ca683bf6e6faaf16109($fileIdentifier, $file)
+function composerRequire7ef7eaeb2c2287be02ee813d8afe8b9d($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         require $file;
diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php
index fd2b37eee1..22ecc17a89 100644
--- a/civicrm/vendor/composer/autoload_static.php
+++ b/civicrm/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109
+class ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d
 {
     public static $files = array (
         '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@@ -397,10 +397,10 @@ class ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109::$prefixesPsr0;
-            $loader->classMap = ComposerStaticInitb30539b2f2932ca683bf6e6faaf16109::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d::$prefixesPsr0;
+            $loader->classMap = ComposerStaticInit7ef7eaeb2c2287be02ee813d8afe8b9d::$classMap;
 
         }, null, ClassLoader::class);
     }
diff --git a/civicrm/xml/schema/Financial/FinancialType.xml b/civicrm/xml/schema/Financial/FinancialType.xml
index 8e93b6c82e..bbdca886da 100644
--- a/civicrm/xml/schema/Financial/FinancialType.xml
+++ b/civicrm/xml/schema/Financial/FinancialType.xml
@@ -36,11 +36,6 @@
       <label>Name</label>
     </html>
     <add>1.3</add>
-    <pseudoconstant>
-      <table>civicrm_financial_type</table>
-      <keyColumn>id</keyColumn>
-      <labelColumn>name</labelColumn>
-    </pseudoconstant>
   </field>
   <field>
     <name>accounting_code</name>
diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml
index c65044f7cf..712a8b31d2 100644
--- a/civicrm/xml/version.xml
+++ b/civicrm/xml/version.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>5.8.1</version_no>
+  <version_no>5.8.2</version_no>
 </version>
-- 
GitLab