Skip to content

Commit

Permalink
Drop PHP 8.0, support PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
remorhaz committed Feb 13, 2024
1 parent 88dbcf3 commit 77e7427
Show file tree
Hide file tree
Showing 160 changed files with 1,057 additions and 1,118 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
dependencies:
- lowest
- highest
Expand All @@ -32,6 +33,9 @@ jobs:
with:
php-version: ${{ matrix.php-version }}

- name: Install PHIVE
uses: szepeviktor/phive@v1

- name: Install lowest dependencies
if: ${{ matrix.dependencies == 'lowest' && matrix.platform-reqs == 'use-platform-reqs' }}
run: composer update --no-interaction --prefer-lowest
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/build/
/vendor
/composer.lock
/tools/
/vendor-bin/**/vendor/
/vendor-bin/**/composer.lock
/phpcs.xml
/phpunit.xml
/infection.json
Expand Down
4 changes: 4 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="infection" version="^0.27.9" installed="0.27.9" location="./tools/infection" copy="true"/>
</phive>
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Added support for PHP 8.3.
### Removed
- Dropped support for PHP 8.0.

## [0.8.0] - 2023-06-17
### Removed
- Dropped support for PHP 7.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2021 Edward Surov
Copyright (c) 2018-2024 Edward Surov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 22 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
}
],
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-intl": "*",
"ext-json": "*",
"remorhaz/php-unilex": "^0.5.2",
"remorhaz/php-json-data": "^0.6",
"nikic/php-parser": "^4.12"
"remorhaz/php-unilex": "^0.5.3",
"remorhaz/php-json-data": "^0.6.1",
"nikic/php-parser": "^4.12 || ^5"
},
"require-dev": {
"infection/infection": "^0.26 || ^0.27",
"phpunit/phpunit": "^9.6 || ^10",
"squizlabs/php_codesniffer": "^3.7.2"
"bamarni/composer-bin-plugin": "^1.8",
"phpunit/phpunit": "^10.1 || ^11"
},
"autoload": {
"psr-4": {
Expand All @@ -42,13 +41,18 @@
}
},
"scripts": {
"post-update-cmd": ["@phive-install"],
"post-install-cmd": ["@phive-install"],
"phive-install": [
"`if [ -f tools/phive ]; then echo 'tools/'; fi`phive install --trust-gpg-keys C5095986493B4AA0"
],
"build": [
"vendor/bin/unilex build-token-matcher --desc=\"JSONPath token matcher.\" spec/LexerSpec.php generated/TokenMatcher.php",
"vendor/bin/unilex build-lookup-table --type=LL_1 --symbol=Remorhaz\\\\JSON\\\\Path\\\\Parser\\\\SymbolType --token=Remorhaz\\\\JSON\\\\Path\\\\Parser\\\\TokenType --desc=\"JSONPath parser LL(1) lookup table.\" spec/GrammarSpec.php generated/LookupTable.php",
"vendor/bin/phpcbf -p generated/; if [ $? -eq 1 ]; then exit 0; fi"
"vendor-bin/cs/vendor/bin/phpcbf -p generated/; if [ $? -eq 1 ]; then exit 0; fi"
],
"test-cs": [
"vendor/bin/phpcs -sp"
"vendor-bin/cs/vendor/bin/phpcs -sp"
],
"test-unit": [
"vendor/bin/phpunit --coverage-xml=build/log/coverage-xml --coverage-clover=build/log/clover.xml --log-junit=build/log/junit.xml"
Expand All @@ -59,7 +63,7 @@
],
"infection": [
"mkdir -p build/log/infection",
"vendor/bin/infection --threads=4 --coverage=build/log --no-progress --skip-initial-tests"
"tools/infection --threads=4 --coverage=build/log --no-progress --skip-initial-tests"
],
"test-infection": [
"@test-unit",
Expand All @@ -68,7 +72,14 @@
},
"config": {
"allow-plugins": {
"infection/extension-installer": true
"bamarni/composer-bin-plugin": true
},
"sort-packages": true
},
"extra": {
"bamarni-bin": {
"bin-links": false,
"forward-command": true
}
}
}
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ services:
php:
build:
context: .
dockerfile: php-8.0.Dockerfile
dockerfile: php-8.1.Dockerfile
volumes:
- .:/app
working_dir: /app
php8.1:
php8.2:
build:
context: .
dockerfile: php-8.1.Dockerfile
dockerfile: php-8.2.Dockerfile
volumes:
- .:/app
working_dir: /app
php8.2:
php8.3:
build:
context: .
dockerfile: php-8.2.Dockerfile
dockerfile: php-8.3.Dockerfile
volumes:
- .:/app
working_dir: /app
38 changes: 34 additions & 4 deletions generated/TokenMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,8 @@ private function isModeDefaultSymbol21(int $char): bool
0x0111DC == $char ||
0x011200 <= $char && $char <= 0x011211 ||
0x011213 <= $char && $char <= 0x01122B ||
0x01123F == $char ||
0x011240 == $char ||
0x011280 <= $char && $char <= 0x011286 ||
0x011288 == $char ||
0x01128A <= $char && $char <= 0x01128D ||
Expand Down Expand Up @@ -2316,12 +2318,16 @@ private function isModeDefaultSymbol21(int $char): bool
0x011D6A <= $char && $char <= 0x011D89 ||
0x011D98 == $char ||
0x011EE0 <= $char && $char <= 0x011EF2 ||
0x011F02 == $char ||
0x011F04 <= $char && $char <= 0x011F10 ||
0x011F12 <= $char && $char <= 0x011F33 ||
0x011FB0 == $char ||
0x012000 <= $char && $char <= 0x012399 ||
0x012400 <= $char && $char <= 0x01246E ||
0x012480 <= $char && $char <= 0x012543 ||
0x012F90 <= $char && $char <= 0x012FF0 ||
0x013000 <= $char && $char <= 0x01342E ||
0x013000 <= $char && $char <= 0x01342F ||
0x013441 <= $char && $char <= 0x013446 ||
0x014400 <= $char && $char <= 0x014646 ||
0x016800 <= $char && $char <= 0x016A38 ||
0x016A40 <= $char && $char <= 0x016A5E ||
Expand All @@ -2346,7 +2352,9 @@ private function isModeDefaultSymbol21(int $char): bool
0x01AFFD == $char ||
0x01AFFE == $char ||
0x01B000 <= $char && $char <= 0x01B122 ||
0x01B132 == $char ||
0x01B150 <= $char && $char <= 0x01B152 ||
0x01B155 == $char ||
0x01B164 <= $char && $char <= 0x01B167 ||
0x01B170 <= $char && $char <= 0x01B2FB ||
0x01BC00 <= $char && $char <= 0x01BC6A ||
Expand Down Expand Up @@ -2386,11 +2394,14 @@ private function isModeDefaultSymbol21(int $char): bool
0x01D7AA <= $char && $char <= 0x01D7C2 ||
0x01D7C4 <= $char && $char <= 0x01D7CB ||
0x01DF00 <= $char && $char <= 0x01DF1E ||
0x01DF25 <= $char && $char <= 0x01DF2A ||
0x01E030 <= $char && $char <= 0x01E06D ||
0x01E100 <= $char && $char <= 0x01E12C ||
0x01E137 <= $char && $char <= 0x01E13D ||
0x01E14E == $char ||
0x01E290 <= $char && $char <= 0x01E2AD ||
0x01E2C0 <= $char && $char <= 0x01E2EB ||
0x01E4D0 <= $char && $char <= 0x01E4EB ||
0x01E7E0 <= $char && $char <= 0x01E7E6 ||
0x01E7E8 <= $char && $char <= 0x01E7EB ||
0x01E7ED == $char ||
Expand Down Expand Up @@ -2436,12 +2447,14 @@ private function isModeDefaultSymbol21(int $char): bool
0x01EEA5 <= $char && $char <= 0x01EEA9 ||
0x01EEAB <= $char && $char <= 0x01EEBB ||
0x020000 <= $char && $char <= 0x02A6DF ||
0x02A700 <= $char && $char <= 0x02B738 ||
0x02A700 <= $char && $char <= 0x02B739 ||
0x02B740 <= $char && $char <= 0x02B81D ||
0x02B820 <= $char && $char <= 0x02CEA1 ||
0x02CEB0 <= $char && $char <= 0x02EBE0 ||
0x02EBF0 <= $char && $char <= 0x02EE5D ||
0x02F800 <= $char && $char <= 0x02FA1D ||
0x030000 <= $char && $char <= 0x03134A;
0x030000 <= $char && $char <= 0x03134A ||
0x031350 <= $char && $char <= 0x0323AF;
}

