mirror of
https://github.com/opensolutions/ViMbAdmin.git
synced 2026-04-26 00:36:00 +03:00
[GH-ISSUE #195] composer.lock not present #155
Labels
No labels
bug
feature
feature
improvement
improvement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ViMbAdmin-opensolutions#155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lenada on GitHub (Jun 6, 2016).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/195
Please commit the
composer.lockfile to precisely pin the dependencies.In the release notes of 3.0.15 it is recommended to run
composer updatewhich probably works but is not a good practice.If the composer.lock was present the updated version of
opensolutions/OSS-Frameworkwould be reflected there (developers should run composer update not "users") - would also mean a code change for 3.0.15.The end user would then run
composer installto exactly install the dependencies that are described in the lock file.Should I send a PR?
@PhrozenByte commented on GitHub (Jun 7, 2016):
Adding the
composer.lockhas various disadvantages - the most important is, that users don't receive (possibly security critical) updates of dependencies. That's the reason why ViMbAdmin uses version constraints like~1.12and not e.g.1.12.2. Especially for projects which release versions rather infrequent (like ViMbAdmin) is this nothing to sneeze at...The mentioned example with
opensolutions/OSS-Frameworkcould have been solved better: tag new releases (it's your repo) and use version constraints. The latest security update in OSS-Framework should have been released as v1.0.1 and ViMbAdmin'scomposer.jsonshould reflect this with a version constraint like~1.0.1or^1.0.1(depending on the use of semantic versioning). Sure, theREADME.mdofopensolutions/OSS-Frameworkstates that the project "is only currently maintained for bug/security fixes", but this shouldn't be an obstacle to tag new bug/security releases...And the most important last: Without a hint that users must run
composer update(as it is also stated in the Updates article of ViMbAdmin's wiki...) on their own they will never receive the updated dependencies, no matter whethercomposer.lockhas been commited or not!composer.lockhas absolutely nothing to do with that!@barryo @lenada
@barryo commented on GitHub (Jun 7, 2016):
@PhrozenByte - on foot of this issue, I reviewed the documentation at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file - which clearly states:
So:
If the documentation can be made clearly, please - by all means - update it.
@PhrozenByte commented on GitHub (Jun 7, 2016):
ViMbAdmin's documentation is fine, this was just for @lenada's false statement that commiting the
composer.lockchanges anything regarding the necessity that users must runcomposer updateon their own.I know that the composer docs state that
composer.lockshould be commited, but as I've explained, this is a really bad idea for infrequently updated projects like ViMbAdmin, as it can (and will in the long-term) lead to insecure installations. Trust your dependencies (also refer to this excellent SO answer of Josh Johnson)!If you know that one of the projects you depend on doesn't care about BC, pin your dependency to a exact version in your
composer.json, but don't let this affect other projects which ensure BC in an exemplary manner (like Zend or Doctrine).@lenada commented on GitHub (Jun 7, 2016):
@barryo thank you, very much appreciated.
@PhrozenByte running
composer updatein production environments is a no go.Also with automated deployments/builds composer update is not controllable.
Another issue is reproducibility of "bugs" users might encounter - when dependencies are not exactly pinned by a composer.lock hunting them down can become a nightmare.
I don't think this is about trust ( I have experienced bc breaks with doctrine and zf2 (minor releases) although they are trying to stick to semver and have excellent test-coverage).
Once a new release is tagged users should run
composer installto install the exact dependencies the release. If you personally want and consider it a good practice you can stillcomposer update.@PhrozenByte commented on GitHub (Jun 7, 2016):
Everywhere else it's common sense to rely, i.e. trust on dependencies. A Linux distribution won't work if arbitrary software would rely on specific patch releases (i.e.
1.0.3). They all depend on minor releases (i..e.1.0.x) and trust the Maintainer of dependent software that they don't release patch versions which break BC. That's how dependency management works - everywhere else at least. Security is much more important than the vague possibility of dependencies breaking BC.This is probably just a misunderstanding. You must run
composermanually - always. Just commitingcomposer.lockdoesn't letcomposermagically know that thecomposer.lockhas been changed after updating ViMbAdmin.