Skip to content

Commit 005702c

Browse files
committed
Added supporting of PHP 8.3.
1 parent 5b8bb8f commit 005702c

File tree

8 files changed

+73
-20
lines changed

8 files changed

+73
-20
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
@@ -5,4 +5,5 @@
55
/composer.lock
66
/docker-compose.yml
77
/.phpunit.result.cache
8+
/.phpunit.cache
89
/.php-cs-fixer.cache

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
xml-constrcutor
22
===
33

4+
v2.0.3 [2023-12-29]
5+
---
6+
7+
- Supporting of PHP 8.3.
8+
49
v2.0.2 [2023-01-07]
510
---
611

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ xml-constructor
99

1010
The array-like constructor of XML document structure.
1111

12-
Supporting PHP from 5.6 up to 8.2.
12+
Supporting PHP from 5.6 up to 8.3.
1313

1414
Install
1515
---
@@ -132,7 +132,7 @@ You have to install [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
132132
don't use build-in Docker image:
133133

134134
```
135-
composer global require friendsofphp/php-cs-fixer "^3.13.0"
135+
composer global require friendsofphp/php-cs-fixer
136136
```
137137

138138
License

phpcs.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Configuration of code style fixer and checker for this library.
7-
* This configuration compatible with friendsofphp/php-cs-fixer "^3.13.0".
7+
* This configuration compatible with friendsofphp/php-cs-fixer "^3.43.0".
88
*/
99

1010
use PhpCsFixer\Finder;

phpunit.legacy.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
bootstrap="./tests/bootstrap.php"
4+
verbose="true"
5+
colors="true">
6+
7+
<testsuites>
8+
<testsuite name="Main Tests">
9+
<directory>./tests</directory>
10+
</testsuite>
11+
</testsuites>
12+
13+
<filter>
14+
<whitelist>
15+
<directory suffix=".php">./src</directory>
16+
</whitelist>
17+
</filter>
18+
19+
<logging>
20+
<log type="coverage-html" target="build/coverage"/>
21+
<log type="coverage-clover" target="build/logs/clover.xml"/>
22+
</logging>
23+
</phpunit>

phpunit.xml

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
35
bootstrap="./tests/bootstrap.php"
4-
verbose="true"
5-
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>
615

716
<testsuites>
817
<testsuite name="Main Tests">
918
<directory>./tests</directory>
1019
</testsuite>
1120
</testsuites>
1221

13-
<filter>
14-
<whitelist>
15-
<directory suffix=".php">./src</directory>
16-
</whitelist>
17-
</filter>
22+
<logging />
1823

19-
<logging>
20-
<log type="coverage-html" target="build/coverage"/>
21-
<log type="coverage-clover" target="build/logs/clover.xml"/>
22-
</logging>
24+
<source>
25+
<include>
26+
<directory suffix=".php">./src</directory>
27+
</include>
28+
</source>
2329
</phpunit>

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)