Skip to content

Commit

Permalink
Merge pull request #29 from pardeep26k/patch-1
Browse files Browse the repository at this point in the history
Fix PHP81 compatibility issue
  • Loading branch information
roippi authored Jul 29, 2022
2 parents 48f442e + eb3a50d commit 72d0e5a
Show file tree
Hide file tree
Showing 11 changed files with 1,151 additions and 362 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/dispatch-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- mode:yaml; indent-tabs-mode: nil; -*-

# Since this is an external WEBUI or RCP call, limit the inputs to avoid shell injection problems.
---

name: 'dispatch-build-and-test'

on:
workflow_dispatch:
inputs:
phpversion:
description: 'what php version to test against'
type: choice
options:
- '7.4'
- '8.0'
- '8.1'
default: '8.1'
compileroptimizationlevel:
description: 'The g++ -O flag number'
type: choice
options:
- '0'
- '1'
- '2'
default: '2'
valgrindtool:
# The possible choices match /usr/lib64/valgrind/*-amd64-linux
# There are other valgrind flags such as --leak-check=full --show-leak-kinds=all
# but those are not supported by run-tests.php.
# See https://valgrind.org/docs/manual/manual.html
description: 'If not none, the -M argument to run-tests.php; the valgrind --tool argument '
type: choice
options:
- 'memcheck'
- 'helgrind'
- 'drd'
- 'none'
default: 'none'
jobs:
call-build-and-test:
uses: ./.github/workflows/build-and-test.yml
with:
php-version: ${{ github.event.inputs.phpversion }}
compiler-optimization-level: ${{ github.event.inputs.compileroptimizationlevel }}
valgrind-tool: ${{ github.event.inputs.valgrindtool }}
32 changes: 32 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PHP Composer

on:
push:
pull_request:

permissions:
contents: read

jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: [ubuntu-latest,]
php-versions: ['7.4', '8.1']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Check PHP Version
run: php -v
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
run: composer run-script test
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ language: php
php:
- 5.6
- 7.0
- 7.1
- 7.4
- 8.1

# Commands to be run before your environment runs.
before_script:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ramsey/uuid": "^3.5"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
"phpunit/phpunit": "^9.0"
},
"license": "BSD-2-Clause",
"authors": [
Expand Down
Loading

0 comments on commit 72d0e5a

Please sign in to comment.