Skip to content

Commit

Permalink
Merge pull request #2 from the-kbA-team/1-check-for-php-81-compatibility
Browse files Browse the repository at this point in the history
1 check for php 81 compatibility
  • Loading branch information
stosef authored Mar 11, 2024
2 parents 42b9418 + 8290d9f commit bca2811
Show file tree
Hide file tree
Showing 15 changed files with 180 additions and 1,288 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Composer config validation
composer:
name: Composer config validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate composer.json
run: composer validate --strict

# PHP syntax validation
php:
name: PHP syntax validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check PHP syntax of package
run: php -l src/ tests/

phpunit:
name: PHPUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php_version }}
- run: vendor/bin/phpunit

# phpstan for several php versions
phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php_version }}
#php_extensions: redis intl

- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
php_version: ${{ matrix.php_version }}
configuration: phpstan.neon
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/composer.lock
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ php:
- 7.0
- 7.1
- 7.2
- 7.4
- 8.1
env:
global:
- CC_TEST_REPORTER_ID=5ae2c3f73f4475bd0ada0a042a8f581dfeb12745ee9fbb3d1e590f15dbb0ec5c
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
],
"minimum-stability": "stable",
"require": {
"php": "^7.0",
"php": ">7.0, <8.4",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit bca2811

Please sign in to comment.