I've made a personal light framework in PHP which matches my needs for a framework. I'm using different 3rd party libraries, like SwiftMailer, Twig, Assetic, Facebook PHP api, ...
How do you manage these sources codes from 3rd party libraries? Do you add it as a submodule into your project, and just do a pull to get the latest version? Or do you just copy the code into your project dir and do the updates yourself?
Most code repositories are structured like this:
So in my framework dir it looks like this, and us the vendor dirs as submodule from a remote project:
Is this the way to go? Or how do you suggest doing this? During a capistrano deploy, all the submodule repositories will be pulled from the remote servers.
Edit: I must say that I use the framework as submodule in other projects. So the framework is a submodule in a project, and the framework itself also has submodules in it..
Thanks!
I generally use a vendor
folder, either top-level or under src
or lib
that holds the submodules, and use the the --recurse-submodules
option when pulling, and --recursive
with git submodule update
and git submodule status
. I think capistrano can handle this use case decently, but I'm not familiar enough with it to know for sure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With