Skip to content

Commit af470c8

Browse files
committed
Test on PHP 8.2 and update test environment
1 parent 835f186 commit af470c8

File tree

5 files changed

+38
-24
lines changed

5 files changed

+38
-24
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
jobs:
88
PHPUnit:
99
name: PHPUnit (PHP ${{ matrix.php }})
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
1313
php:
14+
- 8.2
15+
- 8.1
1416
- 8.0
1517
- 7.4
1618
- 7.3
@@ -22,7 +24,7 @@ jobs:
2224
- 5.4
2325
- 5.3
2426
steps:
25-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2628
- uses: shivammathur/setup-php@v2
2729
with:
2830
php-version: ${{ matrix.php }}
@@ -35,12 +37,16 @@ jobs:
3537

3638
PHPUnit-hhvm:
3739
name: PHPUnit (HHVM)
38-
runs-on: ubuntu-18.04
40+
runs-on: ubuntu-22.04
3941
continue-on-error: true
4042
steps:
41-
- uses: actions/checkout@v2
42-
- uses: azjezz/setup-hhvm@v1
43+
- uses: actions/checkout@v3
44+
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
45+
- name: Run hhvm composer.phar install
46+
uses: docker://hhvm/hhvm:3.30-lts-latest
4347
with:
44-
version: lts-3.30
45-
- run: hhvm $(which composer) install
46-
- run: hhvm vendor/bin/phpunit
48+
args: hhvm composer.phar install
49+
- name: Run hhvm vendor/bin/phpunit
50+
uses: docker://hhvm/hhvm:3.30-lts-latest
51+
with:
52+
args: hhvm vendor/bin/phpunit

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# clue/reactphp-utf8
22

3-
[![CI status](https://github.com/clue/reactphp-utf8/workflows/CI/badge.svg)](https://github.com/clue/reactphp-utf8/actions)
3+
[![CI status](https://github.com/clue/reactphp-utf8/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-utf8/actions)
44
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/utf8-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/utf8-react)
55

66
Streaming UTF-8 parser, built on top of [ReactPHP](https://reactphp.org/).
@@ -78,7 +78,7 @@ This project follows [SemVer](https://semver.org/).
7878
This will install the latest supported version:
7979

8080
```bash
81-
$ composer require clue/utf8-react:^1.2
81+
composer require clue/utf8-react:^1.2
8282
```
8383

8484
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -94,13 +94,13 @@ To run the test suite, you first need to clone this repo and then install all
9494
dependencies [through Composer](https://getcomposer.org/):
9595

9696
```bash
97-
$ composer install
97+
composer install
9898
```
9999

100100
To run the test suite, go to the project root and run:
101101

102102
```bash
103-
$ vendor/bin/phpunit
103+
vendor/bin/phpunit
104104
```
105105

106106
## License

composer.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@
1010
"email": "[email protected]"
1111
}
1212
],
13-
"autoload": {
14-
"psr-4": { "Clue\\React\\Utf8\\": "src/" }
15-
},
16-
"autoload-dev": {
17-
"psr-4": { "Clue\\Tests\\React\\Utf8\\": "tests/" }
18-
},
1913
"require": {
2014
"php": ">=5.3",
2115
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3"
2216
},
2317
"require-dev": {
24-
"phpunit/phpunit": "^9.3 ||^5.7 || ^4.8",
18+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
2519
"react/stream": "^1.0 || ^0.7"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"Clue\\React\\Utf8\\": "src/"
24+
}
25+
},
26+
"autoload-dev": {
27+
"psr-4": {
28+
"Clue\\Tests\\React\\Utf8\\": "tests/"
29+
}
2630
}
2731
}

phpunit.xml.dist

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7+
cacheResult="false"
78
colors="true"
8-
cacheResult="false">
9+
convertDeprecationsToExceptions="true">
910
<testsuites>
1011
<testsuite name="Utf8 Test Suite">
1112
<directory>./tests/</directory>
@@ -16,4 +17,7 @@
1617
<directory>./src/</directory>
1718
</include>
1819
</coverage>
20+
<php>
21+
<ini name="error_reporting" value="-1" />
22+
</php>
1923
</phpunit>

phpunit.xml.legacy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"

0 commit comments

Comments
 (0)