Replies: 12 comments
-
You should have separate composer json and composer lock for your projekt. This one is for openmage core only. Without it we had several situations where CI stopped working because of the upstream change in some dependency |
Beta Was this translation helpful? Give feedback.
-
As said ... we all have different setups, so Lets take the gitpod-example ... it uses php 7.3, but composer.lock is for php8.0, so |
Beta Was this translation helpful? Give feedback.
-
@sreichel im ok with any approach which will give us stability on CI builds. |
Beta Was this translation helpful? Give feedback.
-
So what is the suggestion to get reproducible builds for gitpod? If the issue is with environments where you have control and having a composer.lock at all there, you could also remove it in a separate step of your environment. |
Beta Was this translation helpful? Give feedback.
-
I personally make it a point to never install php and therefore composer in my dev environment and instead rely 100% on Docker. For example for general purpose use I use this in my .bashrc:
So perhaps we could standardize a way to run composer for OpenMage like It would be recommended to users to use whatever version of PHP is used by this wrapper which is matched to the gitpod environment. If a user needed to use a different version they would delete and generate a new |
Beta Was this translation helpful? Give feedback.
-
I really dont know, but what troubles CI not having a composer.lock?
Just drop IMHO ... composer.lock belongs to customer projects, to ensure every developer has a env that match live system. If i do a |
Beta Was this translation helpful? Give feedback.
-
The arguments brought by @sreichel are pertinent. The current composer.lock is a file created by Composer and contains particularities that may not be found in the configuration of the system where it is located. I didn't use Composer with OpenMage, but seeing the (json + lock) files warned me in a way that there is a possibility to use Composer and that if I use it, I must have a composer.lock for the system it is running on. I think that the installation and update stage are mandatory at the beginning, so the presence of the composer.lock file in the repository should not be necessary, You could rename it composer.lock.sample if you want to keep it. Deleting composer.lock and running
|
Beta Was this translation helpful? Give feedback.
-
@sreichel wrote:
I believe this is what @tmotyl was getting at, but perhaps the committed While merging upstream changes if the user keeps composer.lock in the repo the user would always keep the head and ignore the upstream changes to composer.lock, then manually merge changes to composer.json and run composer update again. I've managed a project with the composer.lock file in the repo and when there are lots of branches updating composer.json this is not uncommon to have to do anyway. But on that note, I do think we will need all of our different dev/demo environments to be kept on the same PHP version which matches the one used to generate composer.lock. My proposal would be that they always use the latest supported version. |
Beta Was this translation helpful? Give feedback.
-
The latest version of composer.lock has already been merged yesterday into OM via PR #2378. It was generated in Ubuntu 22.04 with PHP 8.1.2 installed. Therefore, the file will remain in the repository and there is no longer an issue of dropping it. I would suggest that we either move this post to Discussions, where it will remain for opinions or close it. |
Beta Was this translation helpful? Give feedback.
-
Updating to latest version does not resolve my issue. Let me think about it a few days ... :) |
Beta Was this translation helpful? Give feedback.
-
+1 to drop composer.lock |
Beta Was this translation helpful? Give feedback.
-
I moved this post to Discussions/Ideas. It can be decided at a moment of mutual agreement whether to delete this file or not. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary (*)
composer.lock depends on php version and we all run different setups, Does it make sense to have it in the repo?
Examples (*)
Current composer.lock seems to be for php8.0 ...
composer install
Proposed solution
Remove composer.lock
Beta Was this translation helpful? Give feedback.
All reactions