From b35f59345056cf605927f24d75e610db599838ab Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 29 Nov 2021 08:50:03 -0500 Subject: [PATCH] APIv4 - Delete unused OptionList trait This trait had been added for the sake of SearchKit to determine which entities should be searchable and which were merely supplying option lists for other entities. However, this logic broke down quickly as some option lists *should* be searchable, so that path was abandoned in favor of the `@searchable` annotation. The trait now does nothing and is just taking up space and adding unnecessary complexity. --- Civi/Api4/CaseType.php | 1 - Civi/Api4/ContactType.php | 1 - Civi/Api4/Country.php | 1 - Civi/Api4/Entity.php | 1 - Civi/Api4/FinancialType.php | 1 - Civi/Api4/Generic/Traits/OptionList.php | 23 ----------------------- Civi/Api4/LocationType.php | 1 - Civi/Api4/MembershipBlock.php | 1 - Civi/Api4/MembershipStatus.php | 1 - Civi/Api4/MembershipType.php | 1 - Civi/Api4/OptionGroup.php | 1 - Civi/Api4/OptionValue.php | 1 - Civi/Api4/PaymentProcessor.php | 1 - Civi/Api4/PaymentProcessorType.php | 1 - Civi/Api4/PaymentToken.php | 1 - Civi/Api4/RelationshipType.php | 1 - Civi/Api4/StateProvince.php | 1 - 17 files changed, 39 deletions(-) delete mode 100644 Civi/Api4/Generic/Traits/OptionList.php diff --git a/Civi/Api4/CaseType.php b/Civi/Api4/CaseType.php index a8ae7273e4..3de80b7965 100644 --- a/Civi/Api4/CaseType.php +++ b/Civi/Api4/CaseType.php @@ -21,6 +21,5 @@ namespace Civi\Api4; * @package Civi\Api4 */ class CaseType extends Generic\DAOEntity { - use Generic\Traits\OptionList; } diff --git a/Civi/Api4/ContactType.php b/Civi/Api4/ContactType.php index 74eeccd9d8..e949845613 100644 --- a/Civi/Api4/ContactType.php +++ b/Civi/Api4/ContactType.php @@ -26,7 +26,6 @@ namespace Civi\Api4; * @package Civi\Api4 */ class ContactType extends Generic\DAOEntity { - use Generic\Traits\OptionList; use Generic\Traits\ManagedEntity; } diff --git a/Civi/Api4/Country.php b/Civi/Api4/Country.php index 63093db8e8..47fb952f53 100644 --- a/Civi/Api4/Country.php +++ b/Civi/Api4/Country.php @@ -18,6 +18,5 @@ namespace Civi\Api4; * @package Civi\Api4 */ class Country extends Generic\DAOEntity { - use Generic\Traits\OptionList; } diff --git a/Civi/Api4/Entity.php b/Civi/Api4/Entity.php index d6b0dfcc3c..9669bdf25d 100644 --- a/Civi/Api4/Entity.php +++ b/Civi/Api4/Entity.php @@ -60,7 +60,6 @@ class Entity extends Generic\AbstractEntity { 'BasicEntity' => 'BasicEntity', 'ManagedEntity' => 'ManagedEntity', 'EntityBridge' => 'EntityBridge', - 'OptionList' => 'OptionList', ], ], [ diff --git a/Civi/Api4/FinancialType.php b/Civi/Api4/FinancialType.php index 14db20d00a..ea85931db8 100644 --- a/Civi/Api4/FinancialType.php +++ b/Civi/Api4/FinancialType.php @@ -22,6 +22,5 @@ namespace Civi\Api4; * @package Civi\Api4 */ class FinancialType extends Generic\DAOEntity { - use Generic\Traits\OptionList; } diff --git a/Civi/Api4/Generic/Traits/OptionList.php b/Civi/Api4/Generic/Traits/OptionList.php deleted file mode 100644 index 3dea083bfd..0000000000 --- a/Civi/Api4/Generic/Traits/OptionList.php +++ /dev/null @@ -1,23 +0,0 @@ -