@tsteur opened this Issue on November 29th 2015 Member

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

@mattab commented on June 20th 2017 Member

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

@tsteur commented on February 11th 2020 Member

@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 commented on February 11th 2020 Member

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

@tsteur commented on February 11th 2020 Member

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.

This Issue was closed on February 11th 2020
Powered by GitHub Issue Mirror