Calling Developers!
We are reenergizing our code contribution process! Learn More

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

Options
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,034 ⚖️ - Guardians (admin)
    Options

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

  • U0347J4T08Y
    U0347J4T08Y Posts: 6 🧑🏻‍🚀 - Cadet
    Options

    Why do you delete the .lock file?

  • U01F7P3D9NH
    U01F7P3D9NH Posts: 60 🧑🏻‍🚀 - Cadet
    Options

    Removed the lock in filesystem since wrong version is locked

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,034 ⚖️ - Guardians (admin)
    Options

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

  • U0347J4T08Y
    U0347J4T08Y Posts: 6 🧑🏻‍🚀 - Cadet
    edited May 2022
    Options

    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,034 ⚖️ - Guardians (admin)
    Options

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

  • U01F7P3D9NH
    U01F7P3D9NH Posts: 60 🧑🏻‍🚀 - Cadet
    Options

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