Skip to content

Commit 9efbb3a

Browse files
authored
Merge pull request #1 from phpsa/patch-1
Patch 1
2 parents 68b91fe + ae0d65b commit 9efbb3a

File tree

4 files changed

+31
-16
lines changed

4 files changed

+31
-16
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Add Kubernetes style health checks to your Craft site.
66

77
## Requirements
88

9-
This plugin requires Craft CMS 3.0.0-beta.23 or later.
9+
This plugin requires Craft CMS 3.x / 4.x
1010

1111
## Installation
1212

@@ -18,7 +18,7 @@ To install the plugin, follow these instructions.
1818

1919
2. Then tell Composer to load the plugin:
2020

21-
composer require mccallister/healthz
21+
composer require customd/healthz
2222

2323
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Healthz.
2424

composer.json

+22-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "mccallister/healthz",
2+
"name": "customd/healthz",
33
"description": "Add health checks to your Craft website, useful when running inside of Docker",
44
"type": "craft-plugin",
55
"keywords": [
@@ -14,29 +14,43 @@
1414
"load balancer"
1515
],
1616
"support": {
17-
"docs": "https://github.com/jasonmccallister/craft-healthz",
18-
"issues": "https://github.com/jasonmccallister/craft-healthz/issues"
17+
"docs": "https://github.com/customd/craft-healthz",
18+
"issues": "https://github.com/customd/craft-healthz/issues"
1919
},
2020
"license": "MIT",
2121
"authors": [{
2222
"name": "Jason McCallister",
2323
"homepage": "https://mccallister.io",
2424
"email": "themccallister@gmail.com"
25-
}],
25+
},
26+
{
27+
"name": "Custom D",
28+
"homepage": "https://customd.com"
29+
}
30+
],
2631
"require": {
27-
"craftcms/cms": "^3.0.0-RC1"
32+
"craftcms/cms": "^3.0.0|^4.0.0"
2833
},
2934
"autoload": {
3035
"psr-4": {
31-
"mccallister\\healthz\\": "src/"
36+
"customd\\healthz\\": "src/"
3237
}
3338
},
3439
"extra": {
3540
"name": "Healthz",
3641
"handle": "healthz",
3742
"hasCpSettings": false,
3843
"hasCpSection": false,
39-
"changelogUrl": "https://raw.githubusercontent.com/jasonmccallister/craft-healthz/master/CHANGELOG.md",
40-
"class": "mccallister\\healthz\\Healthz"
44+
"changelogUrl": "https://raw.githubusercontent.com/customd/craft-healthz/master/CHANGELOG.md",
45+
"class": "cusotmd\\healthz\\Healthz"
46+
},
47+
"require-dev": {
48+
"craftcms/rector": "dev-main"
49+
},
50+
"config": {
51+
"allow-plugins": {
52+
"yiisoft/yii2-composer": true,
53+
"craftcms/plugin-installer": true
54+
}
4155
}
4256
}

src/Healthz.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace mccallister\healthz;
3+
namespace customd\healthz;
44

55
use Craft;
66
use craft\base\Plugin;
@@ -45,7 +45,7 @@ class Healthz extends Plugin
4545
*
4646
* @var string
4747
*/
48-
public $schemaVersion = '1.0.0';
48+
public string $schemaVersion = '1.0.0';
4949

5050
// Public Methods
5151
// =========================================================================

src/controllers/LivenessController.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?php
22

33
/**
4-
* Health Check plugin for Craft CMS 3.x
4+
* Health Check plugin for Craft CMS 4.x
55
*
66
* Add health checks to your Craft website, useful when running inside of Docker
77
*
88
* @link https://mccallister.io
99
* @copyright Copyright (c) 2019 Jason McCallister
1010
*/
1111

12-
namespace mccallister\healthz\controllers;
12+
namespace customd\healthz\controllers;
1313

1414
use Craft;
1515
use craft\web\Controller;
@@ -45,8 +45,9 @@ class LivenessController extends Controller
4545
* The actions must be in 'kebab-case'
4646
* @access protected
4747
*/
48-
protected $allowAnonymous = ['index'];
49-
48+
protected array|int|bool $allowAnonymous = [
49+
'index' => self::ALLOW_ANONYMOUS_LIVE | self::ALLOW_ANONYMOUS_OFFLINE
50+
];
5051
// Public Methods
5152
// =========================================================================
5253

0 commit comments

Comments
 (0)