Skip to content

Commit 1c55028

Browse files
authored
switch to php 8 (#11)
* refactor github workflow * update composer dependencies for PHP ^8.1 and require current dev-main versions of interfaces and commons * add .uuid files to git ignore list * adapt classes for PHP 8
1 parent 906b485 commit 1c55028

File tree

8 files changed

+376
-299
lines changed

8 files changed

+376
-299
lines changed

.github/workflows/main.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Controls when the action will run.
2+
on:
3+
# Triggers the workflow on push or pull request events but only for the main branch
4+
push:
5+
pull_request:
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: "read"
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# composer validation
16+
composer:
17+
name: "composer config validation"
18+
runs-on: "ubuntu-latest"
19+
steps:
20+
- uses: "actions/checkout@v3"
21+
- name: "Validate composer.json"
22+
run: "composer validate --strict"
23+
# PHP lint and PHPStan for different PHP versions
24+
php:
25+
runs-on: "ubuntu-latest"
26+
strategy:
27+
matrix:
28+
php-version:
29+
- "8.1"
30+
- "8.2"
31+
- "8.3"
32+
name: "PHP ${{ matrix.php-version }}"
33+
steps:
34+
- name: "git checkout"
35+
uses: "actions/checkout@v3"
36+
- name: "setup PHP"
37+
uses: "shivammathur/setup-php@v2"
38+
with:
39+
php-version: "${{ matrix.php-version }}"
40+
coverage: "xdebug"
41+
- name: "check PHP version"
42+
run: "php -v"
43+
- name: "lint PHP files"
44+
run: "php -l src/"
45+
# - name: "install composer dependencies"
46+
# run: "composer install --prefer-dist --no-progress"
47+
# # PHPStan
48+
# - name: "PHPStan static analysis"
49+
# uses: "php-actions/phpstan@v3"
50+
# with:
51+
# php_version: "${{ matrix.php-version }}"
52+
# configuration: "phpstan.neon"
53+
# path: "exceptions/ src/ tests/"

.github/workflows/php.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
vendor/
2+
.uuid

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"homepage": "https://php-sap.github.io/",
1414
"minimum-stability": "stable",
1515
"require": {
16-
"php": ">=7.4",
16+
"php": "^8.1",
1717
"ext-json": "*",
1818
"phpunit/phpunit": "^9.6",
1919
"kba-team/memory-container": "^2.0",
20-
"php-sap/interfaces": "^4.0",
21-
"php-sap/common": "^5.0"
20+
"php-sap/interfaces": "dev-main",
21+
"php-sap/common": "dev-main"
2222
},
2323
"autoload": {
2424
"psr-4": {

0 commit comments

Comments
 (0)