L
L
lagudal2021-05-06 15:10:32
Composer
lagudal, 2021-05-06 15:10:32

Composer require - how not to overwrite files manually modified on the server?

It’s as if it’s arranged in such a way that we don’t even change files manually on the developer server - all development is local, then to gitlab and from there through composer to the server.
But still, sometimes it happens that someone urgently needs to change something, or it happens that some functions cannot be tested locally. Whereas the exception is changed directly to the server and tested. And if at such a moment - when there are manual changes, but they are not yet committed, not launched and, accordingly, these changes are not in the versions - someone from the team executes the composer require of some component, they will receive a message:

- Updating labels/base (100.0.263-beta-3 => 100.0.263-beta-4): The package has modified files: ....
Discard changes [y,n,v,d,s,?]

As if choosing y - the files will be overwritten, n - the update will be interrupted completely, and so it seems that the rest of the options mean clear.
But is it possible to perform an update without interrupting it, without overwriting these manually modified files and updating all others if necessary?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-05-06
@alexey-m-ukolov

No, of course - there could be any changes in the package during this time, you can just put the whole project if you pull the snake on the snake.
This problem is solved differently: these experiments should be carried out in a separate branch, without disturbing anyone. To do this, staging must support deploying multiple instances of the project side by side, this is relatively easy to do if you use containers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question