Y
Y
Yuri Oblovatsky2020-07-08 11:40:26
PHP
Yuri Oblovatsky, 2020-07-08 11:40:26

How to organize gitflow for a library connected via composer?

There are projects and a library. The library is connected through the composer. New feature1 requires changes in the library. In parallel, feature2 requires other changes in the library. It turns out 2 branches, which will then be merged into master.

"rep/lib": "^2.1.0"

Locally, I can develop in different ways:

  1. Specify a specific commit in composer
  2. Delete the vendor folder and make a symbolic link to the folder where the library is being developed
  3. Set tags: 2.1.0.12, 2.1.0.13


When it merges into the master, it is enough to put the tag and everything is OK.

But what about a tester who deploys through the deployer and then manually checks in the browser? The branches are not dead yet.

  1. In the composer, it cannot specify a specific commit, because No access. And the deployment process is not easy, so if you allow him to change composer.json and run composer install / update, then there may be errors.
  2. The option with a symbolic link for testing may not be considered at all.
  3. If you specify tags and there are no other branches, then okay. But if there are 2 branches, then composer will select the tag with the higher version and it may point to the adjacent branch, and not the desired one.


How to organize testing in this case? Before that, they either merged before testing, or there were no 2 branches at the same time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitriy, 2020-07-08
@Observat

look
at your library for two changes,
are you making these changes in branches? accordingly
New feature1 requires the dev-feature1 branch - specify in the composer
feature2 requires the dev-feature2 branch - specify in the composer
, that's all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question