Bug 16769 - Koha::Cache->set_in_cache calls need to be standardised
Summary: Koha::Cache->set_in_cache calls need to be standardised
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-18 14:04 UTC by Jonathan Druart
Modified: 2017-06-14 22:16 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16769: Uniformise calls to Koha::Cache->set_in_cache (3.42 KB, patch)
2016-06-18 14:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16769: Uniformise calls to Koha::Cache->set_in_cache (3.58 KB, patch)
2016-07-27 14:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 16769: [QA Follow-up] Still found an occurrence (901 bytes, patch)
2016-07-27 14:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 16769: [QA Follow-up] Remove unsupported deepcopy parameter (1.02 KB, patch)
2016-07-27 14:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 16769: Uniformise calls to Koha::Cache->set_in_cache (3.59 KB, patch)
2016-10-04 09:57 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 16769: [QA Follow-up] Still found an occurrence (912 bytes, patch)
2016-10-04 09:57 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 16769: [QA Follow-up] Remove unsupported deepcopy parameter (1.03 KB, patch)
2016-10-04 09:57 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-06-18 14:04:00 UTC
Koha::Cache->set_in_cache supports old calls to this method. It is better to standardise all of the calls and support only one version.
Comment 1 Jonathan Druart 2016-06-18 14:08:02 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2016-07-27 14:17:47 UTC
Created attachment 53751 [details] [review]
Bug 16769: Uniformise calls to Koha::Cache->set_in_cache

From the POD of Koha::Cache->set_in_cache:
 # This is a bit of a hack to support the old API in case things still use it

Let's remove this hack and update old calls.

Test plan:
Look at the results of
  git grep set_in_cache
and confirm that there are no more version of the old call (without
hashref as third param)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2016-07-27 14:17:51 UTC
Created attachment 53752 [details] [review]
Bug 16769: [QA Follow-up] Still found an occurrence

Script svc/report did contain one old-style call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2016-07-27 14:17:54 UTC
Created attachment 53753 [details] [review]
Bug 16769: [QA Follow-up] Remove unsupported deepcopy parameter

Routine C4/Koha/GetAuthorisedValues adds deepcopy => 1 to the options of
set_in_cache. This makes no sense (anymore?). Is not supported or passed
further. So better remove it.

Test plan:
Run t/db_dependent/Koha.t (with Test::Deep available to minimize confusion)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Nick Clemens (kidclamp) 2016-10-04 09:57:08 UTC
Created attachment 56013 [details] [review]
Bug 16769: Uniformise calls to Koha::Cache->set_in_cache

From the POD of Koha::Cache->set_in_cache:
 # This is a bit of a hack to support the old API in case things still use it

Let's remove this hack and update old calls.

Test plan:
Look at the results of
  git grep set_in_cache
and confirm that there are no more version of the old call (without
hashref as third param)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens (kidclamp) 2016-10-04 09:57:12 UTC
Created attachment 56014 [details] [review]
Bug 16769: [QA Follow-up] Still found an occurrence

Script svc/report did contain one old-style call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Nick Clemens (kidclamp) 2016-10-04 09:57:18 UTC
Created attachment 56015 [details] [review]
Bug 16769: [QA Follow-up] Remove unsupported deepcopy parameter

Routine C4/Koha/GetAuthorisedValues adds deepcopy => 1 to the options of
set_in_cache. This makes no sense (anymore?). Is not supported or passed
further. So better remove it.

Test plan:
Run t/db_dependent/Koha.t (with Test::Deep available to minimize confusion)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 8 Brendan Gallagher 2016-10-11 08:53:40 UTC
Pushed to Master - Should be in the november 16.11 release.  Thanks!