From 47cfb6bb6811af2d488885769ac7320df09b487d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 9 Nov 2022 21:49:57 -0500 Subject: [PATCH] Afform - Upgrade ext to civix 22.10.0 --- ext/afform/admin/afform_admin.civix.php | 10 +++++----- ext/afform/admin/info.xml | 3 ++- ext/afform/core/afform.civix.php | 10 +++++----- ext/afform/core/info.xml | 3 ++- ext/afform/html/afform_html.civix.php | 10 +++++----- ext/afform/html/info.xml | 1 + ext/afform/mock/afform_mock.civix.php | 10 +++++----- ext/afform/mock/info.xml | 1 + 8 files changed, 26 insertions(+), 22 deletions(-) diff --git a/ext/afform/admin/afform_admin.civix.php b/ext/afform/admin/afform_admin.civix.php index 3071d542f3..82e009d93c 100644 --- a/ext/afform/admin/afform_admin.civix.php +++ b/ext/afform/admin/afform_admin.civix.php @@ -24,7 +24,7 @@ class CRM_AfformAdmin_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_AfformAdmin_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 _afform_admin_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _afform_admin_civix_civicrm_uninstall() { +function _afform_admin_civix_civicrm_uninstall(): void { _afform_admin_civix_civicrm_config(); if ($upgrader = _afform_admin_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _afform_admin_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _afform_admin_civix_civicrm_enable() { +function _afform_admin_civix_civicrm_enable(): void { _afform_admin_civix_civicrm_config(); if ($upgrader = _afform_admin_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _afform_admin_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _afform_admin_civix_civicrm_disable() { +function _afform_admin_civix_civicrm_disable(): void { _afform_admin_civix_civicrm_config(); if ($upgrader = _afform_admin_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/afform/admin/info.xml b/ext/afform/admin/info.xml index 6b81a6f960..cdd86abcd0 100644 --- a/ext/afform/admin/info.xml +++ b/ext/afform/admin/info.xml @@ -25,6 +25,7 @@ CRM/AfformAdmin + 22.10.0 @@ -33,7 +34,7 @@ ang-php@1.0.0 menu-xml@1.0.0 - mgd-php@1.1.0 + mgd-php@1.0.0 afform-entity-php@1.0.0 diff --git a/ext/afform/core/afform.civix.php b/ext/afform/core/afform.civix.php index ae7b0c0fa4..11006a5f58 100644 --- a/ext/afform/core/afform.civix.php +++ b/ext/afform/core/afform.civix.php @@ -24,7 +24,7 @@ class CRM_Afform_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_Afform_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 _afform_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _afform_civix_civicrm_uninstall() { +function _afform_civix_civicrm_uninstall(): void { _afform_civix_civicrm_config(); if ($upgrader = _afform_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _afform_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _afform_civix_civicrm_enable() { +function _afform_civix_civicrm_enable(): void { _afform_civix_civicrm_config(); if ($upgrader = _afform_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _afform_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _afform_civix_civicrm_disable() { +function _afform_civix_civicrm_disable(): void { _afform_civix_civicrm_config(); if ($upgrader = _afform_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/afform/core/info.xml b/ext/afform/core/info.xml index 5b363a4083..0c88317cca 100644 --- a/ext/afform/core/info.xml +++ b/ext/afform/core/info.xml @@ -21,6 +21,7 @@ The Form Core extension is required to use any dynamic form. To administer and edit forms, also install the FormBuilder extension. CRM/Afform + 22.10.0 @@ -32,7 +33,7 @@ ang-php@1.0.0 - mgd-php@1.1.0 + mgd-php@1.0.0 scan-classes@1.0.0 diff --git a/ext/afform/html/afform_html.civix.php b/ext/afform/html/afform_html.civix.php index 80d673e53a..31c33437bb 100644 --- a/ext/afform/html/afform_html.civix.php +++ b/ext/afform/html/afform_html.civix.php @@ -24,7 +24,7 @@ class CRM_AfformHtml_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_AfformHtml_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 _afform_html_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _afform_html_civix_civicrm_uninstall() { +function _afform_html_civix_civicrm_uninstall(): void { _afform_html_civix_civicrm_config(); if ($upgrader = _afform_html_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _afform_html_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _afform_html_civix_civicrm_enable() { +function _afform_html_civix_civicrm_enable(): void { _afform_html_civix_civicrm_config(); if ($upgrader = _afform_html_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _afform_html_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _afform_html_civix_civicrm_disable() { +function _afform_html_civix_civicrm_disable(): void { _afform_html_civix_civicrm_config(); if ($upgrader = _afform_html_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/afform/html/info.xml b/ext/afform/html/info.xml index 62fe25f6e7..69d64da0f6 100644 --- a/ext/afform/html/info.xml +++ b/ext/afform/html/info.xml @@ -27,5 +27,6 @@ CRM/AfformHtml + 22.10.0 diff --git a/ext/afform/mock/afform_mock.civix.php b/ext/afform/mock/afform_mock.civix.php index b28d263901..74c34428b1 100644 --- a/ext/afform/mock/afform_mock.civix.php +++ b/ext/afform/mock/afform_mock.civix.php @@ -24,7 +24,7 @@ class CRM_AfformMock_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_AfformMock_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 _afform_mock_civix_civicrm_postInstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall */ -function _afform_mock_civix_civicrm_uninstall() { +function _afform_mock_civix_civicrm_uninstall(): void { _afform_mock_civix_civicrm_config(); if ($upgrader = _afform_mock_civix_upgrader()) { $upgrader->onUninstall(); @@ -150,7 +150,7 @@ function _afform_mock_civix_civicrm_uninstall() { * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable */ -function _afform_mock_civix_civicrm_enable() { +function _afform_mock_civix_civicrm_enable(): void { _afform_mock_civix_civicrm_config(); if ($upgrader = _afform_mock_civix_upgrader()) { if (is_callable([$upgrader, 'onEnable'])) { @@ -165,7 +165,7 @@ function _afform_mock_civix_civicrm_enable() { * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable * @return mixed */ -function _afform_mock_civix_civicrm_disable() { +function _afform_mock_civix_civicrm_disable(): void { _afform_mock_civix_civicrm_config(); if ($upgrader = _afform_mock_civix_upgrader()) { if (is_callable([$upgrader, 'onDisable'])) { diff --git a/ext/afform/mock/info.xml b/ext/afform/mock/info.xml index b94656d3fa..5b720648e0 100644 --- a/ext/afform/mock/info.xml +++ b/ext/afform/mock/info.xml @@ -29,5 +29,6 @@ CRM/AfformMock + 22.10.0 -- 2.25.1