Skip to content

Commit

Permalink
Merge pull request #6 from ARCANEDEV/php-8-support
Browse files Browse the repository at this point in the history
Adding PHP 8.0 support
  • Loading branch information
arcanedev-maroc authored Dec 1, 2020
2 parents b45794b + 158e9ae commit 0ef0b6a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.3, 7.4]
php: [7.3, 7.4, 8.0]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
Expand All @@ -35,9 +35,10 @@ jobs:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: none
tools: composer:v2

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction

- name: Execute tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ checks:
tools:
external_code_coverage:
timeout: 600
runs: 4
runs: 6
php_code_sniffer:
enabled: true
config:
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.3",
"php": "^7.3|^8.0",
"ext-json": "*",
"ext-zip": "*",
"arcanedev/support": "^8.0",
"league/flysystem": "^1.0.49"
"league/flysystem": "^1.1"
},
"require-dev": {
"laravel/slack-notification-channel": "^2.2",
"aws/aws-sdk-php": "^3.155",
"laravel/slack-notification-channel": "^2.3",
"league/flysystem-aws-s3-v3": "^1.0.1",
"mockery/mockery": "^1.3.1",
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.3"
"mockery/mockery": "^1.4.2",
"orchestra/testbench": "^6.4",
"phpunit/phpunit": "^9.3.3"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 5 additions & 7 deletions src/Database/DbDumperManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,12 @@ protected function createDumper(string $class, array $config): AbstractDumper
*/
protected function parseConfig(string $connection): array
{
try {
$config = (new ConfigurationUrlParser)->parseConfiguration(
$this->app['config']->get("database.connections.{$connection}")
);
}
catch (Exception $e) {
$config = $this->app['config']->get("database.connections.{$connection}");

if (is_null($config))
throw CannotCreateDbDumper::unsupportedDriver($connection, static::SUPPORTED_DRIVERS);
}

$config = (new ConfigurationUrlParser)->parseConfiguration($config);

if (isset($config['read'])) {
$config = Arr::except(
Expand Down

0 comments on commit 0ef0b6a

Please sign in to comment.