-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer lock file support #2098
Comments
Hi, Is this feature ready and available? |
No. Only the |
Great. Thank you for letting me know. |
I have a question. Right now, the app provides upgrading Can't it be done this way? If so, how can we enable the composer through app (self hosted). I would like to give it a try. Also any hints/tips on which files I need to look, if I were to try implement this? |
Yes, the short version is that we need to run I'm not 100% sure if we should be running Another thing I'm not sure about is which files to write locally before running Right now Probably the best way to move this forward is if you can help me research/plan the best way to update the |
Hi,
So what it means is, if you already have a
So, Now you have to run Say I have If we had run But the advantage here is definitely, being able to update to a major version. Here is how you can test it out. Create an empty project with composer require symfony/console:~4.0.5
Notice that it actually installs Now edit the Run composer install and you will get
So you run composer update and you get
Notice, here also composer correctly installed If I am not mistaken, then I believe, this has always been the behavior of composer dependency resolution from the early age. So in order to update the So here's a question. Right now, how do you update And to answer your confusions I'm not 100% sure if we should be running composer update or composer install. Typically we like to update the package file (composer.json manually ourselves) and then use the CLI tool for lock file only. So potentially we should be running composer install to generate a correct lock file for our composer.json instead of composer update x.
I think the confusing part is, the corresponding commands of To generate lock files of manually updated versions inside
|
@swashata this is exactly the type of knowledge I was after - thank you! At the end you illustrate the last problem I was worrying about - that Let's use a simple case:
From your description I think the problem is that if we just run |
Hello, If we have a pinned dependency in
In this case, But is this what you are asking? If by pinned dependency you mean, something pinned by renovateapp config (I have just started using this morning, so not very good at this right now), then definitely One thing I would like to focus here is, Say you have If theoratically, you would want to use Please check the output of the screenshot below and you will understand what I am saying. |
And to quote your questions directly From your description I think the problem is that if we just run composer update then both dep-a and dep-b will get updated? i.e. composer will update not only the composer.lock for dep-b but also update both composer.json and composer.lock for dep-b too? Yes, both But if we run composer update dep-a then it will only update dep-a in composer.lock as we'd like? And yes. It will only update the resolution for |
After using renovateapp a bit, I've found that it does update one package at a time creating MR. I was under the impression that it will send a single MR updating all the stuff. In this case, it is definitely needed to run |
Now, if you help me understand how you are firing the lock file update of |
Thanks again @swashata In summary, you could say that my main concern was that I need to think a little bit first about the most appropriate way to incorporate composer lock files. Right now the logic for |
Great. Do let me know if I could be of help. |
Great. I will check this out locally. |
Adds logic to support updating the accompanying `composer.lock` file whenever `composer.json` is updated. Closes #2098
🎉 This issue has been resolved in version 13.23.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.
The text was updated successfully, but these errors were encountered: