Bump symfony/http-kernel from 4.4.43 to 4.4.50 #1
2
.idea/php.xml
generated
2
.idea/php.xml
generated
@ -35,7 +35,7 @@
|
|||||||
<path value="$PROJECT_DIR$/vendor/symfony/dependency-injection" />
|
<path value="$PROJECT_DIR$/vendor/symfony/dependency-injection" />
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.1">
|
<component name="PhpProjectSharedConfiguration" php_language_level="7.2">
|
||||||
<option name="suggestChangeDefaultLanguageLevel" value="false" />
|
<option name="suggestChangeDefaultLanguageLevel" value="false" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
],
|
],
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1",
|
"php": ">=7.2",
|
||||||
"symfony/framework-bundle": ">=4.3",
|
"symfony/framework-bundle": ">=4.3",
|
||||||
"symfony/flex": "^1.2",
|
"symfony/flex": "^1.2",
|
||||||
"symfony/dependency-injection": "^v4.4",
|
"symfony/dependency-injection": "^v4.4",
|
||||||
|
|||||||
157
composer.lock
generated
157
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "bae2c32dc5a579e2e0c95f32dcf3c86e",
|
"content-hash": "d5477f1164051aeeb67150f3f04a753b",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "geocodio/uptimerobot-api-client",
|
"name": "geocodio/uptimerobot-api-client",
|
||||||
@ -448,16 +448,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/debug",
|
"name": "symfony/debug",
|
||||||
"version": "v4.4.41",
|
"version": "v4.4.44",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/debug.git",
|
"url": "https://github.com/symfony/debug.git",
|
||||||
"reference": "6637e62480b60817b9a6984154a533e8e64c6bd5"
|
"reference": "1a692492190773c5310bc7877cb590c04c2f05be"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5",
|
"url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be",
|
||||||
"reference": "6637e62480b60817b9a6984154a533e8e64c6bd5",
|
"reference": "1a692492190773c5310bc7877cb590c04c2f05be",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -496,7 +496,7 @@
|
|||||||
"description": "Provides tools to ease debugging PHP code",
|
"description": "Provides tools to ease debugging PHP code",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/debug/tree/v4.4.41"
|
"source": "https://github.com/symfony/debug/tree/v4.4.44"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -513,7 +513,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"abandoned": "symfony/error-handler",
|
"abandoned": "symfony/error-handler",
|
||||||
"time": "2022-04-12T15:19:55+00:00"
|
"time": "2022-07-28T16:29:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dependency-injection",
|
"name": "symfony/dependency-injection",
|
||||||
@ -603,7 +603,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v2.5.1",
|
"version": "v2.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
@ -650,7 +650,7 @@
|
|||||||
"description": "A generic function and convention to trigger deprecation notices",
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -670,16 +670,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/error-handler",
|
"name": "symfony/error-handler",
|
||||||
"version": "v4.4.41",
|
"version": "v4.4.44",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/error-handler.git",
|
"url": "https://github.com/symfony/error-handler.git",
|
||||||
"reference": "529feb0e03133dbd5fd3707200147cc4903206da"
|
"reference": "be731658121ef2d8be88f3a1ec938148a9237291"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/529feb0e03133dbd5fd3707200147cc4903206da",
|
"url": "https://api.github.com/repos/symfony/error-handler/zipball/be731658121ef2d8be88f3a1ec938148a9237291",
|
||||||
"reference": "529feb0e03133dbd5fd3707200147cc4903206da",
|
"reference": "be731658121ef2d8be88f3a1ec938148a9237291",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -718,7 +718,7 @@
|
|||||||
"description": "Provides tools to manage errors and ease debugging PHP code",
|
"description": "Provides tools to manage errors and ease debugging PHP code",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/error-handler/tree/v4.4.41"
|
"source": "https://github.com/symfony/error-handler/tree/v4.4.44"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -734,20 +734,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-04-12T15:19:55+00:00"
|
"time": "2022-07-28T16:29:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v4.4.42",
|
"version": "v4.4.44",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
"reference": "708e761740c16b02c86e3f0c932018a06b895d40"
|
"reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40",
|
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1e866e9e5c1b22168e0ce5f0b467f19bba61266a",
|
||||||
"reference": "708e761740c16b02c86e3f0c932018a06b895d40",
|
"reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -802,7 +802,7 @@
|
|||||||
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
|
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42"
|
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.44"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -818,11 +818,11 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-05T15:33:49+00:00"
|
"time": "2022-07-20T09:59:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher-contracts",
|
"name": "symfony/event-dispatcher-contracts",
|
||||||
"version": "v1.1.12",
|
"version": "v1.1.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
||||||
@ -881,7 +881,7 @@
|
|||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.12"
|
"source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.13"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1239,16 +1239,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-client-contracts",
|
"name": "symfony/http-client-contracts",
|
||||||
"version": "v2.5.1",
|
"version": "v2.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-client-contracts.git",
|
"url": "https://github.com/symfony/http-client-contracts.git",
|
||||||
"reference": "1a4f708e4e87f335d1b1be6148060739152f0bd5"
|
"reference": "ba6a9f0e8f3edd190520ee3b9a958596b6ca2e70"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/1a4f708e4e87f335d1b1be6148060739152f0bd5",
|
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ba6a9f0e8f3edd190520ee3b9a958596b6ca2e70",
|
||||||
"reference": "1a4f708e4e87f335d1b1be6148060739152f0bd5",
|
"reference": "ba6a9f0e8f3edd190520ee3b9a958596b6ca2e70",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1297,7 +1297,7 @@
|
|||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-client-contracts/tree/v2.5.1"
|
"source": "https://github.com/symfony/http-client-contracts/tree/v2.5.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1313,20 +1313,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-03-13T20:07:29+00:00"
|
"time": "2022-04-12T15:48:08+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v5.4.10",
|
"version": "v5.4.20",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e"
|
"reference": "d0435363362a47c14e9cf50663cb8ffbf491875a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0435363362a47c14e9cf50663cb8ffbf491875a",
|
||||||
"reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e",
|
"reference": "d0435363362a47c14e9cf50663cb8ffbf491875a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1338,8 +1338,11 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"predis/predis": "~1.0",
|
"predis/predis": "~1.0",
|
||||||
"symfony/cache": "^4.4|^5.0|^6.0",
|
"symfony/cache": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/dependency-injection": "^5.4|^6.0",
|
||||||
"symfony/expression-language": "^4.4|^5.0|^6.0",
|
"symfony/expression-language": "^4.4|^5.0|^6.0",
|
||||||
"symfony/mime": "^4.4|^5.0|^6.0"
|
"symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4",
|
||||||
|
"symfony/mime": "^4.4|^5.0|^6.0",
|
||||||
|
"symfony/rate-limiter": "^5.2|^6.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/mime": "To use the file extension guesser"
|
"symfony/mime": "To use the file extension guesser"
|
||||||
@ -1370,7 +1373,7 @@
|
|||||||
"description": "Defines an object-oriented layer for the HTTP specification",
|
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-foundation/tree/v5.4.10"
|
"source": "https://github.com/symfony/http-foundation/tree/v5.4.20"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1386,20 +1389,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-06-19T13:13:40+00:00"
|
"time": "2023-01-29T11:11:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v4.4.43",
|
"version": "v4.4.50",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "c4c33fb9203e6f166ac0f318ce34e00686702522"
|
"reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/c4c33fb9203e6f166ac0f318ce34e00686702522",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/aa6df6c045f034aa13ac752fc234bb300b9488ef",
|
||||||
"reference": "c4c33fb9203e6f166ac0f318ce34e00686702522",
|
"reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1474,7 +1477,7 @@
|
|||||||
"description": "Provides a structured process for converting a Request into a Response",
|
"description": "Provides a structured process for converting a Request into a Response",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/http-kernel/tree/v4.4.43"
|
"source": "https://github.com/symfony/http-kernel/tree/v4.4.50"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1490,20 +1493,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-06-26T16:51:30+00:00"
|
"time": "2023-02-01T08:01:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.26.0",
|
"version": "v1.27.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
|
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||||
"reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
|
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1518,7 +1521,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.26-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1556,7 +1559,7 @@
|
|||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
|
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1572,20 +1575,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-24T11:49:31+00:00"
|
"time": "2022-11-03T14:55:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.26.0",
|
"version": "v1.27.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
|
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||||
"reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
|
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1600,7 +1603,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.26-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1639,7 +1642,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1655,20 +1658,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-24T11:49:31+00:00"
|
"time": "2022-11-03T14:55:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php73",
|
"name": "symfony/polyfill-php73",
|
||||||
"version": "v1.26.0",
|
"version": "v1.27.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php73.git",
|
"url": "https://github.com/symfony/polyfill-php73.git",
|
||||||
"reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
|
"reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
|
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
|
||||||
"reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
|
"reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1677,7 +1680,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.26-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1718,7 +1721,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
|
"source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1734,20 +1737,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-24T11:49:31+00:00"
|
"time": "2022-11-03T14:55:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php80",
|
"name": "symfony/polyfill-php80",
|
||||||
"version": "v1.26.0",
|
"version": "v1.27.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||||
"reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
|
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
|
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
|
||||||
"reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
|
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1756,7 +1759,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "1.26-dev"
|
"dev-main": "1.27-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/polyfill",
|
"name": "symfony/polyfill",
|
||||||
@ -1801,7 +1804,7 @@
|
|||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
|
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1817,7 +1820,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-10T07:21:04+00:00"
|
"time": "2022-11-03T14:55:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-php81",
|
"name": "symfony/polyfill-php81",
|
||||||
@ -2166,16 +2169,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v5.4.9",
|
"version": "v5.4.19",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "af52239a330fafd192c773795520dc2dd62b5657"
|
"reference": "2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/af52239a330fafd192c773795520dc2dd62b5657",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b",
|
||||||
"reference": "af52239a330fafd192c773795520dc2dd62b5657",
|
"reference": "2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2235,7 +2238,7 @@
|
|||||||
"dump"
|
"dump"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/var-dumper/tree/v5.4.9"
|
"source": "https://github.com/symfony/var-dumper/tree/v5.4.19"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -2251,7 +2254,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-05-21T10:24:18+00:00"
|
"time": "2023-01-16T10:52:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-exporter",
|
"name": "symfony/var-exporter",
|
||||||
@ -2839,7 +2842,7 @@
|
|||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": ">=7.1",
|
"php": ">=7.2",
|
||||||
"ext-json": "*"
|
"ext-json": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
|
|||||||
@ -26,6 +26,8 @@ class Monitor
|
|||||||
const KEYWORD_TYPE_EXIST = 1;
|
const KEYWORD_TYPE_EXIST = 1;
|
||||||
const KEYWORD_TYPE_NOT_EXIST = 2;
|
const KEYWORD_TYPE_NOT_EXIST = 2;
|
||||||
|
|
||||||
|
const ALLOWED_KEYWORK_TYPES = [self::KEYWORD_TYPE_EXIST, self::KEYWORD_TYPE_NOT_EXIST];
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
@ -41,7 +43,7 @@ class Monitor
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
private $subType;
|
private $subType;
|
||||||
|
|
||||||
/** @var string */
|
/** @var int */
|
||||||
private $keywordType;
|
private $keywordType;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
@ -76,18 +78,18 @@ class Monitor
|
|||||||
$monitor->setId($monitorObj->id);
|
$monitor->setId($monitorObj->id);
|
||||||
$monitor->setFriendlyName($monitorObj->friendly_name);
|
$monitor->setFriendlyName($monitorObj->friendly_name);
|
||||||
$monitor->setUrl($monitorObj->url);
|
$monitor->setUrl($monitorObj->url);
|
||||||
$monitor->setType($monitorObj->type);
|
$monitor->setType((int)$monitorObj->type);
|
||||||
$monitor->setSubType($monitorObj->sub_type);
|
$monitor->setSubType($monitorObj->sub_type);
|
||||||
$monitor->setKeywordType($monitorObj->keyword_type);
|
$monitor->setKeywordType((int)$monitorObj->keyword_type);
|
||||||
$monitor->setKeywordValue($monitorObj->keyword_value);
|
$monitor->setKeywordValue($monitorObj->keyword_value);
|
||||||
$monitor->setHttpUsername($monitorObj->http_username);
|
$monitor->setHttpUsername($monitorObj->http_username);
|
||||||
$monitor->setHttpPassword($monitorObj->http_password);
|
$monitor->setHttpPassword($monitorObj->http_password);
|
||||||
$monitor->setPort($monitorObj->port);
|
$monitor->setPort($monitorObj->port);
|
||||||
$monitor->setInterval($monitorObj->interval);
|
$monitor->setInterval((int)$monitorObj->interval);
|
||||||
$monitor->setStatus($monitorObj->status);
|
$monitor->setStatus((int)$monitorObj->status);
|
||||||
|
|
||||||
$date = new \DateTime();
|
$date = new \DateTime();
|
||||||
$date->setTimestamp($monitorObj->create_datetime);
|
$date->setTimestamp((int)$monitorObj->create_datetime);
|
||||||
$monitor->setCreateDatetime($date);
|
$monitor->setCreateDatetime($date);
|
||||||
|
|
||||||
return $monitor;
|
return $monitor;
|
||||||
@ -201,7 +203,7 @@ class Monitor
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getKeywordType(): ?string
|
public function getKeywordType(): ?int
|
||||||
{
|
{
|
||||||
return $this->keywordType;
|
return $this->keywordType;
|
||||||
}
|
}
|
||||||
@ -210,9 +212,11 @@ class Monitor
|
|||||||
* @param string $keywordType
|
* @param string $keywordType
|
||||||
* @return Monitor
|
* @return Monitor
|
||||||
*/
|
*/
|
||||||
public function setKeywordType(?string $keywordType): Monitor
|
public function setKeywordType(?int $keywordType): Monitor
|
||||||
{
|
{
|
||||||
$this->keywordType = $keywordType;
|
if (in_array($keywordType, self::ALLOWED_KEYWORK_TYPES, true)){
|
||||||
|
$this->keywordType = $keywordType;
|
||||||
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,4 +345,9 @@ class Monitor
|
|||||||
$this->createDatetime = $createDatetime;
|
$this->createDatetime = $createDatetime;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getErrors()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -11,3 +11,7 @@ services:
|
|||||||
arguments:
|
arguments:
|
||||||
- '%uptime_robot.credentials.api_key%'
|
- '%uptime_robot.credentials.api_key%'
|
||||||
- '@Symfony\Component\Serializer\SerializerInterface'
|
- '@Symfony\Component\Serializer\SerializerInterface'
|
||||||
|
calls:
|
||||||
|
- setInterval: ['%uptime_robot.configurations.interval%']
|
||||||
|
- setAlertContactsString: ['%uptime_robot.configurations.alert_contacts%']
|
||||||
|
|
||||||
|
|||||||
@ -26,19 +26,21 @@ class UptimeRobotAlertContacsService extends UptimeRobotService
|
|||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse);
|
||||||
|
|
||||||
switch ($response->stat) {
|
if ($response) {
|
||||||
case 'ok':
|
switch ($response->stat) {
|
||||||
|
case 'ok':
|
||||||
|
|
||||||
foreach ($response->alert_contacts as $alert_contact) {
|
foreach ($response->alert_contacts as $alert_contact) {
|
||||||
|
|
||||||
$alertContact = AlertContact::getAlertContactFromResponse($alert_contact);
|
$alertContact = AlertContact::getAlertContactFromResponse($alert_contact);
|
||||||
|
|
||||||
$this->cachedAlertContacts[] = $alertContact;
|
$this->cachedAlertContacts[] = $alertContact;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -66,17 +68,18 @@ class UptimeRobotAlertContacsService extends UptimeRobotService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse);
|
||||||
|
if ($response) {
|
||||||
switch ($response->stat) {
|
switch ($response->stat) {
|
||||||
case 'ok':
|
case 'ok':
|
||||||
$alertContact->setId($response->alertcontact->id);
|
$alertContact->setId($response->alertcontact->id);
|
||||||
return $alertContact;
|
return $alertContact;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,14 +105,16 @@ class UptimeRobotAlertContacsService extends UptimeRobotService
|
|||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse);
|
||||||
|
|
||||||
switch ($response->stat) {
|
if ($response) {
|
||||||
case 'ok':
|
switch ($response->stat) {
|
||||||
$alertContact->setId($response->alert_contact->id);
|
case 'ok':
|
||||||
return $alertContact;
|
$alertContact->setId($response->alert_contact->id);
|
||||||
break;
|
return $alertContact;
|
||||||
default:
|
break;
|
||||||
return false;
|
default:
|
||||||
break;
|
return null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,15 +133,17 @@ class UptimeRobotAlertContacsService extends UptimeRobotService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse);
|
||||||
|
if ($response) {
|
||||||
switch ($response->stat) {
|
switch ($response->stat) {
|
||||||
case 'ok':
|
case 'ok':
|
||||||
return $alertContact;
|
return $alertContact;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return null;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -152,7 +159,7 @@ class UptimeRobotAlertContacsService extends UptimeRobotService
|
|||||||
|
|
||||||
/** @var AlertContact $alertContact */
|
/** @var AlertContact $alertContact */
|
||||||
foreach ($this->cachedAlertContacts as $alertContact) {
|
foreach ($this->cachedAlertContacts as $alertContact) {
|
||||||
if ($alertContact->getId() === $id || $alertContact->getFriendlyName() === $name || $alertContact->getValue() === $value ) {
|
if ($alertContact->getId() === $id || $alertContact->getFriendlyName() === $name || $alertContact->getValue() === $value) {
|
||||||
return $alertContact;
|
return $alertContact;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Pn\UptimeRobotBundle\Service;
|
namespace Pn\UptimeRobotBundle\Service;
|
||||||
|
|
||||||
|
use Pn\UptimeRobotBundle\Model\AlertContact;
|
||||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||||
use Symfony\Component\Serializer\SerializerInterface;
|
use Symfony\Component\Serializer\SerializerInterface;
|
||||||
use Vdhicts\UptimeRobot\Client\Client;
|
use Vdhicts\UptimeRobot\Client\Client;
|
||||||
@ -9,6 +10,14 @@ use Vdhicts\UptimeRobot\Client\Configuration;
|
|||||||
|
|
||||||
class UptimeRobotApiService
|
class UptimeRobotApiService
|
||||||
{
|
{
|
||||||
|
private $apiKey;
|
||||||
|
|
||||||
|
private $interval;
|
||||||
|
|
||||||
|
private $alertContactsString;
|
||||||
|
|
||||||
|
private $alertContacts;
|
||||||
|
|
||||||
/** @var $client */
|
/** @var $client */
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
@ -28,10 +37,30 @@ class UptimeRobotApiService
|
|||||||
|
|
||||||
public function __construct(string $apiKey, SerializerInterface $serializer)
|
public function __construct(string $apiKey, SerializerInterface $serializer)
|
||||||
{
|
{
|
||||||
$configuration = new Configuration($apiKey);
|
$this->apiKey = $apiKey;
|
||||||
|
$configuration = new Configuration($this->apiKey);
|
||||||
|
|
||||||
$this->client = new Client($configuration);
|
$this->client = new Client($configuration);
|
||||||
$this->serializer = $serializer;
|
$this->serializer = $serializer;
|
||||||
|
$this->alertContacts = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if apikey is setted and suppose that api is valid
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isActive()
|
||||||
|
{
|
||||||
|
return !empty($this->apiKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getApiKey(): string
|
||||||
|
{
|
||||||
|
return $this->apiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -50,13 +79,65 @@ class UptimeRobotApiService
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getInterval()
|
||||||
|
{
|
||||||
|
return $this->interval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $interval
|
||||||
|
*/
|
||||||
|
public function setInterval($interval): void
|
||||||
|
{
|
||||||
|
$this->interval = $interval;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $alertContactsString
|
||||||
|
*/
|
||||||
|
public function setAlertContactsString(?string $alertContactsString): void
|
||||||
|
{
|
||||||
|
$this->alertContactsString = $alertContactsString;
|
||||||
|
if (!empty($alertContactsString) && $this->isActive()) {
|
||||||
|
$alertContacts = explode(',', $alertContactsString);
|
||||||
|
|
||||||
|
foreach ($alertContacts as $alertContactName) {
|
||||||
|
if (!empty($alertContactName)) {
|
||||||
|
$alertContact = $this->getAlertContactService()->findbyName($alertContactName);
|
||||||
|
if ($alertContact instanceof AlertContact) {
|
||||||
|
$this->alertContacts[] = $alertContact;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getAlertContacts()
|
||||||
|
{
|
||||||
|
return $this->alertContacts;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $alertContacts
|
||||||
|
*/
|
||||||
|
public function setAlertContacts($alertContacts): void
|
||||||
|
{
|
||||||
|
$this->alertContacts = $alertContacts;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return UptimeRobotMonitorService
|
* @return UptimeRobotMonitorService
|
||||||
*/
|
*/
|
||||||
public function getMonitorService(): UptimeRobotMonitorService
|
public function getMonitorService(): UptimeRobotMonitorService
|
||||||
{
|
{
|
||||||
if (null === $this->monitorService) {
|
if (null === $this->monitorService) {
|
||||||
$this->monitorService = New UptimeRobotMonitorService($this->client);
|
$this->monitorService = new UptimeRobotMonitorService($this->client);
|
||||||
if ($this->io instanceof SymfonyStyle) {
|
if ($this->io instanceof SymfonyStyle) {
|
||||||
$this->monitorService->setIo($this->io);
|
$this->monitorService->setIo($this->io);
|
||||||
}
|
}
|
||||||
@ -70,7 +151,7 @@ class UptimeRobotApiService
|
|||||||
public function getAlertContactService(): UptimeRobotAlertContacsService
|
public function getAlertContactService(): UptimeRobotAlertContacsService
|
||||||
{
|
{
|
||||||
if (null === $this->alertContactService) {
|
if (null === $this->alertContactService) {
|
||||||
$this->alertContactService = New UptimeRobotAlertContacsService($this->client);
|
$this->alertContactService = new UptimeRobotAlertContacsService($this->client);
|
||||||
if ($this->io instanceof SymfonyStyle) {
|
if ($this->io instanceof SymfonyStyle) {
|
||||||
$this->alertContactService->setIo($this->io);
|
$this->alertContactService->setIo($this->io);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ namespace Pn\UptimeRobotBundle\Service;
|
|||||||
|
|
||||||
use Pn\UptimeRobotBundle\Model\AlertContact;
|
use Pn\UptimeRobotBundle\Model\AlertContact;
|
||||||
use Pn\UptimeRobotBundle\Model\Monitor;
|
use Pn\UptimeRobotBundle\Model\Monitor;
|
||||||
|
use Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException;
|
||||||
|
|
||||||
class UptimeRobotMonitorService extends UptimeRobotService
|
class UptimeRobotMonitorService extends UptimeRobotService
|
||||||
{
|
{
|
||||||
@ -26,7 +27,8 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $params
|
* @param array $params
|
||||||
* @return array|bool
|
* @return array
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function getMonitors($params = [])
|
public function getMonitors($params = [])
|
||||||
{
|
{
|
||||||
@ -34,32 +36,38 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$jsonResponse = $this->client->perform(self::GET_MONITORS, $params);
|
$jsonResponse = $this->client->perform(self::GET_MONITORS, $params);
|
||||||
} catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) {
|
} catch (FailedRequestException $exception) {
|
||||||
$this->logError($exception);
|
$this->logError($exception);
|
||||||
|
throw $exception;
|
||||||
}
|
}
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse, false);
|
||||||
|
|
||||||
switch ($response->stat) {
|
if ($response) {
|
||||||
case 'ok':
|
switch ($response->stat) {
|
||||||
foreach ($response->monitors as $monitorObj) {
|
case 'ok':
|
||||||
$monitor = Monitor::getMonitorFromResponse($monitorObj);
|
foreach ($response->monitors as $monitorObj) {
|
||||||
|
$monitor = Monitor::getMonitorFromResponse($monitorObj);
|
||||||
|
|
||||||
$this->cachedMonitors[] = $monitor;
|
$this->cachedMonitors[] = $monitor;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
return false;
|
|
||||||
break;
|
return $this->cachedMonitors;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->cachedMonitors;
|
throw new FailedRequestException($jsonResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Monitor $monitor
|
* @param Monitor $monitor
|
||||||
* @return bool|Monitor
|
* @param array $alertContacts
|
||||||
|
* @param int $threshold
|
||||||
|
* @param int $recurrence
|
||||||
|
* @return Monitor|null
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function create(Monitor $monitor, array $alertContacts, $threshold = 0, $recurrence = 0)
|
public function create(Monitor $monitor, array $alertContacts, int $threshold = 0, int $recurrence = 0): ?Monitor
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$alertContactsString = '';
|
$alertContactsString = '';
|
||||||
@ -89,29 +97,33 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
'mwindows' => ''
|
'mwindows' => ''
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) {
|
} catch (FailedRequestException $exception) {
|
||||||
$this->logError($exception);
|
$this->logError($exception);
|
||||||
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse, false);
|
||||||
|
|
||||||
|
if ($response) {
|
||||||
switch ($response->stat) {
|
switch ($response->stat) {
|
||||||
case 'ok':
|
case 'ok':
|
||||||
$monitor->setId($response->monitor->id);
|
$monitor->setId($response->monitor->id);
|
||||||
return $monitor;
|
return $monitor;
|
||||||
break;
|
default:
|
||||||
default:
|
return null;
|
||||||
return false;
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
throw new FailedRequestException($jsonResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Monitor $oldMonitor
|
* @param Monitor $oldMonitor
|
||||||
* @param Monitor $monitor
|
* @param Monitor $monitor
|
||||||
* @return bool|Monitor
|
* @param array $alertContacts
|
||||||
|
* @param int $threshold
|
||||||
|
* @param int $recurrence
|
||||||
|
* @return Monitor|null
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function update(Monitor $oldMonitor, Monitor $monitor, array $alertContacts, $threshold = 0, $recurrence = 0)
|
public function update(Monitor $oldMonitor, Monitor $monitor, array $alertContacts, $threshold = 0, $recurrence = 0)
|
||||||
{
|
{
|
||||||
@ -138,10 +150,11 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
'interval' => $monitor->getInterval(),
|
'interval' => $monitor->getInterval(),
|
||||||
'http_username' => $monitor->getHttpUsername(),
|
'http_username' => $monitor->getHttpUsername(),
|
||||||
'http_password' => $monitor->getHttpPassword(),
|
'http_password' => $monitor->getHttpPassword(),
|
||||||
'mwindows' => ''
|
'mwindows' => '',
|
||||||
|
'status' => $monitor->getStatus()
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!empty($alertContactsString)){
|
if (!empty($alertContactsString)) {
|
||||||
$params['alert_contacts'] = $alertContactsString;
|
$params['alert_contacts'] = $alertContactsString;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,26 +162,29 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
self::EDIT_MONITOR,
|
self::EDIT_MONITOR,
|
||||||
$params
|
$params
|
||||||
);
|
);
|
||||||
} catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) {
|
} catch (FailedRequestException $exception) {
|
||||||
$this->logError($exception);
|
$this->logError($exception);
|
||||||
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse, false);
|
||||||
|
if ($response) {
|
||||||
|
switch ($response->stat) {
|
||||||
|
case 'ok':
|
||||||
|
$monitor->setId($response->monitor->id);
|
||||||
|
return $monitor;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
|
||||||
switch ($response->stat) {
|
}
|
||||||
case 'ok':
|
|
||||||
$monitor->setId($response->monitor->id);
|
|
||||||
return $monitor;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
throw new FailedRequestException($jsonResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Monitor $monitor
|
* @param Monitor $monitor
|
||||||
* @return bool|Monitor
|
* @return Monitor|null
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function delete(Monitor $monitor)
|
public function delete(Monitor $monitor)
|
||||||
{
|
{
|
||||||
@ -176,25 +192,29 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
$jsonResponse = $this->client->perform(self::DELETE_MONITOR, [
|
$jsonResponse = $this->client->perform(self::DELETE_MONITOR, [
|
||||||
'id' => $monitor->getId()
|
'id' => $monitor->getId()
|
||||||
]);
|
]);
|
||||||
} catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) {
|
} catch (FailedRequestException $exception) {
|
||||||
$this->logError($exception);
|
$this->logError($exception);
|
||||||
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse, false);
|
||||||
|
if ($response) {
|
||||||
|
switch ($response->stat) {
|
||||||
|
case 'ok':
|
||||||
|
return $monitor;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
|
||||||
switch ($response->stat) {
|
}
|
||||||
case 'ok':
|
|
||||||
return $monitor;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw new FailedRequestException($jsonResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Monitor $monitor
|
* @param Monitor $monitor
|
||||||
* @return bool|Monitor
|
* @return Monitor|null
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function reset(Monitor $monitor)
|
public function reset(Monitor $monitor)
|
||||||
{
|
{
|
||||||
@ -202,28 +222,33 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
$jsonResponse = $this->client->perform(self::RESET_MONITOR, [
|
$jsonResponse = $this->client->perform(self::RESET_MONITOR, [
|
||||||
'id' => $monitor->getId()
|
'id' => $monitor->getId()
|
||||||
]);
|
]);
|
||||||
} catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) {
|
} catch (FailedRequestException $exception) {
|
||||||
$this->logError($exception);
|
$this->logError($exception);
|
||||||
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = json_decode($jsonResponse);
|
$response = json_decode($jsonResponse, false);
|
||||||
|
if ($response) {
|
||||||
switch ($response->stat) {
|
switch ($response->stat) {
|
||||||
case 'ok':
|
case 'ok':
|
||||||
return $monitor;
|
return $monitor;
|
||||||
break;
|
default:
|
||||||
default:
|
return null;
|
||||||
return false;
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw new FailedRequestException($jsonResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $id
|
* @param null $id
|
||||||
|
* @param null $name
|
||||||
|
* @param null $url
|
||||||
* @param bool $forceRefresh
|
* @param bool $forceRefresh
|
||||||
* @return mixed|Monitor|null
|
* @return Monitor|null
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function find($id = null, $name = null, $url = null, $forceRefresh = false)
|
public function find($id = null, $name = null, $url = null, bool $forceRefresh = false)
|
||||||
{
|
{
|
||||||
if (empty($this->cachedMonitors) || $forceRefresh) {
|
if (empty($this->cachedMonitors) || $forceRefresh) {
|
||||||
$this->getMonitors();
|
$this->getMonitors();
|
||||||
@ -244,9 +269,10 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
* @param $url
|
* @param $url
|
||||||
* @param int $type
|
* @param int $type
|
||||||
* @param bool $forceRefresh
|
* @param bool $forceRefresh
|
||||||
* @return mixed|Monitor|null
|
* @return Monitor|null
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function findOneByURLAndType($url, $type = Monitor::TYPE_HTTP, $forceRefresh = false)
|
public function findOneByURLAndType($url, int $type = Monitor::TYPE_HTTP, bool $forceRefresh = false)
|
||||||
{
|
{
|
||||||
if (empty($this->cachedMonitors) || $forceRefresh) {
|
if (empty($this->cachedMonitors) || $forceRefresh) {
|
||||||
$this->getMonitors();
|
$this->getMonitors();
|
||||||
@ -264,9 +290,13 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Monitor $monitor
|
* @param Monitor $monitor
|
||||||
* @return bool|mixed|Monitor
|
* @param array $alertContacts
|
||||||
|
* @param int $threshold
|
||||||
|
* @param int $recurrence
|
||||||
|
* @return null|Monitor
|
||||||
|
* @throws FailedRequestException
|
||||||
*/
|
*/
|
||||||
public function createOrUpdate(Monitor $monitor, array $alertContacts, $threshold = 0, $recurrence = 0)
|
public function createOrUpdate(Monitor $monitor, array $alertContacts, int $threshold = 0, int $recurrence = 0)
|
||||||
{
|
{
|
||||||
if ($monitor->isValidObjectForCreate()) {
|
if ($monitor->isValidObjectForCreate()) {
|
||||||
|
|
||||||
@ -274,11 +304,11 @@ class UptimeRobotMonitorService extends UptimeRobotService
|
|||||||
|
|
||||||
if ($foundMonitor instanceof Monitor) {
|
if ($foundMonitor instanceof Monitor) {
|
||||||
return $this->update($foundMonitor, $monitor, $alertContacts, $threshold, $recurrence);
|
return $this->update($foundMonitor, $monitor, $alertContacts, $threshold, $recurrence);
|
||||||
} else {
|
|
||||||
return $this->create($monitor, $alertContacts, $threshold, $recurrence);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return $monitor->getErrors();
|
return $this->create($monitor, $alertContacts, $threshold, $recurrence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user