From 3be10cad688914f4f7c0199752375c70d3bcc61d Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Wed, 20 Sep 2023 11:31:17 -0400
Subject: [PATCH] civicrm release-5.65.2

---
 civicrm.php                                   |  4 +-
 civicrm/CRM/Core/Invoke.php                   |  2 +-
 civicrm/CRM/Custom/Form/CustomDataByType.php  |  2 +-
 civicrm/CRM/Upgrade/Incremental/Base.php      | 93 ++++++++++++++++++-
 .../Incremental/php/FiveSixtyThree.php        |  2 +-
 civicrm/CRM/Utils/Check/Component/Env.php     | 85 +++++++++++++----
 civicrm/CRM/Utils/Date.php                    |  4 +-
 civicrm/civicrm-version.php                   |  2 +-
 civicrm/ext/afform/admin/info.xml             |  2 +-
 civicrm/ext/afform/core/info.xml              |  2 +-
 civicrm/ext/afform/html/info.xml              |  2 +-
 civicrm/ext/afform/mock/info.xml              |  2 +-
 civicrm/ext/authx/info.xml                    |  2 +-
 civicrm/ext/civi_campaign/info.xml            |  2 +-
 civicrm/ext/civi_case/info.xml                |  2 +-
 civicrm/ext/civi_contribute/info.xml          |  2 +-
 civicrm/ext/civi_event/info.xml               |  2 +-
 civicrm/ext/civi_mail/info.xml                |  2 +-
 civicrm/ext/civi_member/info.xml              |  2 +-
 civicrm/ext/civi_pledge/info.xml              |  2 +-
 civicrm/ext/civi_report/info.xml              |  2 +-
 civicrm/ext/civicrm_admin_ui/info.xml         |  2 +-
 civicrm/ext/civicrm_search_ui/info.xml        |  2 +-
 civicrm/ext/civigrant/info.xml                |  2 +-
 civicrm/ext/civiimport/info.xml               |  2 +-
 civicrm/ext/ckeditor4/info.xml                |  2 +-
 .../ext/contributioncancelactions/info.xml    |  2 +-
 civicrm/ext/elavon/info.xml                   |  2 +-
 civicrm/ext/eventcart/info.xml                |  2 +-
 civicrm/ext/ewaysingle/info.xml               |  2 +-
 civicrm/ext/financialacls/info.xml            |  2 +-
 civicrm/ext/flexmailer/info.xml               |  2 +-
 civicrm/ext/greenwich/info.xml                |  2 +-
 civicrm/ext/legacycustomsearches/info.xml     |  2 +-
 civicrm/ext/message_admin/info.xml            |  2 +-
 civicrm/ext/oauth-client/info.xml             |  2 +-
 civicrm/ext/payflowpro/info.xml               |  2 +-
 civicrm/ext/recaptcha/info.xml                |  2 +-
 civicrm/ext/search_kit/info.xml               |  2 +-
 civicrm/ext/sequentialcreditnotes/info.xml    |  2 +-
 civicrm/ext/standaloneusers/info.xml          |  2 +-
 civicrm/release-notes.md                      |  9 ++
 civicrm/release-notes/5.65.2.md               | 42 +++++++++
 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   | 12 +--
 civicrm/vendor/composer/installed.php         |  4 +-
 civicrm/xml/version.xml                       |  2 +-
 50 files changed, 267 insertions(+), 82 deletions(-)
 create mode 100644 civicrm/release-notes/5.65.2.md

diff --git a/civicrm.php b/civicrm.php
index 184eace904..49570b3c20 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name: CiviCRM
  * Description: CiviCRM - Growing and Sustaining Relationships
- * Version: 5.65.1
+ * Version: 5.65.2
  * Requires at least: 4.9
  * Requires PHP:      7.3
  * Author: CiviCRM LLC
@@ -36,7 +36,7 @@ if (!defined('ABSPATH')) {
 }
 
 // Set version here: changing it forces Javascript and CSS to reload.
