Moodle
  1. Moodle
  2. MDL-36936

Specify phpunit dependency as require-dev instead of require

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1, 2.5
    • Fix Version/s: 2.4.1
    • Component/s: Unit tests
    • Labels:
    • Rank:
      46475

      Description

      In 2.4 phpunit is specified as a 'require' package in the composer installer (composer.json), the 'require-dev' attribute, which is more appropriate for dev/test purposes can be used instead of it. Would be useful if in future Moodle intends to use composer to manage other libraries dependencies (used by Moodle core). The only difference using this attribute instead of 'require' is that composer has to be executed with --dev option (http://getcomposer.org/doc/04-schema.md#require-dev)

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          Thanks a lot.

          Show
          Petr Škoda added a comment - Thanks a lot.
          Hide
          Petr Škoda added a comment -

          Thanks for the proposal, I have already updated the docs because the --dev is also backwards compatible with 2.4.0

          Show
          Petr Škoda added a comment - Thanks for the proposal, I have already updated the docs because the --dev is also backwards compatible with 2.4.0
          Hide
          Sam Hemelryk added a comment -

          Thanks Petr, nice catch David, has been integrated now.

          Show
          Sam Hemelryk added a comment - Thanks Petr, nice catch David, has been integrated now.
          Hide
          Aparup Banerjee added a comment -

          (just noting Petr is backporting this via MDL-36817 too)

          Show
          Aparup Banerjee added a comment - (just noting Petr is backporting this via MDL-36817 too)
          Hide
          Aparup Banerjee added a comment -

          (from 10mins head scratching) - maybe useful to note.. if you had a setup that had the required dependencies and then ran composer install (without --dev) , then it uninstalls the now dev dependencies.

          Show
          Aparup Banerjee added a comment - (from 10mins head scratching) - maybe useful to note.. if you had a setup that had the required dependencies and then ran composer install (without --dev) , then it uninstalls the now dev dependencies.
          Hide
          David Monllaó added a comment -

          It passes, it installs phpunit and all it's dependencies into vendor/ and writes the versions in composer.lock

          Show
          David Monllaó added a comment - It passes, it installs phpunit and all it's dependencies into vendor/ and writes the versions in composer.lock
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: