Review main Merged

39153[TASK] composer.json should stick to explicit dependencies

Xavier Perseguers CR -1 V +2 Easy +3 −3 updated 05/05/15, 10:21

Commit message

Having non-strict version dependencies in composer.json makes packaging
of TYPO3 CMS unreliable since:

- Cannot prevent a faulty 3rd-party package being committed right before
  the packaging script is run
- Cannot install TYPO3 CMS from git tags as a later point of time using
  the exact same 3rd-party package list

Review

  • Code review CR -1
    • Helmut Hummel +2
    • Thomas Maroschik +1
    • Wouter Wolters +1
    • Mathias Brodala -1
    • Benni Mack +1
  • Verified V +2
    • Helmut Hummel +2

Issues 1

Files 1

Review log 12

  1. Xavier Perseguers uploaded patch set 1 05/01/15, 12:26

  2. Andreas Allacher commented on patch set 1 05/01/15, 20:51

    Wouldn't adding a composer.lock file also take care of this?
  3. Mathias Brodala commented on patch set 1 CR -1 05/04/15, 06:48

    I agree with Andreas. The composer.lock should not only be added for releases but also to the latest master too, to ensure every contributor has the same packages to start with. Bumps in dependencies could then be clearly visible in the history, too.
  4. Thomas Maroschik commented on patch set 1 05/04/15, 08:29

    I'm strictly against a composer.lock in master or other branches. It's ok for releases/tags. Developers need to detect errors in 3rd party libraries fast. If you only commit to "safe" state, we will stick to old versions forever again. Pining on specific versions in the composer.json should be enough.
  5. Mathias Brodala commented on patch set 1 05/04/15, 13:31

    That's vastly different from any other workflow though. Usually do exactly that: stick to the known version and bump dependencies after testing from time to time or if necessary.
  6. Benni Mack commented on patch set 1 05/04/15, 14:47

    @mbrodala - well, different from projects that you DO. but not different from frameworks you develop on :)
  7. Andreas Allacher commented on patch set 1 05/04/15, 16:23

    @Thomas Maroshik: I don't see how that is different to using exact versions in composer.json? Because if no one modifies the versions there it will stay on an old state forever. It is also possible to update only a single component. If it fails you could just add the "correct" version for the failing component too. However, now that I thought about it and also checked composer documentation: https://getcomposer.org/doc/02-libraries.md#lock-file It makes sense to not use a .lock file because it is likely someone else will install typo3/cms via composer and then the .lock file would be ignored as only the main project uses the .lock file. So in case of TYPO3/CMS using the lock file will not solve the issue that is described here. Actually, the issue described here is even worse because if one installs typo3/cms via composer it could be that the packaging script was run with correct dependencies but when the typo3/cms was installed via composer it was faulty.
  8. Benni Mack voted on patch set 1 CR +1 05/05/15, 09:23

  9. Thomas Maroschik voted on patch set 1 CR +1 05/05/15, 09:39

  10. Wouter Wolters voted on patch set 1 CR +1 05/05/15, 09:39

  11. Helmut Hummel voted on patch set 1 CR +2 V +2 05/05/15, 10:13

  12. Mathias Schreiber merged patch set 1 05/05/15, 10:21