Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change signature of Dimension hooks to allow to change them in the future #8409

Closed
tsteur opened this issue Jul 23, 2015 · 1 comment
Closed
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jul 23, 2015

In Dimensions we have some "hooks" / methods that are called during tracking: https://github.com/piwik/piwik/blob/2.14.1-rc1/core/Plugin/Dimension/VisitDimension.php#L216-L252

Same applies to ActionDimension and ConversionDimension eg

    public function onExistingVisit(Request $request, Visitor $visitor, $action)
    {
        return false;
    }

Problem is that we will never be able to change this signature as it might break plugins. Instead we should pass only one object where one can call $i->getRequest(), $i->getVisitor(), ... It is not as nicely readable etc but it will allow us to change code in the future and provide more parameters.

We potentially have similar issues with other classes too, eg Reports::configureWidgets(). Those would be ideally changed too. We should do this for 3.0.0 as it will break the API

@tsteur tsteur added the c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. label Jul 23, 2015
@tsteur tsteur added this to the 3.0.0 milestone Jul 23, 2015
@mattab
Copy link
Member

mattab commented Aug 13, 2015

Since we do a LTS release #8546 and we will change our release cycle #8547 - we do not need this anymore

@mattab mattab closed this as completed Aug 13, 2015
@mattab mattab added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Aug 13, 2015
@mattab mattab modified the milestones: 3.0.0, 3.0.0-b1 Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants