diff --git a/.travis.yml b/.travis.yml index b4d0c1c..94975bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,25 @@ language: php php: + - 7.2 - 7.3 - 7.4 + - 8.0snapshot env: + - LARAVEL=^6.0 - LARAVEL=^7.0 - LARAVEL=^8.0 -matrix: - fast_finish: true - allow_failures: - - php: 7.4 - cache: directories: - $HOME/.composer/cache install: - - travis_retry composer install --no-suggest --no-interaction --prefer-dist --no-progress + - travis_retry composer self-update + - travis_retry composer install --no-interaction --prefer-dist --no-progress -script: +script: - ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml after_success: diff --git a/composer.json b/composer.json index 0bb3d4f..f546b2f 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,8 @@ "email": "thomas.manley@generationtux.com" } ], - "minimum-stability": "stable", + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "Gentux\\Healthz\\": "src/" @@ -26,18 +27,18 @@ ] }, "require": { - "php": ">=7.3", + "php": ">=7.2.5", "guzzlehttp/guzzle": "^6.2", "aws/aws-sdk-php": "~3.0", - "illuminate/contracts": "^7.0|^8.0", - "illuminate/database": "^7.0|^8.0", - "illuminate/queue": "^7.0|^8.0", - "illuminate/console": "^7.0|^8.0", + "illuminate/contracts": "^6.0|^7.0|^8.0", + "illuminate/database": "^6.0|^7.0|^8.0", + "illuminate/queue": "^6.0|7.0|^8.0", + "illuminate/console": "^6.0|^7.0|^8.0", "twig/twig": "~1.0" }, "require-dev": { - "phpunit/phpunit": "^8.5", - "mockery/mockery": "^1.2.1", + "phpunit/phpunit": "^8.4|^9.3.3", + "mockery/mockery": "~1.3.3|^1.4.2", "gecko-packages/gecko-memcache-mock": "^1.0" }, "extra": { diff --git a/src/HealthResult.php b/src/HealthResult.php index c2bca4c..c1f402d 100644 --- a/src/HealthResult.php +++ b/src/HealthResult.php @@ -71,9 +71,9 @@ public function title(): string } /** - * @return string + * @return null|string */ - public function description(): string + public function description(): ?string { return $this->check->description(); } diff --git a/src/Support/HealthzServiceProvider.php b/src/Support/HealthzServiceProvider.php index 4659023..aea69e6 100644 --- a/src/Support/HealthzServiceProvider.php +++ b/src/Support/HealthzServiceProvider.php @@ -2,6 +2,7 @@ namespace Gentux\Healthz\Support; use Gentux\Healthz\Healthz; +use Illuminate\Support\Arr; use Illuminate\Support\ServiceProvider; class HealthzServiceProvider extends ServiceProvider @@ -51,8 +52,8 @@ protected function healthzUIHandler() $password = getenv('HEALTHZ_PASSWORD'); if ($username != "") { if ( - array_get($_SERVER, 'PHP_AUTH_USER') !== $username || - array_get($_SERVER, 'PHP_AUTH_PW') !== $password + Arr::get($_SERVER, 'PHP_AUTH_USER') !== $username || + Arr::get($_SERVER, 'PHP_AUTH_PW') !== $password ) { return response('Invalid credentials', 401, ['WWW-Authenticate' => 'Basic']); }