Skip to content

Commit 3d9ce91

Browse files
committed
Supporting of PHP 8.3.
1 parent f20e9e3 commit 3d9ce91

File tree

10 files changed

+78
-21
lines changed

10 files changed

+78
-21
lines changed

.github/workflows/build.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,26 @@ jobs:
2121
- 8.0
2222
- 8.1
2323
- 8.2
24+
- 8.3
25+
include:
26+
- phpunit: phpunit.xml
27+
- php: 5.6
28+
phpunit: phpunit.legacy.xml
29+
- php: 7.0
30+
phpunit: phpunit.legacy.xml
31+
- php: 7.1
32+
phpunit: phpunit.legacy.xml
33+
- php: 7.2
34+
phpunit: phpunit.legacy.xml
35+
- php: 7.3
36+
phpunit: phpunit.legacy.xml
37+
- php: 7.4
38+
phpunit: phpunit.legacy.xml
39+
- php: 8.0
40+
phpunit: phpunit.legacy.xml
41+
2442
steps:
25-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v4
2644

2745
- name: Install PHP
2846
uses: shivammathur/setup-php@v2
@@ -34,10 +52,10 @@ jobs:
3452

3553
- name: Get Composer Cache Directory
3654
id: composer-cache
37-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
55+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3856

3957
- name: Cache Composer packages
40-
uses: actions/cache@v2
58+
uses: actions/cache@v3
4159
with:
4260
path: ${{ steps.composer-cache.outputs.dir }}
4361
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
@@ -47,7 +65,7 @@ jobs:
4765
run: composer install --no-plugins
4866

4967
- name: Run test suite
50-
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit
68+
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --configuration ${{ matrix.phpunit }}
5169

5270
- name: Upload coverage results to Coveralls
5371
env:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/.php-cs-fixer.cache
1010
/docker-compose.yml
1111
/.phpunit.result.cache
12+
/.phpunit.cache

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ php-html-form
99
- *Dep*: Deprecated.
1010
- *Fix*: Fixed.
1111

12+
2.0.3 [2023-12-30]
13+
------------------
14+
15+
- Add: Supporting of PHP 8.3.
16+
1217
2.0.2 [2022-12-12]
1318
------------------
1419

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ The MIT License (MIT)
22

33
Copyright (c) 2016 Adam Wathan <adam.wathan@gmail.com>
44

5-
Copyright (c) 2022 Vasily Belosloodcev <vasily.belosloodcev@gmail.com>
5+
Copyright (c) 2023 Vasily Belosloodcev <vasily.belosloodcev@gmail.com>
66

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

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ You have to install [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
372372
don't use build-in Docker image:
373373

374374
```
375-
composer global require friendsofphp/php-cs-fixer "^3.13.0"
375+
composer global require friendsofphp/php-cs-fixer
376376
```
377377

378378
License

phpcs.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Configuration of code style fixer and checker for this library.
5-
* This configuration compatible with friendsofphp/php-cs-fixer "^3.13.0".
5+
* This configuration compatible with friendsofphp/php-cs-fixer "^3.43.1".
66
*/
77

88
use PhpCsFixer\Finder;

phpunit.legacy.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
5+
bootstrap="./tests/bootstrap.php"
6+
verbose="true"
7+
colors="true">
8+
9+
<testsuites>
10+
<testsuite name="PHP HTML Form">
11+
<directory>tests</directory>
12+
<exclude>tests/TestCase.php</exclude>
13+
<exclude>tests/bootstrap.php</exclude>
14+
<exclude>tests/InputContractTest.php</exclude>
15+
<exclude>tests/TextSubclassContractTest.php</exclude>
16+
</testsuite>
17+
</testsuites>
18+
<filter>
19+
<whitelist>
20+
<directory suffix=".php">src</directory>
21+
</whitelist>
22+
</filter>
23+
<logging>
24+
<log type="coverage-clover" target="build/logs/clover.xml"/>
25+
<log type="coverage-html" target="build/coverage"/>
26+
</logging>
27+
</phpunit>

phpunit.xml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
55
bootstrap="./tests/bootstrap.php"
6-
verbose="true"
7-
colors="true">
6+
colors="true"
7+
cacheDirectory=".phpunit.cache"
8+
>
9+
<coverage>
10+
<report>
11+
<clover outputFile="build/logs/clover.xml"/>
12+
<html outputDirectory="build/coverage"/>
13+
</report>
14+
</coverage>
815

916
<testsuites>
1017
<testsuite name="PHP HTML Form">
@@ -15,13 +22,12 @@
1522
<exclude>tests/TextSubclassContractTest.php</exclude>
1623
</testsuite>
1724
</testsuites>
18-
<filter>
19-
<whitelist>
25+
26+
<logging/>
27+
28+
<source>
29+
<include>
2030
<directory suffix=".php">src</directory>
21-
</whitelist>
22-
</filter>
23-
<logging>
24-
<log type="coverage-clover" target="build/logs/clover.xml"/>
25-
<log type="coverage-html" target="build/coverage"/>
26-
</logging>
31+
</include>
32+
</source>
2733
</phpunit>

tests/FormBuilderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testButton($value, $name, $expected)
114114
$this->assertEquals($expected, $result);
115115
}
116116

117-
public function buttonProvider()
117+
public static function buttonProvider()
118118
{
119119
return [
120120
['Click Me', 'click-me', '<button type="button" name="click-me">Click Me</button>'],

workenv/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.2-cli-alpine
1+
FROM php:8.3-cli-alpine
22

33
RUN apk add --no-cache $PHPIZE_DEPS && apk add --update --no-cache linux-headers
44

@@ -13,6 +13,6 @@ RUN if [ ${GITHUB_OAUTH_TOKEN} != false ]; then \
1313
;fi
1414
RUN export COMPOSER_DISABLE_XDEBUG_WARN=1
1515

16-
RUN composer global require friendsofphp/php-cs-fixer "^3.13.0"
16+
RUN composer global require friendsofphp/php-cs-fixer "^3.43.1"
1717

1818
CMD ["php", "-a"]

0 commit comments

Comments
 (0)