diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b376f9..431f3be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['7.2', '7.4'] + php: ['7.3', '8.1'] deps: ['lowest', 'stable'] steps: - name: Checkout code diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 78% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 56a26ed..7255150 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -1,22 +1,31 @@ in(__DIR__ . '/spec') +$finder = Finder::create() ->in(__DIR__ . '/src') ->name('*.php') ->ignoreDotFiles(true) ->ignoreVCS(true); -return Config::create() +$config = new Config(); + +return $config ->setRiskyAllowed(true) ->setHideProgress(true) ->setUsingCache(false) ->setRules([ '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true], + 'binary_operator_spaces' => [ + 'operators' => [ + '=' => 'align', + '=>' => 'align', + ], + ], 'blank_line_after_opening_tag' => true, 'blank_line_before_statement' => ['statements' => ['break', 'continue', 'declare', 'try']], 'concat_space' => ['spacing' => 'one'], diff --git a/README.md b/README.md index 4e13fb3..ba5a8cc 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ handled by an HTTP client which is PSR-18 compatible. Behind the scenes, we use GuzzleHTTP, a de-facto industry standard library for HTTP communication. ## Requirements -- PHP 7.x or 8.x +- PHP 7.3 or higher - FACT-FinderĀ® 7.x or FACT-FinderĀ® NG ## License diff --git a/composer.json b/composer.json index 2136a08..3877141 100644 --- a/composer.json +++ b/composer.json @@ -10,16 +10,16 @@ } ], "require": { - "php": ">=7.1||~8.1", + "php": ">=7.3 || ~8.1", "ext-json": "*", "guzzlehttp/guzzle": "^6.3|^7.0", "psr/http-client": "^1.0", "psr/log": "^1.1||^3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.17", + "friendsofphp/php-cs-fixer": "^3.4.0", "phpmd/phpmd": "^2.9", - "phpspec/phpspec": "^6.0" + "phpspec/phpspec": "^7.2" }, "autoload": { "psr-4": { diff --git a/src/Client/ClientBuilder.php b/src/Client/ClientBuilder.php index 4194b21..26226ec 100644 --- a/src/Client/ClientBuilder.php +++ b/src/Client/ClientBuilder.php @@ -62,6 +62,7 @@ public function build(): ClientInterface 'base_uri' => $this->serverUrl, 'handler' => $handler, 'headers' => ['Accept' => 'application/json'], + 'timeout' => 10, 'http_errors' => false, ];