Skip to content

Commit 4b38b06

Browse files
committed
Drop PHP 8.0, support PHP 8.3
1 parent 81ca350 commit 4b38b06

File tree

60 files changed

+305
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+305
-279
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
php-version:
15-
- "8.0"
1615
- "8.1"
1716
- "8.2"
17+
- "8.3"
1818
os:
1919
- ubuntu-latest
20-
- macOS-latest
21-
- windows-latest
2220
composer-options:
2321
- ""
2422
- "--prefer-lowest"
@@ -37,6 +35,9 @@ jobs:
3735
coverage: xdebug
3836
ini-values: error_reporting=E_ALL
3937

38+
- name: Install PHIVE
39+
uses: szepeviktor/phive@v1
40+
4041
- name: Install dependencies
4142
run: composer update
4243
--prefer-dist
@@ -45,3 +46,18 @@ jobs:
4546

4647
- name: Run tests
4748
run: composer test
49+
50+
- name: Run Infection
51+
run: composer infection
52+
env:
53+
INFECTION_DASHBOARD_API_KEY: ${{ secrets.INFECTION_DASHBOARD_API_KEY }}
54+
55+
- name: Upload coverage to Codecov.io
56+
run: bash <(curl -s https://codecov.io/bash -s "build/logs")
57+
continue-on-error: true
58+
59+
- name: Upload coverage to Scrutinizer
60+
uses: sudo-bot/action-scrutinizer@latest
61+
with:
62+
cli-args: --format=php-clover build/logs/clover.xml
63+
continue-on-error: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/build/
22
/vendor/
33
/composer.lock
4+
/tools/
5+
/vendor-bin/**/vendor/
6+
/vendor-bin/**/composer.lock
47
/phpunit.xml
58
/infection.json
69
.phpunit.result.cache

.phive/phars.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="infection" version="^0.27.10" installed="0.27.10" location="./tools/infection" copy="true"/>
4+
</phive>

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
### Removed
9+
- Dropped PHP 8.0 support.
10+
### Added
11+
- Added PHP 8.3 support.
12+
713
## [0.6.0] - 2023-09-19
814
### Removed
915
- Dropped PHP 7 support.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016-2023 Edward Surov
3+
Copyright (c) 2016-2024 Edward Surov
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
[![Build](https://github.com/remorhaz/php-json-patch/actions/workflows/build.yml/badge.svg)](https://github.com/remorhaz/php-json-patch/actions/workflows/build.yml)
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/remorhaz/php-json-patch/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/remorhaz/php-json-patch/?branch=master)
66
[![codecov](https://codecov.io/gh/remorhaz/php-json-patch/branch/master/graph/badge.svg)](https://codecov.io/gh/remorhaz/php-json-patch)
7-
[![Infection MSI](https://badge.stryker-mutator.io/github.com/remorhaz/php-json-patch/master)](https://infection.github.io)
8-
[![Total Downloads](https://poser.pugx.org/remorhaz/php-json-patch/downloads)](https://packagist.org/packages/remorhaz/php-json-patch)
7+
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fremorhaz%2Fphp-json-patch%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/remorhaz/php-json-patch/master)[![Total Downloads](https://poser.pugx.org/remorhaz/php-json-patch/downloads)](https://packagist.org/packages/remorhaz/php-json-patch)
98
[![License](https://poser.pugx.org/remorhaz/php-json-patch/license)](https://packagist.org/packages/remorhaz/php-json-patch)
109

1110
This library implements [RFC6902](https://tools.ietf.org/html/rfc6902)-compliant JSON patch tool.
1211

1312
## Requirements
14-
- PHP 8.0+
13+
- PHP 8.1.
1514
- [JSON extension](https://www.php.net/manual/en/book.json.php) (ext-json) - required by [remorhaz/php-json-data](https://github.com/remorhaz/php-json-data) to access JSON documents.
1615
- [Internationalization functions](https://www.php.net/manual/en/book.intl.php) (ext-intl) - required by [`remorhaz/php-json-data`](https://github.com/remorhaz/php-json-data) to compare Unicode strings.
1716

composer.json

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616
}
1717
],
1818
"require": {
19-
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
19+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
2020
"ext-intl": "*",
21-
"remorhaz/php-json-data": "^0.6",
22-
"remorhaz/php-json-pointer": "^0.7"
21+
"remorhaz/php-json-data": "^0.7",
22+
"remorhaz/php-json-pointer": "^0.7.1"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "^9.6.13 || ^10",
26-
"infection/infection": "^0.26.19 || ^0.27.2",
27-
"squizlabs/php_codesniffer": "^3.7.2"
25+
"bamarni/composer-bin-plugin": "^1.8.2",
26+
"phpunit/phpunit": "^10.1 || ^11"
2827
},
2928
"autoload": {
3029
"psr-4": {
@@ -37,8 +36,13 @@
3736
}
3837
},
3938
"scripts": {
39+
"post-update-cmd": ["@phive-install"],
40+
"post-install-cmd": ["@phive-install"],
41+
"phive-install": [
42+
"`if [ -f tools/phive ]; then echo 'tools/'; fi`phive install --trust-gpg-keys C5095986493B4AA0"
43+
],
4044
"test-cs": [
41-
"vendor/bin/phpcs"
45+
"vendor-bin/cs/vendor/bin/phpcs -sp"
4246
],
4347
"test-unit": [
4448
"vendor/bin/phpunit --coverage-xml=build/logs/coverage-xml --log-junit=build/logs/junit.xml"
@@ -50,12 +54,18 @@
5054
"infection": [
5155
"@test-unit",
5256
"mkdir -p build/logs/infection",
53-
"vendor/bin/infection --threads=4 --coverage=build/logs --no-progress --skip-initial-tests"
57+
"tools/infection --threads=4 --coverage=build/logs --no-progress --skip-initial-tests"
5458
]
5559
},
5660
"config": {
5761
"allow-plugins": {
58-
"infection/extension-installer": true
62+
"bamarni/composer-bin-plugin": true
63+
}
64+
},
65+
"extra": {
66+
"bamarni-bin": {
67+
"bin-links": false,
68+
"forward-command": true
5969
}
6070
}
6171
}

docker-compose.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@ services:
44
php:
55
build:
66
context: .
7-
dockerfile: php-8.0.Dockerfile
7+
dockerfile: php-8.1.Dockerfile
8+
volumes:
9+
- .:/app
10+
working_dir: /app
11+
php8.2:
12+
build:
13+
context: .
14+
dockerfile: php-8.2.Dockerfile
15+
volumes:
16+
- .:/app
17+
working_dir: /app
18+
php8.3:
19+
build:
20+
context: .
21+
dockerfile: php-8.3.Dockerfile
822
volumes:
923
- .:/app
1024
working_dir: /app

infection.json.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"text": "build/logs/infection/infection.log",
1010
"summary": "build/logs/infection/summary.log",
1111
"perMutator": "build/logs/infection/per-mutator.md",
12-
"badge": {
13-
"branch": "master"
12+
"stryker": {
13+
"badge": "/^master$/"
1414
}
1515
}
1616
}

php-8.0.Dockerfile

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

0 commit comments

Comments
 (0)