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

Plugin updates need to define a wrong namespace #9303

Closed
tsteur opened this issue Nov 29, 2015 · 4 comments
Closed

Plugin updates need to define a wrong namespace #9303

tsteur opened this issue Nov 29, 2015 · 4 comments
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 Nov 29, 2015

Eg in CustomDimensions plugin I had to use Piwik\Plugins\CustomDimensions\Updates_0_1_1 but as updates are placed in an Updates directory within the plugin the platform should actually check for Piwik\Plugins\CustomDimensions\Updates\Updates_0_1_1 (as classnames are not allowed to start with a number we cannot use Piwik\Plugins\CustomDimensions\Updates\0_1_1).

I tried to use the correct namespace but then the platform throws an exception that it could not find the classname Piwik\Plugins\CustomDimensions\Updates_0_1_1 .

When fixing this issue we need to make sure to not break BC and to match both cases

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Nov 29, 2015
@mattab mattab added this to the 3.0.0 milestone Dec 23, 2015
@mattab
Copy link
Member

mattab commented Jun 20, 2017

Would be great to fix this in Piwik 4, although we don't have to

@tsteur
Copy link
Member Author

tsteur commented Feb 11, 2020

@mattab wonder actually if it's worth changing anything there? It's not ideal but it's also not a big issue especially since the correct namespace is generated by the command etc anyway. Also since the class name cannot start with a number, there will always be a mismatch of class name (eg Updates_1_1_1) and file name (eg 1.1.1.php) anyway.

@sgiehl
Copy link
Member

sgiehl commented Feb 11, 2020

We could also rename the files to something like Update_1.1.1.php, to be able to use the filename as classname 🤔

@tsteur
Copy link
Member Author

tsteur commented Feb 11, 2020

But then we usually also don't have underscores in there etc. I reckon it's not much of an issue to keep it as it is. It's not breaking anything and rather a minor technicality. Closing it for now. Feel free to reopen if needed.

@tsteur tsteur closed this as completed Feb 11, 2020
@tsteur tsteur added wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. and removed Bug For errors / faults / flaws / inconsistencies etc. labels Feb 11, 2020
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

3 participants