Skip to content

Commit

Permalink
Support PHP 8.0 (#18)
Browse files Browse the repository at this point in the history
* Update composer.json

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update tests.yml

* Update UpdateDisposableDomainsCommand.php

* Update composer.json
  • Loading branch information
Propaganistas authored Dec 1, 2020
1 parent ec9be39 commit 568887f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
php: [7.2, 7.3, 7.4, 8.0]
laravel: [6.*, 7.*, 8.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
Expand All @@ -37,6 +37,11 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, json, intl, libxml, mbstring, pdo, pdo_sqlite, sqlite

- name: Setup Problem Matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Cache dependencies
uses: actions/cache@v1
Expand All @@ -48,9 +53,6 @@ jobs:
run: |
composer require "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest --no-progress
- name: Configure matchers
uses: mheap/phpunit-matcher-action@master
- name: Execute tests
run: vendor/bin/phpunit --teamcity
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=7.1|^8.0",
"illuminate/cache": "^6.0|^7.0|^8.0",
"illuminate/config": "^6.0|^7.0|^8.0",
"illuminate/contracts": "^6.0|^7.0|^8.0",
Expand All @@ -27,7 +27,7 @@
"illuminate/validation": "^6.0|^7.0|^8.0"
},
"require-dev": {
"mockery/mockery": "*",
"mockery/mockery": "^1.3.3|^1.4.2",
"phpunit/phpunit": "*",
"orchestra/testbench": "*"
},
Expand Down
5 changes: 5 additions & 0 deletions src/Console/UpdateDisposableDomainsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public function handle(DisposableDomains $disposable)
protected function fetchFromSource()
{
$sourceUrl = $this->config->get('disposable-email.source');

if (! $sourceUrl) {
$this->error('Source URL is null.');
return false;
}

try {
$content = file_get_contents($sourceUrl);
Expand Down

0 comments on commit 568887f

Please sign in to comment.