So, we write classes so code can be reusable. Then we can use, say, class "Foo" in multiple projects.
Now, say I have used "Foo" on a web application, and also in a related web application, and they both live on the same hardware.
Application.php
require_once("classes/foo.php");
SomethingElse.php
require_once($path_to_application_php . "/classes/foo.php");
I think this is, in a way, BETTER than SomethingElse having its own copy of Foo. When I must make changes to Foo the new functionality is available for both apps without me having to do much work. However, what if we decide to move SomethingElse to a different server?
I've thought about remote mounts, but that's a big PITA.
Is is possible with Git (for example) to push class files like this from a central repository to multiple other locations? I think I MIGHT have a strategy ... but are there multiple ways to accomplish this goal? How do you do it, or would you do it ... or would you NOT do it and do something else?