Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix backward compatibility with PHP < 7.4 #265

Open
wants to merge 120 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
67bb99c
Allow adding HTTP headers to requests
antonioribeiro Oct 10, 2020
fecebbe
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
9312b0d
Merge pull request #219 from antonioribeiro/analysis-peVpoW
antonioribeiro Oct 10, 2020
ca80c00
Merge pull request #220 from antonioribeiro/feature/http-headers
antonioribeiro Oct 10, 2020
921fffa
Add SSL certificates checker
antonioribeiro Oct 10, 2020
da185f9
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
9236fe1
Merge pull request #221 from antonioribeiro/analysis-L3DLno
antonioribeiro Oct 10, 2020
a6d0925
Merge pull request #222 from antonioribeiro/feature/ssl-certificates
antonioribeiro Oct 10, 2020
f0ad360
Add URL to error message when HTTP is not able to connect
antonioribeiro Oct 10, 2020
cefdd77
Fix Composer command for Symfony 5
antonioribeiro Oct 10, 2020
87dfde8
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
ae651e4
Merge pull request #223 from antonioribeiro/analysis-1bvD0P
antonioribeiro Oct 10, 2020
b280fbc
Add support for API checks via the HTTP checker and add example
antonioribeiro Oct 10, 2020
11e9a89
Merge branch 'master' of https://github.com/antonioribeiro/health
antonioribeiro Oct 10, 2020
40ff168
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
1a8f21d
Merge pull request #224 from antonioribeiro/analysis-vQRGKg
antonioribeiro Oct 10, 2020
d123fe6
Change key
antonioribeiro Oct 10, 2020
b7c563d
Merge branch 'master' of https://github.com/antonioribeiro/health
antonioribeiro Oct 10, 2020
78d72ca
Allow using URL parameter at the same level of method
antonioribeiro Oct 10, 2020
3f90f1c
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
1634afa
Merge pull request #225 from antonioribeiro/analysis-d0rpEw
antonioribeiro Oct 10, 2020
716fd11
Fix scheduler
antonioribeiro Oct 10, 2020
5c62b4f
Merge branch 'master' of https://github.com/antonioribeiro/health
antonioribeiro Oct 10, 2020
9c92b52
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
c761173
Merge pull request #226 from antonioribeiro/analysis-x04pA0
antonioribeiro Oct 10, 2020
57f347d
Fix assignment on old PHP versions
antonioribeiro Oct 10, 2020
8d3d625
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
ec885fe
Merge pull request #227 from antonioribeiro/analysis-nNlpAy
antonioribeiro Oct 10, 2020
8edb3fd
Fix comma on old PHP versions
antonioribeiro Oct 10, 2020
015f2b4
Merge branch 'master' of https://github.com/antonioribeiro/health
antonioribeiro Oct 10, 2020
92e6f8b
Fix for old PHPs
antonioribeiro Oct 10, 2020
871627c
Apply fixes from StyleCI
antonioribeiro Oct 10, 2020
f155b60
Merge pull request #228 from antonioribeiro/analysis-vQRGjO
antonioribeiro Oct 10, 2020
6432ccb
Add examples
antonioribeiro Oct 10, 2020
a6fea02
Merge branch 'master' of https://github.com/antonioribeiro/health
antonioribeiro Oct 10, 2020
d3a109e
Run openssl s_client to get real information about certificate
antonioribeiro Oct 14, 2020
d74314c
Apply fixes from StyleCI
antonioribeiro Oct 14, 2020
2ef0cb0
Merge pull request #229 from antonioribeiro/analysis-bQyKY4
antonioribeiro Oct 14, 2020
0445b50
Update changelog
antonioribeiro Oct 14, 2020
96264e0
Merge branch 'master' of https://github.com/antonioribeiro/health
antonioribeiro Oct 14, 2020
5c51206
Switch from SweetAlert to SweetAlert2
Oct 15, 2020
72aba02
delete packege-lock.json
Oct 15, 2020
cf27879
Fix Swal import
antonioribeiro Oct 17, 2020
5061e38
Merge pull request #230 from limonte/switch-from-sweetalert-to-sweeta…
antonioribeiro Oct 17, 2020
f137eda
Upgrade packages
antonioribeiro Oct 17, 2020
6475965
Merge branch 'switch-from-sweetalert-to-sweetalert2'
antonioribeiro Oct 17, 2020
ba6b1f5
Fix build badge
antonioribeiro Oct 17, 2020
daeeb29
Improve badges format
antonioribeiro Oct 17, 2020
3ef329a
Update list of checkers
antonioribeiro Oct 17, 2020
48a373c
Update composer.json
qschmick Oct 27, 2020
4b23602
Updated artisan check command to return non-zero exit code on failures
qschmick Oct 27, 2020
63121b5
Updated PHPDOC and styling
qschmick Oct 27, 2020
3d0f767
Arrow functions are only usable in php 7.4; Project is listed as 7.1+
qschmick Oct 27, 2020
50d5bde
fixing stlying
qschmick Oct 27, 2020
d55ae3d
Merge pull request #233 from qschmick/fix/remove-arrow-functions
antonioribeiro Oct 27, 2020
26112b6
Merge pull request #232 from qschmick/chore/artisan-check-exit-code
antonioribeiro Oct 27, 2020
a3d9de0
Merge pull request #231 from qschmick/patch-1
antonioribeiro Oct 27, 2020
d258239
Add new checkers
antonioribeiro Oct 27, 2020
6905b9a
Upgrade packages
antonioribeiro Oct 27, 2020
93f3977
Upgrade to GitHub-native Dependabot
dependabot-preview[bot] Apr 29, 2021
585193a
Add basic support for NPRE standard exit codes
keevan Sep 7, 2021
0aace44
Update State column message to allow for the listing of OK and CRITICAL
keevan Sep 7, 2021
5e939e3
Update format of health:panel display
keevan Sep 7, 2021
a6fd4c7
Update /heath/string with filtering and result status support
keevan Sep 7, 2021
9d6a63a
Add summary web response format by providing a format param to the url
keevan Sep 7, 2021
adf3622
Merge pull request #237 from antonioribeiro/dependabot/add-v2-config-…
antonioribeiro Oct 23, 2021
b62c1a2
Apply fixes from StyleCI
antonioribeiro Oct 23, 2021
ec323c6
Merge pull request #242 from antonioribeiro/analysis-lKAJwW
antonioribeiro Oct 23, 2021
645149d
Merge catalyst-add-npre-supported-return-values
antonioribeiro Oct 23, 2021
4215353
Apply fixes from StyleCI
antonioribeiro Oct 23, 2021
7e2e9c5
Merge pull request #243 from antonioribeiro/analysis-ajA10V
antonioribeiro Oct 23, 2021
42910f0
Add total time to console panel
antonioribeiro Oct 23, 2021
25af9e0
Correctly format total time float
antonioribeiro Oct 23, 2021
de07809
Apply fixes from StyleCI
antonioribeiro Oct 23, 2021
a59ef85
Merge pull request #244 from antonioribeiro/analysis-Vrm9Ng
antonioribeiro Oct 23, 2021
9fb91dd
Merge pull request #245 from antonioribeiro/feature/add-total-time-to…
antonioribeiro Oct 23, 2021
12c6e1b
Refactor Security Check checker to use a new tool
antonioribeiro Oct 23, 2021
16652d2
Apply fixes from StyleCI
antonioribeiro Oct 23, 2021
3b44bc0
Merge pull request #246 from antonioribeiro/analysis-lKAJjJ
antonioribeiro Oct 23, 2021
117bdd0
Merge pull request #247 from antonioribeiro/feature/refactor-security…
antonioribeiro Oct 23, 2021
d083259
Don't try to save nulls to database runtime column
antonioribeiro Oct 23, 2021
4dd807a
Merge pull request #248 from antonioribeiro/fix/empty-elapsed-time
antonioribeiro Oct 23, 2021
1eb18b3
Add checkout.com API checker
antonioribeiro Oct 23, 2021
d0e27c6
Merge pull request #249 from antonioribeiro/feature/add-checkout-com-…
antonioribeiro Oct 23, 2021
83fe1b5
Check for debug mode only on production
antonioribeiro Oct 23, 2021
5dc5eda
Merge pull request #250 from antonioribeiro/feature/debug-mode-produc…
antonioribeiro Oct 23, 2021
55a9979
Fix security issues
antonioribeiro Oct 23, 2021
96e84a1
Merge pull request #251 from antonioribeiro/fix/security-issues
antonioribeiro Oct 23, 2021
81dd70c
Prevent routes registering if they are already cached
Oct 24, 2021
250e593
Merge pull request #252 from antonioribeiro/feature/improve-routes-speed
antonioribeiro Oct 24, 2021
fe0cf5a
Coding style
Oct 24, 2021
9c7d797
Apply fixes from StyleCI
antonioribeiro Oct 24, 2021
816b426
Run tests via Github actions
Oct 24, 2021
593af1f
Disable checkoutcom checks
Oct 24, 2021
0e122bb
Fix tests
Oct 24, 2021
82769a7
Apply fixes from StyleCI
antonioribeiro Oct 24, 2021
e91f644
Merge pull request #254 from antonioribeiro/analysis-nNA9r0
antonioribeiro Oct 24, 2021
e45c3be
Add more PHP versions
Oct 24, 2021
ff08008
Update badge and add PHP 8.1
Oct 24, 2021
616efce
Merge pull request #255 from antonioribeiro/feature/github-actions
antonioribeiro Oct 24, 2021
7159463
Add extensions checker
Oct 25, 2021
3a86dc5
Apply fixes from StyleCI
antonioribeiro Oct 25, 2021
4f749df
Merge pull request #256 from antonioribeiro/analysis-ADn1bl
antonioribeiro Oct 25, 2021
95ef0ae
Merge pull request #257 from antonioribeiro/feature/add-extensions-ch…
antonioribeiro Oct 25, 2021
a153b2d
Add extensions checker
Oct 25, 2021
49db964
Merge pull request #258 from antonioribeiro/feature/add-extensions-ch…
antonioribeiro Oct 25, 2021
0fe128a
Create a Server Vars () checker
Nov 7, 2021
24d7c1a
Apply fixes from StyleCI
antonioribeiro Nov 7, 2021
ba4f31e
Merge pull request #259 from antonioribeiro/analysis-5ZwKd2
antonioribeiro Nov 7, 2021
1823b75
Update readme and changelog
Nov 7, 2021
94f222f
Add more examples
Nov 8, 2021
0554116
Change some key positions
Dec 2, 2021
bd19954
Prevent and notify abnormal errors during resource instantiation
Dec 2, 2021
502ec8e
Apply fixes from StyleCI
antonioribeiro Dec 2, 2021
36dba62
Merge pull request #261 from antonioribeiro/analysis-1bB4GL
antonioribeiro Dec 2, 2021
5ee5cd4
Add MixManifest checker
Dec 2, 2021
a1b7e14
Apply fixes from StyleCI
antonioribeiro Dec 2, 2021
399f1c6
Merge pull request #262 from antonioribeiro/analysis-PxKwRY
antonioribeiro Dec 2, 2021
eff81f2
Add MixManifest
Dec 2, 2021
81b1d35
fix backward compatibility with PHP < 7.4
lintaba Dec 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add URL to error message when HTTP is not able to connect
antonioribeiro committed Oct 10, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit f0ad3605490fca7a696aae7a3c70d80929b40aed
12 changes: 10 additions & 2 deletions src/Checkers/Http.php
Original file line number Diff line number Diff line change
@@ -84,9 +84,17 @@ private function getResourceUrlArray()
*/
private function checkWebPage($url, $ssl = false, $parameters = [])
{
$success = $this->requestSuccessful($url, $ssl, $parameters);
try {
$success = $this->requestSuccessful($url, $ssl, $parameters);

$message = $this->getErrorMessage();
} catch (\Exception $exception) {
$success = false;

$message = "Target: {$url} - ERROR: ".$exception->getMessage();
}

return [$success, $success ? '' : $this->getErrorMessage()];
return [$success, $success ? '' : $message];
}

/**