Skip to content

Commit

Permalink
feat!: require php 8.3 (#227)
Browse files Browse the repository at this point in the history
* feat!: require php 8.3
* ci: add workflow for test
* fix: malformed return statement
  • Loading branch information
thorbrink authored Feb 1, 2024
1 parent f31b151 commit d9f7b6d
Show file tree
Hide file tree
Showing 13 changed files with 2,927 additions and 386 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Create Release and bump version files
uses: helsingborg-stad/release-wp-plugin-action@1.0.2
with:
php-version: 8.2
php-version: 8.3
node-version: 20.6.0
build-assets:
needs: ['release']
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
if: ${{ hashFiles('composer.json') != '' }}
with:
tools: composer
php-version: '7.4'
php-version: '8.3'

- name: Build PHP
if: ${{ hashFiles('composer.json') != '' }}
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:

jobs:

test:

runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
php-version: '8.3'
tools: composer:v2

- name: Install dependencies
run: composer i

- name: Run tests
run: composer run test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Thumbs.db
*.tar
*.zip

# phpunit cache
.phpunit.result.cache

# -------------------------
# BEGIN Whitelisted Files
# -------------------------
Expand Down
15 changes: 11 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@
}
],
"require": {
"php": "^8.3",
"helsingborg-stad/acf-export-manager": ">=1.0.0",
"philo/laravel-blade": "^3.1",
"ralouphie/mimey": "^2.1",
"helsingborg-stad/blade": "^2.0.0",
"justinrainbow/json-schema": "^5.2"
},
"autoload": {
"psr-4": {
"EventManagerIntegration\\": "source/php/"
}
},
"version": "1.2.6"
}
"scripts": {
"test": "@php vendor/bin/phpunit"
},
"version": "1.2.6",
"require-dev": {
"lucatume/function-mocker": "^1.3",
"10up/wp_mock": "^0.5.0"
}
}
Loading

0 comments on commit d9f7b6d

Please sign in to comment.