From 20b0f0968a773b45adbc8594a7580730020fa9aa Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Sat, 8 May 2021 11:17:20 +0200 Subject: [PATCH] Bump highest php version to 8.0 for 311 and master Only real required change is to set the new max_input_vars=5000 requirement. Strictly speaking only needed for php8, but it doesn't hurt with older php versions and older moodle branches, so setting it up always. About the xmlrpc-beta extension, it's only needed for php8 runs and only if the plugin uses xmlrpc for something. If not, it can be omitted without problem, as far as it's not a moodle requirement but only a recommendation. --- .github/workflows/ci.yml | 23 +++++++++++++++++++---- .travis.yml | 18 ++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 986cc3b5..ea482a68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,18 +28,31 @@ jobs: fail-fast: false matrix: include: - - php: 7.4 + - php: 8.0 moodle-branch: master database: pgsql - - php: 7.4 + # The following line is only needed if you're going to run php8 jobs and your + # plugin needs xmlrpc services. + extensions: xmlrpc-beta + - php: 8.0 moodle-branch: master database: mariadb - - php: 7.4 + # The following line is only needed if you're going to run php8 jobs and your + # plugin needs xmlrpc services. + extensions: xmlrpc-beta + - php: 8.0 moodle-branch: MOODLE_311_STABLE database: pgsql - - php: 7.4 + # The following line is only needed if you're going to run php8 jobs and your + # plugin needs xmlrpc services. + extensions: xmlrpc-beta + - php: 8.0 moodle-branch: MOODLE_311_STABLE database: mariadb + # The following line is only needed if you're going to run php8 jobs and your + # plugin needs xmlrpc services. + extensions: xmlrpc-beta + - php: 7.4 moodle-branch: MOODLE_310_STABLE database: pgsql @@ -88,6 +101,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} + extensions: ${{ matrix.extensions }} + ini-values: max_input_vars=5000 coverage: none - name: Initialise moodle-plugin-ci diff --git a/.travis.yml b/.travis.yml index bcaace64..6dc4de95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,14 +16,15 @@ cache: jobs: include: - - php: 7.4 + - php: 8.0 env: MOODLE_BRANCH=master DB=pgsql - - php: 7.4 + - php: 8.0 env: MOODLE_BRANCH=master DB=mysqli - - php: 7.4 + - php: 8.0 env: MOODLE_BRANCH=MOODLE_311_STABLE DB=pgsql - - php: 7.4 + - php: 8.0 env: MOODLE_BRANCH=MOODLE_311_STABLE DB=mysqli + - php: 7.4 env: MOODLE_BRANCH=MOODLE_310_STABLE DB=pgsql - php: 7.4 @@ -60,6 +61,10 @@ jobs: # be executed with that PHP versions. before_install: + # The following line is only needed if you're going to run php8 jobs and your + # plugin needs xmlrpc services. + - if [[ ${TRAVIS_PHP_VERSION:0:1} -gt 7 ]]; then pecl install xmlrpc-beta; fi + - echo 'max_input_vars=5000' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - phpenv config-rm xdebug.ini - cd ../.. - composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3 @@ -74,17 +79,18 @@ before_install: fi install: - - moodle-plugin-ci install + # Quiet to avoid moodle-plugin-ci detecting some behat PHP warnings. Remove it once MDL-71622 is sorted out. + - moodle-plugin-ci install --quiet script: - moodle-plugin-ci phplint - moodle-plugin-ci phpcpd - moodle-plugin-ci phpmd - moodle-plugin-ci codechecker + - moodle-plugin-ci phpdoc - moodle-plugin-ci validate - moodle-plugin-ci savepoints - moodle-plugin-ci mustache - moodle-plugin-ci grunt - - moodle-plugin-ci phpdoc - moodle-plugin-ci phpunit - moodle-plugin-ci behat