-
Notifications
You must be signed in to change notification settings - Fork 325
Single Core and Subtree Split
This page proposes and outlines the steps necessary to have a single repository with the core Sulu components and bundles whilst maintaining separate packages.
We should aim to:
- Merge all core Sulu bundles into
sulu-cmf/sulu
- Maintain readonly mirrors of the individual packages via the use of
git subtree split
- SuluAdminBundle
- SuluCategoryBundle
- SuluContactBundle
- SuluContentBundle
- SuluLocationBundle/
- SuluMediaBundle
- SuluSecurityBundle
- SuluTagBundle
- SuluTestBundle
- SuluTranslateBundle
- SuluSearchBundle
- SuluWebsiteBundle
Question: Should these bundles simply be merged into a sulu-ecommerce
package? The bundles could then also
be maintained as as independent packages via. subtree splot
- SuluProductBundle
- SuluSalesOrderBundle
- SuluSalesCoreBundle
- SuluSalesInvoiceBundle
Should we do the migration and the tree splitting at the same time?
-
+: The tests in the existing repositories will continue to work as all dependencies are already installed and there is no need to do a composer install for each bundle.
-
+: We can assume that nobody is using any of the bundles standalone and that existing deployments will continue to function using the existing repositories (the next version of sulu-standard will include only
sulu/sulu
-
-:
- Write rewrite script to rewrite the selected repositories into core.
- Script to migrate issues (? could be done afterwards)
- Write script to maintain the subtree splits (e.g. use this github hook needs
redis
andansible
... - Update
sulu-cmf/sulu
composer file to include replace stuff as with Symfony. - Update
travis.yml
to run the individual bundle tests as withsymfony/symfony
.
- Explicitly backup the existing Sulu repository (ALL history will be rewritten)
- Run the merge script (on my Laptop) to merge then force push to github
- Migrate issues to
sulu-cmf/sulu
- Install cronjob to maintain the subtree splits
The main benefit to this approach are centered around imporved developer efficiency:
- All sulu packages will share the same version (pros: Makes deployment much easier)
- Refactoring is much easier
- Testing other peoples code is easier
- All external bundle dependencies must be declared both in the Bundle and in
sulu/sulu
- All depdencies need to be declared in composer.json
- massive search
- ... ?
- Update absolute paths:
- @SecurityBundle:DependencyInjection/Configuration.php - vendor/blah/blah
Migrating PRs presents a challenge which can be overcome in at least 2 ways:
- Rewriting the history of the PR branch and pulling that branch from
sulu/sulu
. - Copying the changes into
sulu/sulu
and making a new commit
The second option would be preferable. It would suffice to:
$ cp /path/to/Bundle/SuluFoobarBundle/* /path/to/sulu-cmf/sulu/src/Sulu/Bundle/SuluFoobarBundle/
$ cd /path/to/sulu-cmf/sulu/src/Sulu/Bundle/SuluFoobarBundle
$ git branch my_new_pr
$ git add *
$ git commit -m "My changes"
$ git push origin my_new_pr