Another PR that doesn't add, but mostly removes a feature. This time it is the
getKeywordsForPageUrl widget. Why I want to argue that it can be completly deleted:
Common::sendHeaderwhich obviously won't work when copying it into one's website: https://github.com/matomo-org/matomo/commit/65353d7bac8a90bf05545c0ecd693d81b684f9e2#diff-69b25f970e74caa20603c448a82972d4R329
Deleting this widget is also not a backward incompatible change as the
getKeywordsForPageUrl API it uses still exists and therefore people can continue to use their old code.
Sounds good to me. Wanted to have this removed in the past as well but don't remember the reasons it wasn't done. May need to check if some developer docs point to it and if things are documented there as well.
Tests should be fixed now. (Will check after CI ran)
Not sure about removing the API as it would be a breaking change.
Maybe we should at least deprecate it and mark it as to be removed in Matomo 4 ?
Is adding the
<a class='mention' href='https://github.com/deprecated'>@deprecated</a> as in https://github.com/matomo-org/matomo/pull/14093/commits/d74199bafe82216bbc67ad40f2333b1c84310c63 and adding to the changelog as in https://github.com/matomo-org/matomo/pull/14093/commits/11301a68ef5ac6f80a85da7c513172cf97263192 enough?
we use to write the version it will be removed in the code comment and in the changelog, so we know when it can be safely removed. e.g. in changelog:
API Referrers.getKeywordsForPageUrl and Referrers.getKeywordsForPageTitle have been deprecated and will be removed in Matomo 4.0.0
and php comment
/** * <a class='mention' href='https://github.com/deprecated'>@deprecated</a> will be removed in Matomo 4.0.0 */
Makes sense :heavy_check_mark:
https://github.com/matomo-org/matomo/blob/a06e2d5c27e0172b6de647c6754b9eead5ed0b36/tests/PHPUnit/Integration/WidgetsListTest.php#L138 needs to be adjusted as the widget was in category
fixed the test. Will merge if all related tests are passing now