From 9e9a419558c2e070bf238b12144c76ec4c0e7d48 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 9 Nov 2022 21:57:37 -0500 Subject: [PATCH] Core extensions - Upgrade to civix 22.10.0 --- ext/authx/authx.civix.php | 10 +- ext/authx/info.xml | 1 + .../civicrm_admin_ui.civix.php | 187 +++++++++++++++++- ext/civicrm_admin_ui/info.xml | 3 +- ext/civigrant/civigrant.civix.php | 183 ++++++++++++++++- ext/civigrant/civigrant.php | 9 - ext/civigrant/info.xml | 3 +- ext/civiimport/civiimport.civix.php | 20 +- ext/civiimport/info.xml | 2 +- ext/ckeditor4/ckeditor4.civix.php | 10 +- ext/ckeditor4/info.xml | 1 + .../contributioncancelactions.civix.php | 16 +- ext/contributioncancelactions/info.xml | 1 + ext/elavon/elavon.civix.php | 20 +- ext/elavon/info.xml | 2 +- ext/eventcart/eventcart.civix.php | 16 +- ext/eventcart/info.xml | 1 + ext/ewaysingle/ewaysingle.civix.php | 16 +- ext/ewaysingle/info.xml | 3 +- ext/financialacls/financialacls.civix.php | 16 +- ext/financialacls/info.xml | 1 + ext/flexmailer/flexmailer.civix.php | 16 +- ext/flexmailer/info.xml | 1 + ext/greenwich/greenwich.civix.php | 16 +- ext/greenwich/info.xml | 1 + ext/legacycustomsearches/info.xml | 2 +- .../legacycustomsearches.civix.php | 10 +- ext/message_admin/info.xml | 1 + ext/message_admin/message_admin.civix.php | 10 +- ext/oauth-client/info.xml | 1 + ext/oauth-client/oauth_client.civix.php | 10 +- ext/payflowpro/info.xml | 3 +- ext/payflowpro/payflowpro.civix.php | 13 +- ext/recaptcha/info.xml | 1 + ext/recaptcha/recaptcha.civix.php | 10 +- ext/search_kit/info.xml | 3 +- ext/search_kit/search_kit.civix.php | 10 +- ext/sequentialcreditnotes/info.xml | 1 + .../sequentialcreditnotes.civix.php | 21 +- 39 files changed, 492 insertions(+), 159 deletions(-) diff --git a/ext/authx/authx.civix.php b/ext/authx/authx.civix.php index 3320d7a451..98e7ecc984 100644 --- a/ext/authx/authx.civix.php +++ b/ext/authx/authx.civix.php @@ -24,7 +24,7 @@ class CRM_Authx_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Authx_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _authx_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _authx_civix_civicrm_uninstall() { +function _authx_civix_civicrm_uninstall(): void { _authx_civix_civicrm_config(); if ($upgrader = _authx_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _authx_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _authx_civix_civicrm_enable() { +function _authx_civix_civicrm_enable(): void { _authx_civix_civicrm_config(); if ($upgrader = _authx_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _authx_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _authx_civix_civicrm_disable() { +function _authx_civix_civicrm_disable(): void { _authx_civix_civicrm_config(); if ($upgrader = _authx_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/authx/info.xml b/ext/authx/info.xml index 2cac9ebd65..5c12a4275d 100644 --- a/ext/authx/info.xml +++ b/ext/authx/info.xml @@ -32,5 +32,6 @@ CRM/Authx + 22.10.0 diff --git a/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php b/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php index 4e347ebd65..ef54bbc93e 100644 --- a/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php +++ b/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php @@ -24,7 +24,7 @@ class CRM_CivicrmAdminUi_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_CivicrmAdminUi_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -91,9 +91,9 @@ function _civicrm_admin_ui_civix_civicrm_config(&$config = NULL) { } $configured = TRUE; - $template =& CRM_Core_Smarty::singleton(); + $template = CRM_Core_Smarty::singleton(); - $extRoot = dirname(__FILE__) . DIRECTORY_SEPARATOR; + $extRoot = __DIR__ . DIRECTORY_SEPARATOR; $extDir = $extRoot . 'templates'; if (is_array($template->template_dir)) { @@ -107,6 +107,185 @@ function _civicrm_admin_ui_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } +/** + * Implements hook_civicrm_install(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install + */ +function _civicrm_admin_ui_civix_civicrm_install() { + _civicrm_admin_ui_civix_civicrm_config(); + if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { + $upgrader->onInstall(); + } +} + +/** + * Implements hook_civicrm_postInstall(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall + */ +function _civicrm_admin_ui_civix_civicrm_postInstall() { + _civicrm_admin_ui_civix_civicrm_config(); + if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { + if (is_callable([$upgrader, 'onPostInstall'])) { + $upgrader->onPostInstall(); + } + } +} + +/** + * Implements hook_civicrm_uninstall(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall + */ +function _civicrm_admin_ui_civix_civicrm_uninstall(): void { + _civicrm_admin_ui_civix_civicrm_config(); + if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { + $upgrader->onUninstall(); + } +} + +/** + * (Delegated) Implements hook_civicrm_enable(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable + */ +function _civicrm_admin_ui_civix_civicrm_enable(): void { + _civicrm_admin_ui_civix_civicrm_config(); + if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { + if (is_callable([$upgrader, 'onEnable'])) { + $upgrader->onEnable(); + } + } +} + +/** + * (Delegated) Implements hook_civicrm_disable(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable + * @return mixed + */ +function _civicrm_admin_ui_civix_civicrm_disable(): void { + _civicrm_admin_ui_civix_civicrm_config(); + if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { + if (is_callable([$upgrader, 'onDisable'])) { + $upgrader->onDisable(); + } + } +} + +/** + * (Delegated) Implements hook_civicrm_upgrade(). + * + * @param $op string, the type of operation being performed; 'check' or 'enqueue' + * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks + * + * @return mixed + * based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending) + * for 'enqueue', returns void + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade + */ +function _civicrm_admin_ui_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { + if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { + return $upgrader->onUpgrade($op, $queue); + } +} + +/** + * @return CRM_CivicrmAdminUi_Upgrader + */ +function _civicrm_admin_ui_civix_upgrader() { + if (!file_exists(__DIR__ . '/CRM/CivicrmAdminUi/Upgrader.php')) { + return NULL; + } + else { + return CRM_CivicrmAdminUi_Upgrader_Base::instance(); + } +} + +/** + * Inserts a navigation menu item at a given place in the hierarchy. + * + * @param array $menu - menu hierarchy + * @param string $path - path to parent of this item, e.g. 'my_extension/submenu' + * 'Mailing', or 'Administer/System Settings' + * @param array $item - the item to insert (parent/child attributes will be + * filled for you) + * + * @return bool + */ +function _civicrm_admin_ui_civix_insert_navigation_menu(&$menu, $path, $item) { + // If we are done going down the path, insert menu + if (empty($path)) { + $menu[] = [ + 'attributes' => array_merge([ + 'label' => CRM_Utils_Array::value('name', $item), + 'active' => 1, + ], $item), + ]; + return TRUE; + } + else { + // Find an recurse into the next level down + $found = FALSE; + $path = explode('/', $path); + $first = array_shift($path); + foreach ($menu as $key => &$entry) { + if ($entry['attributes']['name'] == $first) { + if (!isset($entry['child'])) { + $entry['child'] = []; + } + $found = _civicrm_admin_ui_civix_insert_navigation_menu($entry['child'], implode('/', $path), $item); + } + } + return $found; + } +} + +/** + * (Delegated) Implements hook_civicrm_navigationMenu(). + */ +function _civicrm_admin_ui_civix_navigationMenu(&$nodes) { + if (!is_callable(['CRM_Core_BAO_Navigation', 'fixNavigationMenu'])) { + _civicrm_admin_ui_civix_fixNavigationMenu($nodes); + } +} + +/** + * Given a navigation menu, generate navIDs for any items which are + * missing them. + */ +function _civicrm_admin_ui_civix_fixNavigationMenu(&$nodes) { + $maxNavID = 1; + array_walk_recursive($nodes, function($item, $key) use (&$maxNavID) { + if ($key === 'navID') { + $maxNavID = max($maxNavID, $item); + } + }); + _civicrm_admin_ui_civix_fixNavigationMenuItems($nodes, $maxNavID, NULL); +} + +function _civicrm_admin_ui_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $parentID) { + $origKeys = array_keys($nodes); + foreach ($origKeys as $origKey) { + if (!isset($nodes[$origKey]['attributes']['parentID']) && $parentID !== NULL) { + $nodes[$origKey]['attributes']['parentID'] = $parentID; + } + // If no navID, then assign navID and fix key. + if (!isset($nodes[$origKey]['attributes']['navID'])) { + $newKey = ++$maxNavID; + $nodes[$origKey]['attributes']['navID'] = $newKey; + $nodes[$newKey] = $nodes[$origKey]; + unset($nodes[$origKey]); + $origKey = $newKey; + } + if (isset($nodes[$origKey]['child']) && is_array($nodes[$origKey]['child'])) { + _civicrm_admin_ui_civix_fixNavigationMenuItems($nodes[$origKey]['child'], $maxNavID, $nodes[$origKey]['attributes']['navID']); + } + } +} + /** * (Delegated) Implements hook_civicrm_entityTypes(). * diff --git a/ext/civicrm_admin_ui/info.xml b/ext/civicrm_admin_ui/info.xml index cfb004668d..1a36cd756b 100644 --- a/ext/civicrm_admin_ui/info.xml +++ b/ext/civicrm_admin_ui/info.xml @@ -32,8 +32,9 @@ CRM/CivicrmAdminUi crmCivicrmAdminUi + 22.10.0 - mgd-php@1.1.0 + mgd-php@1.0.0 diff --git a/ext/civigrant/civigrant.civix.php b/ext/civigrant/civigrant.civix.php index dcf1934b5b..424cd9e19a 100644 --- a/ext/civigrant/civigrant.civix.php +++ b/ext/civigrant/civigrant.civix.php @@ -24,7 +24,7 @@ class CRM_Grant_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Grant_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -108,14 +108,181 @@ function _civigrant_civix_civicrm_config(&$config = NULL) { } /** - * (Delegated) Implements hook_civicrm_alterSettingsFolders(). + * Implements hook_civicrm_install(). * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterSettingsFolders + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install */ -function _civigrant_civix_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) { - $settingsDir = __DIR__ . DIRECTORY_SEPARATOR . 'settings'; - if (!in_array($settingsDir, $metaDataFolders) && is_dir($settingsDir)) { - $metaDataFolders[] = $settingsDir; +function _civigrant_civix_civicrm_install() { + _civigrant_civix_civicrm_config(); + if ($upgrader = _civigrant_civix_upgrader()) { + $upgrader->onInstall(); + } +} + +/** + * Implements hook_civicrm_postInstall(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall + */ +function _civigrant_civix_civicrm_postInstall() { + _civigrant_civix_civicrm_config(); + if ($upgrader = _civigrant_civix_upgrader()) { + if (is_callable([$upgrader, 'onPostInstall'])) { + $upgrader->onPostInstall(); + } + } +} + +/** + * Implements hook_civicrm_uninstall(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall + */ +function _civigrant_civix_civicrm_uninstall(): void { + _civigrant_civix_civicrm_config(); + if ($upgrader = _civigrant_civix_upgrader()) { + $upgrader->onUninstall(); + } +} + +/** + * (Delegated) Implements hook_civicrm_enable(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable + */ +function _civigrant_civix_civicrm_enable(): void { + _civigrant_civix_civicrm_config(); + if ($upgrader = _civigrant_civix_upgrader()) { + if (is_callable([$upgrader, 'onEnable'])) { + $upgrader->onEnable(); + } + } +} + +/** + * (Delegated) Implements hook_civicrm_disable(). + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable + * @return mixed + */ +function _civigrant_civix_civicrm_disable(): void { + _civigrant_civix_civicrm_config(); + if ($upgrader = _civigrant_civix_upgrader()) { + if (is_callable([$upgrader, 'onDisable'])) { + $upgrader->onDisable(); + } + } +} + +/** + * (Delegated) Implements hook_civicrm_upgrade(). + * + * @param $op string, the type of operation being performed; 'check' or 'enqueue' + * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks + * + * @return mixed + * based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending) + * for 'enqueue', returns void + * + * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade + */ +function _civigrant_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { + if ($upgrader = _civigrant_civix_upgrader()) { + return $upgrader->onUpgrade($op, $queue); + } +} + +/** + * @return CRM_Grant_Upgrader + */ +function _civigrant_civix_upgrader() { + if (!file_exists(__DIR__ . '/CRM/Grant/Upgrader.php')) { + return NULL; + } + else { + return CRM_Grant_Upgrader_Base::instance(); + } +} + +/** + * Inserts a navigation menu item at a given place in the hierarchy. + * + * @param array $menu - menu hierarchy + * @param string $path - path to parent of this item, e.g. 'my_extension/submenu' + * 'Mailing', or 'Administer/System Settings' + * @param array $item - the item to insert (parent/child attributes will be + * filled for you) + * + * @return bool + */ +function _civigrant_civix_insert_navigation_menu(&$menu, $path, $item) { + // If we are done going down the path, insert menu + if (empty($path)) { + $menu[] = [ + 'attributes' => array_merge([ + 'label' => CRM_Utils_Array::value('name', $item), + 'active' => 1, + ], $item), + ]; + return TRUE; + } + else { + // Find an recurse into the next level down + $found = FALSE; + $path = explode('/', $path); + $first = array_shift($path); + foreach ($menu as $key => &$entry) { + if ($entry['attributes']['name'] == $first) { + if (!isset($entry['child'])) { + $entry['child'] = []; + } + $found = _civigrant_civix_insert_navigation_menu($entry['child'], implode('/', $path), $item); + } + } + return $found; + } +} + +/** + * (Delegated) Implements hook_civicrm_navigationMenu(). + */ +function _civigrant_civix_navigationMenu(&$nodes) { + if (!is_callable(['CRM_Core_BAO_Navigation', 'fixNavigationMenu'])) { + _civigrant_civix_fixNavigationMenu($nodes); + } +} + +/** + * Given a navigation menu, generate navIDs for any items which are + * missing them. + */ +function _civigrant_civix_fixNavigationMenu(&$nodes) { + $maxNavID = 1; + array_walk_recursive($nodes, function($item, $key) use (&$maxNavID) { + if ($key === 'navID') { + $maxNavID = max($maxNavID, $item); + } + }); + _civigrant_civix_fixNavigationMenuItems($nodes, $maxNavID, NULL); +} + +function _civigrant_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $parentID) { + $origKeys = array_keys($nodes); + foreach ($origKeys as $origKey) { + if (!isset($nodes[$origKey]['attributes']['parentID']) && $parentID !== NULL) { + $nodes[$origKey]['attributes']['parentID'] = $parentID; + } + // If no navID, then assign navID and fix key. + if (!isset($nodes[$origKey]['attributes']['navID'])) { + $newKey = ++$maxNavID; + $nodes[$origKey]['attributes']['navID'] = $newKey; + $nodes[$newKey] = $nodes[$origKey]; + unset($nodes[$origKey]); + $origKey = $newKey; + } + if (isset($nodes[$origKey]['child']) && is_array($nodes[$origKey]['child'])) { + _civigrant_civix_fixNavigationMenuItems($nodes[$origKey]['child'], $maxNavID, $nodes[$origKey]['attributes']['navID']); + } } } diff --git a/ext/civigrant/civigrant.php b/ext/civigrant/civigrant.php index daab7e0224..bd14f68621 100644 --- a/ext/civigrant/civigrant.php +++ b/ext/civigrant/civigrant.php @@ -12,15 +12,6 @@ function civigrant_civicrm_config(&$config) { _civigrant_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_alterSettingsFolders(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterSettingsFolders - */ -function civigrant_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) { - _civigrant_civix_civicrm_alterSettingsFolders($metaDataFolders); -} - /** * Implements hook_civicrm_entityTypes(). * diff --git a/ext/civigrant/info.xml b/ext/civigrant/info.xml index 87beb51071..1aaface54b 100644 --- a/ext/civigrant/info.xml +++ b/ext/civigrant/info.xml @@ -30,10 +30,11 @@ CRM_Grant_Upgrader menu-xml@1.0.0 - mgd-php@1.1.0 + mgd-php@1.0.0 afform-entity-php@1.0.0 CRM/Grant + 22.10.0 diff --git a/ext/civiimport/civiimport.civix.php b/ext/civiimport/civiimport.civix.php index 4ca2d5282f..d7f10c0883 100644 --- a/ext/civiimport/civiimport.civix.php +++ b/ext/civiimport/civiimport.civix.php @@ -24,7 +24,7 @@ class CRM_Civiimport_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Civiimport_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -79,13 +79,6 @@ class CRM_Civiimport_ExtensionUtil { use CRM_Civiimport_ExtensionUtil as E; -function _civiimport_civix_mixin_polyfill() { - if (!class_exists('CRM_Extension_MixInfo')) { - $polyfill = __DIR__ . '/mixin/polyfill.php'; - (require $polyfill)(E::LONG_NAME, E::SHORT_NAME, E::path()); - } -} - /** * (Delegated) Implements hook_civicrm_config(). * @@ -112,7 +105,6 @@ function _civiimport_civix_civicrm_config(&$config = NULL) { $include_path = $extRoot . PATH_SEPARATOR . get_include_path(); set_include_path($include_path); - _civiimport_civix_mixin_polyfill(); } /** @@ -125,7 +117,6 @@ function _civiimport_civix_civicrm_install() { if ($upgrader = _civiimport_civix_upgrader()) { $upgrader->onInstall(); } - _civiimport_civix_mixin_polyfill(); } /** @@ -147,7 +138,7 @@ function _civiimport_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _civiimport_civix_civicrm_uninstall() { +function _civiimport_civix_civicrm_uninstall(): void { _civiimport_civix_civicrm_config(); if ($upgrader = _civiimport_civix_upgrader()) { $upgrader->onUninstall(); @@ -159,14 +150,13 @@ function _civiimport_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _civiimport_civix_civicrm_enable() { +function _civiimport_civix_civicrm_enable(): void { _civiimport_civix_civicrm_config(); if ($upgrader = _civiimport_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { $upgrader->onEnable(); } } - _civiimport_civix_mixin_polyfill(); } /** @@ -175,7 +165,7 @@ function _civiimport_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _civiimport_civix_civicrm_disable() { +function _civiimport_civix_civicrm_disable(): void { _civiimport_civix_civicrm_config(); if ($upgrader = _civiimport_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/civiimport/info.xml b/ext/civiimport/info.xml index 89348098fb..537122a7b1 100644 --- a/ext/civiimport/info.xml +++ b/ext/civiimport/info.xml @@ -31,7 +31,7 @@ CRM/Civiimport - 22.05.2 + 22.10.0 crmCiviimport diff --git a/ext/ckeditor4/ckeditor4.civix.php b/ext/ckeditor4/ckeditor4.civix.php index 17a0475106..e7ce69749e 100644 --- a/ext/ckeditor4/ckeditor4.civix.php +++ b/ext/ckeditor4/ckeditor4.civix.php @@ -24,7 +24,7 @@ class CRM_Ckeditor4_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Ckeditor4_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _ckeditor4_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _ckeditor4_civix_civicrm_uninstall() { +function _ckeditor4_civix_civicrm_uninstall(): void { _ckeditor4_civix_civicrm_config(); if ($upgrader = _ckeditor4_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _ckeditor4_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _ckeditor4_civix_civicrm_enable() { +function _ckeditor4_civix_civicrm_enable(): void { _ckeditor4_civix_civicrm_config(); if ($upgrader = _ckeditor4_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _ckeditor4_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _ckeditor4_civix_civicrm_disable() { +function _ckeditor4_civix_civicrm_disable(): void { _ckeditor4_civix_civicrm_config(); if ($upgrader = _ckeditor4_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/ckeditor4/info.xml b/ext/ckeditor4/info.xml index 90e3d69f04..3ebef25e6a 100644 --- a/ext/ckeditor4/info.xml +++ b/ext/ckeditor4/info.xml @@ -30,5 +30,6 @@ CRM/Ckeditor4 + 22.10.0 diff --git a/ext/contributioncancelactions/contributioncancelactions.civix.php b/ext/contributioncancelactions/contributioncancelactions.civix.php index af68033f7b..f78d349348 100644 --- a/ext/contributioncancelactions/contributioncancelactions.civix.php +++ b/ext/contributioncancelactions/contributioncancelactions.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Contributioncancelactions_ExtensionUtil { - const SHORT_NAME = "contributioncancelactions"; - const LONG_NAME = "contributioncancelactions"; - const CLASS_PREFIX = "CRM_Contributioncancelactions"; + const SHORT_NAME = 'contributioncancelactions'; + const LONG_NAME = 'contributioncancelactions'; + const CLASS_PREFIX = 'CRM_Contributioncancelactions'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Contributioncancelactions_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Contributioncancelactions_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _contributioncancelactions_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _contributioncancelactions_civix_civicrm_uninstall() { +function _contributioncancelactions_civix_civicrm_uninstall(): void { _contributioncancelactions_civix_civicrm_config(); if ($upgrader = _contributioncancelactions_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _contributioncancelactions_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _contributioncancelactions_civix_civicrm_enable() { +function _contributioncancelactions_civix_civicrm_enable(): void { _contributioncancelactions_civix_civicrm_config(); if ($upgrader = _contributioncancelactions_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _contributioncancelactions_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _contributioncancelactions_civix_civicrm_disable() { +function _contributioncancelactions_civix_civicrm_disable(): void { _contributioncancelactions_civix_civicrm_config(); if ($upgrader = _contributioncancelactions_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/contributioncancelactions/info.xml b/ext/contributioncancelactions/info.xml index b150bbc926..79ec0bf65c 100644 --- a/ext/contributioncancelactions/info.xml +++ b/ext/contributioncancelactions/info.xml @@ -27,5 +27,6 @@ CRM/Contributioncancelactions + 22.10.0 diff --git a/ext/elavon/elavon.civix.php b/ext/elavon/elavon.civix.php index d9bf7ce880..22f149e029 100644 --- a/ext/elavon/elavon.civix.php +++ b/ext/elavon/elavon.civix.php @@ -24,7 +24,7 @@ class CRM_Elavon_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Elavon_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -79,13 +79,6 @@ class CRM_Elavon_ExtensionUtil { use CRM_Elavon_ExtensionUtil as E; -function _elavon_civix_mixin_polyfill() { - if (!class_exists('CRM_Extension_MixInfo')) { - $polyfill = __DIR__ . '/mixin/polyfill.php'; - (require $polyfill)(E::LONG_NAME, E::SHORT_NAME, E::path()); - } -} - /** * (Delegated) Implements hook_civicrm_config(). * @@ -112,7 +105,6 @@ function _elavon_civix_civicrm_config(&$config = NULL) { $include_path = $extRoot . PATH_SEPARATOR . get_include_path(); set_include_path($include_path); - _elavon_civix_mixin_polyfill(); } /** @@ -125,7 +117,6 @@ function _elavon_civix_civicrm_install() { if ($upgrader = _elavon_civix_upgrader()) { $upgrader->onInstall(); } - _elavon_civix_mixin_polyfill(); } /** @@ -147,7 +138,7 @@ function _elavon_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _elavon_civix_civicrm_uninstall() { +function _elavon_civix_civicrm_uninstall(): void { _elavon_civix_civicrm_config(); if ($upgrader = _elavon_civix_upgrader()) { $upgrader->onUninstall(); @@ -159,14 +150,13 @@ function _elavon_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _elavon_civix_civicrm_enable() { +function _elavon_civix_civicrm_enable(): void { _elavon_civix_civicrm_config(); if ($upgrader = _elavon_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { $upgrader->onEnable(); } } - _elavon_civix_mixin_polyfill(); } /** @@ -175,7 +165,7 @@ function _elavon_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _elavon_civix_civicrm_disable() { +function _elavon_civix_civicrm_disable(): void { _elavon_civix_civicrm_config(); if ($upgrader = _elavon_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/elavon/info.xml b/ext/elavon/info.xml index 6d95fcacf0..e1c492d863 100644 --- a/ext/elavon/info.xml +++ b/ext/elavon/info.xml @@ -27,7 +27,7 @@ CRM/Elavon - 22.05.2 + 22.10.0 crmElavon diff --git a/ext/eventcart/eventcart.civix.php b/ext/eventcart/eventcart.civix.php index bdce986d6e..609fdb2e6e 100644 --- a/ext/eventcart/eventcart.civix.php +++ b/ext/eventcart/eventcart.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Event_Cart_ExtensionUtil { - const SHORT_NAME = "eventcart"; - const LONG_NAME = "eventcart"; - const CLASS_PREFIX = "CRM_Event_Cart"; + const SHORT_NAME = 'eventcart'; + const LONG_NAME = 'eventcart'; + const CLASS_PREFIX = 'CRM_Event_Cart'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Event_Cart_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Event_Cart_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _eventcart_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _eventcart_civix_civicrm_uninstall() { +function _eventcart_civix_civicrm_uninstall(): void { _eventcart_civix_civicrm_config(); if ($upgrader = _eventcart_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _eventcart_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _eventcart_civix_civicrm_enable() { +function _eventcart_civix_civicrm_enable(): void { _eventcart_civix_civicrm_config(); if ($upgrader = _eventcart_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _eventcart_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _eventcart_civix_civicrm_disable() { +function _eventcart_civix_civicrm_disable(): void { _eventcart_civix_civicrm_config(); if ($upgrader = _eventcart_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/eventcart/info.xml b/ext/eventcart/info.xml index 15d2f61d3d..7a9c0aa76c 100644 --- a/ext/eventcart/info.xml +++ b/ext/eventcart/info.xml @@ -31,5 +31,6 @@ CRM/Event/Cart + 22.10.0 diff --git a/ext/ewaysingle/ewaysingle.civix.php b/ext/ewaysingle/ewaysingle.civix.php index d94d1fa614..33da147685 100644 --- a/ext/ewaysingle/ewaysingle.civix.php +++ b/ext/ewaysingle/ewaysingle.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Ewaysingle_ExtensionUtil { - const SHORT_NAME = "ewaysingle"; - const LONG_NAME = "ewaysingle"; - const CLASS_PREFIX = "CRM_Ewaysingle"; + const SHORT_NAME = 'ewaysingle'; + const LONG_NAME = 'ewaysingle'; + const CLASS_PREFIX = 'CRM_Ewaysingle'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Ewaysingle_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Ewaysingle_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _ewaysingle_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _ewaysingle_civix_civicrm_uninstall() { +function _ewaysingle_civix_civicrm_uninstall(): void { _ewaysingle_civix_civicrm_config(); if ($upgrader = _ewaysingle_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _ewaysingle_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _ewaysingle_civix_civicrm_enable() { +function _ewaysingle_civix_civicrm_enable(): void { _ewaysingle_civix_civicrm_config(); if ($upgrader = _ewaysingle_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _ewaysingle_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _ewaysingle_civix_civicrm_disable() { +function _ewaysingle_civix_civicrm_disable(): void { _ewaysingle_civix_civicrm_config(); if ($upgrader = _ewaysingle_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/ewaysingle/info.xml b/ext/ewaysingle/info.xml index 8f2c5a15a5..ed7e87f5e2 100644 --- a/ext/ewaysingle/info.xml +++ b/ext/ewaysingle/info.xml @@ -29,9 +29,10 @@ - mgd-php@1.1.0 + mgd-php@1.0.0 CRM/Ewaysingle + 22.10.0 diff --git a/ext/financialacls/financialacls.civix.php b/ext/financialacls/financialacls.civix.php index 6948a1e926..62bdbe3f8b 100644 --- a/ext/financialacls/financialacls.civix.php +++ b/ext/financialacls/financialacls.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Financialacls_ExtensionUtil { - const SHORT_NAME = "financialacls"; - const LONG_NAME = "financialacls"; - const CLASS_PREFIX = "CRM_Financialacls"; + const SHORT_NAME = 'financialacls'; + const LONG_NAME = 'financialacls'; + const CLASS_PREFIX = 'CRM_Financialacls'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Financialacls_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Financialacls_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _financialacls_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _financialacls_civix_civicrm_uninstall() { +function _financialacls_civix_civicrm_uninstall(): void { _financialacls_civix_civicrm_config(); if ($upgrader = _financialacls_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _financialacls_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _financialacls_civix_civicrm_enable() { +function _financialacls_civix_civicrm_enable(): void { _financialacls_civix_civicrm_config(); if ($upgrader = _financialacls_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _financialacls_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _financialacls_civix_civicrm_disable() { +function _financialacls_civix_civicrm_disable(): void { _financialacls_civix_civicrm_config(); if ($upgrader = _financialacls_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/financialacls/info.xml b/ext/financialacls/info.xml index 76cf28cdc6..084868bbc0 100644 --- a/ext/financialacls/info.xml +++ b/ext/financialacls/info.xml @@ -33,5 +33,6 @@ CRM/Financialacls + 22.10.0 diff --git a/ext/flexmailer/flexmailer.civix.php b/ext/flexmailer/flexmailer.civix.php index becfec49fc..92186e7632 100644 --- a/ext/flexmailer/flexmailer.civix.php +++ b/ext/flexmailer/flexmailer.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Flexmailer_ExtensionUtil { - const SHORT_NAME = "flexmailer"; - const LONG_NAME = "org.civicrm.flexmailer"; - const CLASS_PREFIX = "CRM_Flexmailer"; + const SHORT_NAME = 'flexmailer'; + const LONG_NAME = 'org.civicrm.flexmailer'; + const CLASS_PREFIX = 'CRM_Flexmailer'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Flexmailer_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Flexmailer_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _flexmailer_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _flexmailer_civix_civicrm_uninstall() { +function _flexmailer_civix_civicrm_uninstall(): void { _flexmailer_civix_civicrm_config(); if ($upgrader = _flexmailer_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _flexmailer_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _flexmailer_civix_civicrm_enable() { +function _flexmailer_civix_civicrm_enable(): void { _flexmailer_civix_civicrm_config(); if ($upgrader = _flexmailer_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _flexmailer_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _flexmailer_civix_civicrm_disable() { +function _flexmailer_civix_civicrm_disable(): void { _flexmailer_civix_civicrm_config(); if ($upgrader = _flexmailer_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/flexmailer/info.xml b/ext/flexmailer/info.xml index 5b3aee9566..c725f129e8 100644 --- a/ext/flexmailer/info.xml +++ b/ext/flexmailer/info.xml @@ -34,5 +34,6 @@ CRM/Flexmailer + 22.10.0 diff --git a/ext/greenwich/greenwich.civix.php b/ext/greenwich/greenwich.civix.php index c7649fd1e9..782bb0f998 100644 --- a/ext/greenwich/greenwich.civix.php +++ b/ext/greenwich/greenwich.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Greenwich_ExtensionUtil { - const SHORT_NAME = "greenwich"; - const LONG_NAME = "greenwich"; - const CLASS_PREFIX = "CRM_Greenwich"; + const SHORT_NAME = 'greenwich'; + const LONG_NAME = 'greenwich'; + const CLASS_PREFIX = 'CRM_Greenwich'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Greenwich_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Greenwich_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _greenwich_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _greenwich_civix_civicrm_uninstall() { +function _greenwich_civix_civicrm_uninstall(): void { _greenwich_civix_civicrm_config(); if ($upgrader = _greenwich_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _greenwich_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _greenwich_civix_civicrm_enable() { +function _greenwich_civix_civicrm_enable(): void { _greenwich_civix_civicrm_config(); if ($upgrader = _greenwich_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _greenwich_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _greenwich_civix_civicrm_disable() { +function _greenwich_civix_civicrm_disable(): void { _greenwich_civix_civicrm_config(); if ($upgrader = _greenwich_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/greenwich/info.xml b/ext/greenwich/info.xml index cb67596e69..da1c9d3d69 100644 --- a/ext/greenwich/info.xml +++ b/ext/greenwich/info.xml @@ -29,5 +29,6 @@ CRM/Greenwich + 22.10.0 diff --git a/ext/legacycustomsearches/info.xml b/ext/legacycustomsearches/info.xml index 531901123b..53200260e8 100644 --- a/ext/legacycustomsearches/info.xml +++ b/ext/legacycustomsearches/info.xml @@ -34,6 +34,6 @@ CRM/Legacycustomsearches - 22.05.2 + 22.10.0 diff --git a/ext/legacycustomsearches/legacycustomsearches.civix.php b/ext/legacycustomsearches/legacycustomsearches.civix.php index 3cb227a420..b769c8311f 100644 --- a/ext/legacycustomsearches/legacycustomsearches.civix.php +++ b/ext/legacycustomsearches/legacycustomsearches.civix.php @@ -24,7 +24,7 @@ class CRM_Legacycustomsearches_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Legacycustomsearches_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _legacycustomsearches_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _legacycustomsearches_civix_civicrm_uninstall() { +function _legacycustomsearches_civix_civicrm_uninstall(): void { _legacycustomsearches_civix_civicrm_config(); if ($upgrader = _legacycustomsearches_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _legacycustomsearches_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _legacycustomsearches_civix_civicrm_enable() { +function _legacycustomsearches_civix_civicrm_enable(): void { _legacycustomsearches_civix_civicrm_config(); if ($upgrader = _legacycustomsearches_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _legacycustomsearches_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _legacycustomsearches_civix_civicrm_disable() { +function _legacycustomsearches_civix_civicrm_disable(): void { _legacycustomsearches_civix_civicrm_config(); if ($upgrader = _legacycustomsearches_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/message_admin/info.xml b/ext/message_admin/info.xml index d9c3a52225..8f8b50517f 100644 --- a/ext/message_admin/info.xml +++ b/ext/message_admin/info.xml @@ -34,5 +34,6 @@ CRM/MessageAdmin + 22.10.0 diff --git a/ext/message_admin/message_admin.civix.php b/ext/message_admin/message_admin.civix.php index 483d0b9c07..14af7812f4 100644 --- a/ext/message_admin/message_admin.civix.php +++ b/ext/message_admin/message_admin.civix.php @@ -24,7 +24,7 @@ class CRM_MessageAdmin_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_MessageAdmin_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _message_admin_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _message_admin_civix_civicrm_uninstall() { +function _message_admin_civix_civicrm_uninstall(): void { _message_admin_civix_civicrm_config(); if ($upgrader = _message_admin_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _message_admin_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _message_admin_civix_civicrm_enable() { +function _message_admin_civix_civicrm_enable(): void { _message_admin_civix_civicrm_config(); if ($upgrader = _message_admin_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _message_admin_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _message_admin_civix_civicrm_disable() { +function _message_admin_civix_civicrm_disable(): void { _message_admin_civix_civicrm_config(); if ($upgrader = _message_admin_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/oauth-client/info.xml b/ext/oauth-client/info.xml index ab995c731a..67e921d406 100644 --- a/ext/oauth-client/info.xml +++ b/ext/oauth-client/info.xml @@ -36,5 +36,6 @@ CRM/OAuth + 22.10.0 diff --git a/ext/oauth-client/oauth_client.civix.php b/ext/oauth-client/oauth_client.civix.php index 3d9ae5d3f5..e83d3f14ba 100644 --- a/ext/oauth-client/oauth_client.civix.php +++ b/ext/oauth-client/oauth_client.civix.php @@ -24,7 +24,7 @@ class CRM_OAuth_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_OAuth_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _oauth_client_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _oauth_client_civix_civicrm_uninstall() { +function _oauth_client_civix_civicrm_uninstall(): void { _oauth_client_civix_civicrm_config(); if ($upgrader = _oauth_client_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _oauth_client_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _oauth_client_civix_civicrm_enable() { +function _oauth_client_civix_civicrm_enable(): void { _oauth_client_civix_civicrm_config(); if ($upgrader = _oauth_client_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _oauth_client_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _oauth_client_civix_civicrm_disable() { +function _oauth_client_civix_civicrm_disable(): void { _oauth_client_civix_civicrm_config(); if ($upgrader = _oauth_client_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/payflowpro/info.xml b/ext/payflowpro/info.xml index 6d297a693e..9942300144 100644 --- a/ext/payflowpro/info.xml +++ b/ext/payflowpro/info.xml @@ -26,9 +26,10 @@ - mgd-php@1.1.0 + mgd-php@1.0.0 CRM/Payflowpro + 22.10.0 diff --git a/ext/payflowpro/payflowpro.civix.php b/ext/payflowpro/payflowpro.civix.php index 02c9abccac..ff6316d715 100644 --- a/ext/payflowpro/payflowpro.civix.php +++ b/ext/payflowpro/payflowpro.civix.php @@ -24,7 +24,7 @@ class CRM_Payflowpro_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Payflowpro_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -93,8 +93,7 @@ function _payflowpro_civix_civicrm_config(&$config = NULL) { $template = CRM_Core_Smarty::singleton(); - $extRoot = __DIR__ - . DIRECTORY_SEPARATOR; + $extRoot = __DIR__ . DIRECTORY_SEPARATOR; $extDir = $extRoot . 'templates'; if (is_array($template->template_dir)) { @@ -139,7 +138,7 @@ function _payflowpro_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _payflowpro_civix_civicrm_uninstall() { +function _payflowpro_civix_civicrm_uninstall(): void { _payflowpro_civix_civicrm_config(); if ($upgrader = _payflowpro_civix_upgrader()) { $upgrader->onUninstall(); @@ -151,7 +150,7 @@ function _payflowpro_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _payflowpro_civix_civicrm_enable() { +function _payflowpro_civix_civicrm_enable(): void { _payflowpro_civix_civicrm_config(); if ($upgrader = _payflowpro_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -166,7 +165,7 @@ function _payflowpro_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _payflowpro_civix_civicrm_disable() { +function _payflowpro_civix_civicrm_disable(): void { _payflowpro_civix_civicrm_config(); if ($upgrader = _payflowpro_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/recaptcha/info.xml b/ext/recaptcha/info.xml index 70dd98c35a..84ab2482f0 100644 --- a/ext/recaptcha/info.xml +++ b/ext/recaptcha/info.xml @@ -33,5 +33,6 @@ CRM/Recaptcha + 22.10.0 diff --git a/ext/recaptcha/recaptcha.civix.php b/ext/recaptcha/recaptcha.civix.php index dc51b7677d..67c3221da5 100644 --- a/ext/recaptcha/recaptcha.civix.php +++ b/ext/recaptcha/recaptcha.civix.php @@ -24,7 +24,7 @@ class CRM_Recaptcha_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Recaptcha_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _recaptcha_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _recaptcha_civix_civicrm_uninstall() { +function _recaptcha_civix_civicrm_uninstall(): void { _recaptcha_civix_civicrm_config(); if ($upgrader = _recaptcha_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _recaptcha_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _recaptcha_civix_civicrm_enable() { +function _recaptcha_civix_civicrm_enable(): void { _recaptcha_civix_civicrm_config(); if ($upgrader = _recaptcha_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _recaptcha_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _recaptcha_civix_civicrm_disable() { +function _recaptcha_civix_civicrm_disable(): void { _recaptcha_civix_civicrm_config(); if ($upgrader = _recaptcha_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/search_kit/info.xml b/ext/search_kit/info.xml index 6b07f2c245..213503e45a 100644 --- a/ext/search_kit/info.xml +++ b/ext/search_kit/info.xml @@ -30,9 +30,10 @@ ang-php@1.0.0 scan-classes@1.0.0 menu-xml@1.0.0 - mgd-php@1.1.0 + mgd-php@1.0.0 CRM/Search + 22.10.0 diff --git a/ext/search_kit/search_kit.civix.php b/ext/search_kit/search_kit.civix.php index da7a7cfa9d..414f9a73d4 100644 --- a/ext/search_kit/search_kit.civix.php +++ b/ext/search_kit/search_kit.civix.php @@ -24,7 +24,7 @@ class CRM_Search_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Search_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _search_kit_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _search_kit_civix_civicrm_uninstall() { +function _search_kit_civix_civicrm_uninstall(): void { _search_kit_civix_civicrm_config(); if ($upgrader = _search_kit_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _search_kit_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _search_kit_civix_civicrm_enable() { +function _search_kit_civix_civicrm_enable(): void { _search_kit_civix_civicrm_config(); if ($upgrader = _search_kit_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _search_kit_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _search_kit_civix_civicrm_disable() { +function _search_kit_civix_civicrm_disable(): void { _search_kit_civix_civicrm_config(); if ($upgrader = _search_kit_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/sequentialcreditnotes/info.xml b/ext/sequentialcreditnotes/info.xml index 4d2b6a2ca5..7e0ea714d7 100644 --- a/ext/sequentialcreditnotes/info.xml +++ b/ext/sequentialcreditnotes/info.xml @@ -28,5 +28,6 @@ CRM/Sequentialcreditnotes + 22.10.0 diff --git a/ext/sequentialcreditnotes/sequentialcreditnotes.civix.php b/ext/sequentialcreditnotes/sequentialcreditnotes.civix.php index 098dde7d07..e17812d6ab 100644 --- a/ext/sequentialcreditnotes/sequentialcreditnotes.civix.php +++ b/ext/sequentialcreditnotes/sequentialcreditnotes.civix.php @@ -7,9 +7,9 @@ * extension. */ class CRM_Sequentialcreditnotes_ExtensionUtil { - const SHORT_NAME = "sequentialcreditnotes"; - const LONG_NAME = "sequentialcreditnotes"; - const CLASS_PREFIX = "CRM_Sequentialcreditnotes"; + const SHORT_NAME = 'sequentialcreditnotes'; + const LONG_NAME = 'sequentialcreditnotes'; + const CLASS_PREFIX = 'CRM_Sequentialcreditnotes'; /** * Translate a string using the extension's domain. @@ -24,7 +24,7 @@ class CRM_Sequentialcreditnotes_ExtensionUtil { * Translated text. * @see ts */ - public static function ts($text, $params = []) { + public static function ts($text, $params = []): string { if (!array_key_exists('domain', $params)) { $params['domain'] = [self::LONG_NAME, NULL]; } @@ -41,7 +41,7 @@ class CRM_Sequentialcreditnotes_ExtensionUtil { * Ex: 'http://example.org/sites/default/ext/org.example.foo'. * Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'. */ - public static function url($file = NULL) { + public static function url($file = NULL): string { if ($file === NULL) { return rtrim(CRM_Core_Resources::singleton()->getUrl(self::LONG_NAME), '/'); } @@ -138,7 +138,7 @@ function _sequentialcreditnotes_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _sequentialcreditnotes_civix_civicrm_uninstall() { +function _sequentialcreditnotes_civix_civicrm_uninstall(): void { _sequentialcreditnotes_civix_civicrm_config(); if ($upgrader = _sequentialcreditnotes_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _sequentialcreditnotes_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _sequentialcreditnotes_civix_civicrm_enable() { +function _sequentialcreditnotes_civix_civicrm_enable(): void { _sequentialcreditnotes_civix_civicrm_config(); if ($upgrader = _sequentialcreditnotes_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _sequentialcreditnotes_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _sequentialcreditnotes_civix_civicrm_disable() { +function _sequentialcreditnotes_civix_civicrm_disable(): void { _sequentialcreditnotes_civix_civicrm_config(); if ($upgrader = _sequentialcreditnotes_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { @@ -181,7 +181,8 @@ function _sequentialcreditnotes_civix_civicrm_disable() { * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks * * @return mixed - * based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending) for 'enqueue', returns void + * based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending) + * for 'enqueue', returns void * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade */ @@ -219,7 +220,7 @@ function _sequentialcreditnotes_civix_insert_navigation_menu(&$menu, $path, $ite if (empty($path)) { $menu[] = [ 'attributes' => array_merge([ - 'label' => $item['name'] ?? NULL, + 'label' => CRM_Utils_Array::value('name', $item), 'active' => 1, ], $item), ]; -- 2.25.1