Skip to content

Commit c3f7ccd

Browse files
committed
Document (docs + template) the new PHP8 required changes
1 parent 2aa97b8 commit c3f7ccd

File tree

4 files changed

+33
-17
lines changed

4 files changed

+33
-17
lines changed

.travis.dist.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ cache:
1414
- $HOME/.npm
1515

1616
php:
17-
- 7.2
1817
- 7.3
1918
- 7.4
19+
- 8.0
2020

2121
env:
2222
global:
23-
- MOODLE_BRANCH=MOODLE_39_STABLE
23+
- MOODLE_BRANCH=MOODLE_311_STABLE
2424
matrix:
2525
- DB=pgsql
2626
- DB=mysqli
2727

2828
before_install:
29+
- if [[ ${TRAVIS_PHP_VERSION:0:1} -gt 7 ]]; then pecl install xmlrpc-beta; fi
30+
- echo 'max_input_vars=5000' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
2931
- phpenv config-rm xdebug.ini
3032
- cd ../..
3133
- composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3

docs/GHAFileExplained.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,33 @@ jobs:
5050
# Determines build matrix. This is a list of PHP versions, databases and
5151
# branches to test our project against. For each combination a separate
5252
# build will be created. For example below 6 builds will be created in
53-
# total (7.2-pgsql, 7.2-mariadb, 7.3-pgsql, 7.3-mariadb, etc.). If we add
53+
# total (7.3-pgsql, 7.3-mariadb, 7.4-pgsql, 7.4-mariadb, etc.). If we add
5454
# another branch, total number of builds will become 12.
5555
# If you need to use PHP 7.0 and run phpunit coverage test, make sure you are
5656
# using ubuntu-16.04 virtual environment in this case to have phpdbg or
5757
# this version in the system.
5858
strategy:
5959
fail-fast: false
6060
matrix:
61-
php: ['7.2', '7.3', '7.4']
62-
moodle-branch: ['MOODLE_310_STABLE']
61+
php: ['7.3', '7.4', '8.0']
62+
moodle-branch: ['MOODLE_311_STABLE']
6363
database: [pgsql, mariadb]
6464

65-
# There is an alterantive way allowing to define explicitly define which php, moodle-branch
65+
# There is an alternative way allowing to define explicitly define which php, moodle-branch
6666
# and database to use:
6767
#
6868
# matrix:
6969
# include:
70-
# - php: '7.4'
71-
# moodle-branch: 'MOODLE_310_STABLE'
70+
# - php: '8.0'
71+
# moodle-branch: 'MOODLE_311_STABLE'
7272
# database: pgsql
73-
# - php: '7.3'
73+
# Optional line: Only needed if going to run php8 jobs and the plugin
74+
# needs xmlrpc services or other special extensions.
75+
# extensions: xmlrpc-beta
76+
# - php: '7.4'
7477
# moodle-branch: 'MOODLE_310_STABLE'
7578
# database: mariadb
76-
# - php: '7.2'
79+
# - php: '7.3'
7780
# moodle-branch: 'MOODLE_39_STABLE'
7881
# database: pgsql
7982

@@ -89,6 +92,8 @@ jobs:
8992
uses: shivammathur/setup-php@v2
9093
with:
9194
php-version: ${{ matrix.php }}
95+
extensions: ${{ matrix.extensions }}
96+
ini-values: max_input_vars=5000
9297
coverage: none
9398

9499
# Install this project into a directory called "ci", updating PATH and

docs/TravisFileExplained.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ cache:
3131
# listed here will create a separate build and run the tests against that
3232
# version of PHP.
3333
php:
34-
- 7.2
3534
- 7.3
3635
- 7.4
36+
- 8.0
3737

3838
# This section sets up the environment variables for the build.
3939
env:
4040
global:
4141
# This line determines which version branch of Moodle to test against.
42-
- MOODLE_BRANCH=MOODLE_39_STABLE
42+
- MOODLE_BRANCH=MOODLE_311_STABLE
4343
# This matrix is used for testing against multiple databases. So for
4444
# each version of PHP being tested, one build will be created for each
4545
# database listed here. EG: for PHP 7.3, one build will be created
@@ -61,16 +61,23 @@ env:
6161
#
6262
# jobs:
6363
# include:
64+
# - php: 8.0
65+
# env: MOODLE_BRANCH=MOODLE_311_STABLE DB=pgsql
66+
# - php: 7.4
67+
# env: MOODLE_BRANCH=MOODLE_311_STABLE DB=pgsql
6468
# - php: 7.3
65-
# env: MOODLE_BRANCH=MOODLE_39_STABLE DB=pgsql
66-
# - php: 7.3
67-
# env: MOODLE_BRANCH=MOODLE_39_STABLE DB=mysqli
69+
# env: MOODLE_BRANCH=MOODLE_311_STABLE DB=mysqli
6870
# ....
6971
# Note: this also enables to add specific env variables (NODE_VERSION,
7072
# EXTRA_PLUGINS...) per job, if you don't want to do it globally.
7173

7274
# This lists steps that are run before the installation step.
7375
before_install:
76+
# Optional line: Only needed if going to run php8 jobs and the plugin
77+
# needs xmlrpc services.
78+
- if [[ ${TRAVIS_PHP_VERSION:0:1} -gt 7 ]]; then pecl install xmlrpc-beta; fi
79+
# Setup a good default max_input_vars value for all runs.
80+
- echo 'max_input_vars=5000' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
7481
# This disables XDebug which should speed up the build.
7582
- phpenv config-rm xdebug.ini
7683
# Currently we are inside of the clone of your repository. We move up two

gha.dist.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
php: ['7.2', '7.3', '7.4']
31-
moodle-branch: ['MOODLE_310_STABLE']
30+
php: ['7.3', '7.4', '8.0']
31+
moodle-branch: ['MOODLE_311_STABLE']
3232
database: [pgsql, mariadb]
3333

3434
steps:
@@ -41,6 +41,8 @@ jobs:
4141
uses: shivammathur/setup-php@v2
4242
with:
4343
php-version: ${{ matrix.php }}
44+
extensions: ${{ matrix.extensions }}
45+
ini-values: max_input_vars=5000
4446
coverage: none
4547

4648
- name: Initialise moodle-plugin-ci

0 commit comments

Comments
 (0)