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

              Assignee:
              dobedobedoh Andrew Lyons
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Jake Dallimore Jake Dallimore
              Integrator:
              David Monllaó David Monllaó
              Tester:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/May/17