Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1935

PHPUnit 6 is namespaced, makes Tuque and Scholar fail during Travis-CI on PHP7.x

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.x-1.10
    • Component/s: Scholar Module, Tuque API
    • Labels:
      None

      Description

      Recent (post code freeze) failing Travis-CI run on Scholar module for just 7.x versions and following investigation showed that Travis-CI updated, for PHP7 versions its PHPUnit library to version 6, which drops support for Php5 and adds namespacing to its classes making things like

         class CSLDateParserTest  extends PHPUnit_Framework_TestCase
      

      at

      https://github.com/Islandora/islandora_scholar/blob/7.x/modules/citeproc/tests/CSL_Dateparser.tes
      fails badly with a not existing class. (should be \PHPUnit\Framework\TestCase)

      See more info a github comment where this appeared: https://github.com/Islandora/islandora_scholar/pull/258#issuecomment-287052836
      IRC talk about the topic: http://irclogs.islandora.ca/2017-03-16.html

      This affects also all tests run by Tuque. Travis-CI fixes those PHPUnit versions depending on which PHP we are testing, so this happened automatically when Travis updated to its latest version for PHP 7.x

      Possible ways to fix:

      • separate PHPUnit tests (files) depending on which PHP version/ PHPUnit version is running
      • Some hack/conditionals on each test file
      • downloading in Travis PHPUnit via .phar or composer fixed to pre 6.0 version, dissalowing newer version to run
        Documenting.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jonathan.green Jonathan Green
                Reporter:
                dpinokrayon Diego Pino Navarro
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified