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

composer.json is missing name attribute

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.7.14, 2.8.12, 2.9.6, 3.0.4, 3.1
    • None
    • General
    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • master_MDL-54834
    • Hide

      create a composer.json file in an empty directory:

      {
      "repositories": [

      { "type": "vcs", "url": "git@github.com:moodle/moodle.git" }

      ],
      "require":

      { "moodle/moodle": "MOODLE_31_STABLE-dev" }

      }

      Run composer update, and see error messages.

      Now change moodle/moodle.git in composer.json to dunlop-lello/moodle.git and the version MOODLE_31_STABLE-dev to MOODLE_31_MDL-54834-dev and run composer update again. This time, moodle will be downloaded to vendor/moodle/moodle.

      An example of how this is useful is at https://github.com/dunlop-lello/moodle-composed - that mini project uses composer to download moodle and the kaltura plugin suite, then installs symlinks in the relevant module directories to activate the plugins. No more messing with the wierd way git implements submodules or forking upstream code just to add regular plugins.

      Show
      create a composer.json file in an empty directory: { "repositories": [ { "type": "vcs", "url": "git@github.com:moodle/moodle.git" } ], "require": { "moodle/moodle": "MOODLE_31_STABLE-dev" } } Run composer update, and see error messages. Now change moodle/moodle.git in composer.json to dunlop-lello/moodle.git and the version MOODLE_31_STABLE-dev to MOODLE_31_ MDL-54834 -dev and run composer update again. This time, moodle will be downloaded to vendor/moodle/moodle. An example of how this is useful is at https://github.com/dunlop-lello/moodle-composed - that mini project uses composer to download moodle and the kaltura plugin suite, then installs symlinks in the relevant module directories to activate the plugins. No more messing with the wierd way git implements submodules or forking upstream code just to add regular plugins.

    Description

      The current composer.json doesn't include a name attribute, so moodle can't be required via composer.

      For an example of how including via could be useful, see https://github.com/dunlop-lello/moodle-composed - Kaltura wasn't picked for any real reason, other than I'm working with it on an unrelated project, and it's a multi-plugin zip.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              phil@dunlop-lello.uk Phil Lello
              Rajesh Taneja Rajesh Taneja
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: