A
A
Andrew2016-01-28 18:11:54
Yii
Andrew, 2016-01-28 18:11:54

How is the problem with dependencies solved in a civilized way when forking a project?

For example, when starting a new development, we take some application template as a basis (for example, phundament/app). During the development process, the logic is mixed up. And now, a critical bug is found in the parent project. You can, of course, look at the commits and correct them manually. But, firstly, you can’t keep track of everything, secondly, a fix can significantly affect changes in the architecture, and thirdly, the question boils down to whether it is possible, at least theoretically, to somehow automate the update? Does composer somehow solve this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
betal, 2016-01-28
@betal

Maybe something like docker?

N
Nikita, 2016-01-28
@bitver

Composer won't help you. it's a package manager, a project template is not a library.
Your problem could be solved like this

# Clone just the repository's .git folder (excluding files as they are already in
# `existing-dir`) into an empty temporary directory
git clone --no-checkout repo-to-clone existing-dir/existing-dir.tmp # might want --no-hardlinks for cloning local repo

# Move the .git folder to the directory with the files.
# This makes `existing-dir` a git repo.
mv existing-dir/existing-dir.tmp/.git existing-dir/

# Delete the temporary directory
rmdir existing-dir/existing-dir.tmp
cd existing-dir

# git thinks all files are deleted, this reverts the state of the repo to HEAD.
# WARNING: any local changes to the files will be lost.
git reset --hard HEAD
taken from here stackoverflow.com/questions/2411031/how-do-i-clone...
You just need to play around with git... And all this, provided that you will do all your own codes inherited from the template ones, and write only ignored configs.
It is better to take the most stable version of the template, and in extreme cases, edit the pens, IMHO =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question