I have been working on a number of PHP projects (web site, polling scripts, AMQP services, etc) and all are related to each over so there is some overlap in the database schema. So far i've been using Doctrine DBAL to both generate my schema (using SchemaManager) and for data access through (non-ORM) entity and repository classes.
My question is regarding finding a better practice for storing/sharing the database related objects around my platform.
For example the web site side of the project currently contains the schema for several required tables which provides the benefit of building my tables automatically when i boot up another instance server. In a separate project i have built a monitoring service and in that project defined the tables required to store the settings. This all seems fine however i now wish to build an admin page on the web site which allows me to update the records in the monitor service tables.
I don't really want to include the monitor system code into the web site code base (via composer) just to share the repositories and schema so i'm looking for ideas on a better arrangement.
My first idea is to create a separate "shared-schema" project which includes system-wide database classes so all my schema files and repositories and entities live in a single location however i'm not sure if this is at all sensible. My concern is that if i'm loading this in to all projects via composer then i'm going to end up having to update several projects every time i change something in the schema etc.
Please let me know if you have any specific questions or advice on how best to deal with this kind of situation.
Thanks