Skip to content

Commit d9681b1

Browse files
authored
Merge pull request #222 from SimonFrings/php7.1
Update to require PHP 7.1+
2 parents aa26641 + 8db0cb5 commit d9681b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+767
-800
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ jobs:
1919
- 7.3
2020
- 7.2
2121
- 7.1
22-
- 7.0
23-
- 5.6
24-
- 5.5
25-
- 5.4
26-
- 5.3
2722
steps:
2823
- uses: actions/checkout@v4
2924
- uses: shivammathur/setup-php@v2
@@ -50,19 +45,3 @@ jobs:
5045
ini-file: development
5146
- run: composer install
5247
- run: vendor/bin/phpunit --coverage-text
53-
54-
PHPUnit-hhvm:
55-
name: PHPUnit (HHVM)
56-
runs-on: ubuntu-22.04
57-
continue-on-error: true
58-
steps:
59-
- uses: actions/checkout@v4
60-
- run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM
61-
- name: Run hhvm composer.phar install
62-
uses: docker://hhvm/hhvm:3.30-lts-latest
63-
with:
64-
args: hhvm composer.phar install
65-
- name: Run hhvm vendor/bin/phpunit
66-
uses: docker://hhvm/hhvm:3.30-lts-latest
67-
with:
68-
args: hhvm vendor/bin/phpunit

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ composer require react/dns:^3@dev
424424
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
425425

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

431430
## Tests

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
}
2727
],
2828
"require": {
29-
"php": ">=5.3.0",
29+
"php": ">=7.1",
3030
"react/cache": "^1.0 || ^0.6 || ^0.5",
3131
"react/event-loop": "^1.2",
3232
"react/promise": "^3.0 || ^2.7 || ^1.2.1"
3333
},
3434
"require-dev": {
35-
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
35+
"phpunit/phpunit": "^9.6 || ^7.5",
3636
"react/async": "^4 || ^3 || ^2",
3737
"react/promise-timer": "^1.9"
3838
},

examples/01-one.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
$factory = new Factory();
1414
$resolver = $factory->create($config);
1515

16-
$name = isset($argv[1]) ? $argv[1] : 'www.google.com';
16+
$name = $argv[1] ?? 'www.google.com';
1717

1818
$resolver->resolve($name)->then(function ($ip) use ($name) {
1919
echo 'IP for ' . $name . ': ' . $ip . PHP_EOL;

examples/02-concurrent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
$names = array_slice($argv, 1);
1717
if (!$names) {
18-
$names = array('google.com', 'www.google.com', 'gmail.com');
18+
$names = ['google.com', 'www.google.com', 'gmail.com'];
1919
}
2020

2121
foreach ($names as $name) {

examples/03-cached.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$factory = new Factory();
1515
$resolver = $factory->createCached($config);
1616

17-
$name = isset($argv[1]) ? $argv[1] : 'www.google.com';
17+
$name = $argv[1] ?? 'www.google.com';
1818

1919
$resolver->resolve($name)->then(function ($ip) use ($name) {
2020
echo 'IP for ' . $name . ': ' . $ip . PHP_EOL;

examples/11-all-ips.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$factory = new Factory();
1515
$resolver = $factory->create($config);
1616

17-
$name = isset($argv[1]) ? $argv[1] : 'www.google.com';
17+
$name = $argv[1] ?? 'www.google.com';
1818

1919
$resolver->resolveAll($name, Message::TYPE_A)->then(function (array $ips) use ($name) {
2020
echo 'IPv4 addresses for ' . $name . ': ' . implode(', ', $ips) . PHP_EOL;

examples/12-all-types.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
$factory = new Factory();
1717
$resolver = $factory->create($config);
1818

19-
$name = isset($argv[1]) ? $argv[1] : 'google.com';
20-
$type = constant('React\Dns\Model\Message::TYPE_' . (isset($argv[2]) ? $argv[2] : 'TXT'));
19+
$name = $argv[1] ?? 'google.com';
20+
$type = constant('React\Dns\Model\Message::TYPE_' . ($argv[2] ?? 'TXT'));
2121

2222
$resolver->resolveAll($name, $type)->then(function (array $values) {
2323
var_dump($values);

examples/13-reverse-dns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$factory = new Factory();
1515
$resolver = $factory->create($config);
1616

17-
$ip = isset($argv[1]) ? $argv[1] : '8.8.8.8';
17+
$ip = $argv[1] ?? '8.8.8.8';
1818

1919
if (@inet_pton($ip) === false) {
2020
exit('Error: Given argument is not a valid IP' . PHP_EOL);

examples/91-query-a-and-aaaa.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
$executor = new UdpTransportExecutor('8.8.8.8:53');
1111

12-
$name = isset($argv[1]) ? $argv[1] : 'www.google.com';
12+
$name = $argv[1] ?? 'www.google.com';
1313

1414
$ipv4Query = new Query($name, Message::TYPE_A, Message::CLASS_IN);
1515
$ipv6Query = new Query($name, Message::TYPE_AAAA, Message::CLASS_IN);

0 commit comments

Comments
 (0)