What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Composer help needed! My composer file includes f.e. `"spryker/silexphp": "^0.3.10"`. Deleting .lock

U01F7P3D9NH
U01F7P3D9NH Posts: 60 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

Composer help needed! My composer file includes f.e. "spryker/silexphp": "^0.3.10". Deleting .lock and regeneration always leads to module upgrades, f.e. silex version is 0.3.11. Now Iยดm feeling kinda stupid ๐Ÿ™‚ This only happens in a specific branch. Thanks for any hint

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 โš–๏ธ - Guardians (admin)

    How do you remove it? in the composer.json or directly via cli?

  • U0347J4T08Y
    U0347J4T08Y Posts: 6 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Why do you delete the .lock file?

  • U01F7P3D9NH
    U01F7P3D9NH Posts: 60 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Removed the lock in filesystem since wrong version is locked

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 โš–๏ธ - Guardians (admin)

    normally you should never touch the composer.lock file manually. composer is taking care of it

  • U0347J4T08Y
    U0347J4T08Y Posts: 6 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited May 2022

    Because it seems that it's good behavior. If you recreate the lock file and you have for example in the composer.json info to use vesion `"^0.3.10" then it meeans that composer will install latest library with number higher than mentioned.

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,051 โš–๏ธ - Guardians (admin)

    I suggest reverting the deletion and do the following: https://stackoverflow.com/a/27440198/6104816

  • U01F7P3D9NH
    U01F7P3D9NH Posts: 60 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    many thanks, I took a lock from different branch, looks good!