Skip to content

Commit

Permalink
Merge branch 'master' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
tortuetorche authored Nov 30, 2020
2 parents e1df828 + b044a1d commit 1c65fa3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"email": "[email protected]"
}
],
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Gentux\\Healthz\\": "src/"
Expand All @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions src/HealthResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
5 changes: 3 additions & 2 deletions src/Support/HealthzServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Gentux\Healthz\Support;

use Gentux\Healthz\Healthz;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;

class HealthzServiceProvider extends ServiceProvider
Expand Down Expand Up @@ -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']);
}
Expand Down

0 comments on commit 1c65fa3

Please sign in to comment.