I'm trying to figure out the workflow Symfony uses to create separate packages for each Symfony Component (and Bridge or Bundle) while still including them all in the main Symfony Framework.
The framework as well as each component have their own composer.json files:
Symfony
├── Component
| ├── Component1
| | ├── ...
| | └── composer.json
| ├── Component2
| | ├── ...
| | └── composer.json
| └── ...
└── ...
I'd like to create a project in a similar fashion. How does Symfony use Git subtrees to track the framework and the components in this way so they can be installed individually or all together with composer? Does the framework maintain a separate repository for each package? Is this process automated? It seems like a lot of work to manually update all the component packages.
Each component and bundle in Symfony has it's own repository on Github. They are only used for packagist and therefor they are read only. All work take place in the main repository.
After each commit, all changes will be pushed to the read only repositories. The script is not public as i know, but you can read a bit on how fabien implement it here
I use also a subtree split to distribute my packages to the sub repositories within a jenkin task.
Here is a small guide to add a subtree split to your main repository and how to distribute it back to its repositories. Example is transfered to your directory structure example and the owner of the repositories is Acme.
#execute in subtree repository
$ git init
$ git commit -a -m "init"
$ git remote add origin git@github.com:Acme/Component1.git
$ git push -u origin master
#execute in main repository
$ git remote add -f Component1 git@github.com:Acme/Component1.git
$ git subtree add --prefix Symfony/Component/Component1 --squash Component1/master
$ git subtree push --prefix=Symfony/Component/Component1 Component1 master
#execute in main repository on a webhook in e.g. jenkins
$ git remote add -f Component1 git@github.com:Acme/Component1.git #only if you haven't add it before
$ git subtree push --prefix=Symfony/Component/Component1 Component1 master
Hope that may help to to set up your infrastructure.