Skip to content

Commit cff1c7b

Browse files
authored
Merge pull request #36 from SimonFrings/php8
Support PHP 8.1 and minor clean up
2 parents a598769 + a6fd471 commit cff1c7b

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

.github/workflows/ci.yml

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

77
jobs:
88
PHPUnit:
9-
runs-on: ubuntu-latest
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-20.04
1011
strategy:
1112
matrix:
1213
php:
14+
- 8.1
1315
- 8.0
1416
- 7.4
1517
- 7.3
@@ -22,10 +24,10 @@ jobs:
2224
- 5.3
2325
steps:
2426
- uses: actions/checkout@v2
25-
- name: Setup PHP
26-
uses: shivammathur/setup-php@v2
27+
- uses: shivammathur/setup-php@v2
2728
with:
2829
php-version: ${{ matrix.php }}
30+
coverage: xdebug
2931
- run: composer install
3032
- run: vendor/bin/phpunit --coverage-text
3133
if: ${{ matrix.php >= 7.3 }}
@@ -35,6 +37,7 @@ jobs:
3537
PHPUnit-hhvm:
3638
name: PHPUnit (HHVM)
3739
runs-on: ubuntu-18.04
40+
continue-on-error: true
3841
steps:
3942
- uses: actions/checkout@v2
4043
- uses: azjezz/setup-hhvm@v1

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ $connector->connect('www.google.com:80')->then(function ($stream) {
6262
Because everything uses the same simple API, the resulting `Connector` classes can be easily interchanged
6363
and be used in places that expect the normal `ConnectorInterface`. This can be used to stack them into each other,
6464
like using [timeouts](#timeout) for TCP connections, [delaying](#delay) SSL/TLS connections,
65-
[retrying](#repeat) failed connection attemps, [randomly](#random) picking a `Connector` or
65+
[retrying](#repeat) failed connection attempts, [randomly](#random) picking a `Connector` or
6666
any combination thereof.
6767

6868
## Usage
6969

70-
This section lists all this libraries' features along with some examples.
70+
This section lists all features of this library along with some examples.
7171
The examples assume you've [installed](#install) this library and
7272
already [set up a `Socket/Connector` instance `$connector`](https://github.com/reactphp/socket#connector).
7373

@@ -148,7 +148,7 @@ simplify exchanging the actual `ConnectionManager` during runtime (`->setConnect
148148

149149
### Consecutive
150150

151-
The `ConnectionManagerConsecutive($connectors)` establishs connections by trying to connect through
151+
The `ConnectionManagerConsecutive($connectors)` establishes connections by trying to connect through
152152
any of the given `ConnectionManager`s in consecutive order until the first one succeeds.
153153

154154
```php
@@ -186,7 +186,7 @@ $concurrent = new ConnectionManagerConcurrent(array(
186186

187187
The `ConnectionManagerSelective($connectors)` manages a list of `Connector`s and
188188
forwards each connection through the first matching one.
189-
This can be used to implement networking access control lists (ACLs) or firewill
189+
This can be used to implement networking access control lists (ACLs) or firewall
190190
rules like a blacklist or whitelist.
191191

192192
This allows fine-grained control on how to handle outgoing connections, like
@@ -247,7 +247,7 @@ Passing anything else will result in an `InvalidArgumentException`.
247247

248248
## Install
249249

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

253253
This project follows [SemVer](https://semver.org/).
@@ -262,12 +262,12 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
262262
This project aims to run on any platform and thus does not require any PHP
263263
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
264264
HHVM.
265-
It's *highly recommended to use PHP 7+* for this project.
265+
It's *highly recommended to use the latest supported PHP version* for this project.
266266

267267
## Tests
268268

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

272272
```bash
273273
$ composer install
@@ -276,7 +276,7 @@ $ composer install
276276
To run the test suite, go to the project root and run:
277277

278278
```bash
279-
$ php vendor/bin/phpunit
279+
$ vendor/bin/phpunit
280280
```
281281

282282
## License

phpunit.xml.dist

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7+
cacheResult="false"
78
colors="true"
8-
cacheResult="false">
9+
convertDeprecationsToExceptions="true">
910
<testsuites>
1011
<testsuite name="Connection-Manager-Extra 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>

0 commit comments

Comments
 (0)