Skip to content

Commit

Permalink
Merge pull request #292 from jeremykendall/develop
Browse files Browse the repository at this point in the history
create 5.7.2 release
  • Loading branch information
nyamsprod authored Oct 26, 2020
2 parents d9775db + 0000075 commit a2f61eb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 21 deletions.
23 changes: 8 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,42 @@ matrix:
include:
- php: 7.2
env:
- COLLECT_COVERAGE=false
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --prefer-lowest --prefer-stable"
- RUN_PHPSTAN=false
- VALIDATE_CODING_STYLE=false
- php: 7.2
env:
- COLLECT_COVERAGE=true
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
- RUN_PHPSTAN=true
- VALIDATE_CODING_STYLE=true
- RUN_PHPSTAN=false
- VALIDATE_CODING_STYLE=false
- php: 7.3
env:
- COLLECT_COVERAGE=false
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --prefer-lowest --prefer-stable"
- RUN_PHPSTAN=false
- VALIDATE_CODING_STYLE=false
- php: 7.3
env:
- COLLECT_COVERAGE=true
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
- RUN_PHPSTAN=true
- VALIDATE_CODING_STYLE=true
- RUN_PHPSTAN=false
- VALIDATE_CODING_STYLE=false
- php: 7.4
env:
- COLLECT_COVERAGE=false
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --prefer-lowest --prefer-stable"
- RUN_PHPSTAN=false
- VALIDATE_CODING_STYLE=false
- php: 7.4
env:
- COLLECT_COVERAGE=true
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
- RUN_PHPSTAN=true
- VALIDATE_CODING_STYLE=true
- php: nightly
env:
- COLLECT_COVERAGE=false
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source --ignore-platform-reqs"
- COMPOSER_ARGS="--no-interaction --no-suggest --prefer-source"
- RUN_PHPSTAN=false
- VALIDATE_CODING_STYLE=false
install:
- composer remove --no-interaction --no-update --dev "friendsofphp/php-cs-fixer"
- travis_retry composer update $COMPOSER_ARGS
allow_failures:
- php: nightly
fast_finish: true
Expand All @@ -58,6 +54,3 @@ script:
- if [ "$VALIDATE_CODING_STYLE" == "true" ]; then composer phpcs; fi
- if [ "$RUN_PHPSTAN" == "true" ]; then composer phpstan; fi
- composer phpunit
after_script:
- if [ "$COLLECT_COVERAGE" == "true" ]; then wget https://scrutinizer-ci.com/ocular.phar
&& php ocular.phar code-coverage:upload --format=php-clover build/clover.xml; fi
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

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

## 5.7.2 - 2020-10-25

### Added

- None

### Fixed

- Added support for PHP8 see [#289](https://github.com/jeremykendall/php-domain-parser/pull/289) based on works by [@szepeviktor](https://github.com/szepeviktor)

### Deprecated

- None

### Removed

- None

## 5.7.1 - 2020-08-24

### Added
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ If the Domain is not resolved or in case of error a null `Pdp\Domain` is returne
~~~php
<?php

use Pdp\Rules;use Pdp\TopLevelDomains;
use Pdp\Rules;
use Pdp\TopLevelDomains;

$rules = Rules::createFromPath('/path/to/mozilla/public-suffix.dat'); //$rules is a Pdp\Rules object

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
"psl"
],
"require": {
"php": "^7.2.5",
"ext-intl": "*",
"ext-json": "*",
"php": "^7.2.5 || ^8.0",
"psr/log": "^1.1",
"psr/simple-cache": "^1.0.1"
},
"require-dev": {
"composer/composer": "^1.6",
"composer/composer": "^1.6 || ^2.0",
"friendsofphp/php-cs-fixer": "^2.16",
"mikey179/vfsstream": "^1.6.7",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^8.0 || ^9.3"
},
"suggest": {
"psr/simple-cache-implementation": "To enable using other cache providers",
Expand Down
10 changes: 8 additions & 2 deletions src/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace Pdp;

use Throwable;
use function curl_close;
use function curl_errno;
use function curl_error;
Expand Down Expand Up @@ -52,8 +53,13 @@ public function __construct(array $options = [])
CURLOPT_HTTPGET => true,
];

$curl = curl_init();
$res = @curl_setopt_array($curl, $this->options);
try {
$curl = curl_init();
$res = @curl_setopt_array($curl, $this->options);
} catch (Throwable $exception) {
throw new Exception('Please verify your curl additionnal options', $exception->getCode(), $exception);
}

curl_close($curl);
if (!$res) {
throw new Exception('Please verify your curl additionnal options');
Expand Down

0 comments on commit a2f61eb

Please sign in to comment.