Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on PHP 8.2 and update test environment #25

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ on:

jobs:
PHPUnit:
runs-on: ubuntu-latest
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-22.04
strategy:
matrix:
php:
- 8.2
- 8.1
- 8.0
- 7.4
- 7.3
- 7.2
Expand All @@ -20,11 +24,11 @@ jobs:
- 5.4
- 5.3
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- run: composer install
- run: vendor/bin/phpunit --coverage-text
if: ${{ matrix.php >= 7.3 }}
Expand All @@ -33,10 +37,16 @@ jobs:

PHPUnit-hhvm:
name: PHPUnit (HHVM)
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- uses: actions/checkout@v2
- run: curl -O https://dl.hhvm.com/ubuntu/pool/main/h/hhvm/hhvm_3.30.9-1~bionic_amd64.deb
- run: sudo apt install -y --allow-downgrades ./hhvm_3.30.9-1~bionic_amd64.deb
- run: hhvm $(which composer) install
- run: hhvm vendor/bin/phpunit --coverage-text
- uses: actions/checkout@v3
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
- name: Run hhvm composer.phar install
uses: docker://hhvm/hhvm:3.30-lts-latest
with:
args: hhvm composer.phar install
- name: Run hhvm vendor/bin/phpunit
uses: docker://hhvm/hhvm:3.30-lts-latest
with:
args: hhvm vendor/bin/phpunit
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# clue/reactphp-flux

[![CI status](https://github.com/clue/reactphp-flux/workflows/CI/badge.svg)](https://github.com/clue/reactphp-flux/actions)
[![CI status](https://github.com/clue/reactphp-flux/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-flux/actions)
[![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)

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

```

See also the [examples](examples).
See also the [examples](examples/).

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

## Install

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

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

```bash
$ composer require clue/reactphp-flux:^1.3
composer require clue/reactphp-flux:^1.3
```

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

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

## Tests

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

```bash
$ composer install
composer install
```

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

```bash
$ php vendor/bin/phpunit
vendor/bin/phpunit
```

## License
Expand Down
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@
"authors": [
{
"name": "Christian Lück",
"email": "christian@lueck.tv"
"email": "christian@clue.engineering"
}
],
"autoload": {
"psr-4": {
"Clue\\React\\Flux\\": "src"
}
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\Flux\\": "tests/" }
},
"require": {
"php": ">=5.3",
"react/promise": "^2.5 || ^1.2.1",
"react/stream": "^1.2"
},
"require-dev": {
"clue/ndjson-react": "^1.0",
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35",
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/http": "^1.4"
},
"autoload": {
"psr-4": {
"Clue\\React\\Flux\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Clue\\Tests\\React\\Flux\\": "tests/"
}
}
}
12 changes: 8 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResult="false"
colors="true"
cacheResult="false">
convertDeprecationsToExceptions="true">
<testsuites>
<testsuite name="Flux test suite">
<directory>./tests/</directory>
Expand All @@ -16,4 +17,7 @@
<directory>./src/</directory>
</include>
</coverage>
<php>
<ini name="error_reporting" value="-1" />
</php>
</phpunit>
2 changes: 1 addition & 1 deletion phpunit.xml.legacy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

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