Skip to content

Commit 3ea74b3

Browse files
authored
Merge pull request #25 from clue-labs/php8.2
Test on PHP 8.2 and update test environment
2 parents a37a12b + 988ba38 commit 3ea74b3

File tree

5 files changed

+51
-34
lines changed

5 files changed

+51
-34
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ on:
66

77
jobs:
88
PHPUnit:
9-
runs-on: ubuntu-latest
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-22.04
1011
strategy:
1112
matrix:
1213
php:
14+
- 8.2
15+
- 8.1
16+
- 8.0
1317
- 7.4
1418
- 7.3
1519
- 7.2
@@ -20,11 +24,11 @@ jobs:
2024
- 5.4
2125
- 5.3
2226
steps:
23-
- uses: actions/checkout@v2
24-
- name: Setup PHP
25-
uses: shivammathur/setup-php@v2
27+
- uses: actions/checkout@v3
28+
- uses: shivammathur/setup-php@v2
2629
with:
2730
php-version: ${{ matrix.php }}
31+
coverage: xdebug
2832
- run: composer install
2933
- run: vendor/bin/phpunit --coverage-text
3034
if: ${{ matrix.php >= 7.3 }}
@@ -33,10 +37,16 @@ jobs:
3337

3438
PHPUnit-hhvm:
3539
name: PHPUnit (HHVM)
36-
runs-on: ubuntu-18.04
40+
runs-on: ubuntu-22.04
41+
continue-on-error: true
3742
steps:
38-
- uses: actions/checkout@v2
39-
- run: curl -O https://dl.hhvm.com/ubuntu/pool/main/h/hhvm/hhvm_3.30.9-1~bionic_amd64.deb
40-
- run: sudo apt install -y --allow-downgrades ./hhvm_3.30.9-1~bionic_amd64.deb
41-
- run: hhvm $(which composer) install
42-
- run: hhvm vendor/bin/phpunit --coverage-text
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
47+
with:
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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# clue/reactphp-flux
22

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

66
Flux, the lightweight stream processor to concurrently do many (but not too many) things at once,
@@ -117,7 +117,7 @@ $transformer->on('error', 'printf');
117117

118118
```
119119

120-
See also the [examples](examples).
120+
See also the [examples](examples/).
121121

122122
By changing the `$concurrency` parameter, you can see how processing this list
123123
without concurrency takes near `4s`, while using a concurrency setting of `5`
@@ -651,36 +651,36 @@ all operations in memory without using a streaming approach.
651651

652652
## Install
653653

654-
The recommended way to install this library is [through Composer](https://getcomposer.org).
654+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
655655
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
656656

657657
This project follows [SemVer](https://semver.org/).
658658
This will install the latest supported version:
659659

660660
```bash
661-
$ composer require clue/reactphp-flux:^1.3
661+
composer require clue/reactphp-flux:^1.3
662662
```
663663

664664
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
665665

666666
This project aims to run on any platform and thus does not require any PHP
667-
extensions and supports running on legacy PHP 5.3 through current PHP 7+ and
667+
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
668668
HHVM.
669-
It's *highly recommended to use PHP 7+* for this project.
669+
It's *highly recommended to use the latest supported PHP version* for this project.
670670

671671
## Tests
672672

673673
To run the test suite, you first need to clone this repo and then install all
674-
dependencies [through Composer](https://getcomposer.org):
674+
dependencies [through Composer](https://getcomposer.org/):
675675

676676
```bash
677-
$ composer install
677+
composer install
678678
```
679679

680680
To run the test suite, go to the project root and run:
681681

682682
```bash
683-
$ php vendor/bin/phpunit
683+
vendor/bin/phpunit
684684
```
685685

686686
## License

composer.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,27 @@
77
"authors": [
88
{
99
"name": "Christian Lück",
10-
"email": "christian@lueck.tv"
10+
"email": "christian@clue.engineering"
1111
}
1212
],
13-
"autoload": {
14-
"psr-4": {
15-
"Clue\\React\\Flux\\": "src"
16-
}
17-
},
18-
"autoload-dev": {
19-
"psr-4": { "Clue\\Tests\\React\\Flux\\": "tests/" }
20-
},
2113
"require": {
14+
"php": ">=5.3",
2215
"react/promise": "^2.5 || ^1.2.1",
2316
"react/stream": "^1.2"
2417
},
2518
"require-dev": {
2619
"clue/ndjson-react": "^1.0",
27-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35",
20+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
2821
"react/http": "^1.4"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Clue\\React\\Flux\\": "src/"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"Clue\\Tests\\React\\Flux\\": "tests/"
31+
}
2932
}
3033
}

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="Flux 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)