-
Notifications
You must be signed in to change notification settings - Fork 663
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
Adding composer.lock
in VCS ?
#10446
Comments
Hey @drupol, can you reproduce the issue on https://psalm.dev ? |
No, but I cannot reproduce the Psalm PHAR on my local machine 🥲 |
Hi @drupol, note that the composer versions of the packages used to build the phar are already included inside of the phar, in the phar-versions.php file, you could use that instead of composer.lock. |
Mmm though only the versions Psalm and php-parser are included... I'll merge a commit to also bundle the entire composer.lock as well. |
That could be a potential solution, as long as we can extract the I think in PHPUnit they had a command to print-out the |
Providing composer lock bundled with built artifacts (such as phar file) is definitely a good idea. Adding it to VCS is a lot less beneficial and can actually lead to 'works on my machine' situations because composer ignores |
Hi there,
I'm writing to suggest an enhancement for the
vimeo/psalm
project to improve its integration and ensure long-term reliability, particularly for package managers like apt, rpm, yum, nix, etc etc.The primary goal here is to enable reproducibility of the exact build of the PHAR released, down to the last bit. This is crucial, especially when distributing it as a binary for reasons of reliability and security.
To achieve this, I propose adding a
composer.lock
file to thevimeo/psalm
repository. This file will ensure thatpsalm
is reproducible on any system, regardless of environmental differences, by locking down specific versions of dependencies. Its absence currently hinders the ability to precisely replicate the builds you provide in your GitHub releases, introducing potential variability.For example, in Nix, we have to provide our own
composer.lock
for each update, as seen here: NixOS/nixpkgs#271920For reference, here are some projects that have recognized the value of versioning the
composer.lock
file:composer.lock
file in the repository bobthecow/psysh#767composer.lock
file in the repository phpro/grumphp#1095If there are concerns about including the
composer.lock
file in the main repository, could it be an option to add it to the release artifacts on GitHub instead? This compromise would still greatly benefit reproducibility and consistency in dependency management.Thank you for considering this enhancement. I look forward to your response.
The text was updated successfully, but these errors were encountered: