From b9f01788d3356965b890d1ade6d6694c90e34847 Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Tue, 16 Nov 2021 12:34:16 -0500 Subject: [PATCH] Fix deprecations and errata (NOJIRA) --- app/config/routes.php | 18 +++++++++--------- app/src/Controller/ErrorController.php | 2 +- app/templates/Standard/index.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/config/routes.php b/app/config/routes.php index ae555ec0c..92c97cf11 100644 --- a/app/config/routes.php +++ b/app/config/routes.php @@ -62,17 +62,17 @@ */ // Match Request - $builder->get('/api/:matchgrid_id/v1/matchRequests/:id', ['controller' => 'TierApi', 'action' => 'viewMatchRequest']); - $builder->get('/api/:matchgrid_id/v1/matchRequests', ['controller' => 'TierApi', 'action' => 'viewMatchRequests']); - $builder->put('/api/:matchgrid_id/v1/people/:sor/:sorid', ['controller' => 'TierApi', 'action' => 'match']); - $builder->post('/api/:matchgrid_id/v1/people/:sor/:sorid', ['controller' => 'TierApi', 'action' => 'search']); + $builder->get('/api/{matchgrid_id}/v1/matchRequests/{id}', ['controller' => 'TierApi', 'action' => 'viewMatchRequest']); + $builder->get('/api/{matchgrid_id}/v1/matchRequests', ['controller' => 'TierApi', 'action' => 'viewMatchRequests']); + $builder->put('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'match']); + $builder->post('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'search']); // This doesn't match and we end up in current(), so we just check there // Also, as of API v1.0.0, search over GET has been removed -// $builder->get('/api/:matchgrid_id/v1/people/:sor/:sorid?*', ['controller' => 'TierApi', 'action' => 'search']); - $builder->delete('/api/:matchgrid_id/v1/people/:sor/:sorid', ['controller' => 'TierApi', 'action' => 'remove']); - $builder->get('/api/:matchgrid_id/v1/people/:sor/:sorid', ['controller' => 'TierApi', 'action' => 'current']); - $builder->get('/api/:matchgrid_id/v1/people/:sor', ['controller' => 'TierApi', 'action' => 'inventory']); - $builder->put('/api/:matchgrid_id/v1/referenceIds/:id', ['controller' => 'TierApi', 'action' => 'merge']); +// $builder->get('/api/{matchgrid_id}/v1/people/{sor}/{sorid}?*', ['controller' => 'TierApi', 'action' => 'search']); + $builder->delete('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'remove']); + $builder->get('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'current']); + $builder->get('/api/{matchgrid_id}/v1/people/{sor}', ['controller' => 'TierApi', 'action' => 'inventory']); + $builder->put('/api/{matchgrid_id}/v1/referenceIds/{id}', ['controller' => 'TierApi', 'action' => 'merge']); /** * Connect catchall routes for all controllers. diff --git a/app/src/Controller/ErrorController.php b/app/src/Controller/ErrorController.php index c0778d91d..4c7ce5251 100644 --- a/app/src/Controller/ErrorController.php +++ b/app/src/Controller/ErrorController.php @@ -62,7 +62,7 @@ public function beforeRender(EventInterface $event) * @param \Cake\Event\EventInterface $event Event. * @return \Cake\Http\Response|null|void */ - public function afterFilter(Event $event) + public function afterFilter(EventInterface $event) { } } diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index 801e49b36..78b93eedf 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -95,7 +95,7 @@ function _column_key($modelsName, $c, $tz=null) { Html->link(' ' . __('match.op.add.a', __('match.ct.'.$vv_modelname, [1])), array_merge($linkFilter, ['action' => 'add']), - ['escape' => false, 'class' => 'addbutton']); ?> + ['escape' => false]); ?>