Getting Lean and Solving Problems: Farewell to Git Submodules
Sometimes, you have to let a good thing go. This time around, we’re letting go of something that encourages what we feel is sub-optimal application development. And the great news is that only 0.3% of all applications deployed on PHP Fog use this feature. As of Friday, February 17th, we’ll be deprecating support for git submodules in deployed apps on PHP Fog. This means that PHP Fog will no longer sync or update git submodules when deploying applications.
So why are we making this choice? Syncing Git submodules has caused us a number of issues with reliably deploying your applications. Submodules can point to Git repositories that have gone away or are otherwise unavailable, they can overwrite files that have been written to disk by your web app, and developers have accidentally pulled in unwanted changes from submodules that have broken their app in production. Each of these issues can be extremely difficult to fix.
We’re here to help you deploy your apps with velocity and grace, so rather than spending engineering resources to support a feature that so few of our customers use – and that causes an inordinate number of headaches – we’re continuing to make PHP Fog leaner and better. And we’ll have two cool new features to tell you about next week that should make your life a whole lot easier.
Are you using Git submodules on PHP Fog? No worries… we have your solution.
We have evaluated several PHP package and dependency management tools and have decided to recommend Composer. Composer will allow you to specify a manifest of “packages” from a main package repository “Packagist” and Git repositories. Composer will manage putting them into your source folder without needing to use Git submodules. You then check these dependencies into your application’s Git repository like normal files, with none of the problems associated with Git submodules. It also gives you finer-grained controls over which versions of your dependencies you wish to use and provides better parity between your development and production environments.
Need help making the transition? You got it! We’ve created a walk-through for replacing a Git submodule dependency with Composer on our help site, and you can check out the code for this example application that has several dependencies and is constructed according to our best practices model. If you need additional help, you can get request assistance from our awesome support engineering team.
More questions? Comments, concerns, feedback? We always love to hear from our customers about what they need from us. What should we add? Anything you never use that you’d like to see hit the cutting room floor? How do we make PHP Fog your dream PaaS? Talk to us! @appfog or Facebook or Google Plus.