0

I'd like to know what's the best practice using git for a project using external library/modules/framework. Put the case I deploy a project with zend 2 and some modules for instance ZfcUser and BjyAuthorize should I put it in the repository or not ? When a developer clone the project get the framework and modules or not ? Thanks in advance.

2 Answers 2

3

In the case you're using composer to manage your project dependencies, no need to push ZF2, ZfcUser and BjyAuthorize. Just add your composer.json package descriptor and ignore your vendor folder to push your project.

If you're managing dependencies by yourself, i think it can be useful to push all your libraries. (that's how i did for many ZF1 projects where i had embedded some libraries).

I strongly urge you to use composer or any tool like it as you don't have to worry anymore about framework / libraries updates.

Sign up to request clarification or add additional context in comments.

Comments

2

If the framework exists as a git repository I would consider using git submodule add yourFramework which will put a reference to the framework in your repository that others can download.

The overhead associated with adding some frameworks to a repository is probably trivial seeing as that code shouldn't get touched. It might just be easier for you to add the framework into the repository to reduce the work that other developers would have to do in order to start working.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.