Currently I just have a bunch of php files sitting in folders under source control. Logically I have a collection of related projects and a shared database.
- Project 1 is a web application interacting with a database.
- Project 2 is some background processes also interacting with the same database.
- Project 3 is a library including extended database connection objects and other utility functions.
Project 1 and 2 depend on the library code.
I want to split the projects into three separate repositories so they can be developed independently.
What is the best approach to organising the first two projects so they depend on the library but don't need their own copy of the library in their source tree?
Should I convert the library in to a PEAR package and have that package installed system wide. Or is it better that projects 1 and 2 are 'build / deployed' in some sense and include a copy of the library during that build step. This approach would imply the use of some kind of build management tool like Phing / PHP-Maven.