A
A
Alex Goncharov2018-11-16 14:21:28
Composer
Alex Goncharov, 2018-11-16 14:21:28

How to restore composer.json and composer.lock?

Colleagues, how can I restore / recreate
composer.json
composer.lock files that
are not on the server.
Only the installed.json file remains

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
riot26, 2018-11-16
@riot26

There is no way to restore 100%. Installed.json stores all dependencies, even indirect ones. Also, there is no indication in which section the package is require or require-dev. Installed.json lists only specific package versions, while composer.json can specify versions with the ^ and ~ operators. Restoring "just to work" is quite realistic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question