From fea2812aa72b479b2982712b1124f4d7ff07cc2a Mon Sep 17 00:00:00 2001 From: Lainow Date: Thu, 30 Jan 2025 16:00:51 +0100 Subject: [PATCH 01/10] GLPI 11 Compatibility --- .github/workflows/continuous-integration.yml | 2 +- ajax/agent.php | 6 +++--- composer.json | 4 ++-- inc/computergroup.class.php | 4 ++-- inc/computergroupdynamic.class.php | 4 ++-- inc/computergroupstatic.class.php | 6 +++--- inc/contactlog.class.php | 6 +++--- inc/credential.class.php | 6 +++--- inc/credentialtype.class.php | 14 +++++++------- inc/databaseparam.class.php | 4 ++-- inc/databaseparam_computergroup.class.php | 6 +++--- inc/databaseparam_credential.class.php | 6 +++--- inc/inventoryaction.class.php | 9 +++++---- phpstan.neon | 8 +++----- setup.php | 12 ++++++++++-- 15 files changed, 52 insertions(+), 45 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ffc57a7..0f40e9f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -20,7 +20,7 @@ jobs: name: "Generate CI matrix" uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1" with: - glpi-version: "10.0.x" + glpi-version: "11.0.x" ci: name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}" needs: "generate-ci-matrix" diff --git a/ajax/agent.php b/ajax/agent.php index 16da5e9..17c2c02 100644 --- a/ajax/agent.php +++ b/ajax/agent.php @@ -40,9 +40,9 @@ if (isset($_POST['action']) && isset($_POST['id'])) { $agent = new Agent(); if (!$agent->getFromDB($_POST['id'])) { - Response::sendError(404, 'Unable to load agent #' . $_POST['id']); - - return; + $exception = new \Glpi\Exception\Http\HttpException(404); // @phpstan-ignore-line + $exception->setMessageToDisplay('Unable to load agent #' . $_POST['id']); + throw $exception; // @phpstan-ignore-line }; $answer = []; diff --git a/composer.json b/composer.json index bea1b48..867074b 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": ">=7.4" + "php": ">=8.2" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.75", @@ -14,7 +14,7 @@ "config": { "optimize-autoloader": true, "platform": { - "php": "7.4.99" + "php": "8.2.99" }, "sort-packages": true, "allow-plugins": { diff --git a/inc/computergroup.class.php b/inc/computergroup.class.php index 55bb85a..649642b 100644 --- a/inc/computergroup.class.php +++ b/inc/computergroup.class.php @@ -68,12 +68,12 @@ public static function getTypeName($nb = 0) return _n('Computer Group', 'Computers Group', $nb, 'databaseinventory'); } - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/computergroupdynamic.class.php b/inc/computergroupdynamic.class.php index 39c7e89..562d546 100644 --- a/inc/computergroupdynamic.class.php +++ b/inc/computergroupdynamic.class.php @@ -37,12 +37,12 @@ public static function getTypeName($nb = 0) return _n('Dynamic group', 'Dynamic groups', $nb, 'databaseinventory'); } - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/computergroupstatic.class.php b/inc/computergroupstatic.class.php index 214a225..bc36df7 100644 --- a/inc/computergroupstatic.class.php +++ b/inc/computergroupstatic.class.php @@ -77,17 +77,17 @@ public static function getTypeName($nb = 0) return _n('Static group', 'Static groups', $nb, 'databaseinventory'); } - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public function canCreateItem() + public function canCreateItem(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/contactlog.class.php b/inc/contactlog.class.php index 6450055..9e51481 100644 --- a/inc/contactlog.class.php +++ b/inc/contactlog.class.php @@ -63,17 +63,17 @@ class PluginDatabaseinventoryContactLog extends CommonDBTM public $dohistory = true; public static $rightname = 'database_inventory'; - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canUpdate() + public static function canUpdate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/credential.class.php b/inc/credential.class.php index 058aed5..2688d8d 100644 --- a/inc/credential.class.php +++ b/inc/credential.class.php @@ -63,17 +63,17 @@ class PluginDatabaseinventoryCredential extends CommonDBTM public $dohistory = true; public static $rightname = 'database_inventory'; - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, CREATE); } - public static function canUpdate() + public static function canUpdate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, PURGE); } diff --git a/inc/credentialtype.class.php b/inc/credentialtype.class.php index 480ec74..ed251b0 100644 --- a/inc/credentialtype.class.php +++ b/inc/credentialtype.class.php @@ -41,32 +41,32 @@ class PluginDatabaseinventoryCredentialType extends CommonDropdown private const POSTGRE_SQL = 5; private const MONGO_DB = 6; - public static function canCreate() + public static function canCreate(): bool { return false; } - public static function canUpdate() + public static function canUpdate(): bool { return false; } - public static function canPurge() + public static function canPurge(): bool { return false; } - public static function canDelete() + public static function canDelete(): bool { return false; } - public static function canView() + public static function canView(): bool { return false; } - public function canViewItem() + public function canViewItem(): bool { return false; } @@ -165,7 +165,7 @@ public static function install(Migration $migration) if (!countElementsInTable($table, ['id' => $id])) { $state->add([ 'id' => $id, - 'name' => Sanitizer::sanitize($label), + 'name' => $label, ]); } } diff --git a/inc/databaseparam.class.php b/inc/databaseparam.class.php index 529eb34..56b1ef3 100644 --- a/inc/databaseparam.class.php +++ b/inc/databaseparam.class.php @@ -68,12 +68,12 @@ public static function getTypeName($nb = 0) return _n('Database params', 'Databases params', $nb, 'databaseinventory'); } - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/databaseparam_computergroup.class.php b/inc/databaseparam_computergroup.class.php index 31c8285..2ecbeaf 100644 --- a/inc/databaseparam_computergroup.class.php +++ b/inc/databaseparam_computergroup.class.php @@ -72,17 +72,17 @@ class PluginDatabaseinventoryDatabaseParam_ComputerGroup extends CommonDBRelatio public static $rightname = 'database_inventory'; - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public function canCreateItem() + public function canCreateItem(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/databaseparam_credential.class.php b/inc/databaseparam_credential.class.php index 3c90f2f..24a381b 100644 --- a/inc/databaseparam_credential.class.php +++ b/inc/databaseparam_credential.class.php @@ -72,17 +72,17 @@ class PluginDatabaseinventoryDatabaseParam_Credential extends CommonDBRelation public static $rightname = 'database_inventory'; - public static function canCreate() + public static function canCreate(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public function canCreateItem() + public function canCreateItem(): bool { return Session::haveRight(static::$rightname, UPDATE); } - public static function canPurge() + public static function canPurge(): bool { return Session::haveRight(static::$rightname, UPDATE); } diff --git a/inc/inventoryaction.class.php b/inc/inventoryaction.class.php index ac2cce3..138b05e 100644 --- a/inc/inventoryaction.class.php +++ b/inc/inventoryaction.class.php @@ -28,6 +28,7 @@ * ------------------------------------------------------------------------- */ +use Glpi\Asset\Asset_PeripheralAsset; use GuzzleHttp\Psr7\Response; class PluginDatabaseinventoryInventoryAction extends CommonDBTM @@ -111,7 +112,7 @@ public static function runPartialInventory(Agent $agent, $fromMA = false) // not authorized return self::handleAgentResponse($response, $endpoint); } - } catch (\GuzzleHttp\Exception\ClientException $e) { + } catch (\GuzzleHttp\Exception\ClientException $e) { // @phpstan-ignore-line if ($fromMA) { return false; } else { @@ -121,7 +122,7 @@ public static function runPartialInventory(Agent $agent, $fromMA = false) } } - public static function handleAgentResponse(Response $response, $request): array + public static function handleAgentResponse($response, $request): array { $params = []; $params['answer'] = sprintf( @@ -142,7 +143,7 @@ private static function findAgent(Computer $item) // if no agent has been found, check if there is a linked item, and find its agent if (!$has_agent && $item->getType() == 'Computer') { - $citem = new Computer_Item(); + $citem = new Asset_PeripheralAsset(); $has_relation = $citem->getFromDBByCrit([ 'itemtype' => $item->getType(), 'items_id' => $item->fields['id'], @@ -179,7 +180,7 @@ public static function postItemForm($item) echo $out; - $url = Plugin::getWebDir('databaseinventory') . '/ajax/agent.php'; + $url = plugin_databaseinventory_geturl() . 'ajax/agent.php'; $key = PluginDatabaseinventoryInventoryAction::MA_PARTIAL; $js = << Date: Wed, 12 Feb 2025 11:42:49 +0100 Subject: [PATCH 02/10] update composer --- composer.lock | 439 ++++++++++++++--------------------- inc/credentialtype.class.php | 2 +- 2 files changed, 178 insertions(+), 263 deletions(-) diff --git a/composer.lock b/composer.lock index 231ab99..03e736a 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": "a120c2f6295baba8513207928680cfca", + "content-hash": "3adc0bdb1a0a82cb562c7abae19bb6ba", "packages": [], "packages-dev": [ { @@ -731,16 +731,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.13", + "version": "2.1.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e55e03e6d4ac49cd1240907e5b08e5cd378572a9" + "reference": "8f99e18eb775dbaf6460c95fa0b65312da9c746a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e55e03e6d4ac49cd1240907e5b08e5cd378572a9", - "reference": "e55e03e6d4ac49cd1240907e5b08e5cd378572a9", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f99e18eb775dbaf6460c95fa0b65312da9c746a", + "reference": "8f99e18eb775dbaf6460c95fa0b65312da9c746a", "shasum": "" }, "require": { @@ -836,22 +836,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -878,9 +883,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -934,30 +939,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -978,9 +983,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "react/cache", @@ -1510,29 +1515,29 @@ }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1564,7 +1569,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -1572,56 +1578,51 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "symfony/console", - "version": "v5.4.47", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1655,7 +1656,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.47" + "source": "https://github.com/symfony/console/tree/v6.4.17" }, "funding": [ { @@ -1671,24 +1672,24 @@ "type": "tidelift" } ], - "time": "2024-11-06T11:30:55+00:00" + "time": "2024-12-07T12:07:30+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.4", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { @@ -1697,7 +1698,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" } }, "autoload": { @@ -1722,7 +1723,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.4" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -1738,48 +1739,43 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.45", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9" + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/72982eb416f61003e9bb6e91f8b3213600dcf9e9", - "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1807,7 +1803,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/v5.4.45" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" }, "funding": [ { @@ -1823,29 +1819,26 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.4", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f" + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", - "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "thanks": { @@ -1853,7 +1846,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" } }, "autoload": { @@ -1886,7 +1879,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.4" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" }, "funding": [ { @@ -1902,30 +1895,29 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.45", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "57c8294ed37d4a055b77057827c67f9558c95c54" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54", - "reference": "57c8294ed37d4a055b77057827c67f9558c95c54", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^5.4|^6.4" + "symfony/process": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1953,7 +1945,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.45" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" }, "funding": [ { @@ -1969,26 +1961,27 @@ "type": "tidelift" } ], - "time": "2024-10-22T13:05:35+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/finder", - "version": "v5.4.45", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "63741784cd7b9967975eec610b256eed3ede022b" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b", - "reference": "63741784cd7b9967975eec610b256eed3ede022b", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2016,7 +2009,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.45" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -2032,27 +2025,25 @@ "type": "tidelift" } ], - "time": "2024-09-28T13:32:08+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.45", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6" + "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", - "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50", + "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -2085,7 +2076,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.45" + "source": "https://github.com/symfony/options-resolver/tree/v7.2.0" }, "funding": [ { @@ -2101,7 +2092,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-11-20T11:17:29+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2421,82 +2412,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.31.0", @@ -2655,21 +2570,20 @@ }, { "name": "symfony/process", - "version": "v5.4.47", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d" + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d", - "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -2697,7 +2611,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.47" + "source": "https://github.com/symfony/process/tree/v7.2.0" }, "funding": [ { @@ -2713,33 +2627,30 @@ "type": "tidelift" } ], - "time": "2024-11-06T11:36:42+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.4", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f37b419f7aea2e9abf10abd261832cace12e3300" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f37b419f7aea2e9abf10abd261832cace12e3300", - "reference": "f37b419f7aea2e9abf10abd261832cace12e3300", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "thanks": { @@ -2747,13 +2658,16 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2780,7 +2694,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.4" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -2796,25 +2710,25 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.45", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004" + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fb2c199cf302eb207f8c23e7ee174c1c31a5c004", - "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e46690d5b9d7164a6d061cab1e8d46141b9f49df", + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -2842,7 +2756,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.45" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.2" }, "funding": [ { @@ -2858,38 +2772,39 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2024-12-18T14:28:33+00:00" }, { "name": "symfony/string", - "version": "v5.4.47", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", + "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2928,7 +2843,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.47" + "source": "https://github.com/symfony/string/tree/v7.2.0" }, "funding": [ { @@ -2944,31 +2859,31 @@ "type": "tidelift" } ], - "time": "2024-11-10T20:33:58+00:00" + "time": "2024-11-13T13:31:26+00:00" }, { "name": "twig/twig", - "version": "v3.11.3", + "version": "v3.19.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3b06600ff3abefaf8ff55d5c336cd1c4253f8c7e" + "reference": "d4f8c2b86374f08efc859323dbcd95c590f7124e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3b06600ff3abefaf8ff55d5c336cd1c4253f8c7e", - "reference": "3b06600ff3abefaf8ff55d5c336cd1c4253f8c7e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/d4f8c2b86374f08efc859323dbcd95c590f7124e", + "reference": "d4f8c2b86374f08efc859323dbcd95c590f7124e", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php80": "^1.22", "symfony/polyfill-php81": "^1.29" }, "require-dev": { + "phpstan/phpstan": "^2.0", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -3012,7 +2927,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.11.3" + "source": "https://github.com/twigphp/Twig/tree/v3.19.0" }, "funding": [ { @@ -3024,7 +2939,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T12:34:41+00:00" + "time": "2025-01-29T07:06:14+00:00" } ], "aliases": [], @@ -3033,11 +2948,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4" + "php": ">=8.2" }, "platform-dev": [], "platform-overrides": { - "php": "7.4.99" + "php": "8.2.99" }, "plugin-api-version": "2.3.0" } diff --git a/inc/credentialtype.class.php b/inc/credentialtype.class.php index ed251b0..a9165c6 100644 --- a/inc/credentialtype.class.php +++ b/inc/credentialtype.class.php @@ -28,7 +28,7 @@ * ------------------------------------------------------------------------- */ -use Glpi\Toolbox\Sanitizer; + class PluginDatabaseinventoryCredentialType extends CommonDropdown { From 265ebea3c172634b7a21026e0e91645bed7d12b4 Mon Sep 17 00:00:00 2001 From: LAUNAY Samuel <107540223+Lainow@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:26:58 +0100 Subject: [PATCH 03/10] Update inc/inventoryaction.class.php Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> --- inc/inventoryaction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inventoryaction.class.php b/inc/inventoryaction.class.php index 138b05e..df192e3 100644 --- a/inc/inventoryaction.class.php +++ b/inc/inventoryaction.class.php @@ -180,7 +180,7 @@ public static function postItemForm($item) echo $out; - $url = plugin_databaseinventory_geturl() . 'ajax/agent.php'; + $url = $CFG_GLPI['url_base'] . '/plugins/databaseinventory/ajax/agent.php'; $key = PluginDatabaseinventoryInventoryAction::MA_PARTIAL; $js = << Date: Thu, 20 Feb 2025 11:27:04 +0100 Subject: [PATCH 04/10] Update ajax/agent.php Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> --- ajax/agent.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ajax/agent.php b/ajax/agent.php index 17c2c02..82d49b2 100644 --- a/ajax/agent.php +++ b/ajax/agent.php @@ -40,9 +40,7 @@ if (isset($_POST['action']) && isset($_POST['id'])) { $agent = new Agent(); if (!$agent->getFromDB($_POST['id'])) { - $exception = new \Glpi\Exception\Http\HttpException(404); // @phpstan-ignore-line - $exception->setMessageToDisplay('Unable to load agent #' . $_POST['id']); - throw $exception; // @phpstan-ignore-line + throw new \Glpi\Exception\Http\NotFoundHttpException('Unable to load agent #' . $_POST['id']); }; $answer = []; From 4748299c0be199752d5a63ac2900b97598c46c19 Mon Sep 17 00:00:00 2001 From: LAUNAY Samuel <107540223+Lainow@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:28:46 +0100 Subject: [PATCH 05/10] Update inc/inventoryaction.class.php Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> --- inc/inventoryaction.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inventoryaction.class.php b/inc/inventoryaction.class.php index df192e3..982e2fb 100644 --- a/inc/inventoryaction.class.php +++ b/inc/inventoryaction.class.php @@ -112,7 +112,7 @@ public static function runPartialInventory(Agent $agent, $fromMA = false) // not authorized return self::handleAgentResponse($response, $endpoint); } - } catch (\GuzzleHttp\Exception\ClientException $e) { // @phpstan-ignore-line + } if ($fromMA) { return false; } else { From 4714ae7c3415e1864575e9e7ade5f2dd7a4f94ad Mon Sep 17 00:00:00 2001 From: Lainow Date: Thu, 20 Feb 2025 11:30:16 +0100 Subject: [PATCH 06/10] update composer --- composer.lock | 62 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 03e736a..8013d33 100644 --- a/composer.lock +++ b/composer.lock @@ -407,6 +407,7 @@ }, { "name": "friendsofphp/php-cs-fixer", +<<<<<<< HEAD "version": "v3.75.0", "source": { "type": "git", @@ -417,6 +418,18 @@ "type": "zip", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", +======= + "version": "v3.69.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "13b0c0eede38c11cd674b080f2b485d0f14ffa9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/13b0c0eede38c11cd674b080f2b485d0f14ffa9f", + "reference": "13b0c0eede38c11cd674b080f2b485d0f14ffa9f", +>>>>>>> 11062af (update composer) "shasum": "" }, "require": { @@ -447,18 +460,30 @@ "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { +<<<<<<< HEAD "facile-it/paraunit": "^1.3.1 || ^2.6", "infection/infection": "^0.29.14", "justinrainbow/json-schema": "^5.3 || ^6.2", +======= + "facile-it/paraunit": "^1.3.1 || ^2.5", + "infection/infection": "^0.29.10", + "justinrainbow/json-schema": "^5.3 || ^6.0", +>>>>>>> 11062af (update composer) "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", +<<<<<<< HEAD "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" +======= + "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.7", + "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.0" +>>>>>>> 11062af (update composer) }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -499,7 +524,11 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", +<<<<<<< HEAD "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" +======= + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.1" +>>>>>>> 11062af (update composer) }, "funding": [ { @@ -507,6 +536,7 @@ "type": "github" } ], +<<<<<<< HEAD "time": "2025-03-31T18:40:42+00:00" }, { @@ -563,6 +593,9 @@ "source": "https://github.com/friendsoftwig/twigcs/tree/v6.1.0" }, "time": "2023-01-04T16:01:24+00:00" +======= + "time": "2025-02-18T23:57:43+00:00" +>>>>>>> 11062af (update composer) }, { "name": "glpi-project/tools", @@ -731,16 +764,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.4", + "version": "2.1.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8f99e18eb775dbaf6460c95fa0b65312da9c746a" + "reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f99e18eb775dbaf6460c95fa0b65312da9c746a", - "reference": "8f99e18eb775dbaf6460c95fa0b65312da9c746a", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c", + "reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c", "shasum": "" }, "require": { @@ -785,7 +818,11 @@ "type": "github" } ], +<<<<<<< HEAD "time": "2025-04-27T12:28:25+00:00" +======= + "time": "2025-02-19T15:46:42+00:00" +>>>>>>> 11062af (update composer) }, { "name": "phpstan/phpstan-deprecation-rules", @@ -2863,24 +2900,23 @@ }, { "name": "twig/twig", - "version": "v3.19.0", + "version": "v3.20.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "d4f8c2b86374f08efc859323dbcd95c590f7124e" + "reference": "3468920399451a384bef53cf7996965f7cd40183" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/d4f8c2b86374f08efc859323dbcd95c590f7124e", - "reference": "d4f8c2b86374f08efc859323dbcd95c590f7124e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3468920399451a384bef53cf7996965f7cd40183", + "reference": "3468920399451a384bef53cf7996965f7cd40183", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { "phpstan/phpstan": "^2.0", @@ -2927,7 +2963,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.19.0" + "source": "https://github.com/twigphp/Twig/tree/v3.20.0" }, "funding": [ { @@ -2939,7 +2975,7 @@ "type": "tidelift" } ], - "time": "2025-01-29T07:06:14+00:00" + "time": "2025-02-13T08:34:43+00:00" } ], "aliases": [], From 1c153d5e6cc70f994acb62b1c369fde48715ad27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 04:44:18 +0000 Subject: [PATCH 07/10] Bump the dev-dependencies group with 2 updates Bumps the dev-dependencies group with 2 updates: [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) and [phpstan/phpstan](https://github.com/phpstan/phpstan). Updates `friendsofphp/php-cs-fixer` from 3.66.0 to 3.68.5 - [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases) - [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.66.0...v3.68.5) Updates `phpstan/phpstan` from 2.1.1 to 2.1.2 - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/2.1.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/2.1.1...2.1.2) --- updated-dependencies: - dependency-name: friendsofphp/php-cs-fixer dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] --- composer.json | 4 +++ composer.lock | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/composer.json b/composer.json index 867074b..7a6e4c1 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,12 @@ "php": ">=8.2" }, "require-dev": { +<<<<<<< HEAD "friendsofphp/php-cs-fixer": "^3.75", "friendsoftwig/twigcs": "^6.1", +======= + "friendsofphp/php-cs-fixer": "^3.68", +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) "glpi-project/tools": "^0.7.4", "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/extension-installer": "^1.4", diff --git a/composer.lock b/composer.lock index 8013d33..f4184e9 100644 --- a/composer.lock +++ b/composer.lock @@ -407,6 +407,7 @@ }, { "name": "friendsofphp/php-cs-fixer", +<<<<<<< HEAD <<<<<<< HEAD "version": "v3.75.0", "source": { @@ -419,6 +420,8 @@ "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", ======= +======= +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) "version": "v3.69.1", "source": { "type": "git", @@ -429,7 +432,22 @@ "type": "zip", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/13b0c0eede38c11cd674b080f2b485d0f14ffa9f", "reference": "13b0c0eede38c11cd674b080f2b485d0f14ffa9f", +<<<<<<< HEAD >>>>>>> 11062af (update composer) +======= +======= + "version": "v3.68.5", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "7bedb718b633355272428c60736dc97fb96daf27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7bedb718b633355272428c60736dc97fb96daf27", + "reference": "7bedb718b633355272428c60736dc97fb96daf27", +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) "shasum": "" }, "require": { @@ -447,7 +465,11 @@ "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", +<<<<<<< HEAD "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", +======= + "sebastian/diff": "^4.0 || ^5.1 || ^6.0", +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) "symfony/console": "^5.4 || ^6.4 || ^7.0", "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", @@ -473,6 +495,7 @@ "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", +<<<<<<< HEAD "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", <<<<<<< HEAD @@ -483,7 +506,17 @@ "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.7", "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.0", "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.0" +<<<<<<< HEAD >>>>>>> 11062af (update composer) +======= +======= + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", + "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", + "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -524,11 +557,18 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", +<<<<<<< HEAD <<<<<<< HEAD "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" ======= "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.1" >>>>>>> 11062af (update composer) +======= + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.1" +======= + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.5" +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) }, "funding": [ { @@ -536,6 +576,7 @@ "type": "github" } ], +<<<<<<< HEAD <<<<<<< HEAD "time": "2025-03-31T18:40:42+00:00" }, @@ -596,6 +637,12 @@ ======= "time": "2025-02-18T23:57:43+00:00" >>>>>>> 11062af (update composer) +======= + "time": "2025-02-18T23:57:43+00:00" +======= + "time": "2025-01-30T17:00:50+00:00" +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) }, { "name": "glpi-project/tools", @@ -764,6 +811,7 @@ }, { "name": "phpstan/phpstan", +<<<<<<< HEAD "version": "2.1.6", "source": { "type": "git", @@ -774,6 +822,18 @@ "type": "zip", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c", "reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c", +======= + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "7d08f569e582ade182a375c366cbd896eccadd3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7d08f569e582ade182a375c366cbd896eccadd3a", + "reference": "7d08f569e582ade182a375c366cbd896eccadd3a", +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) "shasum": "" }, "require": { @@ -818,11 +878,18 @@ "type": "github" } ], +<<<<<<< HEAD <<<<<<< HEAD "time": "2025-04-27T12:28:25+00:00" ======= "time": "2025-02-19T15:46:42+00:00" >>>>>>> 11062af (update composer) +======= + "time": "2025-02-19T15:46:42+00:00" +======= + "time": "2025-01-21T14:54:06+00:00" +>>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) +>>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) }, { "name": "phpstan/phpstan-deprecation-rules", From 6852e483c0a34e9b13108a0ea9fdfe5c04f36757 Mon Sep 17 00:00:00 2001 From: LAUNAY Samuel <107540223+Lainow@users.noreply.github.com> Date: Thu, 20 Feb 2025 11:42:15 +0100 Subject: [PATCH 08/10] Update setup.php Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com> --- setup.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/setup.php b/setup.php index 8e61928..d8a0e0e 100644 --- a/setup.php +++ b/setup.php @@ -101,11 +101,3 @@ function plugin_version_databaseinventory() ], ]; } - -function plugin_databaseinventory_geturl(): string -{ - /** @var array $CFG_GLPI */ - global $CFG_GLPI; - - return sprintf('%s/plugins/databaseinventory/', $CFG_GLPI['url_base']); -} From 5236777acb302cd064333106e083a95a8d400b1b Mon Sep 17 00:00:00 2001 From: Lainow Date: Thu, 20 Feb 2025 11:43:29 +0100 Subject: [PATCH 09/10] Fix phpstan error --- ajax/agent.php | 2 +- inc/inventoryaction.class.php | 16 ++++++++++------ phpstan.neon | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ajax/agent.php b/ajax/agent.php index 82d49b2..8c609c7 100644 --- a/ajax/agent.php +++ b/ajax/agent.php @@ -40,7 +40,7 @@ if (isset($_POST['action']) && isset($_POST['id'])) { $agent = new Agent(); if (!$agent->getFromDB($_POST['id'])) { - throw new \Glpi\Exception\Http\NotFoundHttpException('Unable to load agent #' . $_POST['id']); + throw new \Glpi\Exception\Http\NotFoundHttpException(); }; $answer = []; diff --git a/inc/inventoryaction.class.php b/inc/inventoryaction.class.php index 982e2fb..e8c5c81 100644 --- a/inc/inventoryaction.class.php +++ b/inc/inventoryaction.class.php @@ -112,13 +112,14 @@ public static function runPartialInventory(Agent $agent, $fromMA = false) // not authorized return self::handleAgentResponse($response, $endpoint); } + } catch (Exception $e) { } - if ($fromMA) { - return false; - } else { - // not authorized - return ['answer' => __('Not allowed')]; - } + + if ($fromMA) { + return false; + } else { + // not authorized + return ['answer' => $e->getMessage()]; } } @@ -169,6 +170,9 @@ public static function postItemForm($item) return; } + /** @var array $CFG_GLPI */ + global $CFG_GLPI; + if ($item::getType() == Computer::getType()) { if ($agent = self::findAgent($item)) { $out = '
'; diff --git a/phpstan.neon b/phpstan.neon index 73f5f07..6aad43e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,6 +11,7 @@ parameters: scanDirectories: - ../../src - ../../inc + - ../../vendor/symfony/http-kernel/Exception stubFiles: - ../../stubs/glpi_constants.php rules: From f95f277c1b9fbe4f4a71af3c69fcdba3ee5b8ace Mon Sep 17 00:00:00 2001 From: Lainow Date: Mon, 5 May 2025 16:35:17 +0200 Subject: [PATCH 10/10] Update composer --- composer.json | 4 - composer.lock | 245 +++++++++++++++----------------------------------- 2 files changed, 71 insertions(+), 178 deletions(-) diff --git a/composer.json b/composer.json index 7a6e4c1..867074b 100644 --- a/composer.json +++ b/composer.json @@ -3,12 +3,8 @@ "php": ">=8.2" }, "require-dev": { -<<<<<<< HEAD "friendsofphp/php-cs-fixer": "^3.75", "friendsoftwig/twigcs": "^6.1", -======= - "friendsofphp/php-cs-fixer": "^3.68", ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) "glpi-project/tools": "^0.7.4", "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/extension-installer": "^1.4", diff --git a/composer.lock b/composer.lock index f4184e9..ee12e8a 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": "3adc0bdb1a0a82cb562c7abae19bb6ba", + "content-hash": "ca8dbf91acbf18c3f8b411ceb8790e7b", "packages": [], "packages-dev": [ { @@ -407,8 +407,6 @@ }, { "name": "friendsofphp/php-cs-fixer", -<<<<<<< HEAD -<<<<<<< HEAD "version": "v3.75.0", "source": { "type": "git", @@ -419,35 +417,6 @@ "type": "zip", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", -======= -======= ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) - "version": "v3.69.1", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "13b0c0eede38c11cd674b080f2b485d0f14ffa9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/13b0c0eede38c11cd674b080f2b485d0f14ffa9f", - "reference": "13b0c0eede38c11cd674b080f2b485d0f14ffa9f", -<<<<<<< HEAD ->>>>>>> 11062af (update composer) -======= -======= - "version": "v3.68.5", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "7bedb718b633355272428c60736dc97fb96daf27" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7bedb718b633355272428c60736dc97fb96daf27", - "reference": "7bedb718b633355272428c60736dc97fb96daf27", ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) "shasum": "" }, "require": { @@ -465,11 +434,7 @@ "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", -<<<<<<< HEAD "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", -======= - "sebastian/diff": "^4.0 || ^5.1 || ^6.0", ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) "symfony/console": "^5.4 || ^6.4 || ^7.0", "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", @@ -482,41 +447,18 @@ "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { -<<<<<<< HEAD "facile-it/paraunit": "^1.3.1 || ^2.6", "infection/infection": "^0.29.14", "justinrainbow/json-schema": "^5.3 || ^6.2", -======= - "facile-it/paraunit": "^1.3.1 || ^2.5", - "infection/infection": "^0.29.10", - "justinrainbow/json-schema": "^5.3 || ^6.0", ->>>>>>> 11062af (update composer) "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", -<<<<<<< HEAD "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", -<<<<<<< HEAD "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" -======= - "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.7", - "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.0", - "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.0" -<<<<<<< HEAD ->>>>>>> 11062af (update composer) -======= -======= - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", - "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", - "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -557,18 +499,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", -<<<<<<< HEAD -<<<<<<< HEAD "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" -======= - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.1" ->>>>>>> 11062af (update composer) -======= - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.69.1" -======= - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.5" ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) }, "funding": [ { @@ -576,22 +507,20 @@ "type": "github" } ], -<<<<<<< HEAD -<<<<<<< HEAD "time": "2025-03-31T18:40:42+00:00" }, { "name": "friendsoftwig/twigcs", - "version": "v6.1.0", + "version": "6.5.0", "source": { "type": "git", "url": "https://github.com/friendsoftwig/twigcs.git", - "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182" + "reference": "aaa3ba112bf4fcee7b51a00d9b45b13bc2cc23bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/3c36d606c4f19db0dd2a01b735ec7a8151b7f182", - "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182", + "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/aaa3ba112bf4fcee7b51a00d9b45b13bc2cc23bc", + "reference": "aaa3ba112bf4fcee7b51a00d9b45b13bc2cc23bc", "shasum": "" }, "require": { @@ -600,14 +529,14 @@ "ext-json": "*", "ext-mbstring": "*", "ext-simplexml": "*", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", - "symfony/console": "^4.4 || ^5.3 || ^6.0", - "symfony/filesystem": "^4.4 || ^5.3 || ^6.0", - "symfony/finder": "^4.4 || ^5.3 || ^6.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "symfony/console": "^4.4 || ^5.3 || ^6.0 || ^7.0", + "symfony/filesystem": "^4.4 || ^5.3 || ^6.0 || ^7.0", + "symfony/finder": "^4.4 || ^5.3 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.5.20", - "symfony/phpunit-bridge": "^6.2.3" + "phpunit/phpunit": "^9.6.19", + "symfony/phpunit-bridge": "^7.1.4" }, "bin": [ "bin/twigcs" @@ -631,18 +560,9 @@ "description": "Checkstyle automation for Twig", "support": { "issues": "https://github.com/friendsoftwig/twigcs/issues", - "source": "https://github.com/friendsoftwig/twigcs/tree/v6.1.0" - }, - "time": "2023-01-04T16:01:24+00:00" -======= - "time": "2025-02-18T23:57:43+00:00" ->>>>>>> 11062af (update composer) -======= - "time": "2025-02-18T23:57:43+00:00" -======= - "time": "2025-01-30T17:00:50+00:00" ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) + "source": "https://github.com/friendsoftwig/twigcs/tree/6.5.0" + }, + "time": "2024-11-27T21:59:24+00:00" }, { "name": "glpi-project/tools", @@ -811,29 +731,16 @@ }, { "name": "phpstan/phpstan", -<<<<<<< HEAD - "version": "2.1.6", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c", - "reference": "6eaec7c6c9e90dcfe46ad1e1ffa5171e2dab641c", -======= - "version": "2.1.2", + "version": "2.1.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "7d08f569e582ade182a375c366cbd896eccadd3a" + "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7d08f569e582ade182a375c366cbd896eccadd3a", - "reference": "7d08f569e582ade182a375c366cbd896eccadd3a", ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8f2e03099cac24ff3b379864d171c5acbfc6b9a2", + "reference": "8f2e03099cac24ff3b379864d171c5acbfc6b9a2", "shasum": "" }, "require": { @@ -878,18 +785,7 @@ "type": "github" } ], -<<<<<<< HEAD -<<<<<<< HEAD - "time": "2025-04-27T12:28:25+00:00" -======= - "time": "2025-02-19T15:46:42+00:00" ->>>>>>> 11062af (update composer) -======= - "time": "2025-02-19T15:46:42+00:00" -======= - "time": "2025-01-21T14:54:06+00:00" ->>>>>>> 31379e6 (Bump the dev-dependencies group with 2 updates) ->>>>>>> ec48bd0 (Bump the dev-dependencies group with 2 updates) + "time": "2025-05-02T15:32:28+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -1686,16 +1582,16 @@ }, { "name": "symfony/console", - "version": "v6.4.17", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" + "reference": "a3011c7b7adb58d89f6c0d822abb641d7a5f9719" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", - "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", + "url": "https://api.github.com/repos/symfony/console/zipball/a3011c7b7adb58d89f6c0d822abb641d7a5f9719", + "reference": "a3011c7b7adb58d89f6c0d822abb641d7a5f9719", "shasum": "" }, "require": { @@ -1760,7 +1656,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.17" + "source": "https://github.com/symfony/console/tree/v6.4.21" }, "funding": [ { @@ -1776,7 +1672,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T12:07:30+00:00" + "time": "2025-04-07T15:42:41+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2200,7 +2096,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2259,7 +2155,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -2279,7 +2175,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -2337,7 +2233,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -2357,7 +2253,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -2418,7 +2314,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -2438,19 +2334,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -2498,7 +2395,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -2514,20 +2411,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", "shasum": "" }, "require": { @@ -2578,7 +2475,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" }, "funding": [ { @@ -2594,11 +2491,11 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-01-02T08:10:11+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -2654,7 +2551,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0" }, "funding": [ { @@ -2674,16 +2571,16 @@ }, { "name": "symfony/process", - "version": "v7.2.0", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", - "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", "shasum": "" }, "require": { @@ -2715,7 +2612,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.0" + "source": "https://github.com/symfony/process/tree/v7.2.5" }, "funding": [ { @@ -2731,7 +2628,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:24:19+00:00" + "time": "2025-03-13T12:21:46+00:00" }, { "name": "symfony/service-contracts", @@ -2818,16 +2715,16 @@ }, { "name": "symfony/stopwatch", - "version": "v7.2.2", + "version": "v7.2.4", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df" + "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e46690d5b9d7164a6d061cab1e8d46141b9f49df", - "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", + "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", "shasum": "" }, "require": { @@ -2860,7 +2757,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.2.2" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.4" }, "funding": [ { @@ -2876,20 +2773,20 @@ "type": "tidelift" } ], - "time": "2024-12-18T14:28:33+00:00" + "time": "2025-02-24T10:49:57+00:00" }, { "name": "symfony/string", - "version": "v7.2.0", + "version": "v7.2.6", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", + "url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931", + "reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931", "shasum": "" }, "require": { @@ -2947,7 +2844,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.0" + "source": "https://github.com/symfony/string/tree/v7.2.6" }, "funding": [ { @@ -2963,20 +2860,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:26+00:00" + "time": "2025-04-20T20:18:16+00:00" }, { "name": "twig/twig", - "version": "v3.20.0", + "version": "v3.21.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3468920399451a384bef53cf7996965f7cd40183" + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3468920399451a384bef53cf7996965f7cd40183", - "reference": "3468920399451a384bef53cf7996965f7cd40183", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", "shasum": "" }, "require": { @@ -3030,7 +2927,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.20.0" + "source": "https://github.com/twigphp/Twig/tree/v3.21.1" }, "funding": [ { @@ -3042,7 +2939,7 @@ "type": "tidelift" } ], - "time": "2025-02-13T08:34:43+00:00" + "time": "2025-05-03T07:21:55+00:00" } ], "aliases": [], @@ -3057,5 +2954,5 @@ "platform-overrides": { "php": "8.2.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" }