search

Home  >  Q&A  >  body text

php - How to determine the versions of project dependencies if composer.json is missing?

When php develops a project, composer is used to manage dependencies. composer.json and composer.lock record the version numbers and other information that the project depends on. When composer.json and composer.lock are accidentally damaged or lost, how to determine the version number of the project's dependencies? In this case, when running composer require XXX to install new dependencies, how to ensure that the dependent libraries of the system principle are not updated or changed?
Or to ask another way, when the system dependent libraries already exist, how to reversely generate their corresponding composer.json based on these system dependent libraries? Is there any automated way?

ringa_leeringa_lee2725 days ago1174

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-06-07 09:25:10

    Don’t you use version management? If it doesn’t work, go check out the vendor’s source code. There are versions of dependencies in it, and the PHP files generated by composer have detailed contents

    reply
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-06-07 09:25:10

    The project source code is lost, how can I restore it out of thin air?

    reply
    0
  • Cancelreply