Bug 17992 - REST api: Cities controller should not use ->unblessed
Summary: REST api: Cities controller should not use ->unblessed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: Tomás Cohen Arazi
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on: 17932
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-25 12:35 UTC by Tomás Cohen Arazi
Modified: 2017-12-07 22:16 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller (1.96 KB, patch)
2017-01-25 12:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller (2.02 KB, patch)
2017-03-01 10:24 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller (2.12 KB, patch)
2017-03-01 12:11 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2017-01-25 12:35:10 UTC
As bug 17932 introduced the TO_JSON method there's no need to call ->unblessed anymore. As this is a reference implementation, I fix it to the new coding style.
Comment 1 Tomás Cohen Arazi 2017-01-25 12:48:19 UTC
Created attachment 59548 [details] [review]
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller

As bug 17932 adds TO_JSON to Koha::Object(s), there's no need for using
it. Also, as this is a reference implementation for developers to copy
and paste it is sensible to make this change even when this is not
causing any bug.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests still pass!
- Sign off :-D
Comment 2 Matthias Meusburger 2017-03-01 10:24:40 UTC
Created attachment 60750 [details] [review]
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller

As bug 17932 adds TO_JSON to Koha::Object(s), there's no need for using
it. Also, as this is a reference implementation for developers to copy
and paste it is sensible to make this change even when this is not
causing any bug.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Comment 3 Marcel de Rooy 2017-03-01 12:11:26 UTC
Created attachment 60753 [details] [review]
Bug 17992: REST api: Remove the use of ->unblessed from Cities controller

As bug 17932 adds TO_JSON to Koha::Object(s), there's no need for using
it. Also, as this is a reference implementation for developers to copy
and paste it is sensible to make this change even when this is not
causing any bug.

To test:
- Apply the patch
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Kyle M Hall 2017-03-03 16:57:53 UTC
Pushed to master for 17.05, thanks Tomas!
Comment 5 Katrin Fischer 2017-03-12 22:28:16 UTC
Depends on bug 17932 which is not in 16.11.x.