Skip to content

Commit 3008c1d

Browse files
committed
Drop PHP 8.0, support PHP 8.3
1 parent c5a6b3f commit 3008c1d

File tree

71 files changed

+346
-395
lines changed

Some content is hidden

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

71 files changed

+346
-395
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ jobs:
1212
tests:
1313
runs-on: ubuntu-latest
1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
platform-reqs:
1718
- use-platform-reqs
1819
php-version:
19-
- "8.0"
2020
- "8.1"
2121
- "8.2"
22+
- "8.3"
2223
dependencies:
2324
- lowest
2425
- highest
@@ -32,6 +33,9 @@ jobs:
3233
with:
3334
php-version: ${{ matrix.php-version }}
3435

36+
- name: Install PHIVE
37+
uses: szepeviktor/phive@v1
38+
3539
- name: Install lowest dependencies
3640
if: ${{ matrix.dependencies == 'lowest' && matrix.platform-reqs == 'use-platform-reqs' }}
3741
run: composer update --no-interaction --prefer-lowest

.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+
/vendor-bin/**/vendor/
5+
/vendor-bin/**/composer.lock
46
/infection.json
57
/phpunit.xml
8+
/tools/
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.9" installed="0.27.9" 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+
### Added
9+
- Added PHP 8.3 support.
10+
### Removed
11+
- Removed PHP 8.0 support.
12+
713
## [0.6.0] - 2023-06-16
814
### Changed
915
- JSON source structure may contain arbitrary objects, not only `stdClass`.

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-2019 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This library provides infrastructure for JSON documents processing.
1212

1313
## Requirements
1414

15-
- PHP 8
15+
- PHP 8.1 or newer.
1616
- [Internationalization functions](https://www.php.net/manual/en/book.intl.php) (ext-intl) - to compare Unicode strings.
1717
- [JSON extension](https://www.php.net/manual/en/book.json.php) (ext-json) - to encode and decode JSON documents.
1818

composer.json

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@
1414
}
1515
],
1616
"require": {
17-
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
17+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
1818
"ext-json": "*",
1919
"ext-intl": "*"
2020
},
2121
"require-dev": {
22-
"infection/infection": "^0.26 || ^0.27",
23-
"phpunit/phpunit": "^9.5 || ^10",
24-
"psalm/plugin-phpunit": "^0.18.1",
25-
"squizlabs/php_codesniffer": "^3.7.2",
26-
"vimeo/psalm": "^5.12"
22+
"bamarni/composer-bin-plugin": "^1.8",
23+
"phpunit/phpunit": "^10.1 || ^11"
2724
},
2825
"autoload": {
2926
"psr-4": {
@@ -36,21 +33,34 @@
3633
}
3734
},
3835
"scripts": {
36+
"post-update-cmd": ["@phive-install"],
37+
"post-install-cmd": ["@phive-install"],
38+
"phive-install": [
39+
"`if [ -f tools/phive ]; then echo 'tools/'; fi`phive install --trust-gpg-keys C5095986493B4AA0"
40+
],
3941
"test-cs": [
40-
"vendor/bin/phpcs -sp"
42+
"vendor-bin/cs/vendor/bin/phpcs -sp"
4143
],
4244
"test-unit": [
4345
"vendor/bin/phpunit --coverage-xml=build/log/coverage-xml --coverage-clover=build/log/clover.xml --log-junit=build/log/junit.xml"
4446
],
45-
"test-psalm": "vendor/bin/psalm --threads=4 --shepherd",
47+
"test-unit-9": [
48+
"vendor/bin/phpunit --configuration=phpunit-9.xml --coverage-xml=build/log/coverage-xml --coverage-clover=build/log/clover.xml --log-junit=build/log/junit.xml"
49+
],
50+
"test-psalm": "vendor-bin/psalm/vendor/bin/psalm --threads=4 --shepherd",
4651
"test": [
4752
"@test-cs",
4853
"@test-unit",
4954
"@test-psalm"
5055
],
56+
"test-8.0": [
57+
"@test-cs",
58+
"@test-unit-9",
59+
"@test-psalm"
60+
],
5161
"infection": [
5262
"mkdir -p build/log/infection",
53-
"vendor/bin/infection --threads=4 --coverage=build/log --no-progress --skip-initial-tests"
63+
"tools/infection --threads=4 --coverage=build/log --no-progress --skip-initial-tests"
5464
],
5565
"test-infection": [
5666
"@test-unit",
@@ -59,7 +69,15 @@
5969
},
6070
"config": {
6171
"allow-plugins": {
72+
"bamarni/composer-bin-plugin": true,
6273
"infection/extension-installer": true
74+
},
75+
"sort-packages": true
76+
},
77+
"extra": {
78+
"bamarni-bin": {
79+
"bin-links": false,
80+
"forward-command": true
6381
}
6482
}
6583
}

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ services:
44
php:
55
build:
66
context: .
7-
dockerfile: php-8.0.Dockerfile
7+
dockerfile: php-8.1.Dockerfile
88
volumes:
99
- .:/app
1010
working_dir: /app
11-
php8.1:
11+
php8.2:
1212
build:
1313
context: .
14-
dockerfile: php-8.1.Dockerfile
14+
dockerfile: php-8.2.Dockerfile
1515
volumes:
1616
- .:/app
1717
working_dir: /app
18-
php8.2:
18+
php8.3:
1919
build:
2020
context: .
21-
dockerfile: php-8.2.Dockerfile
21+
dockerfile: php-8.3.Dockerfile
2222
volumes:
2323
- .:/app
2424
working_dir: /app

php-8.0.Dockerfile

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

php-8.1.Dockerfile

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
FROM php:8.0-cli
1+
FROM php:8.1-cli
22

33
RUN apt-get update && apt-get install -y \
4-
zip \
5-
git \
6-
libicu-dev && \
4+
zip \
5+
git \
6+
wget \
7+
gpg \
8+
libicu-dev && \
9+
pecl install xdebug && \
710
docker-php-ext-configure intl --enable-intl && \
811
docker-php-ext-install intl pcntl && \
12+
docker-php-ext-enable xdebug && \
913
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"
1014

1115
ENV COMPOSER_ALLOW_SUPERUSER=1 \
1216
COMPOSER_PROCESS_TIMEOUT=1200
1317

1418
RUN curl --silent --show-error https://getcomposer.org/installer | php -- \
15-
--install-dir=/usr/bin --filename=composer
19+
--install-dir=/usr/bin --filename=composer && \
20+
git config --global --add safe.directory "*"
21+
22+
RUN wget -O phive.phar https://phar.io/releases/phive.phar && \
23+
wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc && \
24+
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 && \
25+
gpg --verify phive.phar.asc phive.phar && \
26+
chmod +x phive.phar && \
27+
mv phive.phar /usr/local/bin/phive \

0 commit comments

Comments
 (0)