From 918584c35b90da9dbed39ab9ae9798af17756745 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Thu, 21 Jul 2022 17:53:50 +0200 Subject: [PATCH 01/15] add isActive in UptimeRobotApiService --- src/Service/UptimeRobotApiService.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Service/UptimeRobotApiService.php b/src/Service/UptimeRobotApiService.php index b30f321..8353f34 100644 --- a/src/Service/UptimeRobotApiService.php +++ b/src/Service/UptimeRobotApiService.php @@ -9,6 +9,8 @@ use Vdhicts\UptimeRobot\Client\Configuration; class UptimeRobotApiService { + private $apiKey; + /** @var $client */ protected $client; @@ -28,12 +30,22 @@ class UptimeRobotApiService 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->serializer = $serializer; } + /** + * Check if apikey is setted and suppose that api is valid + * + * @return bool + */ + public function isActive(){ + return !empty($this->apiKey); + } + public function getIo(): SymfonyStyle { -- 2.49.1 From be836d5956d43b2cb6127c2acf4f5195bd67e0b7 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 10:59:00 +0200 Subject: [PATCH 02/15] add alertcontact in uptimerobotservice --- .idea/php.xml | 2 +- composer.json | 2 +- src/Resources/config/services.yaml | 4 ++ src/Service/UptimeRobotApiService.php | 66 +++++++++++++++++++++++++-- 4 files changed, 69 insertions(+), 5 deletions(-) diff --git a/.idea/php.xml b/.idea/php.xml index 949b6a9..424c32b 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -35,7 +35,7 @@ - + \ No newline at end of file diff --git a/composer.json b/composer.json index d4dfeee..ee5ff3e 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "minimum-stability": "stable", "require": { - "php": ">=7.1", + "php": ">=7.4", "symfony/framework-bundle": ">=4.3", "symfony/flex": "^1.2", "symfony/dependency-injection": "^v4.4", diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index 9341d92..515b3f9 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -11,3 +11,7 @@ services: arguments: - '%uptime_robot.credentials.api_key%' - '@Symfony\Component\Serializer\SerializerInterface' + calls: + - setInterval: '%uptime_robot.configurations.interval%' + - setAlertContactsString: '%uptime_robot.configurations.alert_contacts%' + diff --git a/src/Service/UptimeRobotApiService.php b/src/Service/UptimeRobotApiService.php index 8353f34..dd13a0e 100644 --- a/src/Service/UptimeRobotApiService.php +++ b/src/Service/UptimeRobotApiService.php @@ -2,6 +2,7 @@ namespace Pn\UptimeRobotBundle\Service; +use Pn\UptimeRobotBundle\Model\AlertContact; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Serializer\SerializerInterface; use Vdhicts\UptimeRobot\Client\Client; @@ -11,6 +12,12 @@ class UptimeRobotApiService { private $apiKey; + private $interval; + + private string $alertContactsString; + + private array $alertContacts; + /** @var $client */ protected $client; @@ -35,6 +42,7 @@ class UptimeRobotApiService $this->client = new Client($configuration); $this->serializer = $serializer; + $this->alertContacts = []; } /** @@ -42,7 +50,8 @@ class UptimeRobotApiService * * @return bool */ - public function isActive(){ + public function isActive() + { return !empty($this->apiKey); } @@ -62,13 +71,64 @@ class UptimeRobotApiService 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) { + + $alertContact = $this->alertContactService->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 */ public function getMonitorService(): UptimeRobotMonitorService { if (null === $this->monitorService) { - $this->monitorService = New UptimeRobotMonitorService($this->client); + $this->monitorService = new UptimeRobotMonitorService($this->client); if ($this->io instanceof SymfonyStyle) { $this->monitorService->setIo($this->io); } @@ -82,7 +142,7 @@ class UptimeRobotApiService public function getAlertContactService(): UptimeRobotAlertContacsService { if (null === $this->alertContactService) { - $this->alertContactService = New UptimeRobotAlertContacsService($this->client); + $this->alertContactService = new UptimeRobotAlertContacsService($this->client); if ($this->io instanceof SymfonyStyle) { $this->alertContactService->setIo($this->io); } -- 2.49.1 From e80be832932504fd5f0d611ece3b54c8b0dbdee8 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 11:09:12 +0200 Subject: [PATCH 03/15] add alertcontact in uptimerobotservice --- .idea/php.xml | 2 +- composer.json | 2 +- src/Service/UptimeRobotApiService.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.idea/php.xml b/.idea/php.xml index 424c32b..a6bc50b 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -35,7 +35,7 @@ - + \ No newline at end of file diff --git a/composer.json b/composer.json index ee5ff3e..d7859ca 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "minimum-stability": "stable", "require": { - "php": ">=7.4", + "php": ">=7.2", "symfony/framework-bundle": ">=4.3", "symfony/flex": "^1.2", "symfony/dependency-injection": "^v4.4", diff --git a/src/Service/UptimeRobotApiService.php b/src/Service/UptimeRobotApiService.php index dd13a0e..3f5cc0b 100644 --- a/src/Service/UptimeRobotApiService.php +++ b/src/Service/UptimeRobotApiService.php @@ -14,9 +14,9 @@ class UptimeRobotApiService private $interval; - private string $alertContactsString; + private $alertContactsString; - private array $alertContacts; + private $alertContacts; /** @var $client */ protected $client; -- 2.49.1 From 02dc8f76d107d7fb5ee7aa321830238ab5ca41c9 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 11:20:03 +0200 Subject: [PATCH 04/15] add alertcontact in uptimerobotservice --- src/Resources/config/services.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index 515b3f9..dfb4d23 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -12,6 +12,6 @@ services: - '%uptime_robot.credentials.api_key%' - '@Symfony\Component\Serializer\SerializerInterface' calls: - - setInterval: '%uptime_robot.configurations.interval%' - - setAlertContactsString: '%uptime_robot.configurations.alert_contacts%' + - setInterval: ['%uptime_robot.configurations.interval%'] + - setAlertContactsString: ['%uptime_robot.configurations.alert_contacts%'] -- 2.49.1 From dfbff8b44eee2ad45db9e725aa9118fb308a6eb8 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 11:26:02 +0200 Subject: [PATCH 05/15] add alertcontact in uptimerobotservice --- src/Service/UptimeRobotApiService.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Service/UptimeRobotApiService.php b/src/Service/UptimeRobotApiService.php index 3f5cc0b..73f7033 100644 --- a/src/Service/UptimeRobotApiService.php +++ b/src/Service/UptimeRobotApiService.php @@ -97,10 +97,11 @@ class UptimeRobotApiService $alertContacts = explode(',', $alertContactsString); foreach ($alertContacts as $alertContactName) { - - $alertContact = $this->alertContactService->findbyName($alertContactName); - if ($alertContact instanceof AlertContact) { - $this->alertContacts[] = $alertContact; + if (!empty($alertContactName)) { + $alertContact = $this->alertContactService->findbyName($alertContactName); + if ($alertContact instanceof AlertContact) { + $this->alertContacts[] = $alertContact; + } } } } -- 2.49.1 From 6e49ef020866ad9a9fb04e0a2a396e652da07b5b Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 11:49:58 +0200 Subject: [PATCH 06/15] fix status --- src/Service/UptimeRobotMonitorService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Service/UptimeRobotMonitorService.php b/src/Service/UptimeRobotMonitorService.php index 2916805..b9e5946 100644 --- a/src/Service/UptimeRobotMonitorService.php +++ b/src/Service/UptimeRobotMonitorService.php @@ -86,7 +86,8 @@ class UptimeRobotMonitorService extends UptimeRobotService 'http_username' => $monitor->getHttpUsername(), 'http_password' => $monitor->getHttpPassword(), 'alert_contacts' => $alertContactsString, - 'mwindows' => '' + 'mwindows' => '', + 'status' => $monitor->getStatus() ] ); } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { @@ -138,7 +139,8 @@ class UptimeRobotMonitorService extends UptimeRobotService 'interval' => $monitor->getInterval(), 'http_username' => $monitor->getHttpUsername(), 'http_password' => $monitor->getHttpPassword(), - 'mwindows' => '' + 'mwindows' => '', + 'status' => $monitor->getStatus() ]; if (!empty($alertContactsString)){ -- 2.49.1 From 0df319e64ade78f15fba53793489e3006765fddb Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 11:52:37 +0200 Subject: [PATCH 07/15] fix status --- src/Service/UptimeRobotApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/UptimeRobotApiService.php b/src/Service/UptimeRobotApiService.php index 73f7033..7439fa3 100644 --- a/src/Service/UptimeRobotApiService.php +++ b/src/Service/UptimeRobotApiService.php @@ -98,7 +98,7 @@ class UptimeRobotApiService foreach ($alertContacts as $alertContactName) { if (!empty($alertContactName)) { - $alertContact = $this->alertContactService->findbyName($alertContactName); + $alertContact = $this->getAlertContactService()->findbyName($alertContactName); if ($alertContact instanceof AlertContact) { $this->alertContacts[] = $alertContact; } -- 2.49.1 From 2fb473f239c6c9e9ecd988f1ea568d2d757db851 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 12:00:26 +0200 Subject: [PATCH 08/15] fix status --- src/Model/Monitor.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/Monitor.php b/src/Model/Monitor.php index d049185..146290e 100644 --- a/src/Model/Monitor.php +++ b/src/Model/Monitor.php @@ -76,18 +76,18 @@ class Monitor $monitor->setId($monitorObj->id); $monitor->setFriendlyName($monitorObj->friendly_name); $monitor->setUrl($monitorObj->url); - $monitor->setType($monitorObj->type); + $monitor->setType((int)$monitorObj->type); $monitor->setSubType($monitorObj->sub_type); - $monitor->setKeywordType($monitorObj->keyword_type); + $monitor->setKeywordType((int)$monitorObj->keyword_type); $monitor->setKeywordValue($monitorObj->keyword_value); $monitor->setHttpUsername($monitorObj->http_username); $monitor->setHttpPassword($monitorObj->http_password); $monitor->setPort($monitorObj->port); - $monitor->setInterval($monitorObj->interval); - $monitor->setStatus($monitorObj->status); + $monitor->setInterval((int)$monitorObj->interval); + $monitor->setStatus((int)$monitorObj->status); $date = new \DateTime(); - $date->setTimestamp($monitorObj->create_datetime); + $date->setTimestamp((int)$monitorObj->create_datetime); $monitor->setCreateDatetime($date); return $monitor; -- 2.49.1 From 9ffc956e81301432c282ed1d1258cae706b1f516 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 12:11:44 +0200 Subject: [PATCH 09/15] fix status --- src/Model/Monitor.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Model/Monitor.php b/src/Model/Monitor.php index 146290e..0f33e05 100644 --- a/src/Model/Monitor.php +++ b/src/Model/Monitor.php @@ -26,6 +26,8 @@ class Monitor const KEYWORD_TYPE_EXIST = 1; const KEYWORD_TYPE_NOT_EXIST = 2; + const ALLOWED_KEYWORK_TYPES = [self::KEYWORD_TYPE_EXIST, self::KEYWORD_TYPE_NOT_EXIST]; + /** @var int */ private $id; @@ -41,7 +43,7 @@ class Monitor /** @var string */ private $subType; - /** @var string */ + /** @var int */ private $keywordType; /** @var string */ @@ -201,7 +203,7 @@ class Monitor /** * @return string */ - public function getKeywordType(): ?string + public function getKeywordType(): ?int { return $this->keywordType; } @@ -210,9 +212,11 @@ class Monitor * @param string $keywordType * @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; } -- 2.49.1 From 8d33a261681fc91316260303d3d91561ea05f288 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 12:38:42 +0200 Subject: [PATCH 10/15] fix status --- .../UptimeRobotAlertContacsService.php | 79 ++++++++++--------- src/Service/UptimeRobotMonitorService.php | 57 +++++++------ 2 files changed, 74 insertions(+), 62 deletions(-) diff --git a/src/Service/UptimeRobotAlertContacsService.php b/src/Service/UptimeRobotAlertContacsService.php index b589098..e14171e 100644 --- a/src/Service/UptimeRobotAlertContacsService.php +++ b/src/Service/UptimeRobotAlertContacsService.php @@ -26,19 +26,21 @@ class UptimeRobotAlertContacsService extends UptimeRobotService $response = json_decode($jsonResponse); - switch ($response->stat) { - case 'ok': + if ($response) { + 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; - default: - break; + break; + default: + break; + } } @@ -66,17 +68,18 @@ class UptimeRobotAlertContacsService extends UptimeRobotService } $response = json_decode($jsonResponse); - - switch ($response->stat) { - case 'ok': - $alertContact->setId($response->alertcontact->id); - return $alertContact; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + $alertContact->setId($response->alertcontact->id); + return $alertContact; + break; + default: + return false; + break; + } } - + return null; } /** @@ -102,14 +105,16 @@ class UptimeRobotAlertContacsService extends UptimeRobotService $response = json_decode($jsonResponse); - switch ($response->stat) { - case 'ok': - $alertContact->setId($response->alert_contact->id); - return $alertContact; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + $alertContact->setId($response->alert_contact->id); + return $alertContact; + break; + default: + return null; + break; + } } } @@ -128,15 +133,17 @@ class UptimeRobotAlertContacsService extends UptimeRobotService } $response = json_decode($jsonResponse); - - switch ($response->stat) { - case 'ok': - return $alertContact; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + return $alertContact; + break; + default: + return null; + break; + } } + return null; } /** @@ -152,7 +159,7 @@ class UptimeRobotAlertContacsService extends UptimeRobotService /** @var AlertContact $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; } } diff --git a/src/Service/UptimeRobotMonitorService.php b/src/Service/UptimeRobotMonitorService.php index b9e5946..67c4ef3 100644 --- a/src/Service/UptimeRobotMonitorService.php +++ b/src/Service/UptimeRobotMonitorService.php @@ -143,7 +143,7 @@ class UptimeRobotMonitorService extends UptimeRobotService 'status' => $monitor->getStatus() ]; - if (!empty($alertContactsString)){ + if (!empty($alertContactsString)) { $params['alert_contacts'] = $alertContactsString; } @@ -156,15 +156,16 @@ class UptimeRobotMonitorService extends UptimeRobotService } $response = json_decode($jsonResponse); - - switch ($response->stat) { - case 'ok': - $monitor->setId($response->monitor->id); - return $monitor; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + $monitor->setId($response->monitor->id); + return $monitor; + break; + default: + return false; + break; + } } } @@ -183,15 +184,17 @@ class UptimeRobotMonitorService extends UptimeRobotService } $response = json_decode($jsonResponse); - - switch ($response->stat) { - case 'ok': - return $monitor; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + return $monitor; + break; + default: + return false; + break; + } } + return null; } /** @@ -209,15 +212,17 @@ class UptimeRobotMonitorService extends UptimeRobotService } $response = json_decode($jsonResponse); - - switch ($response->stat) { - case 'ok': - return $monitor; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + return $monitor; + break; + default: + return false; + break; + } } + return null; } /** -- 2.49.1 From 04c1dfaa1260588faa4f8ebfd442f0731daa62bc Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 15:47:49 +0200 Subject: [PATCH 11/15] uptimerobot --- src/Service/UptimeRobotMonitorService.php | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/Service/UptimeRobotMonitorService.php b/src/Service/UptimeRobotMonitorService.php index 67c4ef3..e392f6d 100644 --- a/src/Service/UptimeRobotMonitorService.php +++ b/src/Service/UptimeRobotMonitorService.php @@ -39,19 +39,20 @@ class UptimeRobotMonitorService extends UptimeRobotService } $response = json_decode($jsonResponse); - switch ($response->stat) { - case 'ok': - foreach ($response->monitors as $monitorObj) { - $monitor = Monitor::getMonitorFromResponse($monitorObj); + if ($response) { + switch ($response->stat) { + case 'ok': + foreach ($response->monitors as $monitorObj) { + $monitor = Monitor::getMonitorFromResponse($monitorObj); - $this->cachedMonitors[] = $monitor; - } - break; - default: - return false; - break; + $this->cachedMonitors[] = $monitor; + } + break; + default: + return false; + break; + } } - return $this->cachedMonitors; } @@ -96,16 +97,17 @@ class UptimeRobotMonitorService extends UptimeRobotService $response = json_decode($jsonResponse); - - switch ($response->stat) { - case 'ok': - $monitor->setId($response->monitor->id); - return $monitor; - break; - default: - return false; - break; + if ($response) { + switch ($response->stat) { + case 'ok': + $monitor->setId($response->monitor->id); + return $monitor; + break; + default: + break; + } } + return null; } -- 2.49.1 From 947649e84929767b4e234da5fbe91d1b8b193487 Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Fri, 22 Jul 2022 15:58:54 +0200 Subject: [PATCH 12/15] uptimerobot --- src/Service/UptimeRobotMonitorService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Service/UptimeRobotMonitorService.php b/src/Service/UptimeRobotMonitorService.php index e392f6d..50fc6f9 100644 --- a/src/Service/UptimeRobotMonitorService.php +++ b/src/Service/UptimeRobotMonitorService.php @@ -87,8 +87,7 @@ class UptimeRobotMonitorService extends UptimeRobotService 'http_username' => $monitor->getHttpUsername(), 'http_password' => $monitor->getHttpPassword(), 'alert_contacts' => $alertContactsString, - 'mwindows' => '', - 'status' => $monitor->getStatus() + 'mwindows' => '' ] ); } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { -- 2.49.1 From 58994915e8584faa22a9d2987900eff41a34280c Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Mon, 25 Jul 2022 10:49:13 +0200 Subject: [PATCH 13/15] add throws on error in uptimerobot call --- src/Model/Monitor.php | 5 + src/Service/UptimeRobotMonitorService.php | 114 +++++++++++++--------- 2 files changed, 73 insertions(+), 46 deletions(-) diff --git a/src/Model/Monitor.php b/src/Model/Monitor.php index 0f33e05..8900de8 100644 --- a/src/Model/Monitor.php +++ b/src/Model/Monitor.php @@ -345,4 +345,9 @@ class Monitor $this->createDatetime = $createDatetime; return $this; } + + public function getErrors() + { + + } } \ No newline at end of file diff --git a/src/Service/UptimeRobotMonitorService.php b/src/Service/UptimeRobotMonitorService.php index 50fc6f9..78aa6d9 100644 --- a/src/Service/UptimeRobotMonitorService.php +++ b/src/Service/UptimeRobotMonitorService.php @@ -4,6 +4,7 @@ namespace Pn\UptimeRobotBundle\Service; use Pn\UptimeRobotBundle\Model\AlertContact; use Pn\UptimeRobotBundle\Model\Monitor; +use Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException; class UptimeRobotMonitorService extends UptimeRobotService { @@ -26,7 +27,8 @@ class UptimeRobotMonitorService extends UptimeRobotService /** * @param array $params - * @return array|bool + * @return array + * @throws FailedRequestException */ public function getMonitors($params = []) { @@ -34,10 +36,11 @@ class UptimeRobotMonitorService extends UptimeRobotService try { $jsonResponse = $this->client->perform(self::GET_MONITORS, $params); - } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { + } catch (FailedRequestException $exception) { $this->logError($exception); + throw $exception; } - $response = json_decode($jsonResponse); + $response = json_decode($jsonResponse, false); if ($response) { switch ($response->stat) { @@ -48,19 +51,23 @@ class UptimeRobotMonitorService extends UptimeRobotService $this->cachedMonitors[] = $monitor; } break; - default: - return false; - break; } + + return $this->cachedMonitors; } - return $this->cachedMonitors; + + throw new FailedRequestException($jsonResponse); } /** * @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 { $alertContactsString = ''; @@ -90,30 +97,33 @@ class UptimeRobotMonitorService extends UptimeRobotService 'mwindows' => '' ] ); - } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { + } catch (FailedRequestException $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; - break; default: - break; + return null; } } - return null; - + throw new FailedRequestException($jsonResponse); } /** * @param Monitor $oldMonitor * @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) { @@ -152,27 +162,29 @@ class UptimeRobotMonitorService extends UptimeRobotService self::EDIT_MONITOR, $params ); - } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { + } catch (FailedRequestException $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; - break; default: - return false; - break; + return null; + } } + throw new FailedRequestException($jsonResponse); } /** * @param Monitor $monitor - * @return bool|Monitor + * @return Monitor|null + * @throws FailedRequestException */ public function delete(Monitor $monitor) { @@ -180,27 +192,29 @@ class UptimeRobotMonitorService extends UptimeRobotService $jsonResponse = $this->client->perform(self::DELETE_MONITOR, [ 'id' => $monitor->getId() ]); - } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { + } catch (FailedRequestException $exception) { $this->logError($exception); + throw $exception; } - $response = json_decode($jsonResponse); + $response = json_decode($jsonResponse, false); if ($response) { switch ($response->stat) { case 'ok': return $monitor; - break; default: - return false; - break; + return null; + } } - return null; + + throw new FailedRequestException($jsonResponse); } /** * @param Monitor $monitor - * @return bool|Monitor + * @return Monitor|null + * @throws FailedRequestException */ public function reset(Monitor $monitor) { @@ -208,30 +222,33 @@ class UptimeRobotMonitorService extends UptimeRobotService $jsonResponse = $this->client->perform(self::RESET_MONITOR, [ 'id' => $monitor->getId() ]); - } catch (\Vdhicts\UptimeRobot\Client\Exceptions\FailedRequestException $exception) { + } catch (FailedRequestException $exception) { $this->logError($exception); + throw $exception; } - $response = json_decode($jsonResponse); + $response = json_decode($jsonResponse, false); if ($response) { switch ($response->stat) { case 'ok': return $monitor; - break; default: - return false; - break; + return null; } } - return null; + + throw new FailedRequestException($jsonResponse); } /** - * @param $id + * @param null $id + * @param null $name + * @param null $url * @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) { $this->getMonitors(); @@ -252,9 +269,10 @@ class UptimeRobotMonitorService extends UptimeRobotService * @param $url * @param int $type * @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) { $this->getMonitors(); @@ -272,9 +290,13 @@ class UptimeRobotMonitorService extends UptimeRobotService /** * @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()) { @@ -282,11 +304,11 @@ class UptimeRobotMonitorService extends UptimeRobotService if ($foundMonitor instanceof Monitor) { 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; } } \ No newline at end of file -- 2.49.1 From 23362435004dce57fb91caba006d2a7763967a9e Mon Sep 17 00:00:00 2001 From: Giuseppe Nucifora Date: Mon, 25 Jul 2022 22:02:10 +0200 Subject: [PATCH 14/15] add get apikey --- src/Service/UptimeRobotApiService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Service/UptimeRobotApiService.php b/src/Service/UptimeRobotApiService.php index 7439fa3..ae2f1bc 100644 --- a/src/Service/UptimeRobotApiService.php +++ b/src/Service/UptimeRobotApiService.php @@ -55,6 +55,14 @@ class UptimeRobotApiService return !empty($this->apiKey); } + /** + * @return string + */ + public function getApiKey(): string + { + return $this->apiKey; + } + public function getIo(): SymfonyStyle { -- 2.49.1 From 797895448f3afc59fb7d1466f6bf2d4e426ab1c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 11:29:44 +0000 Subject: [PATCH 15/15] Bump symfony/http-kernel from 4.4.43 to 4.4.50 Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 4.4.43 to 4.4.50. - [Release notes](https://github.com/symfony/http-kernel/releases) - [Changelog](https://github.com/symfony/http-kernel/blob/6.2/CHANGELOG.md) - [Commits](https://github.com/symfony/http-kernel/compare/v4.4.43...v4.4.50) --- updated-dependencies: - dependency-name: symfony/http-kernel dependency-type: indirect ... Signed-off-by: dependabot[bot] --- composer.lock | 157 +++++++++++++++++++++++++------------------------- 1 file changed, 80 insertions(+), 77 deletions(-) diff --git a/composer.lock b/composer.lock index 687a7ee..7cf84ee 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bae2c32dc5a579e2e0c95f32dcf3c86e", + "content-hash": "d5477f1164051aeeb67150f3f04a753b", "packages": [ { "name": "geocodio/uptimerobot-api-client", @@ -448,16 +448,16 @@ }, { "name": "symfony/debug", - "version": "v4.4.41", + "version": "v4.4.44", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" + "reference": "1a692492190773c5310bc7877cb590c04c2f05be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", + "url": "https://api.github.com/repos/symfony/debug/zipball/1a692492190773c5310bc7877cb590c04c2f05be", + "reference": "1a692492190773c5310bc7877cb590c04c2f05be", "shasum": "" }, "require": { @@ -496,7 +496,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/debug/tree/v4.4.44" }, "funding": [ { @@ -513,7 +513,7 @@ } ], "abandoned": "symfony/error-handler", - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/dependency-injection", @@ -603,7 +603,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -650,7 +650,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -670,16 +670,16 @@ }, { "name": "symfony/error-handler", - "version": "v4.4.41", + "version": "v4.4.44", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "529feb0e03133dbd5fd3707200147cc4903206da" + "reference": "be731658121ef2d8be88f3a1ec938148a9237291" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/529feb0e03133dbd5fd3707200147cc4903206da", - "reference": "529feb0e03133dbd5fd3707200147cc4903206da", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/be731658121ef2d8be88f3a1ec938148a9237291", + "reference": "be731658121ef2d8be88f3a1ec938148a9237291", "shasum": "" }, "require": { @@ -718,7 +718,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v4.4.41" + "source": "https://github.com/symfony/error-handler/tree/v4.4.44" }, "funding": [ { @@ -734,20 +734,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-07-28T16:29:46+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.42", + "version": "v4.4.44", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "708e761740c16b02c86e3f0c932018a06b895d40" + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40", - "reference": "708e761740c16b02c86e3f0c932018a06b895d40", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1e866e9e5c1b22168e0ce5f0b467f19bba61266a", + "reference": "1e866e9e5c1b22168e0ce5f0b467f19bba61266a", "shasum": "" }, "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", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42" + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.44" }, "funding": [ { @@ -818,11 +818,11 @@ "type": "tidelift" } ], - "time": "2022-05-05T15:33:49+00:00" + "time": "2022-07-20T09:59:04+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.12", + "version": "v1.1.13", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -881,7 +881,7 @@ "standards" ], "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": [ { @@ -1239,16 +1239,16 @@ }, { "name": "symfony/http-client-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "1a4f708e4e87f335d1b1be6148060739152f0bd5" + "reference": "ba6a9f0e8f3edd190520ee3b9a958596b6ca2e70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/1a4f708e4e87f335d1b1be6148060739152f0bd5", - "reference": "1a4f708e4e87f335d1b1be6148060739152f0bd5", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ba6a9f0e8f3edd190520ee3b9a958596b6ca2e70", + "reference": "ba6a9f0e8f3edd190520ee3b9a958596b6ca2e70", "shasum": "" }, "require": { @@ -1297,7 +1297,7 @@ "standards" ], "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": [ { @@ -1313,20 +1313,20 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2022-04-12T15:48:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.10", + "version": "v5.4.20", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e" + "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", - "reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0435363362a47c14e9cf50663cb8ffbf491875a", + "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a", "shasum": "" }, "require": { @@ -1338,8 +1338,11 @@ "require-dev": { "predis/predis": "~1.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/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": { "symfony/mime": "To use the file extension guesser" @@ -1370,7 +1373,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.10" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.20" }, "funding": [ { @@ -1386,20 +1389,20 @@ "type": "tidelift" } ], - "time": "2022-06-19T13:13:40+00:00" + "time": "2023-01-29T11:11:52+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.43", + "version": "v4.4.50", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "c4c33fb9203e6f166ac0f318ce34e00686702522" + "reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c4c33fb9203e6f166ac0f318ce34e00686702522", - "reference": "c4c33fb9203e6f166ac0f318ce34e00686702522", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aa6df6c045f034aa13ac752fc234bb300b9488ef", + "reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef", "shasum": "" }, "require": { @@ -1474,7 +1477,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v4.4.43" + "source": "https://github.com/symfony/http-kernel/tree/v4.4.50" }, "funding": [ { @@ -1490,20 +1493,20 @@ "type": "tidelift" } ], - "time": "2022-06-26T16:51:30+00:00" + "time": "2023-02-01T08:01:31+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -1518,7 +1521,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1556,7 +1559,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1572,20 +1575,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -1600,7 +1603,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1639,7 +1642,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -1655,20 +1658,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -1677,7 +1680,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1718,7 +1721,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -1734,20 +1737,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -1756,7 +1759,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1801,7 +1804,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -1817,7 +1820,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", @@ -2166,16 +2169,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.9", + "version": "v5.4.19", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "af52239a330fafd192c773795520dc2dd62b5657" + "reference": "2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/af52239a330fafd192c773795520dc2dd62b5657", - "reference": "af52239a330fafd192c773795520dc2dd62b5657", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b", + "reference": "2944bbc23f5f8da2b962fbcbf7c4a6109b2f4b7b", "shasum": "" }, "require": { @@ -2235,7 +2238,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.9" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.19" }, "funding": [ { @@ -2251,7 +2254,7 @@ "type": "tidelift" } ], - "time": "2022-05-21T10:24:18+00:00" + "time": "2023-01-16T10:52:33+00:00" }, { "name": "symfony/var-exporter", @@ -2839,7 +2842,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1", + "php": ">=7.2", "ext-json": "*" }, "platform-dev": [], -- 2.49.1