private function isModeDefaultSymbol22(int $char): bool
Expand Down Expand Up @@ -2552,6 +2565,7 @@ private function isModeDefaultSymbol22(int $char): bool
0x0CE2 == $char ||
0x0CE3 == $char ||
0x0CE6 <= $char && $char <= 0x0CEF ||
0x0CF3 == $char ||
0x0D00 <= $char && $char <= 0x0D03 ||
0x0D3B == $char ||
0x0D3C == $char ||
Expand All @@ -2576,7 +2590,7 @@ private function isModeDefaultSymbol22(int $char): bool
0x0E50 <= $char && $char <= 0x0E59 ||
0x0EB1 == $char ||
0x0EB4 <= $char && $char <= 0x0EBC ||
0x0EC8 <= $char && $char <= 0x0ECD ||
0x0EC8 <= $char && $char <= 0x0ECE ||
0x0ED0 <= $char && $char <= 0x0ED9 ||
0x0F18 == $char ||
0x0F19 == $char ||
Expand Down Expand Up @@ -2643,6 +2657,8 @@ private function isModeDefaultSymbol22(int $char): bool
0x1CF4 == $char ||
0x1CF7 <= $char && $char <= 0x1CF9 ||
0x1DC0 <= $char && $char <= 0x1DFF ||
0x200C == $char ||
0x200D == $char ||
0x203F == $char ||
0x2040 == $char ||
0x2054 == $char ||
Expand All @@ -2655,6 +2671,7 @@ private function isModeDefaultSymbol22(int $char): bool
0x302A <= $char && $char <= 0x302F ||
0x3099 == $char ||
0x309A == $char ||
0x30FB == $char ||
0xA620 <= $char && $char <= 0xA629 ||
0xA66F == $char ||
0xA674 <= $char && $char <= 0xA67D ||
Expand Down Expand Up @@ -2708,6 +2725,7 @@ private function isModeDefaultSymbol22(int $char): bool
0xFE4D <= $char && $char <= 0xFE4F ||
0xFF10 <= $char && $char <= 0xFF19 ||
0xFF3F == $char ||
0xFF65 == $char ||
0x0101FD == $char ||
0x0102E0 == $char ||
0x010376 <= $char && $char <= 0x01037A ||
Expand All @@ -2724,6 +2742,7 @@ private function isModeDefaultSymbol22(int $char): bool
0x010D30 <= $char && $char <= 0x010D39 ||
0x010EAB == $char ||
0x010EAC == $char ||
0x010EFD <= $char && $char <= 0x010EFF ||
0x010F46 <= $char && $char <= 0x010F50 ||
0x010F82 <= $char && $char <= 0x010F85 ||
0x011000 <= $char && $char <= 0x011002 ||
Expand All @@ -2747,6 +2766,7 @@ private function isModeDefaultSymbol22(int $char): bool
0x0111CE <= $char && $char <= 0x0111D9 ||
0x01122C <= $char && $char <= 0x011237 ||
0x01123E == $char ||
0x011241 == $char ||
0x0112DF <= $char && $char <= 0x0112EA ||
0x0112F0 <= $char && $char <= 0x0112F9 ||
0x011300 <= $char && $char <= 0x011303 ||
Expand Down Expand Up @@ -2813,6 +2833,14 @@ private function isModeDefaultSymbol22(int $char): bool
0x011D93 <= $char && $char <= 0x011D97 ||
0x011DA0 <= $char && $char <= 0x011DA9 ||
0x011EF3 <= $char && $char <= 0x011EF6 ||
0x011F00 == $char ||
0x011F01 == $char ||
0x011F03 == $char ||
0x011F34 <= $char && $char <= 0x011F3A ||
0x011F3E <= $char && $char <= 0x011F42 ||
0x011F50 <= $char && $char <= 0x011F59 ||
0x013440 == $char ||
0x013447 <= $char && $char <= 0x013455 ||
0x016A60 <= $char && $char <= 0x016A69 ||
0x016AC0 <= $char && $char <= 0x016AC9 ||
0x016AF0 <= $char && $char <= 0x016AF4 ||
Expand Down Expand Up @@ -2847,10 +2875,12 @@ private function isModeDefaultSymbol22(int $char): bool
0x01E023 == $char ||
0x01E024 == $char ||
0x01E026 <= $char && $char <= 0x01E02A ||
0x01E08F == $char ||
0x01E130 <= $char && $char <= 0x01E136 ||
0x01E140 <= $char && $char <= 0x01E149 ||
0x01E2AE == $char ||
0x01E2EC <= $char && $char <= 0x01E2F9 ||
0x01E4EC <= $char && $char <= 0x01E4F9 ||
0x01E8D0 <= $char && $char <= 0x01E8D6 ||
0x01E944 <= $char && $char <= 0x01E94A ||
0x01E950 <= $char && $char <= 0x01E959 ||
Expand Down
19 changes: 0 additions & 19 deletions php-8.0.Dockerfile

This file was deleted.

26 changes: 17 additions & 9 deletions php-8.1.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
FROM php:8.1-rc-cli
FROM php:8.1-cli

RUN apt-get update && apt-get install -y \
zip \
git \
libicu-dev && \
pecl install -f -o xdebug && \
zip \
git \
wget \
gpg \
libicu-dev && \
pecl install xdebug && \
docker-php-ext-enable xdebug && \
docker-php-ext-configure intl --enable-intl && \
docker-php-ext-install intl pcntl && \
echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini" && \
echo "xdebug.max_nesting_level = 1024" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"

echo "xdebug.mode = develop,coverage,debug" >> "$PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini"

ENV COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_PROCESS_TIMEOUT=1200

RUN curl --silent --show-error https://getcomposer.org/installer | php -- \
--install-dir=/usr/bin --filename=composer
--install-dir=/usr/bin --filename=composer && \
git config --global --add safe.directory "*"

RUN wget -O phive.phar https://phar.io/releases/phive.phar && \
wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc && \
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 && \
gpg --verify phive.phar.asc phive.phar && \
chmod +x phive.phar && \
mv phive.phar /usr/local/bin/phive \
Loading

0 comments on commit 77e7427

Please sign in to comment.