Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Summary of how to manage Piwik 2 and 3 + Plugins for Piwik 2 and 3 #9806
We had a meeting and discussed how we could handle Piwik 2 and 3 in the future. This is a summary of the discussions so far.
We will have the following branches (names to be defined):
Our plugins will have the same branches (names to be defined):
We always create the branches for the different versions all the time as tests won't be able to support 2.X and 3.X (different system and UI tests etc) and we actually want to have LTS for plugins too. Also this way we make sure to keep
As our plugins will either support Piwik 2 or 3, not much will change:
Possibly we run UI tests against PHP 5.5 and PHP 5.6 to make sure it works on both PHP versions. Maybe PHP 5.5 and PHP 7.0. Ideally we run (UI) tests against all major supported PHP versions
This will be our process so far, if you have any feedback let us know.
FYI: We will also require any plugin developer to specify a supported Piwik version. We may need to adjust our example plugins that are used for generating a plugin / theme.
Eg one has to specify
referenced this issue
Mar 8, 2016
Everything sounds good
Is this already implemented or does it need to be done? (maybe you could implement this in 2.16.1?)
if our tests run on older PHP 5.X and we assume that tests cover the plugin's functionality, maybe we could pre-set the required PHP version to 5.X ? (to decide on 5.X we should pick the maximum version used for running tests (ie. if we run unit/integration/system tests on 5.3 but UI tests on 5.5 then 5.5 should be minimum required PHP version).)
This is implemented in https://github.com/piwik/piwik/pull/9797 we also send release channel and whether someone prefers a stable version or is keen on betas.
It's really tricky here. I first added it in core and Marktplace (even require it's set) but then changed mind again and rather removed it as it may be hard to maintain and developers might forget to maintain the PHP version anyway. So I won't require it's set in the Marketplace. By default for now plugins are supposed to support same minimum PHP version as the lowest Piwik version they support. Eg when a plugin supports Piwik 2.X they should support PHP 5.3.3, for Piwik 3.X they should possibly support PHP 5.5.X.
I reckon this is not the reality though so we should maybe set it in the plugin generator, or when generating a component. Whenever generating any component, such as an API or a Controller for a plugin, I did update the
In the end I decided to simply leave it as it is. Maybe we could show a warning or question whenever generating a component for a plugin and there is no PHP version set, to ask the plugin developer to verify whether the min PHP version of Piwik is actually supported. We could also have different behaviour for Piwik PRO and community developers and eg not set a PHP version for Piwik PRO devs by default.