Skip to content

Commit 72d0e5a

Browse files
authored
Merge pull request #29 from pardeep26k/patch-1
Fix PHP81 compatibility issue
2 parents 48f442e + eb3a50d commit 72d0e5a

File tree

11 files changed

+1151
-362
lines changed

11 files changed

+1151
-362
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- mode:yaml; indent-tabs-mode: nil; -*-
2+
3+
# Since this is an external WEBUI or RCP call, limit the inputs to avoid shell injection problems.
4+
---
5+
6+
name: 'dispatch-build-and-test'
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
phpversion:
12+
description: 'what php version to test against'
13+
type: choice
14+
options:
15+
- '7.4'
16+
- '8.0'
17+
- '8.1'
18+
default: '8.1'
19+
compileroptimizationlevel:
20+
description: 'The g++ -O flag number'
21+
type: choice
22+
options:
23+
- '0'
24+
- '1'
25+
- '2'
26+
default: '2'
27+
valgrindtool:
28+
# The possible choices match /usr/lib64/valgrind/*-amd64-linux
29+
# There are other valgrind flags such as --leak-check=full --show-leak-kinds=all
30+
# but those are not supported by run-tests.php.
31+
# See https://valgrind.org/docs/manual/manual.html
32+
description: 'If not none, the -M argument to run-tests.php; the valgrind --tool argument '
33+
type: choice
34+
options:
35+
- 'memcheck'
36+
- 'helgrind'
37+
- 'drd'
38+
- 'none'
39+
default: 'none'
40+
jobs:
41+
call-build-and-test:
42+
uses: ./.github/workflows/build-and-test.yml
43+
with:
44+
php-version: ${{ github.event.inputs.phpversion }}
45+
compiler-optimization-level: ${{ github.event.inputs.compileroptimizationlevel }}
46+
valgrind-tool: ${{ github.event.inputs.valgrindtool }}

.github/workflows/php.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
run:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
operating-system: [ubuntu-latest,]
16+
php-versions: ['7.4', '8.1']
17+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
- name: Install PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-versions }}
25+
- name: Check PHP Version
26+
run: php -v
27+
- name: Validate composer.json and composer.lock
28+
run: composer validate --strict
29+
- name: Install dependencies
30+
run: composer install --prefer-dist --no-progress
31+
- name: Run test suite
32+
run: composer run-script test

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ language: php
55
php:
66
- 5.6
77
- 7.0
8-
- 7.1
8+
- 7.4
9+
- 8.1
910

1011
# Commands to be run before your environment runs.
1112
before_script:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ramsey/uuid": "^3.5"
99
},
1010
"require-dev": {
11-
"phpunit/phpunit": "^5.7"
11+
"phpunit/phpunit": "^9.0"
1212
},
1313
"license": "BSD-2-Clause",
1414
"authors": [

0 commit comments

Comments
 (0)