Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81591

Reconcile composer.lock with composer.json contents

XMLWordPrintable

      It seems that in the latest changes to composer (json & lock), probably @ MDL-81266, somehow, there was a small difference about the files finally committed.

      So, in main, each time that the composer stuff is installed, it says:

      Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.

      Issuing a composer update --lock allows to check which the problem is:

      $ php composer.phar update --lock
      Loading composer repositories with package information
      Updating dependencies
      Nothing to modify in lock file
      Writing lock file
      Installing dependencies from lock file (including require-dev)
      Nothing to install, update or remove
      Generating autoload files
      53 packages you are using are looking for funding.
      Use the `composer fund` command to find out more!
      No security vulnerability advisories found.
       
      $ git diff composer.lock
      diff --git a/composer.lock b/composer.lock
      index 37c00a9641c..59ef58c56d4 100644
      --- a/composer.lock
      +++ b/composer.lock
      @@ -4,7 +4,7 @@
               "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
               "This file is @generated automatically"
           ],
      -    "content-hash": "93266c895599040b27580a06ca936318",
      +    "content-hash": "71d16f2c8a871e214637c592b9510ab5",
           "packages": [],
           "packages-dev": [
               {
      

      As far as the problem is only in the content-hash, that means that there aren't differences in packages, only that composer knows that the composer.lock file was not generated by the current composer.json file (because it has a hash of it).

      So, we just need to apply the changes above to get rid of the annoying warning. Nothing else will change.

      This only affects to 44dev, previous branches are not affected.

      Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Paul Holden Paul Holden
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 10 minutes
                1h 10m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.