diff --git a/app/src/Command/UpgradeCommand.php b/app/src/Command/UpgradeCommand.php index 307f14dbf..b1f827335 100644 --- a/app/src/Command/UpgradeCommand.php +++ b/app/src/Command/UpgradeCommand.php @@ -427,12 +427,12 @@ protected function cacheEnvSourcespMode(): void { $EnvSourcesTable = $this->getTableLocator()->get('EnvSource.EnvSources'); - $this->EnvSourceSpMode = $EnvSourcesTable->find('list', [ - 'keyField' => 'id', - 'valueField' => 'sp_mode' - ]) - ->applyOptions(['archived' => true]) - ->toArray(); + $this->EnvSourceSpMode = $EnvSourcesTable->find('list', + keyField: 'id', + valueField: 'sp_mode' + ) + ->applyOptions(['archived' => true]) + ->toArray(); } /** @@ -482,7 +482,7 @@ protected function buildGroupTree() { // as a whole, so we only need to run this once. $GroupsTable = $this->getTableLocator()->get('Groups'); - $GroupsTable->recover(); + $GroupsTable->getBehavior('Tree')->recover(); } /** diff --git a/app/src/Model/Table/GroupsTable.php b/app/src/Model/Table/GroupsTable.php index 0a1adf207..e8b17dd8a 100644 --- a/app/src/Model/Table/GroupsTable.php +++ b/app/src/Model/Table/GroupsTable.php @@ -1021,14 +1021,11 @@ public function localAfterSave(EventInterface $event, EntityInterface $entity, \ public function marshalProvisioningData(int $id): array { $ret = []; - $ret['data'] = $this->get($id, [ + $ret['data'] = $this->get($id, // We need archives for handling deleted records - 'archived' => true, - 'contain' => [ - 'GroupMembers', - 'Identifiers' - ] - ]); + archived: true, + contain: ['GroupMembers', 'Identifiers'] + ); // Provisioning Eligibility is // - Deleted if the changelog deleted flag is true