The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Version controlling a Slim project

Gavin Davies's Avatar

Gavin Davies

19 Jun, 2012 01:37 PM

Hi there,

One of our devs has done a proof of concept project using Slim. It looks great but I'm not sure how to version control this project. It seems that the general Slim workflow is to check out a copy of the framework and start working in index.php... How do you guys version projects that use Slim?

If we are to use Slim we'll need to be able to upgrade versions easily and so forth. Therefore, I don't want to commit the entirety Slim to a Git repo along with our code, it seems more sensible to have Slim as a submodule somewhere - does Slim lend itself to doing this?

I would appreciate any advice!

- Gavin Davies

  1. Support Staff 1 Posted by Andrew Smith on 19 Jun, 2012 01:45 PM

    Andrew Smith's Avatar

    Hi Gavin,

    Slim definitely lends itself to this type of workflow, you can look at the index.php as a bootstrap for the framework, with this you are able to version this one file without saving the rest of the framework in your repository. Josh has kept changes in versions to a minimum and when he does make changes they are well documented. Depending on the size of your project you could follow this article.

    I would also recommend checking out Composer to handle dependencies and Slim itself.

  2. 2 Posted by Gavin Davies on 19 Jun, 2012 01:54 PM

    Gavin Davies's Avatar

    Excellent, thank you Andrew - Composer sounds like a really good route for us

  3. Support Staff 3 Posted by Brian Nesbitt on 19 Jun, 2012 02:06 PM

    Brian Nesbitt's Avatar

    The link from Andrew is a good resource.

    To get you up and running with composer fast you can follow along:

    As suggested you use composer to manage / upgrade to new releases for your dependencies. I think most then put the composer.lock and vendor/ in the .gitignore file and everything else goes into git.

  4. 4 Posted by Gavin Davies on 19 Jun, 2012 06:00 PM

    Gavin Davies's Avatar

    Thanks for your help guys, this has been very useful and all is sorted here :-)

  5. Brian Nesbitt closed this discussion on 29 Jun, 2012 01:09 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac