I have a multiple subdomain website which has been setup as a single Git repository with dev,staging branches setup for each subdomain. This isn't working out very well as there is code being used across all subdomains to work with the database via Doctrine entities which end up with different versions of the entities in each branch and you end up with errors when the entities in the branch you are working on do not match up to structure of the database.
As the site is still in heavy development we need a way to keep common code updated across all branches like the Doctrine entities. Is there are better setup for this site?
The folder structure is something like so:
root
- vendor
- - (composer libs including Doctrine)
- application
- - models
- - - Entities
- - - - OldDB
- - - - NewDB
- - - Repository
- - - - OldDB
- - - - New DB
- - modules
- - - subdomain1
- - - subdomain2
- - - subdomain3
- - - othermodule
- - - moduleforsubdomain2
- tests
Where the subdomains' code is contained within a sub folder of the main site. The whole site is one installation.