Perform compatibility check when a plugin is about to be installed or published on the Marketplace #6150
Labels
answered
For when a question was asked and we referred to forum or answered it.
c: Marketplace
For issues that affect the Matomo Plugin Marketplace where you can download plugins.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone
In #6149 I reported about the danger of generated plugins and components which will fail on older Piwik versions.
For me this is such a critical problem for the quality of the platform to go so far to perform checks / analyze a plugin which methods it is using and based on that update / correct the required Piwik version dynamically. For instance when publishing it on the Marketplace or even in Piwik itself when updating Piwik or a plugin to prevent ending up in a no longer usable Piwik.
It could be for instance done by turning the PHP code into an abstract syntax tree and checking whether all the methods exist in that specific Piwik version. We could also analyze the
@since
annotations but don't think this would actually work since it is likely that a core developer forgets to set it and we do not have them currently for all methods. The behavior of a method should not change so checking for existing methods should be enough. In case we do break compatibility for a method - for instance by throwing an exception where none was before - we could not really detect it I reckon. Maybe there are solutions and other problems...We have similar issues for themes. This should then be a separate issue later. Here we could for instance check whether the used less variables (which is the API basically) actually exist. As there are currently no themes it is not so important but it would be good to provide a good platform that guarantees a certain quality from the beginning.
Seeing this resolved mid or long term. For the quality of the platform definitely rather mid term / soon. Especially as it is not that complex to resolve I think.
The text was updated successfully, but these errors were encountered: