Skip to content

Commit f498d95

Browse files
authored
Merge pull request #289 from jeremykendall/feature/support-php8
Adding PHP8 support to v5 using @szepeviktor fix
2 parents 6f9b59e + 212270e commit f498d95

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ matrix:
4444
- php: nightly
4545
env:
4646
- COLLECT_COVERAGE=false
47-
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --ignore-platform-reqs"
47+
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
4848
- RUN_PHPSTAN=false
4949
- VALIDATE_CODING_STYLE=false
50+
install:
51+
- composer remove --no-interaction --no-update --dev "friendsofphp/php-cs-fixer"
52+
- travis_retry composer require $COMPOSER_ARGS --no-update --dev "composer/composer:2.0.x-dev"
53+
- travis_retry composer require $COMPOSER_ARGS --no-update --dev "phpunit/phpunit:^9.3.11"
54+
- travis_retry composer update $COMPOSER_ARGS
5055
allow_failures:
5156
- php: nightly
5257
fast_finish: true

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All Notable changes to `PHP Domain Parser` **5.x** series will be documented in this file
44

5+
## 5.7.2 - 2020-10-25
6+
7+
### Added
8+
9+
- None
10+
11+
### Fixed
12+
13+
- Added support for PHP8 see [#289](https://github.com/jeremykendall/php-domain-parser/pull/289) based on works by [@szepeviktor](https://github.com/szepeviktor)
14+
15+
### Deprecated
16+
17+
- None
18+
19+
### Removed
20+
21+
- None
22+
523
## 5.7.1 - 2020-08-24
624

725
### Added

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
"psl"
4444
],
4545
"require": {
46-
"php": "^7.2.5",
4746
"ext-intl": "*",
4847
"ext-json": "*",
48+
"php": "^7.2.5 || ^8.0",
4949
"psr/log": "^1.1",
5050
"psr/simple-cache": "^1.0.1"
5151
},

src/CurlHttpClient.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
namespace Pdp;
1717

18+
use Throwable;
1819
use function curl_close;
1920
use function curl_errno;
2021
use function curl_error;
@@ -52,8 +53,13 @@ public function __construct(array $options = [])
5253
CURLOPT_HTTPGET => true,
5354
];
5455

55-
$curl = curl_init();
56-
$res = @curl_setopt_array($curl, $this->options);
56+
try {
57+
$curl = curl_init();
58+
$res = @curl_setopt_array($curl, $this->options);
59+
} catch (Throwable $exception) {
60+
throw new Exception('Please verify your curl additionnal options', $exception->getCode(), $exception);
61+
}
62+
5763
curl_close($curl);
5864
if (!$res) {
5965
throw new Exception('Please verify your curl additionnal options');

0 commit comments

Comments
 (0)