Skip to content

Commit 300bd46

Browse files
committed
Dropped PHP 8.0, supported PHP 8.3
1 parent af247e2 commit 300bd46

File tree

65 files changed

+633
-617
lines changed

Some content is hidden

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

65 files changed

+633
-617
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +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
2120
composer-options:
2221
- ""
2322
- "--prefer-lowest"
@@ -36,6 +35,9 @@ jobs:
3635
coverage: xdebug
3736
ini-values: error_reporting=E_ALL
3837

38+
- name: Install PHIVE
39+
uses: szepeviktor/phive@v1
40+
3941
- name: Install dependencies
4042
run: composer update
4143
--prefer-dist

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/build/
22
/vendor/
33
/composer.lock
4+
/tools/
5+
/vendor-bin/**/vendor/
6+
/vendor-bin/**/composer.lock
47
.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+
### Removed
9+
- Dropped PHP 8.0 support.
10+
### Added
11+
- Added PHP 8.3 support.
12+
713
## [0.7.0] - 2023-09-19
814
### Removed
915
- Dropped PHP 7 support.

composer.json

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
}
1818
],
1919
"require": {
20-
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
21-
"remorhaz/php-json-data": "^0.6",
22-
"remorhaz/php-unilex": "^0.5.2"
20+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
21+
"remorhaz/php-json-data": "^0.7",
22+
"remorhaz/php-unilex": "^0.5.3"
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",
26+
"phpunit/phpunit": "^10.1 || ^11"
2827
},
2928
"autoload": {
3029
"psr-4": {
@@ -43,13 +42,18 @@
4342
"remorhaz/php-json-patch": "Uses JSON Pointers to implement the declarative way of altering JSON data (RFC-6902)"
4443
},
4544
"scripts": {
45+
"post-update-cmd": ["@phive-install"],
46+
"post-install-cmd": ["@phive-install"],
47+
"phive-install": [
48+
"`if [ -f tools/phive ]; then echo 'tools/'; fi`phive install --trust-gpg-keys C5095986493B4AA0"
49+
],
4650
"build": [
4751
"vendor/bin/unilex build-token-matcher --desc=\"JSON Pointer token matcher.\" spec/LexerSpec.php generated/TokenMatcher.php",
4852
"vendor/bin/unilex build-lookup-table --type=LL_1 --symbol=Remorhaz\\\\JSON\\\\Pointer\\\\Parser\\\\SymbolType --token=Remorhaz\\\\JSON\\\\Pointer\\\\Parser\\\\TokenType --desc=\"JSON Pointer parser LL(1) lookup table.\" spec/GrammarSpec.php generated/LookupTable.php",
49-
"vendor/bin/phpcbf -p generated/; if [ $? -eq 1 ]; then exit 0; fi"
53+
"vendor-bin/cs/vendor/bin/phpcbf -p generated/; if [ $? -eq 1 ]; then exit 0; fi"
5054
],
5155
"test-cs": [
52-
"vendor/bin/phpcs -sp"
56+
"vendor-bin/cs/vendor/bin/phpcs -sp"
5357
],
5458
"test-unit": [
5559
"vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --coverage-xml=build/logs/coverage-xml --log-junit=build/logs/junit.xml"
@@ -61,12 +65,19 @@
6165
"infection": [
6266
"@test-unit",
6367
"mkdir -p ./build/logs",
64-
"vendor/bin/infection --coverage=build/logs --threads=4 --no-progress --skip-initial-tests"
68+
"tools/infection --coverage=build/logs --threads=4 --no-progress --skip-initial-tests"
6569
]
6670
},
6771
"config": {
6872
"allow-plugins": {
69-
"infection/extension-installer": true
73+
"bamarni/composer-bin-plugin": true
74+
},
75+
"sort-packages": true
76+
},
77+
"extra": {
78+
"bamarni-bin": {
79+
"bin-links": false,
80+
"forward-command": true
7081
}
7182
}
7283
}

docker-compose.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +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.0:
11+
php8.2:
1212
build:
1313
context: .
14-
dockerfile: php-8.0.Dockerfile
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
1522
volumes:
1623
- .:/app
1724
working_dir: /app

php-8.0.Dockerfile

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

php-8.1.Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM php:8.1-cli
2+
3+
RUN apt-get update && apt-get install -y \
4+
zip \
5+
git \
6+
wget \
7+
gpg \
8+
libicu-dev && \
9+
pecl install xdebug && \
10+
docker-php-ext-enable xdebug && \
11+
docker-php-ext-configure intl --enable-intl && \
12+
docker-php-ext-install intl pcntl && \
13+
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"
14+
15+
ENV COMPOSER_ALLOW_SUPERUSER=1 \
16+
COMPOSER_PROCESS_TIMEOUT=1200
17+
18+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- \
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 \

php-8.2.Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM php:8.2-cli
2+
3+
RUN apt-get update && apt-get install -y \
4+
zip \
5+
git \
6+
wget \
7+
gpg \
8+
libicu-dev && \
9+
pecl install xdebug && \
10+
docker-php-ext-enable xdebug && \
11+
docker-php-ext-configure intl --enable-intl && \
12+
docker-php-ext-install intl pcntl && \
13+
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"
14+
15+
ENV COMPOSER_ALLOW_SUPERUSER=1 \
16+
COMPOSER_PROCESS_TIMEOUT=1200
17+
18+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- \
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 \

php-8.3.Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM php:8.3-cli
2+
3+
RUN apt-get update && apt-get install -y \
4+
zip \
5+
git \
6+
wget \
7+
gpg \
8+
libicu-dev && \
9+
pecl install xdebug && \
10+
docker-php-ext-enable xdebug && \
11+
docker-php-ext-configure intl --enable-intl && \
12+
docker-php-ext-install intl pcntl && \
13+
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"
14+
15+
ENV COMPOSER_ALLOW_SUPERUSER=1 \
16+
COMPOSER_PROCESS_TIMEOUT=1200
17+
18+
RUN curl --silent --show-error https://getcomposer.org/installer | php -- \
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)