We just do all that compilation prior to check-in for release branch.  Basically, version control holds the compiled &#x27;snapshot&#x27; of a working app, and host specific variances in the code is forbidden. (composer is for project bootstrapping rather than a &#x27;build step&#x27;) 
-btw, we do this with subversion since git doesn&#x27;t handle large repos well +empty directories.