General developer forum

Travis-ci fails because of moodle-plugin-ci

 
Picture of Rene Roepke
Travis-ci fails because of moodle-plugin-ci
 

Some how travis-ci will not run with the following configuration:

{
  "os": "linux",
  "env": "MOODLE_BRANCH=MOODLE_34_STABLE DB=pgsql",
  "php": 5.6,
  "dist": "trusty",
  "sudo": false,
  "cache": {
    "directories": [
      "$HOME/.composer/cache"
    ]
  },
  "group": "stable",
  "script": [
    "moodle-plugin-ci phplint",
    "moodle-plugin-ci phpcpd",
    "moodle-plugin-ci phpmd",
    "moodle-plugin-ci codechecker",
    "moodle-plugin-ci validate",
    "moodle-plugin-ci phpunit",
    "moodle-plugin-ci behat",
    "moodle-plugin-ci shifter",
    "moodle-plugin-ci csslint"
  ],
  "install": [
    "moodle-plugin-ci install"
  ],
  "language": "php",
  "before_install": [
    "phpenv config-rm xdebug.ini",
    "cd ../..",
    "composer selfupdate",
    "composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^1",
    "export PATH=\"$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH\""
  ]
}


moodle-plugin-ci install throws the following error:

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/travis/build/moodle/lib/classes/component.php on line 1264


For more look here: 

https://travis-ci.org/moodlepeers/moodle-mod_groupformation/builds/376957505


Anybody any idea how fix it?


 
Average of ratings: -
Picture of Darko Miletić
Re: Travis-ci fails because of moodle-plugin-ci
Core developersParticularly helpful Moodlers

Your settings are incorrect. Moodle 3.4 needs PHP 7.0 or more recent. The error you see derives from a fact that PHP 5.6 does not support return type declaration  available since PHP 7.0.

For requirements see the complete release notes for Moodle 3.4

https://docs.moodle.org/dev/Moodle_3.4_release_notes


 
Average of ratings: Useful (1)
Mark Nielsen in Prague, Czech Republic - 2006
Re: Travis-ci fails because of moodle-plugin-ci
Core developers

Moodle 3.4 requires PHP 7.0 or later and those failing builds are on PHP 5.6 (so likely some PHP 7 syntax is causing it problems).

Cheers!

 
Average of ratings: Useful (1)
Picture of Rene Roepke
Re: Travis-ci fails because of moodle-plugin-ci
 

Thank you, totally forgot about that.

 
Average of ratings: -