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
Handling of Core & plugins with git subtrees and Composer packages #6757
Comments
The script Laravel and other projects use: https://github.com/dflydev/git-subsplit |
I wouldn't create a tree for As said a couple of weeks or months ago I'd rather first try to extract eg the I would probably also not really create a tree for each core plugin that is shipped with Piwik by default. I do not really see an advantage here. Especially since they cannot be reused in any other application (which is the case for Symfony / Laravel packages). It would be different if our plugins would be truly independent AND we do not ship them by default. Then there would be a big advantage of being able to release / deploy new versions independently of core. |
Drupal is about to git-tree their repo as well for some reason https://www.drupal.org/node/2352091#comment-9378633 |
I'm closing this issue because it mixes Composer and "getting rid of submodules". The "getting rid of submodules" is discussed in #6605 (using git subtrees). |
Goal: find a solution for:
plugin.json
tocomposer.json
We could use git subtrees and sub-repositories, for example:
/
-> git repository & GitHub project (piwik/piwik
) & composer package (piwik/piwik
)core/
-> git subtree & GitHub project (piwik/core
) & composer package (piwik/core
)plugins/
CustomAlerts/
-> git subtree & GitHub project (piwik/plugin-CustomAlerts
) & composer package (piwik/plugin-CustomAlerts
)Regarding Composer, we would then use the
replace
feature, e.g.:piwik/piwik
replacespiwik/core
,piwik/plugin-CustomAlerts
, …piwik/core
(and notpiwik/piwik
), and maybe any other plugin: that way we can also run the tests for plugins independently from Piwik by just using Composer (which will installpiwik/core
and not the wholepiwik/piwik
)Maybe all plugins could become subtrees? (to have their
composer.json
). That would mean a lot of repositories though.This is what Symfony does so that
symfony/symfony
contains the whole framework, and thensymfony/console
is just the console component. Have a look at thecomposer.json
. And as you can see,symfony/Console
is just a read-only git subtree.This is also what Laravel does, for example: illuminate/events.
Fabien Potencier mentioned in this article that he is using a script to maintain all subtree in sync with the main one, I'm guessing Laravel do the same. Maybe we could too.
Pros:
composer.json
and be a Composer packageWhat about the UI tests? I don't think this problem would be solved.
TL/DR: Do like Symfony with their components & bundles:
The text was updated successfully, but these errors were encountered: