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

Fileinfo extension is not available by default in (at very least) windows

    XMLWordPrintable

Details

    Description

      There is 1 use of fileinfo/finfo @

      $ ag 'new finfo'
      lib/filestorage/file_storage.php
      2105:            $finfo = new finfo(FILEINFO_MIME_TYPE);
      

      And overall, it's not problematic... but because of Windows that does not come with it enabled by default and requires action:

      http://php.net/manual/en/fileinfo.installation.php

      This is leading to > 100 errors in phpunit under windows (standard 7.0.9 download from php downloads site) with error: Error: Class 'finfo' not found

      So... ONE OF:

      1) of we kill the finfo use above (it used to be optional before 3.3 using class_exists().
      2) or we make it a environmental requirement and document it everywhere.

      Ciao

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              stronk7 Eloy Lafuente (stronk7)
              Jake Dallimore Jake Dallimore
              David Monllaó David Monllaó
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/May/17