Skip to content

Commit 3b5343d

Browse files
committed
Support PHP 8.3, dropped 7.4 and 8.0
1 parent 6902688 commit 3b5343d

24 files changed

+112
-174
lines changed

.github/workflows/php-cs-fixer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
- name: Setup PHP
1414
uses: shivammathur/setup-php@v2
1515
with:
16-
php-version: 7.4
16+
php-version: 8.3
1717
coverage: none
18-
tools: php-cs-fixer, cs2pr
18+
tools: php-cs-fixer:3.54.x, cs2pr
1919

2020
- name: Restore PHP-CS-Fixer cache
2121
uses: actions/cache@v4

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
php: [ "7.4", "8.2" ]
15+
php: [ "8.1", "8.3" ]
1616
steps:
1717
- uses: actions/checkout@v2
1818

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: ["7.4", "8.0", "8.1", "8.2"]
10+
php: ["8.1", "8.2", "8.3"]
1111
stability: [--prefer-lowest, --prefer-stable]
1212
env:
1313
PHP_VERSION: ${{ matrix.php }}
@@ -46,7 +46,7 @@ jobs:
4646

4747
- name: Run tests
4848
run: |
49-
export WITH_COVERAGE=$(if [[ ("${{ matrix.php }}" = "8.2") && ("${{ matrix.stability }}" = "--prefer-stable") ]]; then echo "true"; else echo "false"; fi)
49+
export WITH_COVERAGE=$(if [[ ("${{ matrix.php }}" = "8.3") && ("${{ matrix.stability }}" = "--prefer-stable") ]]; then echo "true"; else echo "false"; fi)
5050
echo "WITH_COVERAGE=${WITH_COVERAGE}" >> $GITHUB_ENV
5151
make vendor
5252
make tests

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
return (new PhpCsFixer\Config())
1212
->setRules([
1313
'@PSR12' => true,
14+
'@PHP81Migration' => true,
1415
'no_unused_imports' => true,
1516
'blank_line_before_statement' => true,
1617
'cast_spaces' => true,

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build:
33
analysis:
44
environment:
55
php:
6-
version: 7.4
6+
version: 8.1
77
cache:
88
disabled: false
99
directories:

Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,22 @@ ti: vendor
5555

5656
vendor:
5757
$(COMPOSER) update $(DEPS_STRATEGY)
58+
$(EXEC_PHP) composer -d tools/php-cs-fixer update
5859

5960
PHP_CS_FIXER = docker-compose run --rm -T php tools/php-cs-fixer/vendor/bin/php-cs-fixer fix -vv --allow-risky=yes
6061

6162
phpcs:
62-
PHP_VERSION=7.4 docker-compose run --rm -T php composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer
63-
PHP_VERSION=7.4 $(PHP_CS_FIXER) --dry-run
63+
PHP_VERSION=8.1 docker-compose run --rm -T php composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer
64+
PHP_VERSION=8.1 $(PHP_CS_FIXER) --dry-run
6465

6566
phpcbf:
66-
PHP_VERSION=7.4 $(PHP_CS_FIXER)
67+
PHP_VERSION=8.1 $(PHP_CS_FIXER)
6768

6869
phpstan: vendor
69-
$(EXEC_PHP) vendor/bin/phpstan analyse src -c phpstan.$(PHP_VERSION).neon -a vendor/autoload.php
70-
71-
phpstan-all-php-versions:
72-
PHP_VERSION=7.4 make phpstan
73-
PHP_VERSION=8.2 make phpstan
70+
$(EXEC_PHP) vendor/bin/phpstan analyse src -c phpstan.neon -a vendor/autoload.php
7471

7572
phpstan-baseline: vendor
76-
$(EXEC_PHP) vendor/bin/phpstan analyse src -c phpstan.$(PHP_VERSION).neon -a vendor/autoload.php --generate-baseline
73+
$(EXEC_PHP) vendor/bin/phpstan analyse src -c phpstan.neon -a vendor/autoload.php --generate-baseline
7774

7875
infection: vendor
7976
$(EXEC_PHP) vendor/bin/phpunit --coverage-xml=build/coverage/coverage-xml --log-junit=build/coverage/phpunit.junit.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.4 | ^8.0",
24+
"php": "^8.1",
2525
"nyholm/psr7": "^1.3",
2626
"psr/http-client": "^1.0",
2727
"symfony/process": "^4.4.30 | ^5.0 |^6.0 | ^7.0",

docker/php/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG PHP_VERSION
22

3-
FROM php:${PHP_VERSION}-cli-buster
3+
FROM php:${PHP_VERSION}-cli-bookworm
44

55
ENV XDEBUG_MODE=coverage
66
RUN echo "memory_limit=-1" > "$PHP_INI_DIR/conf.d/memory-limit.ini" \
@@ -28,8 +28,8 @@ RUN apt-get update \
2828
libpspell-dev
2929
RUN set -eux; \
3030
case "$PHP_VERSION" in \
31-
8.2*) pecl install xdebug-3.2.2;; \
32-
*) pecl install xdebug-3.1.1;; \
31+
8.1*) pecl install xdebug-3.1.1;; \
32+
*) pecl install xdebug-3.3.2;; \
3333
esac
3434
RUN docker-php-ext-configure pspell \
3535
&& docker-php-ext-enable xdebug \

examples/markdown_remover_text_processor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
);
1717

1818
$mdFormattedString = <<<MD
19-
# Mispelling Heading
19+
# Mispelling Heading
2020
21-
**mispelling bold**
21+
**mispelling bold**
2222
23-
* mispelling list item
24-
MD;
23+
* mispelling list item
24+
MD;
2525

2626
// using a string
2727
$misspellingFinder->find($mdFormattedString, ['en_US']);

examples/multisource_mispelling_finder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
new \PhpSpellcheck\Source\MultiSource(
1818
[
1919
new \PhpSpellcheck\Source\File(__DIR__ . '/../tests/Fixtures/Text/mispelling1.txt'),
20-
new \PhpSpellcheck\Source\Directory(__DIR__ . '/../tests/Fixtures/Text/Directory')
20+
new \PhpSpellcheck\Source\Directory(__DIR__ . '/../tests/Fixtures/Text/Directory'),
2121
]
2222
),
2323
['en_US'],

0 commit comments

Comments
 (0)