Skip to content

Commit

Permalink
Fix deprecation warning after framework major upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Aug 18, 2025
1 parent 28d639e commit d5209e3
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function buildPersonRole(
// We need our Mapping configuration, which won't be in $flange
$mappings = $this->PersonRoleMappings->find()
->where(['person_role_mapper_id' => $flange->person_role_mapper->id])
->order(['ordr' => 'ASC'])
->orderBy(['ordr' => 'ASC'])
->all();

foreach($mappings as $mapping) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public function verifiableEmailAddresses(
'attribute' => 'emailAddress',
'status' => StatusEnum::Active,
])
->order(['ordr' => 'ASC'])
->orderBy(['ordr' => 'ASC'])
->toArray();

if (empty($vv_enrollment_attributes)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function assembleVerifiableAddresses(
'enrollment_flow_id' => $petition->enrollment_flow_id,
'status' => SuspendableStatusEnum::Active
])
->order(['EnrollmentFlowSteps.ordr' => 'ASC'])
->orderBy(['EnrollmentFlowSteps.ordr' => 'ASC'])
->contain($this->EnrollmentFlowSteps->getPluginRelations())
->all();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function display(int $petitionId): void
$vv_enrollment_attributes = $this->fetchTable('EnrollmentAttributes')
->find()
->where(fn(QueryExpression $exp, Query $q) => $exp->in('id', $vv_enrollment_atttributes_ids))
->order(['ordr' => 'ASC'])
->orderBy(['ordr' => 'ASC'])
->toArray();
}

Expand Down
8 changes: 5 additions & 3 deletions app/src/Controller/Component/RegistryAuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public function beforeFilter(EventInterface $event) {
break;
case 'open':
// The current request is open/public, no auth required
return true;
$event->setResult(true);
return;
break;
case 'no':
// The controller will not do either authn or authz, so apply
Expand All @@ -162,7 +163,8 @@ public function beforeFilter(EventInterface $event) {
// The controller will handle both authn and authz, simply return
// (The expectation is that the controller already performed the appropriate
// checks before returning 'yes', on failure 'notauth' should be returned.)
return true;
$event->setResult(true);
return;
break;
case 'notauth':
// The controller has rejected this request as unauthenticated or unauthorized
Expand Down Expand Up @@ -823,7 +825,7 @@ public function isApprover(int $petitionId): bool {
$Identifiers = TableRegistry::getTableLocator()->get('Identifiers');

// Pull the Petition to find its CO
$petition = $Petitions->get($petitionId, ['contain' => 'EnrollmentFlows']);
$petition = $Petitions->get($petitionId, contain: ['EnrollmentFlows']);

try {
// Map the authenticated user to a Person ID
Expand Down
8 changes: 4 additions & 4 deletions app/src/Lib/Traits/AutoViewVarsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ public function calculateAutoViewVars(int|null $coId, Object $obj = null): \Gene

// For now we don't filter on status because not all Pluggable models
// use it consistency. (Specifically, EISs use SyncModeEnum instead.)
$generatedValue = $PluggableTable->find('list', [
'keyField' => $modelKey.'.id',
'valueField' => 'description'
])
$generatedValue = $PluggableTable->find('list',
keyField: $modelKey.'.id',
valueField: 'description'
)
->where(['plugin' => $avv['model']])
->contain(StringUtilities::pluginModel($avv['model']))
->all();
Expand Down
8 changes: 4 additions & 4 deletions app/src/Model/Table/PeopleTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ public function localAfterSave(\Cake\Event\EventInterface $event, \Cake\Datasour
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' => [
archived: 'true',
contain: [
'PrimaryName' => [ 'Types' ],
'Addresses' => [ 'Types' ],
'AdHocAttributes',
Expand Down Expand Up @@ -506,7 +506,7 @@ public function marshalProvisioningData(int $id): array {
'TelephoneNumbers' => [ 'Types' ],
'Urls' => [ 'Types' ]
]
]);
);

// Provisioning Eligibility is
// - Deleted if the changelog deleted flag is true OR status is Archived
Expand Down
2 changes: 1 addition & 1 deletion app/templates/element/subnavigation/supertitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
&& !empty($this->getPlugin())
&& $vv_subnavigation_tabs[0] !== StringUtilities::entityToClassName($vv_bc_parent_obj)
) {
$object = $vv_obj ?? $$objectName?->first();
$object = $vv_obj ?? $$objectName?->items()?->first();
if ($object === null) {
// This is a deep nested association that has not been initialized yet. The controller name
// will become the supertitle
Expand Down

0 comments on commit d5209e3

Please sign in to comment.