Skip to content

Commit d9b8301

Browse files
authored
Drop PHP 8.0, update to PHPUnit 10 (#8)
1 parent 71a8cd1 commit d9b8301

File tree

12 files changed

+160
-251
lines changed

12 files changed

+160
-251
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8-
commit-message:
9-
include: "scope"
10-
prefix: "composer"
11-
labels:
12-
- "dependency-update"
138
versioning-strategy: "widen"
9+
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"

.github/workflows/ci.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: "CI"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
9+
env:
10+
INI_VALUES: zend.assertions=1,error_reporting=-1
11+
12+
jobs:
13+
composer-json-lint:
14+
name: "Lint composer.json"
15+
runs-on: "ubuntu-latest"
16+
strategy:
17+
matrix:
18+
php-version:
19+
- "8.1"
20+
21+
steps:
22+
- uses: "actions/checkout@v3"
23+
- uses: "shivammathur/setup-php@v2"
24+
with:
25+
coverage: "none"
26+
php-version: "${{ matrix.php-version }}"
27+
ini-values: "${{ env.INI_VALUES }}"
28+
tools: composer-normalize,composer-require-checker,composer-unused
29+
- uses: "ramsey/composer-install@v2"
30+
31+
- run: "composer validate --strict"
32+
- run: "composer-normalize --dry-run"
33+
- run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)"
34+
- run: "composer-unused"
35+
36+
tests:
37+
name: "Tests"
38+
runs-on: "ubuntu-latest"
39+
strategy:
40+
matrix:
41+
php-version:
42+
- "8.2"
43+
code-coverage:
44+
- "none"
45+
include:
46+
- php-version: "8.1"
47+
code-coverage: "pcov"
48+
49+
steps:
50+
- uses: "actions/checkout@v3"
51+
- uses: "shivammathur/setup-php@v2"
52+
with:
53+
coverage: "${{ matrix.code-coverage }}"
54+
php-version: "${{ matrix.php-version }}"
55+
ini-values: "${{ env.INI_VALUES }}"
56+
- uses: "ramsey/composer-install@v2"
57+
58+
- run: "vendor/bin/phpunit --no-coverage --no-logging"
59+
if: ${{ matrix.code-coverage == 'none' }}
60+
timeout-minutes: 3
61+
62+
- run: "vendor/bin/phpunit --coverage-clover=coverage.xml --no-logging"
63+
if: ${{ matrix.code-coverage != 'none' }}
64+
timeout-minutes: 3
65+
66+
- name: "Send code coverage report to Codecov.io"
67+
if: ${{ matrix.code-coverage != 'none' }}
68+
uses: "codecov/codecov-action@v3"
69+
with:
70+
token: ${{ secrets.CODECOV_TOKEN }}
71+
file: ./coverage.xml
72+
fail_ci_if_error: true
73+
74+
coding-standards:
75+
name: "Coding Standards"
76+
runs-on: "ubuntu-latest"
77+
strategy:
78+
matrix:
79+
php-version:
80+
- "8.1"
81+
82+
steps:
83+
- uses: "actions/checkout@v3"
84+
- uses: "shivammathur/setup-php@v2"
85+
with:
86+
coverage: "none"
87+
php-version: "${{ matrix.php-version }}"
88+
ini-values: "${{ env.INI_VALUES }}"
89+
- uses: "ramsey/composer-install@v2"
90+
91+
- run: "vendor/bin/php-cs-fixer fix --verbose --dry-run --diff"

.github/workflows/integrate.yaml

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

.gitignore

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
vendor/
2-
.idea/
3-
.php-cs-fixer.cache
4-
.phpunit.result.cache
5-
composer.lock
1+
/.idea/
2+
/.phpunit.cache/
3+
/vendor/
4+
/coverage/
5+
/.php-cs-fixer.cache
6+
/.phpunit.result.cache
7+
/composer.lock

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
CSFIX_PHP_BIN=PHP_CS_FIXER_IGNORE_ENV=1 php8.2
2+
PHP_BIN=php8.2 -d zend.assertions=1 -d error_reporting=-1
3+
COMPOSER_BIN=$(shell command -v composer)
4+
15
all: csfix test
26
@echo "Done."
37

48
vendor: composer.json
5-
composer update
9+
$(PHP_BIN) $(COMPOSER_BIN) update
10+
$(PHP_BIN) $(COMPOSER_BIN) bump
611
touch vendor
712

813
.PHONY: csfix
914
csfix: vendor
10-
vendor/bin/php-cs-fixer fix --verbose
15+
$(CSFIX_PHP_BIN) vendor/bin/php-cs-fixer fix -v
1116

1217
.PHONY: test
1318
test: vendor
14-
php -d zend.assertions=1 vendor/bin/phpunit
19+
$(PHP_BIN) vendor/bin/phpunit $(PHPUNIT_ARGS)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Latest Stable Version](https://img.shields.io/packagist/v/slam/php-debug-r.svg)](https://packagist.org/packages/slam/php-debug-r)
44
[![Downloads](https://img.shields.io/packagist/dt/slam/php-debug-r.svg)](https://packagist.org/packages/slam/php-debug-r)
5-
[![Integrate](https://github.com/Slamdunk/php-debug-r/workflows/Integrate/badge.svg?branch=master)](https://github.com/Slamdunk/php-debug-r/actions)
5+
[![Integrate](https://github.com/Slamdunk/php-debug-r/workflows/CI/badge.svg?branch=master)](https://github.com/Slamdunk/php-debug-r/actions)
66
[![Code Coverage](https://codecov.io/gh/Slamdunk/php-debug-r/coverage.svg?branch=master)](https://codecov.io/gh/Slamdunk/php-debug-r?branch=master)
77

88
Custom function for debug purposes

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "slam/php-debug-r",
3-
"type": "library",
43
"description": "Debug function",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Filippo Tessarotto",
@@ -11,12 +11,11 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.4 || ^8.0"
14+
"php": "~8.1.0 || ~8.2.0"
1515
},
1616
"require-dev": {
17-
"malukenho/mcbumpface": "^1.1.5",
18-
"phpunit/phpunit": "^9.5.4",
19-
"slam/php-cs-fixer-extensions": "^v3.0.1"
17+
"phpunit/phpunit": "^10.0.11",
18+
"slam/php-cs-fixer-extensions": "^3.4"
2019
},
2120
"autoload": {
2221
"files": [

0 commit comments

Comments
 (0)