-define('CIVICRM_PLUGIN_VERSION', '5.65.1');
+define('CIVICRM_PLUGIN_VERSION', '5.65.2');
 
 // Store reference to this file.
 if (!defined('CIVICRM_PLUGIN_FILE')) {
diff --git a/civicrm/CRM/Core/Invoke.php b/civicrm/CRM/Core/Invoke.php
index 230ceb7c14..83e9e721bc 100644
--- a/civicrm/CRM/Core/Invoke.php
+++ b/civicrm/CRM/Core/Invoke.php
@@ -249,7 +249,7 @@ class CRM_Core_Invoke {
         CRM_Utils_System::setTitle($item['title']);
       }
 
-      if (isset($item['breadcrumb']) && empty($item['is_public'])) {
+      if (!CRM_Core_Config::isUpgradeMode() && isset($item['breadcrumb']) && empty($item['is_public'])) {
         CRM_Utils_System::appendBreadCrumb($item['breadcrumb']);
       }
 
diff --git a/civicrm/CRM/Custom/Form/CustomDataByType.php b/civicrm/CRM/Custom/Form/CustomDataByType.php
index 57d9d5923d..e5f885ba23 100644
--- a/civicrm/CRM/Custom/Form/CustomDataByType.php
+++ b/civicrm/CRM/Custom/Form/CustomDataByType.php
@@ -29,7 +29,7 @@ class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form {
   /**
    * @var array
    */
-  private $groupTree;
+  protected $groupTree;
 
   /**
    * @var array
diff --git a/civicrm/CRM/Upgrade/Incremental/Base.php b/civicrm/CRM/Upgrade/Incremental/Base.php
index 68e04644f7..d263842f93 100644
--- a/civicrm/CRM/Upgrade/Incremental/Base.php
+++ b/civicrm/CRM/Upgrade/Incremental/Base.php
@@ -188,8 +188,13 @@ class CRM_Upgrade_Incremental_Base {
   }
 
   /**
-   * Add a task to activate an extension. This task will run post-upgrade (after all
-   * changes to core DB are settled).
+   * Add a task to activate an extension. It will use the full, normal installation process
+   * (invoking `hook_install`, `hook_enable`, and so on). To ensure that the installation process
+   * can rely on regular core services and APIs, it will run after the core-upgrade-steps.
+   *
+   * This is more suited to green-field extensions (which started life as an extension).
+   * If you have a brown-field extension which doesn't have install-logic (i.e. it arises from
+   * rearranging pre-existing core-core functionality), then consider `addSimpleExtensionTask()`.
    *
    * @param string $title
    * @param string[] $keys
@@ -206,6 +211,90 @@ class CRM_Upgrade_Incremental_Base {
     );
   }
 
+  /**
+   * Add a task to activate an extension. It will use a simple (low-tech) installation process
+   * (skipping events like `hook_install`; instead, it merely updates `civicrm_extension` and
+   * `CRM_Extension_ClassLoader`). The extension should not now (or in the future) use
+   * `hook_install`. Simple installations can run at any point during the upgrade process.
+   *
+   * This is more suited to brown-field extensions (which arise from rearranging pre-existing
+   * core-core functionality). If you have a green-field extension (which has always been an
+   * extension), then consider `addExtensionTask()` instead.
+   *
+   * @param string $title
+   * @param string|string[] $keys
+   *   List of extensions to enable.
+   */
+  protected function addSimpleExtensionTask(string $title, $keys): void {
+    $this->addTask($title, 'enableSimpleExtension', $keys);
+  }
+
+  /**
+   * This callback is used to enable one or more extensions which have no install or upgrade code,
+   * and whose autoloaders are needed right away.
+   *
+   * It was written to facilitate migrating core code into extensions.
+   * Moving a class into an extension means it is no longer loaded by the core autoloader.
+   * Upgrade code that relies on it could crash if classes disappear during the upgrade,
+   * so this function sets the extension status to enabled and installs its autoloader;
+   * both of which are important depending on the upgrade interface:
+   * - The web UI does each step as a separate ajax request, so inserting/enabling the extension in the db
+   * ensures it is loaded on subsequent requests.
+   * - The CLI upgrader does everything in a single request so its autoloader should be installed right away.
+   *
+   * @param CRM_Queue_TaskContext $ctx
+   * @param string|array $keys
+   * @return bool
+   * @throws CRM_Extension_Exception
+   * @throws DBQueryException
+   */
+  public static function enableSimpleExtension(CRM_Queue_TaskContext $ctx, $keys): bool {
+    $keys = (array) $keys;
+
+    // Find out current situation
+    $system = CRM_Extension_System::singleton();
+    $statuses = CRM_Utils_SQL_Select::from('civicrm_extension')
+      ->select(['full_name, is_active'])
+      ->execute(NULL, FALSE)
+      ->fetchAll();
+    $byStatus = CRM_Utils_Array::index(['is_active', 'full_name'], $statuses);
+    $disabled = array_intersect($keys, array_keys($byStatus[0] ?? []));
+    $uninstalled = array_diff($keys, array_keys($byStatus[0] ?? []), array_keys($byStatus[1] ?? []));
+
+    // Make a plan
+    $toUpdate = $disabled;
+    $toInsert = [];
+    foreach ($uninstalled as $key) {
+      $info = $system->getMapper()->keyToInfo($key);
+      $toInsert[] = [
+        'full_name' => $info->key,
+        'type' => $info->type,
+        'name' => $info->name,
+        'label' => $info->label,
+        'file' => $info->file,
+        'is_active' => 1,
+      ];
+    }
+
+    // Execute the plan
+    if ($toUpdate) {
+      $updateSql = 'UPDATE civicrm_extension SET is_active = 1 WHERE full_name IN ("' . implode('", "', array_keys($toUpdate)) . '")';
+      CRM_Core_DAO::executeQuery($updateSql, [], TRUE, NULL, FALSE, FALSE);
+    }
+    if ($toInsert) {
+      $insertSql = CRM_Utils_SQL_Insert::into('civicrm_extension')
+        ->rows($toInsert)
+        ->toSQL();
+      CRM_Core_DAO::executeQuery($insertSql, [], TRUE, NULL, FALSE, FALSE);
+    }
+    foreach (array_merge($disabled, $uninstalled) as $key) {
+      $info = $system->getMapper()->keyToInfo($key);
+      $path = $system->getMapper()->keyToPath($key);
+      $system->getClassLoader()->installExtension($info, dirname($path));
+    }
+    return TRUE;
+  }
+
   /**
    * @param \CRM_Queue_TaskContext $ctx
    * @param string[] $keys
diff --git a/civicrm/CRM/Upgrade/Incremental/php/FiveSixtyThree.php b/civicrm/CRM/Upgrade/Incremental/php/FiveSixtyThree.php
index d3587657ae..1a6c3b91e6 100644
--- a/civicrm/CRM/Upgrade/Incremental/php/FiveSixtyThree.php
+++ b/civicrm/CRM/Upgrade/Incremental/php/FiveSixtyThree.php
@@ -43,7 +43,7 @@ class CRM_Upgrade_Incremental_php_FiveSixtyThree extends CRM_Upgrade_Incremental
 
     $enabledComponents = Civi::settings()->get('enable_components');
     $extensions = array_map(['CRM_Utils_String', 'convertStringToSnakeCase'], $enabledComponents);
-    $this->addExtensionTask('Enable component extensions', $extensions);
+    $this->addSimpleExtensionTask(sprintf('Enable component-extensions (%s)', implode(', ', $extensions)), $extensions);
 
     $this->addTask('Make ContributionPage.name required', 'alterColumn', 'civicrm_contribution_page', 'name', "varchar(255) NOT NULL COMMENT 'Unique name for identifying contribution page'");
     $this->addTask('Make ContributionPage.title required', 'alterColumn', 'civicrm_contribution_page', 'title', "varchar(255) NOT NULL COMMENT 'Contribution Page title. For top of page display'", TRUE);
diff --git a/civicrm/CRM/Utils/Check/Component/Env.php b/civicrm/CRM/Utils/Check/Component/Env.php
index 4d697af396..2ac6246f6f 100644
--- a/civicrm/CRM/Utils/Check/Component/Env.php
+++ b/civicrm/CRM/Utils/Check/Component/Env.php
@@ -603,9 +603,12 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component {
     $enabled = array_keys(array_filter($stauses, function($status) {
       return $status === CRM_Extension_Manager::STATUS_INSTALLED;
     }));
-    $requiredExtensions = $mapper->getKeysByTag('mgmt:required');
+    // Extensions belonging to enabled components are required
+    $enabledComponents = array_map(['CRM_Utils_String', 'convertStringToSnakeCase'], Civi::settings()->get('enable_components'));
+    // And extensions tagged `mgmg:required` must be enabled
+    $requiredExtensions = array_merge($enabledComponents, $mapper->getKeysByTag('mgmt:required'));
     sort($keys);
-    $updates = $errors = $okextensions = [];
+    $updates = $errors = $okextensions = $missingRequired = [];
 
     $extPrettyLabel = function($key) use ($mapper) {
       // We definitely know a $key, but we may not have a $label.
@@ -637,13 +640,13 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component {
           break;
 
         case CRM_Extension_Manager::STATUS_INSTALLED:
-          $missingRequirements = array_diff($row['requires'], $enabled);
-          if (!empty($row['requires']) && $missingRequirements) {
+          $missingDependencies = array_diff($row['requires'], $enabled);
+          if (!empty($row['requires']) && $missingDependencies) {
             $errors[] = ts('%1 has a missing dependency on %2', [
               1 => $extPrettyLabel($key),
-              2 => implode(', ', array_map($extPrettyLabel, $missingRequirements)),
+              2 => implode(', ', array_map($extPrettyLabel, $missingDependencies)),
               'plural' => '%1 has missing dependencies: %2',
-              'count' => count($missingRequirements),
+              'count' => count($missingDependencies),
             ]);
           }
           elseif (!empty($remotes[$key]) && version_compare($row['version'], $remotes[$key]->version, '<')) {
@@ -664,24 +667,28 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component {
 
         default:
           if (in_array($key, $requiredExtensions, TRUE)) {
-            $requiredMessage = new CRM_Utils_Check_Message(
-              __FUNCTION__ . 'Required:' . $key,
-              ts('The extension %1 is required and must be enabled.', [1 => $row['label']]),
-              ts('Required Extension'),
-              \Psr\Log\LogLevel::ERROR,
-              'fa-exclamation-triangle'
-            );
-            $requiredMessage->addAction(
-              ts('Enable %1', [1 => $row['label']]),
-              '',
-              'api3',
-              ['Extension', 'install', ['key' => $key]]
-            );
-            $messages[] = $requiredMessage;
+            $missingRequired[$key] = $row['label'];
           }
       }
     }
 
+    if ($missingRequired) {
+      $requiredMessage = new CRM_Utils_Check_Message(
+        __FUNCTION__ . 'Required:' . implode(',', array_keys($missingRequired)),
+        ts('The extension %1 is required and must be enabled.', [1 => implode(', ', $missingRequired)]),
+        ts('Required Extension'),
+        \Psr\Log\LogLevel::ERROR,
+        'fa-exclamation-triangle'
+      );
+      $requiredMessage->addAction(
+        ts('Enable %1', [1 => implode(', ', $missingRequired)]),
+        '',
+        'api3',
+        ['Extension', 'install', ['keys' => array_keys($missingRequired)]]
+      );
+      $messages[] = $requiredMessage;
+    }
+
     if (!$okextensions && !$updates && !$errors) {
       $messages[] = new CRM_Utils_Check_Message(
         __FUNCTION__ . 'Ok',
@@ -741,6 +748,44 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component {
     return $messages;
   }
 
+  /**
+   * Ensure that *some* CiviCRM components (component-extensions) are enabled.
+   *
+   * It is believed that some sites lost their list of active-components due to a flawed
+   * upgrade-step circa 5.62/5.63. The upgrade-step has been fixed (civicrm-core#27075),
+   * but some sites may still have bad configurations.
+   *
+   * This problem should generally be obvious after running web-based upgrader, but it's not obvious
+   * in scripted+CLI upgrades.
+   *
+   * @return array
+   * @throws \CRM_Core_Exception
+   * @throws \Civi\API\Exception\UnauthorizedException
+   */
+  public function checkComponents(): array {
+    $messages = [];
+
+    $setting = Civi::settings()->get('enable_components');
+    $exts = \Civi\Api4\Extension::get(FALSE)
+      ->addWhere('key', 'LIKE', 'civi_%')
+      ->addWhere('status', '=', 'installed')
+      ->execute()
+      ->indexBy('key')->column('status');
+    if (empty($setting) || empty($exts)) {
+      $messages[] = new CRM_Utils_Check_Message(
+        __FUNCTION__,
+        ts('None of the CiviCRM components are enabled. This is theoretically legal, but it is most likely a misconfiguration.<br/> Please inspect and re-save the <a %1>component settings</a>.', [
+          1 => sprintf('target="_blank" href="%s"', Civi::url('backend://civicrm/admin/setting/component?reset=1', 'ah')),
+        ]),
+        ts('Missing Components'),
+        \Psr\Log\LogLevel::WARNING,
+        'fa-server'
+      );
+    }
+
+    return $messages;
+  }
+
   /**
    * @return CRM_Utils_Check_Message[]
    */
diff --git a/civicrm/CRM/Utils/Date.php b/civicrm/CRM/Utils/Date.php
index 0159874e7d..68cb109fe3 100644
--- a/civicrm/CRM/Utils/Date.php
+++ b/civicrm/CRM/Utils/Date.php
@@ -2008,10 +2008,10 @@ class CRM_Utils_Date {
     }
     $thisYear = date('Y');
     if (isset($field['start_date_years'])) {
-      $extra['minDate'] = date('Y-m-d', strtotime('-' . ($thisYear - $field['start_date_years']) . ' years'));
+      $extra['minDate'] = date('Y-m-d', strtotime((-1 * ($thisYear - $field['start_date_years'])) . ' years'));
     }
     if (isset($field['end_date_years'])) {
-      $extra['maxDate'] = date('Y-m-d', strtotime('-' . ($thisYear - $field['end_date_years']) . ' years'));
+      $extra['maxDate'] = date('Y-m-d', strtotime((-1 * ($thisYear - $field['end_date_years'])) . ' years'));
     }
     return $extra;
   }
diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php
index eae9bfe69e..d6f0cd2ed0 100644
--- a/civicrm/civicrm-version.php
+++ b/civicrm/civicrm-version.php
@@ -1,7 +1,7 @@
 <?php
 /** @deprecated */
 function civicrmVersion( ) {
-  return array( 'version'  => '5.65.1',
+  return array( 'version'  => '5.65.2',
                 'cms'      => 'Wordpress',
                 'revision' => '' );
 }
diff --git a/civicrm/ext/afform/admin/info.xml b/civicrm/ext/afform/admin/info.xml
index 7bc7d28308..4f8949bd24 100644
--- a/civicrm/ext/afform/admin/info.xml
+++ b/civicrm/ext/afform/admin/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/afform/core/info.xml b/civicrm/ext/afform/core/info.xml
index 70aa0ea9a3..0baab18d64 100644
--- a/civicrm/ext/afform/core/info.xml
+++ b/civicrm/ext/afform/core/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/afform/html/info.xml b/civicrm/ext/afform/html/info.xml
index aac58015f5..a26a0a7836 100644
--- a/civicrm/ext/afform/html/info.xml
+++ b/civicrm/ext/afform/html/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/afform/mock/info.xml b/civicrm/ext/afform/mock/info.xml
index 60098426ed..71485fc852 100644
--- a/civicrm/ext/afform/mock/info.xml
+++ b/civicrm/ext/afform/mock/info.xml
@@ -12,7 +12,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/authx/info.xml b/civicrm/ext/authx/info.xml
index a169c82d23..d8570c9b9f 100644
--- a/civicrm/ext/authx/info.xml
+++ b/civicrm/ext/authx/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-02-11</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/civi_campaign/info.xml b/civicrm/ext/civi_campaign/info.xml
index b26207cd62..57da6fdf3e 100644
--- a/civicrm/ext/civi_campaign/info.xml
+++ b/civicrm/ext/civi_campaign/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_case/info.xml b/civicrm/ext/civi_case/info.xml
index fb0397ce1a..1a210ee5c0 100644
--- a/civicrm/ext/civi_case/info.xml
+++ b/civicrm/ext/civi_case/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_contribute/info.xml b/civicrm/ext/civi_contribute/info.xml
index 2e3aef0874..cae6cbbd50 100644
--- a/civicrm/ext/civi_contribute/info.xml
+++ b/civicrm/ext/civi_contribute/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_event/info.xml b/civicrm/ext/civi_event/info.xml
index a1b09e065a..5267e6d7dd 100644
--- a/civicrm/ext/civi_event/info.xml
+++ b/civicrm/ext/civi_event/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_mail/info.xml b/civicrm/ext/civi_mail/info.xml
index 9304948726..72cd45acf5 100644
--- a/civicrm/ext/civi_mail/info.xml
+++ b/civicrm/ext/civi_mail/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_member/info.xml b/civicrm/ext/civi_member/info.xml
index 4aef573d96..ba8c9db74c 100644
--- a/civicrm/ext/civi_member/info.xml
+++ b/civicrm/ext/civi_member/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_pledge/info.xml b/civicrm/ext/civi_pledge/info.xml
index 459244ea74..f6299ac422 100644
--- a/civicrm/ext/civi_pledge/info.xml
+++ b/civicrm/ext/civi_pledge/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civi_report/info.xml b/civicrm/ext/civi_report/info.xml
index c788cefb42..04bd19e289 100644
--- a/civicrm/ext/civi_report/info.xml
+++ b/civicrm/ext/civi_report/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-04-08</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>component</tag>
diff --git a/civicrm/ext/civicrm_admin_ui/info.xml b/civicrm/ext/civicrm_admin_ui/info.xml
index 0e204fdc6c..bd5b2ddb18 100644
--- a/civicrm/ext/civicrm_admin_ui/info.xml
+++ b/civicrm/ext/civicrm_admin_ui/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-01-02</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/civicrm_search_ui/info.xml b/civicrm/ext/civicrm_search_ui/info.xml
index 3f7751d79d..03ec5bc5ba 100644
--- a/civicrm/ext/civicrm_search_ui/info.xml
+++ b/civicrm/ext/civicrm_search_ui/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2023-07-17</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>alpha</develStage>
   <requires>
     <ext>org.civicrm.search_kit</ext>
diff --git a/civicrm/ext/civigrant/info.xml b/civicrm/ext/civigrant/info.xml
index d46f719246..d2a23149ea 100644
--- a/civicrm/ext/civigrant/info.xml
+++ b/civicrm/ext/civigrant/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-11-11</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/civiimport/info.xml b/civicrm/ext/civiimport/info.xml
index 41d94844a0..d00e307f6f 100644
--- a/civicrm/ext/civiimport/info.xml
+++ b/civicrm/ext/civiimport/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-08-11</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/ckeditor4/info.xml b/civicrm/ext/ckeditor4/info.xml
index cf5164da7e..f29ff3f14e 100644
--- a/civicrm/ext/ckeditor4/info.xml
+++ b/civicrm/ext/ckeditor4/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-05-23</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/contributioncancelactions/info.xml b/civicrm/ext/contributioncancelactions/info.xml
index ba9e12ec76..1fe224984f 100644
--- a/civicrm/ext/contributioncancelactions/info.xml
+++ b/civicrm/ext/contributioncancelactions/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-12</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/elavon/info.xml b/civicrm/ext/elavon/info.xml
index 1045d0121f..1f73e243b3 100644
--- a/civicrm/ext/elavon/info.xml
+++ b/civicrm/ext/elavon/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-08-05</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/eventcart/info.xml b/civicrm/ext/eventcart/info.xml
index 70bac9d779..d46f9825b8 100644
--- a/civicrm/ext/eventcart/info.xml
+++ b/civicrm/ext/eventcart/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-03</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/ewaysingle/info.xml b/civicrm/ext/ewaysingle/info.xml
index f6b64e3385..38fce6560c 100644
--- a/civicrm/ext/ewaysingle/info.xml
+++ b/civicrm/ext/ewaysingle/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-07</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/financialacls/info.xml b/civicrm/ext/financialacls/info.xml
index 24d7946bf7..50def07d30 100644
--- a/civicrm/ext/financialacls/info.xml
+++ b/civicrm/ext/financialacls/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-27</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/flexmailer/info.xml b/civicrm/ext/flexmailer/info.xml
index 0d83a2ed1f..56b62409a1 100644
--- a/civicrm/ext/flexmailer/info.xml
+++ b/civicrm/ext/flexmailer/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-05</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <comments>
     FlexMailer is an email delivery engine which replaces the internal guts
diff --git a/civicrm/ext/greenwich/info.xml b/civicrm/ext/greenwich/info.xml
index 259fea2724..2436be1880 100644
--- a/civicrm/ext/greenwich/info.xml
+++ b/civicrm/ext/greenwich/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-07-21</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/legacycustomsearches/info.xml b/civicrm/ext/legacycustomsearches/info.xml
index 01445a3b81..d4d3e0a102 100644
--- a/civicrm/ext/legacycustomsearches/info.xml
+++ b/civicrm/ext/legacycustomsearches/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-07-25</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/message_admin/info.xml b/civicrm/ext/message_admin/info.xml
index f358adadd2..fcaa37db65 100644
--- a/civicrm/ext/message_admin/info.xml
+++ b/civicrm/ext/message_admin/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-06-12</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/oauth-client/info.xml b/civicrm/ext/oauth-client/info.xml
index d98dfe3c8c..3b1a1e8a1b 100644
--- a/civicrm/ext/oauth-client/info.xml
+++ b/civicrm/ext/oauth-client/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-23</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/payflowpro/info.xml b/civicrm/ext/payflowpro/info.xml
index 397fb31906..01e4c021e4 100644
--- a/civicrm/ext/payflowpro/info.xml
+++ b/civicrm/ext/payflowpro/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-13</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/ext/recaptcha/info.xml b/civicrm/ext/recaptcha/info.xml
index 6d8b2ad481..29e4b907bd 100644
--- a/civicrm/ext/recaptcha/info.xml
+++ b/civicrm/ext/recaptcha/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-03</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/search_kit/info.xml b/civicrm/ext/search_kit/info.xml
index 1ceaf0aa44..f04895703b 100644
--- a/civicrm/ext/search_kit/info.xml
+++ b/civicrm/ext/search_kit/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-01-06</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>stable</develStage>
   <tags>
     <tag>mgmt:required</tag>
diff --git a/civicrm/ext/sequentialcreditnotes/info.xml b/civicrm/ext/sequentialcreditnotes/info.xml
index ef0d9da6d8..c7773e5167 100644
--- a/civicrm/ext/sequentialcreditnotes/info.xml
+++ b/civicrm/ext/sequentialcreditnotes/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-28</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/standaloneusers/info.xml b/civicrm/ext/standaloneusers/info.xml
index ad389dc3d2..97c33ff794 100644
--- a/civicrm/ext/standaloneusers/info.xml
+++ b/civicrm/ext/standaloneusers/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-11-11</releaseDate>
-  <version>5.65.1</version>
+  <version>5.65.2</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.65</ver>
diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md
index 705c2791fa..2f17029cab 100644
--- a/civicrm/release-notes.md
+++ b/civicrm/release-notes.md
@@ -15,6 +15,15 @@ Other resources for identifying changes are:
     * https://github.com/civicrm/civicrm-joomla
     * https://github.com/civicrm/civicrm-wordpress
 
+## CiviCRM 5.65.2
+
+Released September 19, 2023
+
+- **[Synopsis](release-notes/5.65.2.md#synopsis)**
+- **[Bugs resolved](release-notes/5.65.2.md#bugs)**
+- **[Credits](release-notes/5.65.2.md#credits)**
+- **[Feedback](release-notes/5.65.2.md#feedback)**
+
 ## CiviCRM 5.65.1
 
 Released September 8, 2023
diff --git a/civicrm/release-notes/5.65.2.md b/civicrm/release-notes/5.65.2.md
new file mode 100644
index 0000000000..b6bd68520c
--- /dev/null
+++ b/civicrm/release-notes/5.65.2.md
@@ -0,0 +1,42 @@
+# CiviCRM 5.65.2
+
+Released September 19, 2023
+
+- **[Synopsis](#synopsis)**
+- **[Bugs resolved](#bugs)**
+- **[Credits](#credits)**
+- **[Feedback](#feedback)**
+
+## <a name="synopsis"></a>Synopsis
+
+| *Does this version...?*                                         |          |
+| --------------------------------------------------------------- | -------- |
+| Change the database schema?                                     | no       |
+| Alter the API?                                                  | no       |
+| **Require attention to configuration options?**                 | **yes (rare)** |
+| **Fix problems installing or upgrading to a previous version?** | **yes**  |
+| Introduce features?                                             | no       |
+| **Fix bugs?**                                                   | **yes**  |
+| Fix security vulnerabilities?                                   | no       |
+
+## <a name="bugs"></a>Bugs resolved
+
+* **_Custom Data_: Restricted visibility of `$groupTree` may cause some customizations to fail ([#27492](https://github.com/civicrm/civicrm-core/pull/27492))**
+* **_Status Check_: Display warning(s) if a previous upgrade left inconsistencies in the configuration of "Components" ([#27453](https://github.com/civicrm/civicrm-core/pull/27453), [#27475](https://github.com/civicrm/civicrm-core/pull/27475))**
+* **_Upgrader_: Upgrades may fail if customizations depend on migrated component APIs ([dev/core#4521](https://lab.civicrm.org/dev/core/-/issues/4521): [#27481](https://github.com/civicrm/civicrm-core/pull/27481))**
+* **_Upgrader_: Upgrades may fail due to interaction between migrated component APIs, breadcrumbs, and views/entities ([dev/core#4605](https://lab.civicrm.org/dev/core/-/issues/4605): [#27518](https://github.com/civicrm/civicrm-core/pull/27518))**
+
+## <a name="credits"></a>Credits
+
+This release was developed by the following authors and reviewers:
+
+Wildsight - Lars Sander-Green; Wikimedia Foundation - Eileen McNaughton; Megaphone
+Technology Consulting - Jon Goldberg; Dave D; Coop SymbioTIC - Mathieu Lutfy; CiviCRM -
+Coleman Watts, Tim Otten; Circle Interactive - Pradeep Nayak; BrightMinded Ltd - Bradley
+Taylor; aiden_g; Agileware - Justin Freeman
+
+## <a name="feedback"></a>Feedback
+
+These release notes are edited by Tim Otten and Andie 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 7bea043271..1803f377b1 100644
--- a/civicrm/sql/civicrm_data.mysql
+++ b/civicrm/sql/civicrm_data.mysql
@@ -23952,4 +23952,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.65.1';
+UPDATE civicrm_domain SET version = '5.65.2';
diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql
index e3eb529d8a..81cf4e35bc 100644
--- a/civicrm/sql/civicrm_generated.mysql
+++ b/civicrm/sql/civicrm_generated.mysql
@@ -2976,7 +2976,7 @@ UNLOCK TABLES;
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
 INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES
- (1,'Default Domain Name',NULL,'5.65.1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+ (1,'Default Domain Name',NULL,'5.65.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 4dcacc028d..66488b5821 100644
--- a/civicrm/vendor/autoload.php
+++ b/civicrm/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316::getLoader();
+return ComposerAutoloaderInitfe61fa497677221bb9f34e1742d40075::getLoader();
diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php
index 430aa6f807..9b7a9e93cd 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 ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316
+class ComposerAutoloaderInitfe61fa497677221bb9f34e1742d40075
 {
     private static $loader;
 
@@ -24,9 +24,9 @@ class ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316
 
         require __DIR__ . '/platform_check.php';
 
-        spl_autoload_register(array('ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitfe61fa497677221bb9f34e1742d40075', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
-        spl_autoload_unregister(array('ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitfe61fa497677221bb9f34e1742d40075', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         $includePaths[] = get_include_path();
@@ -36,7 +36,7 @@ class ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316
         if ($useStaticLoader) {
             require __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInitfe61fa497677221bb9f34e1742d40075::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -57,12 +57,12 @@ class ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInitfe61fa497677221bb9f34e1742d40075::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire67c874d7fdc7e2efa931aa6138624316($fileIdentifier, $file);
+            composerRequirefe61fa497677221bb9f34e1742d40075($fileIdentifier, $file);
         }
 
         return $loader;
@@ -74,7 +74,7 @@ class ComposerAutoloaderInit67c874d7fdc7e2efa931aa6138624316
  * @param string $file
  * @return void
  */
-function composerRequire67c874d7fdc7e2efa931aa6138624316($fileIdentifier, $file)
+function composerRequirefe61fa497677221bb9f34e1742d40075($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php
index 5b576d10da..0f38addf3c 100644
--- a/civicrm/vendor/composer/autoload_static.php
+++ b/civicrm/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit67c874d7fdc7e2efa931aa6138624316
+class ComposerStaticInitfe61fa497677221bb9f34e1742d40075
 {
     public static $files = array (
         'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@@ -729,11 +729,11 @@ class ComposerStaticInit67c874d7fdc7e2efa931aa6138624316
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::$prefixesPsr0;
-            $loader->fallbackDirsPsr0 = ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::$fallbackDirsPsr0;
-            $loader->classMap = ComposerStaticInit67c874d7fdc7e2efa931aa6138624316::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInitfe61fa497677221bb9f34e1742d40075::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInitfe61fa497677221bb9f34e1742d40075::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInitfe61fa497677221bb9f34e1742d40075::$prefixesPsr0;
+            $loader->fallbackDirsPsr0 = ComposerStaticInitfe61fa497677221bb9f34e1742d40075::$fallbackDirsPsr0;
+            $loader->classMap = ComposerStaticInitfe61fa497677221bb9f34e1742d40075::$classMap;
 
         }, null, ClassLoader::class);
     }
diff --git a/civicrm/vendor/composer/installed.php b/civicrm/vendor/composer/installed.php
index 2f69df8bda..237c915b42 100644
--- a/civicrm/vendor/composer/installed.php
+++ b/civicrm/vendor/composer/installed.php
@@ -5,7 +5,7 @@
         'type' => 'library',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => 'd887fb183cd2ec2e6d20d3ef575fc577e9fad453',
+        'reference' => '302a4461fa1f8bffbf265e1c1ecc9b1c5e8de5ba',
         'name' => 'civicrm/civicrm-core',
         'dev' => true,
     ),
@@ -43,7 +43,7 @@
             'type' => 'library',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => 'd887fb183cd2ec2e6d20d3ef575fc577e9fad453',
+            'reference' => '302a4461fa1f8bffbf265e1c1ecc9b1c5e8de5ba',
             'dev_requirement' => false,
         ),
         'civicrm/civicrm-cxn-rpc' => array(
diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml
index 109f1b0940..9eb58bc4bc 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.65.1</version_no>
+  <version_no>5.65.2</version_no>
 </version>
-- 
GitLab