Skip to content

Commit bc0a87f

Browse files
authored
Merge pull request #36 from clue-labs/php8.2
Test on PHP 8.2 and update test environment
2 parents f9c0b6c + c2f0679 commit bc0a87f

File tree

5 files changed

+41
-28
lines changed

5 files changed

+41
-28
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: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# clue/reactphp-term
22

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

66
Streaming terminal emulator, built on top of [ReactPHP](https://reactphp.org/).
@@ -115,37 +115,36 @@ $stream->on('c0', function ($code) {
115115

116116
## Install
117117

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

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

124124
```bash
125-
$ composer require clue/term-react:^1.3
126-
125+
composer require clue/term-react:^1.3
127126
```
128127

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

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

136135
## Tests
137136

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

141140
```bash
142-
$ composer install
141+
composer install
143142
```
144143

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

147146
```bash
148-
$ php vendor/bin/phpunit
147+
vendor/bin/phpunit
149148
```
150149

151150
## 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\\Term\\": "src/" }
15-
},
16-
"autoload-dev": {
17-
"psr-4": { "Clue\\Tests\\React\\Term\\": "tests/" }
18-
},
1913
"require": {
2014
"php": ">=5.3",
2115
"react/stream": "^1.2"
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/event-loop": "^1.2"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"Clue\\React\\Term\\": "src/"
24+
}
25+
},
26+
"autoload-dev": {
27+
"psr-4": {
28+
"Clue\\Tests\\React\\Term\\": "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="Term 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)