From 3e0aa5b319ffb920b9e0f83f2079603e828f393a Mon Sep 17 00:00:00 2001 From: Marie Bressy <75746914+Mary-Clb@users.noreply.github.com> Date: Thu, 21 Dec 2023 11:35:51 +0100 Subject: [PATCH 1/6] check user right for update, read on computers --- ajax/ack.php | 2 ++ ajax/cancelDowntime.php | 2 ++ ajax/hostTimeline.php | 2 ++ ajax/sendCheck.php | 2 ++ ajax/setDowntime.php | 2 ++ front/host.php | 2 ++ src/Config.php | 2 +- 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ajax/ack.php b/ajax/ack.php index e302cff..71ca6fe 100644 --- a/ajax/ack.php +++ b/ajax/ack.php @@ -32,6 +32,8 @@ include('../../../inc/includes.php'); +Session::checkRight('computer', UPDATE); + header("Content-Type: text/html; charset=UTF-8"); if (isset($_POST['hostid'])) { diff --git a/ajax/cancelDowntime.php b/ajax/cancelDowntime.php index 1eb2323..459bde9 100644 --- a/ajax/cancelDowntime.php +++ b/ajax/cancelDowntime.php @@ -32,6 +32,8 @@ include('../../../inc/includes.php'); +Session::checkRight('computer', UPDATE); + header("Content-Type: text/html; charset=UTF-8"); if (isset($_POST['downtimeid'])) { diff --git a/ajax/hostTimeline.php b/ajax/hostTimeline.php index cf5bfd9..f934b37 100644 --- a/ajax/hostTimeline.php +++ b/ajax/hostTimeline.php @@ -33,6 +33,8 @@ include('../../../inc/includes.php'); +Session::checkRight('computer', READ); + header("Content-Type: text/html; charset=UTF-8"); if (isset($_GET['period']) && isset($_GET['hostid'])) { diff --git a/ajax/sendCheck.php b/ajax/sendCheck.php index e05de08..dfb9781 100644 --- a/ajax/sendCheck.php +++ b/ajax/sendCheck.php @@ -32,6 +32,8 @@ include('../../../inc/includes.php'); +Session::checkRight('computer', UPDATE); + header("Content-Type: text/html; charset=UTF-8"); if (isset($_POST['hostid'])) { diff --git a/ajax/setDowntime.php b/ajax/setDowntime.php index b57c7fc..71e6134 100644 --- a/ajax/setDowntime.php +++ b/ajax/setDowntime.php @@ -32,6 +32,8 @@ include('../../../inc/includes.php'); +Session::checkRight('computer', UPDATE); + header("Content-Type: text/html; charset=UTF-8"); if (isset($_POST['params'])) { diff --git a/front/host.php b/front/host.php index 65784b1..df9a6d6 100644 --- a/front/host.php +++ b/front/host.php @@ -33,6 +33,8 @@ include('../../../inc/includes.php'); +Session::checkRight('computer', READ); + Html::header( Host::getTypeName(), $_SERVER['PHP_SELF'], diff --git a/src/Config.php b/src/Config.php index 3fd9f8b..65df37d 100644 --- a/src/Config.php +++ b/src/Config.php @@ -77,7 +77,7 @@ public static function showForConfig(\Config $config, $withtemplate = 0) /** @var array $CFG_GLPI */ global $CFG_GLPI; - if (!self::canView()) { + if (!self::canUpdate()) { return false; } From 8ec7ea7c0b52c36e6dc4fab993f026550613ad82 Mon Sep 17 00:00:00 2001 From: Mary-Clb Date: Tue, 9 Jan 2024 13:55:34 +0100 Subject: [PATCH 2/6] extending downtime cancelling to services --- src/ApiClient.php | 37 +++++++++++++++++++++-------------- src/Host.php | 42 ++++++++++++++++++++++++++++++++-------- templates/host.html.twig | 2 +- 3 files changed, 58 insertions(+), 23 deletions(-) diff --git a/src/ApiClient.php b/src/ApiClient.php index 75375a4..2cff5df 100644 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -74,7 +74,6 @@ public function connectionRequest(array $params = []) return $data; } - public function diagnostic() { $result = []; @@ -95,8 +94,6 @@ public function diagnostic() } return $result; } - - public function clientRequest(string $endpoint = '', array $params = [], string $method = 'GET') { $api_client = new Client(['base_uri' => $this->api_config["centreon-url"], 'verify' => false]); @@ -119,7 +116,6 @@ public function clientRequest(string $endpoint = '', array $params = [], string $data = json_decode($data_body, true); return $data; } - public function getHostsList(array $params = []) { $defaults = [ @@ -131,63 +127,76 @@ public function getHostsList(array $params = []) $data = $this->clientRequest('monitoring/hosts', $params); return $data; } - public function getOneHost(int $host_id, array $params = []): array { $data = $this->clientRequest('monitoring/hosts/' . $host_id, $params); return $data; } - public function getOneHostResources(int $host_id, array $params = []): array { $data = $this->clientRequest('monitoring/resources/hosts/' . $host_id, $params); return $data; } - public function getOneHostTimeline(int $host_id, array $params = []): array { $data = $this->clientRequest('monitoring/hosts/' . $host_id . '/timeline', $params); return $data; } - public function getServicesList(array $params = []): array { $data = $this->clientRequest('monitoring/services', $params); return $data; } - - public function getServicesListForOneHost(int $host_id, array $params = []): array + public function getServicesListForOneHost(int $host_id, array $params = []) { $params['query'] = ['limit' => 30]; $data = $this->clientRequest('monitoring/hosts/' . $host_id . '/services', $params); return $data; } - public function sendCheckToAnHost(int $host_id, array $params = []) { $params['json']['is_forced'] = true; $data = $this->clientRequest('monitoring/hosts/' . $host_id . '/check', $params['json'], 'POST'); return $data; } - public function setDowntimeOnAHost(int $host_id, array $params) { $data = $this->clientRequest('monitoring/hosts/' . $host_id . '/downtimes', $params, 'POST'); return $data; } - public function listDowntimes(int $host_id, array $params = []) { $data = $this->clientRequest('monitoring/hosts/' . $host_id . '/downtimes', $params); return $data; } + public function displayDowntime(int $downtime_id): array + { + $data = $this->clientRequest('monitoring/downtimes/' . $downtime_id); + return $data; + } + public function servicesDowntimesByHost(int $host_id, array $params = []) + { + $defaultParams = [ + 'query' => [ + 'search' => json_encode([ + 'host.id' => [ + '$eq' => $host_id + ] + ]) + ] + ]; + + $queryParams = array_merge($defaultParams, $params); + + $data = $this->clientRequest('monitoring/services/downtimes', $queryParams); + return $data; + } public function cancelDowntime(int $downtime_id, array $params = []) { $data = $this->clientRequest('monitoring/downtimes/' . $downtime_id, $params, 'DELETE'); return $data; } - public function acknowledgement(int $host_id, array $request = []) { $data = $this->clientRequest('monitoring/hosts/' . $host_id . 'acknowledgements', $request, 'POST'); diff --git a/src/Host.php b/src/Host.php index bc46efd..8074b51 100644 --- a/src/Host.php +++ b/src/Host.php @@ -240,13 +240,11 @@ public function setDowntime(int $id, array $params) } unset($params['time_select']); unset($params['author_id']); - \Toolbox::logDebug($params); $api = new ApiClient(); $res = $api->connectionRequest(); if (isset($res["security"]["token"])) { try { $res = $api->setDowntimeOnAHost($id, ['json' => $params]); - \Toolbox::logDebug($res); return $res; } catch (\Exception $e) { $error_msg = $e->getMessage(); @@ -283,21 +281,49 @@ public function convertToSeconds($option, $duration) return $new_duration; } - public function cancelActualDownTime(int $downtime_id) + public function cancelActualDownTime(int $downtime_id): array { $api = new ApiClient(); $res = $api->connectionRequest(); - if (isset($res['security']['token'])) { + $error = []; + + if (isset($res["security"]["token"])) { try { - $result = $api->cancelDowntime($downtime_id); - return $result; + $actualDowntime = $api->displayDowntime($downtime_id); + $host_id = $actualDowntime['host_id']; + $start_time = $actualDowntime['start_time']; + $end_time = $actualDowntime['end_time']; + + $servicesDowntimes = $api->servicesDowntimesByHost($host_id); + foreach ($servicesDowntimes['result'] as $serviceDowntime) { + if (isset($serviceDowntime['start_time']) && isset($serviceDowntime['end_time'])) { + if ($serviceDowntime['start_time'] == $start_time && $serviceDowntime['end_time'] == $end_time) { + $s_downtime_id = $serviceDowntime['id']; + $api->cancelDowntime($s_downtime_id); + } + } else { + $error[] = [ + 'service_id' => $serviceDowntime['id'], + 'message' => 'No downtime found for this service' + ]; + } + } + $api->cancelDowntime($downtime_id); } catch (\Exception $e) { - $error_msg = $e->getMessage(); - return $error_msg; + $error[] = [ + 'message' => $e->getMessage() + ]; } + } else { + $error[] = [ + 'message' => 'Error' + ]; } + + return $error; } + public function acknowledgement(int $host_id, array $request = []) { $api = new ApiClient(); diff --git a/templates/host.html.twig b/templates/host.html.twig index 55ff19d..3d2ec05 100644 --- a/templates/host.html.twig +++ b/templates/host.html.twig @@ -361,7 +361,7 @@ "type": 'POST', "url" : CFG_GLPI['root_doc'] + "/" + GLPI_PLUGINS_PATH.centreon + "/ajax/cancelDowntime.php", "data": { - "downtimeid": {{ lastdowntimeid ?? 0 }} + "downtimeid": {{ lastdowntimeid ?? 0 }}, }, "success": function(){ reloadTab(''); From 16cefdc0dc377a2ae4af966fd2c5c08fe6248254 Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Tue, 23 Jan 2024 11:07:34 +0100 Subject: [PATCH 3/6] Fix images links in readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e2c73ad..9940d77 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This plugin allows you to see in your GLPI interface informations about the host First, register your url to Centreon, username & password on the Centreon settings page : -![centreon config page](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-settings.jpg) +![centreon config page](docs/screenshots/centreon-settings.jpg) As the connexion works successfully, a green badge appears on the bottom of the page. @@ -14,19 +14,19 @@ As the connexion works successfully, a green badge appears on the bottom of the You can now have a glimpse of your host status from the computers list : -![centreon status on computer](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-settings.jpg) +![centreon status on computer](docs/screenshots/centreon-settings.jpg) ## See all information about a host For seeing more, click on the host and on the Centreon tab : you can access to all general information about the host and its services, without going on your Centreon app ! -![centreon host page](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-accueil.jpg) +![centreon host page](docs/screenshots/centreon-accueil.jpg) ## Timeline and actions Click on the timeline tab to see what happened on your host recently : yesterday, since one week, or since one month : -![centreon host page](https://github.com/pluginsGLPI/centreon/main/docs/screenshots/centreon-timeline.jpg) +![centreon host page](docs/screenshots/centreon-timeline.jpg) You can also perform 3 common actions : 1. Send a check From 47c71f89d922ca781be3cc4f4cd36719848aac0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 1 Feb 2024 15:46:30 +0100 Subject: [PATCH 4/6] Update CI matrix and prevent concurrent runs --- .github/workflows/continuous-integration.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7efa770..642e0c3 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -11,18 +11,22 @@ on: - cron: "0 0 * * *" workflow_dispatch: +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + jobs: + generate-ci-matrix: + name: "Generate CI matrix" + uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1" + with: + glpi-version: "10.0.x" ci: name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}" + needs: "generate-ci-matrix" strategy: fail-fast: false - matrix: - include: - - {glpi-version: "10.0.x", php-version: "7.4", db-image: "mysql:5.7"} - - {glpi-version: "10.0.x", php-version: "8.0", db-image: "mysql:8.0"} - - {glpi-version: "10.0.x", php-version: "8.1", db-image: "mariadb:10.2"} - - {glpi-version: "10.0.x", php-version: "8.2", db-image: "mariadb:11.0"} - - {glpi-version: "10.0.x", php-version: "8.3-rc", db-image: "mysql:8.0"} + matrix: ${{ fromJson(needs.generate-ci-matrix.outputs.matrix) }} uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1" with: plugin-key: "centreon" From 806f3d619ac31c672e71ba4c708224a444f4ee60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 1 Feb 2024 16:06:53 +0100 Subject: [PATCH 5/6] Add `dependabot` config --- .github/dependabot.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8abc772 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,37 @@ +version: 2 +updates: + # Ensure GitHub Actions are used in their latest version + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + + # Strategy for composer dependencies + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "monthly" + allow: + - dependency-type: "direct" + open-pull-requests-limit: 100 + target-branch: "main" + versioning-strategy: "increase" + groups: + dev-dependencies: + patterns: + - "*" + + # Strategy for npm dependencies + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "monthly" + allow: + - dependency-type: "development" + open-pull-requests-limit: 100 + target-branch: "main" + versioning-strategy: "increase" + groups: + dev-dependencies: + patterns: + - "*" From 6006bb7b43dbc3bdb266bb3109fa10f95bc7ef21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:07:25 +0000 Subject: [PATCH 6/6] Bump the dev-dependencies group with 4 updates Bumps the dev-dependencies group with 4 updates: [glpi-project/tools](https://github.com/glpi-project/tools), [phpstan/phpstan](https://github.com/phpstan/phpstan), [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) and [squizlabs/php_codesniffer](https://github.com/squizlabs/PHP_CodeSniffer). Updates `glpi-project/tools` from 0.7.1 to 0.7.2 - [Changelog](https://github.com/glpi-project/tools/blob/develop/CHANGELOG.md) - [Commits](https://github.com/glpi-project/tools/compare/0.7.1...0.7.2) Updates `phpstan/phpstan` from 1.10.41 to 1.10.57 - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.10.41...1.10.57) Updates `phpunit/phpunit` from 9.6.13 to 9.6.16 - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.16/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.13...9.6.16) Updates `squizlabs/php_codesniffer` from 3.7.2 to 3.8.1 - [Release notes](https://github.com/squizlabs/PHP_CodeSniffer/releases) - [Commits](https://github.com/squizlabs/PHP_CodeSniffer/commits) --- updated-dependencies: - dependency-name: glpi-project/tools dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] --- composer.json | 4 +- composer.lock | 200 ++++++++++++++++++++++++++++---------------------- 2 files changed, 115 insertions(+), 89 deletions(-) diff --git a/composer.json b/composer.json index 4067a3a..c78ae93 100644 --- a/composer.json +++ b/composer.json @@ -3,11 +3,11 @@ "php": ">=7.4" }, "require-dev": { - "glpi-project/tools": "^0.7.1", + "glpi-project/tools": "^0.7.2", "php-parallel-lint/php-parallel-lint": "^1.3", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3.7" + "squizlabs/php_codesniffer": "^3.8" }, "config": { "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index c85cdfe..bf04f9a 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": "e8fb144aa8a032de010f2f3425967a2c", + "content-hash": "5688dfc5b6826b9dc5e3ad52f29d8081", "packages": [], "packages-dev": [ { @@ -79,16 +79,16 @@ }, { "name": "glpi-project/tools", - "version": "0.7.1", + "version": "0.7.2", "source": { "type": "git", "url": "https://github.com/glpi-project/tools.git", - "reference": "4bc5a725d9f4da0ee946ad3cbdd54a782d2f40fb" + "reference": "72fe4c075dc63712ae25a809a7a0e84a33a2640b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/4bc5a725d9f4da0ee946ad3cbdd54a782d2f40fb", - "reference": "4bc5a725d9f4da0ee946ad3cbdd54a782d2f40fb", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/72fe4c075dc63712ae25a809a7a0e84a33a2640b", + "reference": "72fe4c075dc63712ae25a809a7a0e84a33a2640b", "shasum": "" }, "require": { @@ -131,7 +131,7 @@ "issues": "https://github.com/glpi-project/tools/issues", "source": "https://github.com/glpi-project/tools" }, - "time": "2023-10-16T11:40:35+00:00" + "time": "2024-01-10T09:01:18+00:00" }, { "name": "myclabs/deep-copy", @@ -194,25 +194,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -220,7 +222,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -244,9 +246,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "phar-io/manifest", @@ -418,16 +420,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.41", + "version": "1.10.57", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c6174523c2a69231df55bdc65b61655e72876d76" + "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6174523c2a69231df55bdc65b61655e72876d76", - "reference": "c6174523c2a69231df55bdc65b61655e72876d76", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1627b1d03446904aaa77593f370c5201d2ecc34e", + "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e", "shasum": "" }, "require": { @@ -476,27 +478,27 @@ "type": "tidelift" } ], - "time": "2023-11-05T12:57:57+00:00" + "time": "2024-01-24T11:51:34+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -546,7 +548,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" }, "funding": [ { @@ -554,7 +556,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-12-22T06:47:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -799,16 +801,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", "shasum": "" }, "require": { @@ -882,7 +884,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" }, "funding": [ { @@ -898,7 +900,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2024-01-19T07:03:14+00:00" }, { "name": "psr/container", @@ -1191,20 +1193,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -1236,7 +1238,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -1244,7 +1246,7 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", @@ -1518,20 +1520,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -1563,7 +1565,7 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -1571,7 +1573,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", @@ -1914,16 +1916,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.8.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", "shasum": "" }, "require": { @@ -1933,11 +1935,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -1952,35 +1954,58 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-01-11T20:47:48+00:00" }, { "name": "symfony/console", - "version": "v5.4.31", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a" + "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/11ac5f154e0e5c4c77af83ad11ead9165280b92a", - "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a", + "url": "https://api.github.com/repos/symfony/console/zipball/dbdf6adcb88d5f83790e1efb57ef4074309d3931", + "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931", "shasum": "" }, "require": { @@ -2050,7 +2075,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.31" + "source": "https://github.com/symfony/console/tree/v5.4.35" }, "funding": [ { @@ -2066,7 +2091,7 @@ "type": "tidelift" } ], - "time": "2023-10-31T07:58:33+00:00" + "time": "2024-01-23T14:28:09+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2712,16 +2737,16 @@ }, { "name": "symfony/string", - "version": "v5.4.31", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b" + "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2765096c03f39ddf54f6af532166e42aaa05b24b", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b", + "url": "https://api.github.com/repos/symfony/string/zipball/c209c4d0559acce1c9a2067612cfb5d35756edc2", + "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2", "shasum": "" }, "require": { @@ -2778,7 +2803,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.31" + "source": "https://github.com/symfony/string/tree/v5.4.35" }, "funding": [ { @@ -2794,20 +2819,20 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:19:44+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -2836,7 +2861,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -2844,30 +2869,31 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "twig/twig", - "version": "v3.7.1", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554" + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.3" + "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" }, "type": "library", "autoload": { @@ -2903,7 +2929,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.7.1" + "source": "https://github.com/twigphp/Twig/tree/v3.8.0" }, "funding": [ { @@ -2915,7 +2941,7 @@ "type": "tidelift" } ], - "time": "2023-08-28T11:09:02+00:00" + "time": "2023-11-21T18:54:41+00:00" } ], "aliases": [],