[Bug 22832] New: Require plugins to specify the methods they implement
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Bug ID: 22832 Summary: Require plugins to specify the methods they implement Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- With bug 21073, a simple plugin implementing (say) only the to_marc method generates this on the DB: mysql> SELECT * FROM plugin_methods; +-----------------------------------------------+-------------------------------+ | plugin_class | plugin_method | +-----------------------------------------------+-------------------------------+ | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | _handle_control_field | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | _version_compare | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | abs_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | as_heavy | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | canonpath | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | catdir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | catfile | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | configure | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | curdir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | except | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_fail | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_ok_tags | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_tags | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | export_to_level | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | file_name_is_absolute | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_metadata | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_plugin_http_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_qualified_table_name | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | get_template | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | go_home | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | import | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | install | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | max | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_dir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_exists | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_open | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_read | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | mbf_validate | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | new | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | no_upwards | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | only | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output_html | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output_html_with_http_headers | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | output_with_http_headers | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | plugins | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | require_version | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | retrieve_data | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | rootdir | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | search_path | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | store_data | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | to_marc | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | uninstall | | Koha::Plugin::Com::ByWaterSolutions::CSV2MARC | updir | +-----------------------------------------------+-------------------------------+ 47 rows in set (0.00 sec) I think plugins should just expose what methods they implement that are intended to be used in Koha, not any internal method. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21073 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21073 [Bug 21073] Improve plugin performance -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23171 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23171 [Bug 23171] Improve plugin performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|23171 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23171 [Bug 23171] Improve plugin performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23890 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23171 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23171 [Bug 23171] The plugin_methods table should not include imported methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23890 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23890 [Bug 23890] Plugins that utilise possibly security breaching hooks should warn -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Component|Architecture, internals, |Plugin architecture |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- Will the "interesting methods" always correspond to the plugin hooks that are in Koha? Or will there be cases where an "interesting method" is not in that list? If we are only looking for which plugin hooks a plugin implements, perhaps we could maintain a list of the hooks and filter the plugin_methods we have today against that list? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24631 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24631 [Bug 24631] Plugin metadata should be outside the main class -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24636 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community |https://bugs.koha-community |.org/bugzilla3/show_bug.cgi |.org/bugzilla3/show_bug.cgi |?id=24636 |?id=24632 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- We have discussed the possibility of a whitelist before... currently we have not done that so we can support legacy plugins which implement additional workflows via `/cgi-bin/koha/plugins/run.pl?class=plugin_class&method=X` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to Tomás Cohen Arazi from comment #0)
I think plugins should just expose what methods they implement that are intended to be used in Koha, not any internal method.
Agreed. That would make it much easier to manage plugins. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Olivier Hubert <olivier.hubert@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|tomascohen@gmail.com |olivier.hubert@inlibro.com CC| |olivier.hubert@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Olivier Hubert <olivier.hubert@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|olivier.hubert@inlibro.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22832 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41720 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41720 [Bug 41720] Plugin metadata should be outside the main class -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org