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

Cache API breaks on master using minimum required PHP version.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Libraries
    • Labels:
      None

      Description

      Using PHP 5.3.2 and perhaps close issues to that the Cache API causes a fatal error as soon as you visit the site:

      Fatal error: Can't inherit abstract function cache_is_key_aware::has() (previously declared abstract in cache_loader) in
      moodle/cache/classes/loaders.php on line 43 Call Stack: 0.0009 826960

      1. main() moodle/index.php:0 0.0011 839256
      2. require_once('moodle/config.php') moodle/index.php:31 0.0024 1170264
      3. require_once('moodle/lib/setup.php') moodle/config.php:31 0.1017 23470864
      4. require_once('moodle/cache/lib.php') moodle/lib/setup.php:479 0.1054 24507664
      5. require_once('moodle/cache/classes/loaders.php') moodle/cache/lib.php:38

      Cheers
      Sam

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            samhemelryk Sam Hemelryk added a comment -

            Also one more bug for PHP versions <= 5.3.6:

            Errors in locallib_test.php:
            There were 3 errors:

            1) cache_config_writer_phpunit_tests::test_add_edit_delete_plugin_instance
            cache_exception: cache/Invalid cache plugin specified. The plugin does not extend the required class.

            moodle/cache/locallib.php:140
            moodle/cache/tests/locallib_test.php:168
            moodle/lib/phpunit/classes/advanced_testcase.php:76

            To re-run:
            phpunit cache_config_writer_phpunit_tests cache/tests/locallib_test.php

            2) cache_config_writer_phpunit_tests::test_set_mode_mappings
            cache_exception: cache/Invalid cache plugin specified. The plugin does not extend the required class.

            moodle/cache/locallib.php:140
            moodle/cache/tests/locallib_test.php:235
            moodle/lib/phpunit/classes/advanced_testcase.php:76

            To re-run:
            phpunit cache_config_writer_phpunit_tests cache/tests/locallib_test.php

            3) cache_config_writer_phpunit_tests::test_set_definition_mappings
            cache_exception: cache/Invalid cache plugin specified. The plugin does not extend the required class.

            moodle/cache/locallib.php:140
            moodle/cache/tests/locallib_test.php:263
            moodle/lib/phpunit/classes/advanced_testcase.php:76

            To re-run:
            phpunit cache_config_writer_phpunit_tests cache/tests/locallib_test.php

            FAILURES!
            Tests: 6, Assertions: 45, Errors: 3.

            Show
            samhemelryk Sam Hemelryk added a comment - Also one more bug for PHP versions <= 5.3.6: Errors in locallib_test.php: There were 3 errors: 1) cache_config_writer_phpunit_tests::test_add_edit_delete_plugin_instance cache_exception: cache/Invalid cache plugin specified. The plugin does not extend the required class. moodle/cache/locallib.php:140 moodle/cache/tests/locallib_test.php:168 moodle/lib/phpunit/classes/advanced_testcase.php:76 To re-run: phpunit cache_config_writer_phpunit_tests cache/tests/locallib_test.php 2) cache_config_writer_phpunit_tests::test_set_mode_mappings cache_exception: cache/Invalid cache plugin specified. The plugin does not extend the required class. moodle/cache/locallib.php:140 moodle/cache/tests/locallib_test.php:235 moodle/lib/phpunit/classes/advanced_testcase.php:76 To re-run: phpunit cache_config_writer_phpunit_tests cache/tests/locallib_test.php 3) cache_config_writer_phpunit_tests::test_set_definition_mappings cache_exception: cache/Invalid cache plugin specified. The plugin does not extend the required class. moodle/cache/locallib.php:140 moodle/cache/tests/locallib_test.php:263 moodle/lib/phpunit/classes/advanced_testcase.php:76 To re-run: phpunit cache_config_writer_phpunit_tests cache/tests/locallib_test.php FAILURES! Tests: 6, Assertions: 45, Errors: 3.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            I've uploaded a patch to fix these two issues.

            Issue 1: was a bug when inheriting from multiple interfaces in PHP <= 5.3.3
            Issue 2: was a bug caused by using is_subclass_of in PHP <= 5.3.6

            Up for integration now, I'll talk nicely to the integrators

            Show
            samhemelryk Sam Hemelryk added a comment - I've uploaded a patch to fix these two issues. Issue 1: was a bug when inheriting from multiple interfaces in PHP <= 5.3.3 Issue 2: was a bug caused by using is_subclass_of in PHP <= 5.3.6 Up for integration now, I'll talk nicely to the integrators
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master

            Show
            poltawski Dan Poltawski added a comment - Integrated to master
            Hide
            poltawski Dan Poltawski added a comment -

            Tested here an on ci servers, looks good.

            Show
            poltawski Dan Poltawski added a comment - Tested here an on ci servers, looks good.

              People

              • Assignee:
                samhemelryk Sam Hemelryk
                Reporter:
                samhemelryk Sam Hemelryk
                Integrator:
                Dan Poltawski
                Tester:
                Dan Poltawski
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/12