How can I organize source control for framework projects?

I'm struggling to figure out what the best practice is to put the project under source control when the project is written against the framework. In my situation, I will use Mercurial for version control.

Most PHP frameworks have an “application” folder, where I have to put my code that interacts with the framework. So is it better to put the application folder in your own repository and then have a different repository for the framework files? Or is it better to put everything, including the framework, in one repository?

I would like to have sufficient flexibility, namely, I would like to be able to change the version of the framework I use for experiments, while retaining the ability to post changes using the stable version.

I have experience with Kohana and Zend Framework structures, so if you can use them as links that would be fantastic.

+3
source share
4 answers

, Mecrucial, , , Subversion :) . , , , , , . .

Zend:

svn/path/
  trunk/
    application/
    library/
      Zend/  
      MyNamespace/
    public/
    data/

svn:external , ... : http://framework.zend.com/svn/framework/standard/tags/release-1.10.5/library/Zend

Symfony , externals symfony . , symfony, Zend , lib:

svn/path/
  trunk/
    apps
    lib/
      vendor/
        Zend/  
        symfony/
    plugins/
    web/
    config/
    data/
    cache/
    log/
+3

Kohana, git, . , . - , . , . public_html.

, : http://github.com/synapsestudios/kohana-projecttemplate

, .

+2

, SVN svn: ignore, / / `ignored '.

, , ; (, , ): ( , ) .

, readme, , , , .

, "", SVN.

+1

Very similar to svn, hg uses <root>/.hgignoreto ignore files / directories (don't forget to add .hgignore as an entry).

I have no experience with any environment, but I can’t think of a scenario in which you want to track the structure and code of an application together, as they will definitely develop at a different pace. The framework code must have its own version control.

0
source

Source: https://habr.com/ru/post/1765549/


All Articles