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/.twig_cs.dist.php b/.twig_cs.dist.php index 352fe0a..6041bcf 100644 --- a/.twig_cs.dist.php +++ b/.twig_cs.dist.php @@ -2,14 +2,16 @@ declare(strict_types=1); -use FriendsOfTwig\Twigcs; +use FriendsOfTwig\Twigcs\Finder\TemplateFinder; +use FriendsOfTwig\Twigcs\Config\Config; +use Glpi\Tools\GlpiTwigRuleset; -$finder = Twigcs\Finder\TemplateFinder::create() +$finder = TemplateFinder::create() ->in(__DIR__ . '/templates') ->name('*.html.twig') ->ignoreVCSIgnored(true); -return Twigcs\Config\Config::create() +return Config::create() ->setFinder($finder) - ->setRuleSet(\Glpi\Tools\GlpiTwigRuleset::class) + ->setRuleSet(GlpiTwigRuleset::class) ; diff --git a/CHANGELOG.md b/CHANGELOG.md index cf9647e..4f38b37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [UNRELEASE] +## [1.1.0] - 2025-09-29 + +### Added + +- GLPI 11 compatibility ### Fixed diff --git a/ajax/agent.php b/ajax/agent.php index 5ba6672..09ea8ce 100644 --- a/ajax/agent.php +++ b/ajax/agent.php @@ -28,10 +28,12 @@ * ------------------------------------------------------------------------- */ -use Glpi\Http\Response; +use Glpi\Exception\Http\NotFoundHttpException; + +use function Safe\json_encode; $AJAX_INCLUDE = 1; -include('../../../inc/includes.php'); +include(__DIR__ . '/../../../inc/includes.php'); header('Content-Type: application/json; charset=UTF-8'); Html::header_nocache(); @@ -42,9 +44,7 @@ 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; + throw new NotFoundHttpException(); }; $answer = []; diff --git a/composer.json b/composer.json index a219396..8b1e015 100644 --- a/composer.json +++ b/composer.json @@ -1,25 +1,16 @@ { "require": { - "php": ">=7.4" + "php": ">=8.2" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.86", - "friendsoftwig/twigcs": "^6.1", - "glpi-project/tools": "^0.8.0", - "php-parallel-lint/php-parallel-lint": "^1.4", - "phpstan/extension-installer": "^1.4", - "phpstan/phpstan": "^2.1", - "phpstan/phpstan-deprecation-rules": "^2.0" + "glpi-project/tools": "^0.8" }, "config": { "optimize-autoloader": true, "platform": { - "php": "7.4.99" + "php": "8.2.99" }, - "sort-packages": true, - "allow-plugins": { - "phpstan/extension-installer": true - } + "sort-packages": true }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index 8d05d37..07dddba 100644 --- a/composer.lock +++ b/composer.lock @@ -4,257 +4,91 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "95a5bc5c249a7ac171a82eddd4163117", + "content-hash": "0bb7734a8837cdd118f20d259d3613e7", "packages": [], "packages-dev": [ { - "name": "clue/ndjson-react", - "version": "v1.3.0", + "name": "glpi-project/tools", + "version": "0.8.1", "source": { "type": "git", - "url": "https://github.com/clue/reactphp-ndjson.git", - "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + "url": "https://github.com/glpi-project/tools.git", + "reference": "cf182b1a6bd1a73c5c6469dbbd0edabf7cb5857e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", - "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/cf182b1a6bd1a73c5c6469dbbd0edabf7cb5857e", + "reference": "cf182b1a6bd1a73c5c6469dbbd0edabf7cb5857e", "shasum": "" }, "require": { - "php": ">=5.3", - "react/stream": "^1.2" + "symfony/console": "^5.4 || ^6.0", + "twig/twig": "^3.3" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", - "react/event-loop": "^1.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Clue\\React\\NDJson\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - } - ], - "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", - "homepage": "https://github.com/clue/reactphp-ndjson", - "keywords": [ - "NDJSON", - "json", - "jsonlines", - "newline", - "reactphp", - "streaming" - ], - "support": { - "issues": "https://github.com/clue/reactphp-ndjson/issues", - "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + "nikic/php-parser": "^4.13", + "phpstan/phpstan-src": "^1.10" }, - "funding": [ - { - "url": "https://clue.engineering/support", - "type": "custom" - }, - { - "url": "https://github.com/clue", - "type": "github" - } + "bin": [ + "bin/extract-locales", + "bin/licence-headers-check", + "tools/plugin-release" ], - "time": "2022-12-23T10:58:28+00:00" - }, - { - "name": "composer/pcre", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<1.11.10" - }, - "require-dev": { - "phpstan/phpstan": "^1.12 || ^2", - "phpstan/phpstan-strict-rules": "^1 || ^2", - "phpunit/phpunit": "^8 || ^9" - }, "type": "library", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - }, - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Pcre\\": "src" + "GlpiProject\\Tools\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "GPL-3.0-or-later" ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Teclib'", + "email": "glpi@teclib.com", + "homepage": "http://teclib-group.com" } ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "description": "Various tools for GLPI and its plugins", "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" + "glpi", + "plugins", + "tools" ], "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.2" + "issues": "https://github.com/glpi-project/tools/issues", + "source": "https://github.com/glpi-project/tools" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2024-11-12T16:29:46+00:00" + "time": "2025-09-08T09:45:41+00:00" }, { - "name": "composer/semver", - "version": "3.4.4", + "name": "psr/container", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95" + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95", - "reference": "198166618906cb2de69b95d7d47e5fa8aa1b2b95", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" + "php": ">=7.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" + "dev-master": "2.0.x-dev" } - ], - "time": "2025-08-20T19:15:30+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, - "type": "library", "autoload": { "psr-4": { - "Composer\\XdebugHandler\\": "src" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -263,214 +97,76 @@ ], "authors": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Restarts a process without Xdebug.", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "Xdebug", - "performance" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2024-05-06T16:37:16+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { - "name": "evenement/evenement", - "version": "v3.0.2", + "name": "symfony/console", + "version": "v6.4.26", "source": { "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + "url": "https://github.com/symfony/console.git", + "reference": "492de6dfd93910d7d7a729c5a04ddcd2b9e99c4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "url": "https://api.github.com/repos/symfony/console/zipball/492de6dfd93910d7d7a729c5a04ddcd2b9e99c4f", + "reference": "492de6dfd93910d7d7a729c5a04ddcd2b9e99c4f", "shasum": "" }, "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^9 || ^6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Evenement\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - } - ], - "description": "Événement is a very simple event dispatching library for PHP", - "keywords": [ - "event-dispatcher", - "event-emitter" - ], - "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/v3.0.2" - }, - "time": "2023-08-08T05:53:35+00:00" - }, - { - "name": "fidry/cpu-core-counter", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "db9508f7b1474469d9d3c53b86f817e344732678" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", - "reference": "db9508f7b1474469d9d3c53b86f817e344732678", - "shasum": "" + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, - "require": { - "php": "^7.2 || ^8.0" + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "fidry/makefile": "^0.2.0", - "fidry/php-cs-fixer-config": "^1.1.2", - "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^2.0", - "phpstan/phpstan-deprecation-rules": "^2.0.0", - "phpstan/phpstan-phpunit": "^2.0", - "phpstan/phpstan-strict-rules": "^2.0", - "phpunit/phpunit": "^8.5.31 || ^9.5.26", - "webmozarts/strict-phpunit": "^7.5" + "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": { "psr-4": { - "Fidry\\CpuCoreCounter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Théo FIDRY", - "email": "theo.fidry@gmail.com" - } - ], - "description": "Tiny utility to get the number of CPU cores.", - "keywords": [ - "CPU", - "core" - ], - "support": { - "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" - }, - "funding": [ - { - "url": "https://github.com/theofidry", - "type": "github" - } - ], - "time": "2025-08-14T07:29:31+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v3.86.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "4a952bd19dc97879b0620f495552ef09b55f7d36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4a952bd19dc97879b0620f495552ef09b55f7d36", - "reference": "4a952bd19dc97879b0620f495552ef09b55f7d36", - "shasum": "" - }, - "require": { - "clue/ndjson-react": "^1.3", - "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.5", - "ext-filter": "*", - "ext-hash": "*", - "ext-json": "*", - "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.2", - "php": "^7.4 || ^8.0", - "react/child-process": "^0.6.6", - "react/event-loop": "^1.5", - "react/promise": "^3.2", - "react/socket": "^1.16", - "react/stream": "^1.4", - "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", - "symfony/console": "^5.4.47 || ^6.4.13 || ^7.0", - "symfony/event-dispatcher": "^5.4.45 || ^6.4.13 || ^7.0", - "symfony/filesystem": "^5.4.45 || ^6.4.13 || ^7.0", - "symfony/finder": "^5.4.45 || ^6.4.17 || ^7.0", - "symfony/options-resolver": "^5.4.45 || ^6.4.16 || ^7.0", - "symfony/polyfill-mbstring": "^1.32", - "symfony/polyfill-php80": "^1.32", - "symfony/polyfill-php81": "^1.32", - "symfony/process": "^5.4.47 || ^6.4.20 || ^7.2", - "symfony/stopwatch": "^5.4.45 || ^6.4.19 || ^7.0" - }, - "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.6", - "infection/infection": "^0.29.14", - "justinrainbow/json-schema": "^5.3 || ^6.4", - "keradus/cli-executor": "^2.2", - "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.8", - "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.23 || ^10.5.47 || ^11.5.25", - "symfony/polyfill-php84": "^1.32", - "symfony/var-dumper": "^5.4.48 || ^6.4.23 || ^7.3.1", - "symfony/yaml": "^5.4.45 || ^6.4.23 || ^7.3.1" - }, - "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" + "Symfony\\Component\\Console\\": "" }, "exclude-from-classmap": [ - "src/Fixer/Internal/*" + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -482,1768 +178,21 @@ "name": "Fabien Potencier", "email": "fabien@symfony.com" }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "keywords": [ - "Static code analysis", - "fixer", - "standards", - "static analysis" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.86.0" - }, - "funding": [ - { - "url": "https://github.com/keradus", - "type": "github" - } - ], - "time": "2025-08-13T22:36:21+00:00" - }, - { - "name": "friendsoftwig/twigcs", - "version": "v6.1.0", - "source": { - "type": "git", - "url": "https://github.com/friendsoftwig/twigcs.git", - "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/3c36d606c4f19db0dd2a01b735ec7a8151b7f182", - "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-hash": "*", - "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" - }, - "require-dev": { - "phpunit/phpunit": "^9.5.20", - "symfony/phpunit-bridge": "^6.2.3" - }, - "bin": [ - "bin/twigcs" - ], - "type": "library", - "autoload": { - "psr-4": { - "FriendsOfTwig\\Twigcs\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tristan Maindron", - "email": "tmaindron@gmail.com" - } - ], - "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" - }, - { - "name": "glpi-project/tools", - "version": "0.8.0", - "source": { - "type": "git", - "url": "https://github.com/glpi-project/tools.git", - "reference": "7c2dcec105ed3427183bdfd382d785363aade436" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/7c2dcec105ed3427183bdfd382d785363aade436", - "reference": "7c2dcec105ed3427183bdfd382d785363aade436", - "shasum": "" - }, - "require": { - "symfony/console": "^5.4 || ^6.0", - "twig/twig": "^3.3" - }, - "require-dev": { - "nikic/php-parser": "^4.13", - "phpstan/phpstan-src": "^1.10" - }, - "bin": [ - "bin/extract-locales", - "bin/licence-headers-check", - "tools/plugin-release" - ], - "type": "library", - "autoload": { - "psr-4": { - "GlpiProject\\Tools\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-3.0-or-later" - ], - "authors": [ - { - "name": "Teclib'", - "email": "glpi@teclib.com", - "homepage": "http://teclib-group.com" - } - ], - "description": "Various tools for GLPI and its plugins", - "keywords": [ - "glpi", - "plugins", - "tools" - ], - "support": { - "issues": "https://github.com/glpi-project/tools/issues", - "source": "https://github.com/glpi-project/tools" - }, - "time": "2025-08-26T10:18:38+00:00" - }, - { - "name": "php-parallel-lint/php-parallel-lint", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", - "reference": "6db563514f27e19595a19f45a4bf757b6401194e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", - "reference": "6db563514f27e19595a19f45a4bf757b6401194e", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=5.3.0" - }, - "replace": { - "grogy/php-parallel-lint": "*", - "jakub-onderka/php-parallel-lint": "*" - }, - "require-dev": { - "nette/tester": "^1.3 || ^2.0", - "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "suggest": { - "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" - }, - "bin": [ - "parallel-lint" - ], - "type": "library", - "autoload": { - "classmap": [ - "./src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "ahoj@jakubonderka.cz" - } - ], - "description": "This tool checks the syntax of PHP files about 20x faster than serial check.", - "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint", - "keywords": [ - "lint", - "static analysis" - ], - "support": { - "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues", - "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0" - }, - "time": "2024-03-27T12:14:49+00:00" - }, - { - "name": "phpstan/extension-installer", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/extension-installer.git", - "reference": "85e90b3942d06b2326fba0403ec24fe912372936" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", - "reference": "85e90b3942d06b2326fba0403ec24fe912372936", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0 || ^2.0" - }, - "require-dev": { - "composer/composer": "^2.0", - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "PHPStan\\ExtensionInstaller\\Plugin" - }, - "autoload": { - "psr-4": { - "PHPStan\\ExtensionInstaller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Composer plugin for automatic installation of PHPStan extensions", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" - }, - "time": "2024-09-04T20:21:43+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "2.1.22", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4", - "reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4", - "shasum": "" - }, - "require": { - "php": "^7.4|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "keywords": [ - "dev", - "static analysis" - ], - "support": { - "docs": "https://phpstan.org/user-guide/getting-started", - "forum": "https://github.com/phpstan/phpstan/discussions", - "issues": "https://github.com/phpstan/phpstan/issues", - "security": "https://github.com/phpstan/phpstan/security/policy", - "source": "https://github.com/phpstan/phpstan-src" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - } - ], - "time": "2025-08-04T19:17:37+00:00" - }, - { - "name": "phpstan/phpstan-deprecation-rules", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "468e02c9176891cc901143da118f09dc9505fc2f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/468e02c9176891cc901143da118f09dc9505fc2f", - "reference": "468e02c9176891cc901143da118f09dc9505fc2f", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.1.15" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^9.6" - }, - "type": "phpstan-extension", - "extra": { - "phpstan": { - "includes": [ - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", - "support": { - "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.3" - }, - "time": "2025-05-14T10:56:57+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" - }, - "time": "2021-11-05T16:50:12+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "react/cache", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/cache.git", - "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", - "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "react/promise": "^3.0 || ^2.0 || ^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, Promise-based cache interface for ReactPHP", - "keywords": [ - "cache", - "caching", - "promise", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/cache/issues", - "source": "https://github.com/reactphp/cache/tree/v1.2.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2022-11-30T15:59:55+00:00" - }, - { - "name": "react/child-process", - "version": "v0.6.6", - "source": { - "type": "git", - "url": "https://github.com/reactphp/child-process.git", - "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", - "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.0", - "react/event-loop": "^1.2", - "react/stream": "^1.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", - "react/socket": "^1.16", - "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\ChildProcess\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Event-driven library for executing child processes with ReactPHP.", - "keywords": [ - "event-driven", - "process", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.6" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2025-01-01T16:37:48+00:00" - }, - { - "name": "react/dns", - "version": "v1.13.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/dns.git", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "react/cache": "^1.0 || ^0.6 || ^0.5", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.7 || ^1.2.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", - "react/async": "^4.3 || ^3 || ^2", - "react/promise-timer": "^1.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Dns\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async DNS resolver for ReactPHP", - "keywords": [ - "async", - "dns", - "dns-resolver", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.13.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2024-06-13T14:18:03+00:00" - }, - { - "name": "react/event-loop", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" - }, - "suggest": { - "ext-pcntl": "For signal handling support when using the StreamSelectLoop" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\EventLoop\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", - "keywords": [ - "asynchronous", - "event-loop" - ], - "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2023-11-13T13:48:05+00:00" - }, - { - "name": "react/promise", - "version": "v3.3.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", - "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", - "shasum": "" - }, - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpstan/phpstan": "1.12.28 || 1.4.10", - "phpunit/phpunit": "^9.6 || ^7.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v3.3.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2025-08-19T18:57:03+00:00" - }, - { - "name": "react/socket", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.0", - "react/dns": "^1.13", - "react/event-loop": "^1.2", - "react/promise": "^3.2 || ^2.6 || ^1.2.1", - "react/stream": "^1.4" - }, - "require-dev": { - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", - "react/async": "^4.3 || ^3.3 || ^2", - "react/promise-stream": "^1.4", - "react/promise-timer": "^1.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Socket\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", - "keywords": [ - "Connection", - "Socket", - "async", - "reactphp", - "stream" - ], - "support": { - "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.16.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2024-07-26T10:38:09+00:00" - }, - { - "name": "react/stream", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", - "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.8", - "react/event-loop": "^1.2" - }, - "require-dev": { - "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", - "keywords": [ - "event-driven", - "io", - "non-blocking", - "pipe", - "reactphp", - "readable", - "stream", - "writable" - ], - "support": { - "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.4.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2024-06-11T12:45:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "4.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-02T06:30:58+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", - "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^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" - }, - "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" - }, - "provide": { - "psr/log-implementation": "1.0|2.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": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command-line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.47" - }, - "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-11-06T11:30:55+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", - "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "2.5-dev" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "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": "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" - }, - "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-25T14:11:13+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v5.4.45", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/72982eb416f61003e9bb6e91f8b3213600dcf9e9", - "reference": "72982eb416f61003e9bb6e91f8b3213600dcf9e9", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.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": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "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" - }, - "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-25T14:11:13+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", - "reference": "e0fe3d79b516eb75126ac6fa4cbf19b79b08c99f", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "2.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "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": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.4" - }, - "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-25T14:11:13+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v5.4.45", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "57c8294ed37d4a055b77057827c67f9558c95c54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/57c8294ed37d4a055b77057827c67f9558c95c54", - "reference": "57c8294ed37d4a055b77057827c67f9558c95c54", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/process": "^5.4|^6.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.45" - }, - "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-10-22T13:05:35+00:00" - }, - { - "name": "symfony/finder", - "version": "v5.4.45", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "63741784cd7b9967975eec610b256eed3ede022b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b", - "reference": "63741784cd7b9967975eec610b256eed3ede022b", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "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" - }, - "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-28T13:32:08+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v5.4.45", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", - "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.45" - }, - "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-25T14:11:13+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "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 for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + "source": "https://github.com/symfony/console/tree/v6.4.26" }, "funding": [ { @@ -2263,44 +212,38 @@ "type": "tidelift" } ], - "time": "2025-06-27T09:58:17+00:00" + "time": "2025-09-26T12:13:46+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" + "php": ">=8.1" }, "type": "library", "extra": { "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2317,18 +260,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -2339,40 +274,35 @@ "url": "https://github.com/fabpot", "type": "github" }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { - "name": "symfony/polyfill-mbstring", + "name": "symfony/polyfill-ctype", "version": "v1.33.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "ext-iconv": "*", "php": ">=7.2" }, "provide": { - "ext-mbstring": "*" + "ext-ctype": "*" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { @@ -2386,7 +316,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2395,25 +325,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" }, "funding": [ { @@ -2433,25 +362,28 @@ "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php73", + "name": "symfony/polyfill-intl-grapheme", "version": "v1.33.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", "shasum": "" }, "require": { "php": ">=7.2" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "thanks": { @@ -2464,11 +396,8 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2484,16 +413,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" }, "funding": [ { @@ -2513,25 +444,28 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-06-27T09:58:17+00:00" }, { - "name": "symfony/polyfill-php80", + "name": "symfony/polyfill-intl-normalizer", "version": "v1.33.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { "php": ">=7.2" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "thanks": { @@ -2544,7 +478,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "classmap": [ "Resources/stubs" @@ -2555,10 +489,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2568,16 +498,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" }, "funding": [ { @@ -2597,25 +529,32 @@ "type": "tidelift" } ], - "time": "2025-01-02T08:10:11+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php81", + "name": "symfony/polyfill-mbstring", "version": "v1.33.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "thanks": { @@ -2628,11 +567,8 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2648,16 +584,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -2677,95 +614,30 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d", - "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.47" - }, - "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-11-06T11:36:42+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.4", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f37b419f7aea2e9abf10abd261832cace12e3300" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "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/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "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": { @@ -2773,13 +645,16 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2806,69 +681,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.4" - }, - "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-25T14:11:13+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v5.4.45", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fb2c199cf302eb207f8c23e7ee174c1c31a5c004", - "reference": "fb2c199cf302eb207f8c23e7ee174c1c31a5c004", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "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/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -2884,38 +697,38 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:11:13+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v5.4.47", + "version": "v7.3.4", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" + "reference": "f96476035142921000338bad71e5247fbc138872" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", + "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", + "reference": "f96476035142921000338bad71e5247fbc138872", "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/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": { @@ -2954,7 +767,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.47" + "source": "https://github.com/symfony/string/tree/v7.3.4" }, "funding": [ { @@ -2965,36 +778,39 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-11-10T20:33:58+00:00" + "time": "2025-09-11T14:36:48+00:00" }, { "name": "twig/twig", - "version": "v3.11.3", + "version": "v3.21.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3b06600ff3abefaf8ff55d5c336cd1c4253f8c7e" + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3b06600ff3abefaf8ff55d5c336cd1c4253f8c7e", - "reference": "3b06600ff3abefaf8ff55d5c336cd1c4253f8c7e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1.0", "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" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { + "phpstan/phpstan": "^2.0", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -3038,7 +854,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.21.1" }, "funding": [ { @@ -3050,7 +866,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T12:34:41+00:00" + "time": "2025-05-03T07:21:55+00:00" } ], "aliases": [], @@ -3059,11 +875,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.6.0" } diff --git a/databaseinventory.xml b/databaseinventory.xml index d9a789f..f67344c 100644 --- a/databaseinventory.xml +++ b/databaseinventory.xml @@ -22,9 +22,9 @@ - 1.1.0-beta4 + 1.1.0 ~11.0.0 - https://github.com/pluginsGLPI/databaseinventory/releases/download/1.1.0-beta4/glpi-databaseinventory-1.1.0-beta4.tar.bz2 + https://github.com/pluginsGLPI/databaseinventory/releases/download/1.1.0/glpi-databaseinventory-1.1.0.tar.bz2 1.0.4 diff --git a/front/computergroup.form.php b/front/computergroup.form.php index 149025d..03e90c3 100644 --- a/front/computergroup.form.php +++ b/front/computergroup.form.php @@ -30,8 +30,6 @@ use Glpi\Event; -include('../../../inc/includes.php'); - Session::checkRight('config', READ); if (!isset($_GET['id'])) { @@ -54,7 +52,7 @@ 'PluginDatabaseinventoryComputerGroup', 4, 'inventory', - sprintf(__('%1$s adds the item %2$s'), $_SESSION['glpiname'], $_POST['name']), + sprintf(__s('%1$s adds the item %2$s'), $_SESSION['glpiname'], $_POST['name']), ); if ($_SESSION['glpibackcreated']) { @@ -64,7 +62,7 @@ Html::back(); } elseif (isset($_POST['add_staticcomputer'])) { if (!$_POST['computers_id']) { - Session::addMessageAfterRedirect(__('Please select a computer', 'databaseinventory'), false, ERROR); + Session::addMessageAfterRedirect(__s('Please select a computer', 'databaseinventory'), false, ERROR); Html::back(); } @@ -75,7 +73,7 @@ 'PluginDatabaseinventoryComputerGroupStatic', 4, 'inventory', - sprintf(__('%1$s adds the item %2$s'), $_SESSION['glpiname'], $computergroupstatic::getTypeName(0)), + sprintf(__s('%1$s adds the item %2$s'), $_SESSION['glpiname'], $computergroupstatic::getTypeName(0)), ); if ($_SESSION['glpibackcreated']) { @@ -94,7 +92,7 @@ 4, 'inventory', //TRANS: %s is the user login - sprintf(__('%s purges an item'), $_SESSION['glpiname']), + sprintf(__s('%s purges an item'), $_SESSION['glpiname']), ); } $computergroup->redirectToList(); @@ -108,7 +106,7 @@ 4, 'inventory', //TRANS: %s is the user login - sprintf(__('%s updates an item'), $_SESSION['glpiname']), + sprintf(__s('%s updates an item'), $_SESSION['glpiname']), ); Html::back(); } else { @@ -119,10 +117,10 @@ if (isset($_GET['save'])) { $input = ['plugin_databaseinventory_computergroups_id' => $_GET['plugin_databaseinventory_computergroups_id']]; $search = serialize([ - 'is_deleted' => isset($_GET['is_deleted']) ? $_GET['is_deleted'] : 0 , - 'as_map' => isset($_GET['as_map']) ? $_GET['as_map'] : 0, + 'is_deleted' => $_GET['is_deleted'] ?? 0 , + 'as_map' => $_GET['as_map'] ?? 0, 'criteria' => $_GET['criteria'], - 'metacriteria' => isset($_GET['metacriteria']) ? $_GET['metacriteria'] : [], + 'metacriteria' => $_GET['metacriteria'] ?? [], ]); if (!$computergroup_dynamic->getFromDBByCrit($input)) { diff --git a/front/computergroup.php b/front/computergroup.php index eebb5e0..a2b516c 100644 --- a/front/computergroup.php +++ b/front/computergroup.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Session::checkRight('config', UPDATE); Html::header( diff --git a/front/credential.form.php b/front/credential.form.php index 40ee85d..dc516bc 100644 --- a/front/credential.form.php +++ b/front/credential.form.php @@ -30,8 +30,6 @@ use Glpi\Event; -include('../../../inc/includes.php'); - Session::checkRight('config', READ); if (!isset($_GET['id'])) { @@ -53,7 +51,7 @@ 'PluginDatabaseinventoryCredential', 4, 'inventory', - sprintf(__('%1$s adds the item %2$s'), $_SESSION['glpiname'], $_POST['name']), + sprintf(__s('%1$s adds the item %2$s'), $_SESSION['glpiname'], $_POST['name']), ); if ($_SESSION['glpibackcreated']) { @@ -71,7 +69,7 @@ 4, 'inventory', //TRANS: %s is the user login - sprintf(__('%s purges an item'), $_SESSION['glpiname']), + sprintf(__s('%s purges an item'), $_SESSION['glpiname']), ); } $credential->redirectToList(); @@ -85,7 +83,7 @@ 4, 'inventory', //TRANS: %s is the user login - sprintf(__('%s updates an item'), $_SESSION['glpiname']), + sprintf(__s('%s updates an item'), $_SESSION['glpiname']), ); Html::back(); } else { diff --git a/front/credential.php b/front/credential.php index 2026e55..d5e976c 100644 --- a/front/credential.php +++ b/front/credential.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Session::checkRight('config', UPDATE); Html::header( diff --git a/front/databaseparam.form.php b/front/databaseparam.form.php index 2635787..9ee6a12 100644 --- a/front/databaseparam.form.php +++ b/front/databaseparam.form.php @@ -30,8 +30,6 @@ use Glpi\Event; -include('../../../inc/includes.php'); - Session::checkRight('config', READ); if (!isset($_GET['id'])) { @@ -55,7 +53,7 @@ 'PluginDatabaseinventoryDatabaseParam', 4, 'inventory', - sprintf(__('%1$s adds the item %2$s'), $_SESSION['glpiname'], $_POST['name']), + sprintf(__s('%1$s adds the item %2$s'), $_SESSION['glpiname'], $_POST['name']), ); if ($_SESSION['glpibackcreated']) { @@ -72,7 +70,7 @@ 'PluginDatabaseinventoryDatabaseParam_Credential', 4, 'inventory', - sprintf(__('%1$s adds the item %2$s'), $_SESSION['glpiname'], $databaseparam_credential::getTypeName(0)), + sprintf(__s('%1$s adds the item %2$s'), $_SESSION['glpiname'], $databaseparam_credential::getTypeName(0)), ); if ($_SESSION['glpibackcreated']) { @@ -90,7 +88,7 @@ 'PluginDatabaseinventoryDatabaseParam_ComputerGroup', 4, 'inventory', - sprintf(__('%1$s adds the item %2$s'), $_SESSION['glpiname'], $databaseparam_computergroup::getTypeName(0)), + sprintf(__s('%1$s adds the item %2$s'), $_SESSION['glpiname'], $databaseparam_computergroup::getTypeName(0)), ); if ($_SESSION['glpibackcreated']) { @@ -109,7 +107,7 @@ 4, 'inventory', //TRANS: %s is the user login - sprintf(__('%s purges an item'), $_SESSION['glpiname']), + sprintf(__s('%s purges an item'), $_SESSION['glpiname']), ); } $databaseparam->redirectToList(); @@ -123,7 +121,7 @@ 4, 'inventory', //TRANS: %s is the user login - sprintf(__('%s updates an item'), $_SESSION['glpiname']), + sprintf(__s('%s updates an item'), $_SESSION['glpiname']), ); Html::back(); } else { diff --git a/front/databaseparam.php b/front/databaseparam.php index e14de1c..bd7966e 100644 --- a/front/databaseparam.php +++ b/front/databaseparam.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Session::checkRight('config', UPDATE); Html::header( diff --git a/front/menu.php b/front/menu.php index bef99f7..9cf62cb 100644 --- a/front/menu.php +++ b/front/menu.php @@ -28,14 +28,13 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); Session::checkLoginUser(); /** @var array $CFG_GLPI */ global $CFG_GLPI; Html::header( - __('Database Inventory', 'databaseinventory'), + __s('Database Inventory', 'databaseinventory'), $_SERVER['PHP_SELF'], 'admin', 'PluginDatabaseInventoryMenu', @@ -44,7 +43,7 @@ if (PluginDatabaseinventoryDatabaseParam::canView()) { echo "
"; echo ""; - echo "'; + echo "'; echo ""; echo ""; @@ -68,7 +67,7 @@ echo '
" . __('Database Inventory', 'databaseinventory') . '
" . __s('Database Inventory', 'databaseinventory') . '
'; } else { echo "


warning

'; - echo '' . __('Access denied') . '
'; + echo '' . __s('Access denied') . ''; } Html::footer(); diff --git a/hook.php b/hook.php index 70f1b61..008d6c7 100644 --- a/hook.php +++ b/hook.php @@ -28,6 +28,9 @@ * ------------------------------------------------------------------------- */ +use function Safe\glob; +use function Safe\preg_match; + /** * Plugin install process * @@ -39,9 +42,9 @@ function plugin_databaseinventory_install() $migration = new Migration($version['version']); // Parse inc directory - foreach (glob(dirname(__FILE__) . '/inc/*') as $filepath) { + foreach (glob(__DIR__ . '/inc/*') as $filepath) { // Load *.class.php files and get the class name - if (preg_match("/inc.(.+)\.class.php$/", $filepath, $matches)) { + if (preg_match("/inc.(.+)\.class.php$/", $filepath, $matches) !== 0) { $classname = 'PluginDatabaseinventory' . ucfirst($matches[1]); include_once($filepath); // If the install method exists, load it @@ -65,9 +68,9 @@ function plugin_databaseinventory_uninstall() $migration = new Migration(PLUGIN_DATABASEINVENTORY_VERSION); // Parse inc directory - foreach (glob(dirname(__FILE__) . '/inc/*') as $filepath) { + foreach (glob(__DIR__ . '/inc/*') as $filepath) { // Load *.class.php files and get the class name - if (preg_match("/inc.(.+)\.class.php/", $filepath, $matches)) { + if (preg_match("/inc.(.+)\.class.php/", $filepath, $matches) !== 0) { $classname = 'PluginDatabaseinventory' . ucfirst($matches[1]); include_once($filepath); // If the install method exists, load it @@ -93,7 +96,7 @@ function plugin_databaseinventory_MassiveActions($type) case 'Agent': $class = PluginDatabaseinventoryInventoryAction::getType(); $key = PluginDatabaseinventoryInventoryAction::MA_PARTIAL; - $label = __('Run partial databases inventory', 'databaseinventory'); + $label = __s('Run partial databases inventory', 'databaseinventory'); return [$class . MassiveAction::CLASS_ACTION_SEPARATOR . $key => $label]; } diff --git a/inc/computergroup.class.php b/inc/computergroup.class.php index 55bb85a..09f3877 100644 --- a/inc/computergroup.class.php +++ b/inc/computergroup.class.php @@ -65,15 +65,15 @@ class PluginDatabaseinventoryComputerGroup extends CommonDBTM public static function getTypeName($nb = 0) { - return _n('Computer Group', 'Computers Group', $nb, 'databaseinventory'); + return _sn('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); } @@ -97,7 +97,7 @@ public function rawSearchOptions() 'id' => '2', 'table' => $this->getTable(), 'field' => 'id', - 'name' => __('ID'), + 'name' => __s('ID'), 'massiveaction' => false, // implicit field is id 'datatype' => 'number', ]; @@ -106,7 +106,7 @@ public function rawSearchOptions() 'id' => '3', 'table' => $this->getTable(), 'field' => 'comment', - 'name' => __('Comment'), + 'name' => __s('Comment'), 'datatype' => 'text', ]; @@ -114,7 +114,7 @@ public function rawSearchOptions() 'id' => '5', 'table' => PluginDatabaseinventoryComputerGroupDynamic::getTable(), 'field' => 'search', - 'name' => __('Number of dynamic items', 'databaseinventory'), + 'name' => __s('Number of dynamic items', 'databaseinventory'), 'nosearch' => true, 'massiveaction' => false, 'forcegroupby' => true, @@ -127,7 +127,7 @@ public function rawSearchOptions() 'id' => '6', 'table' => PluginDatabaseinventoryComputerGroupStatic::getTable(), 'field' => 'id', - 'name' => __('Number of static items', 'databaseinventory'), + 'name' => __s('Number of static items', 'databaseinventory'), 'forcegroupby' => true, 'usehaving' => true, 'nosearch' => true, @@ -140,7 +140,7 @@ public function rawSearchOptions() 'id' => '7', 'table' => PluginDatabaseinventoryComputerGroupDynamic::getTable(), 'field' => '_virtual_dynamic_list', - 'name' => __('List of dynamic items', 'databaseinventory'), + 'name' => __s('List of dynamic items', 'databaseinventory'), 'massiveaction' => false, 'forcegroupby' => true, 'nosearch' => true, @@ -155,7 +155,7 @@ public function rawSearchOptions() 'table' => Computer::getTable(), 'field' => 'name', 'datatype' => 'itemlink', - 'name' => __('List of static items', 'databaseinventory'), + 'name' => __s('List of static items', 'databaseinventory'), 'forcegroupby' => true, 'massiveaction' => false, 'joinparams' => [ diff --git a/inc/computergroupdynamic.class.php b/inc/computergroupdynamic.class.php index 545a6a1..c44daf5 100644 --- a/inc/computergroupdynamic.class.php +++ b/inc/computergroupdynamic.class.php @@ -28,21 +28,25 @@ * ------------------------------------------------------------------------- */ +use function Safe\preg_match; +use function Safe\preg_replace; +use function Safe\preg_split; + class PluginDatabaseinventoryComputerGroupDynamic extends CommonDBTM { public static $rightname = 'database_inventory'; public static function getTypeName($nb = 0) { - return _n('Dynamic group', 'Dynamic groups', $nb, 'databaseinventory'); + return _sn('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); } @@ -74,22 +78,20 @@ public static function getSpecificValueToDisplay($field, $values, array $options switch ($field) { case 'search': $count = 0; - if (isset($values['id'])) { - if (strpos($values['id'], Search::NULLVALUE) === false) { - $computergroup_dynamic = new PluginDatabaseinventoryComputerGroupDynamic(); - $computergroup_dynamic->getFromDB($values['id']); - $count = $computergroup_dynamic->countDynamicItems(); - } + if (isset($values['id']) && !str_contains($values['id'], Search::NULLVALUE)) { + $computergroup_dynamic = new PluginDatabaseinventoryComputerGroupDynamic(); + $computergroup_dynamic->getFromDB($values['id']); + $count = $computergroup_dynamic->countDynamicItems(); } - return ($count) ? $count : ' 0 '; + return $count ?: ' 0 '; case '_virtual_dynamic_list': /** @var array $CFG_GLPI */ global $CFG_GLPI; $value = ' '; $out = ' '; - if (strpos($values['id'], Search::NULLVALUE) === false) { + if (!str_contains($values['id'], Search::NULLVALUE)) { $search_params = Search::manageParams('Computer', unserialize($values['search'])); $data = Search::prepareDatasForSearch('Computer', $search_params); Search::constructSQL($data); @@ -101,7 +103,7 @@ public static function getSpecificValueToDisplay($field, $values, array $options } } - if (!preg_match('/' . Search::LBHR . '/', $value)) { + if (preg_match('/' . Search::LBHR . '/', $value) === 0) { $values = preg_split('/' . Search::LBBR . '/i', $value); $line_delimiter = '
'; } else { diff --git a/inc/computergroupstatic.class.php b/inc/computergroupstatic.class.php index c48a14b..37474b8 100644 --- a/inc/computergroupstatic.class.php +++ b/inc/computergroupstatic.class.php @@ -74,20 +74,20 @@ class PluginDatabaseinventoryComputerGroupStatic extends CommonDBRelation public static function getTypeName($nb = 0) { - return _n('Static group', 'Static groups', $nb, 'databaseinventory'); + return _sn('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..f8d053a 100644 --- a/inc/contactlog.class.php +++ b/inc/contactlog.class.php @@ -63,24 +63,24 @@ 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); } public static function getTypeName($nb = 0) { - return _n('Contact log', 'Contact logs', $nb, 'databaseinventory'); + return _sn('Contact log', 'Contact logs', $nb, 'databaseinventory'); } public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) diff --git a/inc/credential.class.php b/inc/credential.class.php index 058aed5..00e7665 100644 --- a/inc/credential.class.php +++ b/inc/credential.class.php @@ -63,24 +63,24 @@ 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); } public static function getTypeName($nb = 0) { - return _n('Credential', 'Credentials', $nb, 'databaseinventory'); + return _sn('Credential', 'Credentials', $nb, 'databaseinventory'); } public function rawSearchOptions() @@ -91,7 +91,7 @@ public function rawSearchOptions() 'id' => '2', 'table' => $this->getTable(), 'field' => 'id', - 'name' => __('ID'), + 'name' => __s('ID'), 'massiveaction' => false, // implicit field is id 'datatype' => 'number', ]; @@ -100,7 +100,7 @@ public function rawSearchOptions() 'id' => '3', 'table' => $this->getTable(), 'field' => 'login', - 'name' => __('Login'), + 'name' => __s('Login'), 'datatype' => 'text', ]; @@ -108,7 +108,7 @@ public function rawSearchOptions() 'id' => '4', 'table' => $this->getTable(), 'field' => 'port', - 'name' => __('Port'), + 'name' => __s('Port'), 'datatype' => 'number', ]; @@ -116,7 +116,7 @@ public function rawSearchOptions() 'id' => '5', 'table' => $this->getTable(), 'field' => 'socket', - 'name' => __('Socket'), + 'name' => __s('Socket'), 'datatype' => 'text', ]; @@ -124,7 +124,7 @@ public function rawSearchOptions() 'id' => '6', 'table' => PluginDatabaseinventoryCredentialType::getTable(), 'field' => 'name', - 'name' => _n('Type', 'Types', 1), + 'name' => _sn('Type', 'Types', 1), 'datatype' => 'dropdown', ]; diff --git a/inc/credentialtype.class.php b/inc/credentialtype.class.php index 480ec74..94dd2b4 100644 --- a/inc/credentialtype.class.php +++ b/inc/credentialtype.class.php @@ -28,7 +28,7 @@ * ------------------------------------------------------------------------- */ -use Glpi\Toolbox\Sanitizer; + class PluginDatabaseinventoryCredentialType extends CommonDropdown { @@ -41,45 +41,45 @@ 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; } public static function getTypeName($nb = 0) { - return _n('Credential type', 'Credential types', $nb, 'databaseinventory'); + return _sn('Credential type', 'Credential types', $nb, 'databaseinventory'); } public function pre_deleteItem() { Session::addMessageAfterRedirect( - __('You cannot remove this type', 'databaseinventory') . ': ' + __s('You cannot remove this type', 'databaseinventory') . ': ' . $this->fields['name'], false, ERROR, @@ -154,18 +154,18 @@ public static function install(Migration $migration) $state = new self(); foreach ( [ - 1 => __('MySQL', 'databaseinventory'), - 2 => __('Oracle', 'databaseinventory'), - 3 => __('DB2', 'databaseinventory'), - 4 => __('Microsoft SQL', 'databaseinventory'), - 5 => __('PostgreSQL', 'databaseinventory'), - 6 => __('MongoDB', 'databaseinventory'), + 1 => __s('MySQL', 'databaseinventory'), + 2 => __s('Oracle', 'databaseinventory'), + 3 => __s('DB2', 'databaseinventory'), + 4 => __s('Microsoft SQL', 'databaseinventory'), + 5 => __s('PostgreSQL', 'databaseinventory'), + 6 => __s('MongoDB', 'databaseinventory'), ] as $id => $label ) { 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..54186d2 100644 --- a/inc/databaseparam.class.php +++ b/inc/databaseparam.class.php @@ -65,15 +65,15 @@ class PluginDatabaseinventoryDatabaseParam extends CommonDBTM public static function getTypeName($nb = 0) { - return _n('Database params', 'Databases params', $nb, 'databaseinventory'); + return _sn('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); } @@ -86,7 +86,7 @@ public function rawSearchOptions() 'id' => '2', 'table' => $this->getTable(), 'field' => 'id', - 'name' => __('ID'), + 'name' => __s('ID'), 'massiveaction' => false, // implicit field is id 'datatype' => 'number', ]; @@ -95,7 +95,7 @@ public function rawSearchOptions() 'id' => '3', 'table' => $this->getTable(), 'field' => 'is_active', - 'name' => __('Active'), + 'name' => __s('Active'), 'datatype' => 'bool', ]; @@ -103,7 +103,7 @@ public function rawSearchOptions() 'id' => '4', 'table' => $this->getTable(), 'field' => 'partial_inventory', - 'name' => __('Partial inventory', 'databaseinventory'), + 'name' => __s('Partial inventory', 'databaseinventory'), 'datatype' => 'bool', ]; @@ -111,7 +111,7 @@ public function rawSearchOptions() 'id' => '5', 'table' => $this->getTable(), 'field' => 'execution_delay', - 'name' => __('Execution frequency for partial inventory', 'databaseinventory'), + 'name' => __s('Execution frequency for partial inventory', 'databaseinventory'), 'datatype' => 'number', 'min' => 0, 'max' => 24, diff --git a/inc/databaseparam_computergroup.class.php b/inc/databaseparam_computergroup.class.php index 31c8285..3064dd8 100644 --- a/inc/databaseparam_computergroup.class.php +++ b/inc/databaseparam_computergroup.class.php @@ -72,24 +72,24 @@ 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); } public static function getTypeName($nb = 0) { - return _n('Computer Group', 'Computers Group', $nb, 'databaseinventory'); + return _sn('Computer Group', 'Computers Group', $nb, 'databaseinventory'); } public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) diff --git a/inc/databaseparam_credential.class.php b/inc/databaseparam_credential.class.php index 3c90f2f..97b4f34 100644 --- a/inc/databaseparam_credential.class.php +++ b/inc/databaseparam_credential.class.php @@ -72,24 +72,24 @@ 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); } public static function getTypeName($nb = 0) { - return _n('Credential', 'Credentials', $nb, 'databaseinventory'); + return _sn('Credential', 'Credentials', $nb, 'databaseinventory'); } public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) diff --git a/inc/inventoryaction.class.php b/inc/inventoryaction.class.php index 17f0a0f..7f7c28a 100644 --- a/inc/inventoryaction.class.php +++ b/inc/inventoryaction.class.php @@ -28,7 +28,7 @@ * ------------------------------------------------------------------------- */ -use GuzzleHttp\Psr7\Response; +use Glpi\Asset\Asset_PeripheralAsset; class PluginDatabaseinventoryInventoryAction extends CommonDBTM { @@ -41,7 +41,7 @@ public static function showMassiveActionsSubForm(MassiveAction $ma) if ($ma->getAction() !== self::MA_PARTIAL) { return parent::showMassiveActionsSubForm($ma); } - echo Html::submit(__('Run', 'databaseinventory'), ['name' => 'submit']); + echo Html::submit(__s('Run', 'databaseinventory'), ['name' => 'submit']); return true; } @@ -68,7 +68,7 @@ public static function processMassiveActionsForOneItemtype(MassiveAction $ma, Co } } else { $ma->itemDone($item->getType(), $id, MassiveAction::ACTION_KO); - $ma->addMessage(__('Agent not found for computer', 'databaseinventory') . "" . $computer->getFriendlyName() . ''); + $ma->addMessage(__s('Agent not found for computer', 'databaseinventory') . "" . $computer->getFriendlyName() . ''); } } break; @@ -84,7 +84,7 @@ public static function processMassiveActionsForOneItemtype(MassiveAction $ma, Co } } else { $ma->itemDone($item->getType(), $id, MassiveAction::ACTION_KO); - $ma->addMessage(sprintf(__('Agent %1$s not found', 'databaseinventory'), $id)); + $ma->addMessage(sprintf(__s('Agent %1$s not found', 'databaseinventory'), $id)); } } break; @@ -112,21 +112,21 @@ public static function runPartialInventory(Agent $agent, $fromMA = false) // not authorized return self::handleAgentResponse($response, $endpoint); } - } catch (\GuzzleHttp\Exception\ClientException $e) { + } catch (Exception $e) { if ($fromMA) { return false; } else { // not authorized - return ['answer' => __('Not allowed')]; + return ['answer' => $e->getMessage()]; } } } - public static function handleAgentResponse(Response $response, $request): array + public static function handleAgentResponse($response, $request): array { $params = []; $params['answer'] = sprintf( - __('Requested at %s', 'databaseinventory'), + __s('Requested at %s', 'databaseinventory'), Html::convDateTime(date('Y-m-d H:i:s')), ); @@ -143,14 +143,14 @@ 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'], ]); if ($has_relation) { $has_agent = $agent->getFromDBByCrit([ - 'itemtype' => \Computer::getType(), + 'itemtype' => Computer::getType(), 'items_id' => $citem->fields['computers_id'], ]); } @@ -172,21 +172,20 @@ public static function postItemForm($item) if (!Session::haveRight("database_inventory", PluginDatabaseinventoryProfile::RUN_DATABSE_INVENTORY)) { return; } - - if ($item::getType() == Computer::getType()) { - if ($agent = self::findAgent($item)) { - $out = '
'; - $out .= ''; - $out .= '' . __('Unknown') . ''; - $out .= '
'; - - echo $out; - - $url = Plugin::getWebDir('databaseinventory') . '/ajax/agent.php'; - $key = PluginDatabaseinventoryInventoryAction::MA_PARTIAL; - $js = <<'; + $out .= ''; + $out .= '' . __s('Unknown') . ''; + $out .= ''; + echo $out; + $url = $CFG_GLPI['url_base'] . '/plugins/databaseinventory/ajax/agent.php'; + $key = PluginDatabaseinventoryInventoryAction::MA_PARTIAL; + $js = << PluginDatabaseinventoryProfile::getTypeName(), 'field' => 'database_inventory', 'rights' => [ - CREATE => __('Create'), - READ => __('Read'), - UPDATE => __('Update'), - PURGE => ['short' => __('Purge'), + CREATE => __s('Create'), + READ => __s('Read'), + UPDATE => __s('Update'), + PURGE => ['short' => __s('Purge'), 'long' => _x('button', 'Delete permanently'), ], - self::RUN_DATABSE_INVENTORY => __("Run database inventory", "databaseinventory"), + self::RUN_DATABSE_INVENTORY => __s("Run database inventory", "databaseinventory"), ], ], ]; @@ -64,7 +64,7 @@ private static function getAllRights($all = false) public function getRights($interface = 'central') { $rights = parent::getRights(); - $rights[self::RUN_DATABSE_INVENTORY] = __("Run database inventory", "databaseinventory"); + $rights[self::RUN_DATABSE_INVENTORY] = __s("Run database inventory", "databaseinventory"); return $rights; } diff --git a/inc/task.class.php b/inc/task.class.php index e144139..c021746 100644 --- a/inc/task.class.php +++ b/inc/task.class.php @@ -224,7 +224,7 @@ public static function handleInventoryTask(array $params) ], ]; - if (!empty($database_param_found)) { + if ($database_param_found !== []) { $criteria['WHERE'] = [ $database_param_table . '.is_active' => 1, ['NOT' => [$database_param_table . '.id' => $database_param_found]], //no need to look for what is already found @@ -241,10 +241,8 @@ public static function handleInventoryTask(array $params) foreach ($iterator as $data) { $dynamic_group = new PluginDatabaseinventoryComputerGroupDynamic(); $dynamic_group->getFromDB($data['id']); - if ($dynamic_group->isDynamicSearchMatchComputer($computer)) { - if (!in_array($data['database_param_id'], $database_param_found)) { - $database_param_found[] = $data['database_param_id']; - } + if ($dynamic_group->isDynamicSearchMatchComputer($computer) && !in_array($data['database_param_id'], $database_param_found)) { + $database_param_found[] = $data['database_param_id']; } } } diff --git a/phpstan.neon b/phpstan.neon index 455f2e7..db69ea1 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,19 +1,20 @@ +includes: + - ../../vendor/glpi-project/phpstan-glpi/extension.neon + - ../../vendor/phpstan/phpstan-deprecation-rules/rules.neon + - ../../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon + parameters: - parallel: - maximumNumberOfProcesses: 2 level: 5 - bootstrapFiles: - - ../../inc/based_config.php paths: - - inc - - front - ajax + - front + - inc - hook.php - setup.php scanDirectories: - - ../../inc - ../../src - stubFiles: + bootstrapFiles: - ../../stubs/glpi_constants.php -rules: - - GlpiProject\Tools\PHPStan\Rules\GlobalVarTypeRule + - ../../vendor/autoload.php + - setup.php + treatPhpDocTypesAsCertain: false diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..f051d3d --- /dev/null +++ b/psalm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..2a10231 --- /dev/null +++ b/rector.php @@ -0,0 +1,98 @@ +. + * ------------------------------------------------------------------------- + * @copyright Copyright (C) 2021-2023 by Teclib'. + * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html + * @link https://services.glpi-network.com + * ------------------------------------------------------------------------- + */ + +require_once __DIR__ . '/../../src/Plugin.php'; + +use Rector\Caching\ValueObject\Storage\FileCacheStorage; +use Rector\CodeQuality\Rector as CodeQuality; +use Rector\Config\RectorConfig; +use Rector\DeadCode\Rector as DeadCode; +use Rector\ValueObject\PhpVersion; + +return RectorConfig::configure() + ->withPaths([ + __DIR__ . '/ajax', + __DIR__ . '/front', + __DIR__ . '/inc', + ]) + ->withPhpVersion(PhpVersion::PHP_82) + ->withCache( + cacheClass: FileCacheStorage::class, + cacheDirectory: sys_get_temp_dir() . '/databaseinventory-rector', + ) + ->withRootFiles() + ->withParallel(timeoutSeconds: 300) + ->withImportNames(removeUnusedImports: true) + ->withRules([ + CodeQuality\Assign\CombinedAssignRector::class, + CodeQuality\BooleanAnd\RemoveUselessIsObjectCheckRector::class, + CodeQuality\BooleanAnd\SimplifyEmptyArrayCheckRector::class, + CodeQuality\BooleanNot\ReplaceMultipleBooleanNotRector::class, + CodeQuality\Catch_\ThrowWithPreviousExceptionRector::class, + CodeQuality\Empty_\SimplifyEmptyCheckOnEmptyArrayRector::class, + CodeQuality\Expression\InlineIfToExplicitIfRector::class, + CodeQuality\Expression\TernaryFalseExpressionToIfRector::class, + CodeQuality\For_\ForRepeatedCountToOwnVariableRector::class, + CodeQuality\Foreach_\ForeachItemsAssignToEmptyArrayToAssignRector::class, + CodeQuality\Foreach_\ForeachToInArrayRector::class, + CodeQuality\Foreach_\SimplifyForeachToCoalescingRector::class, + CodeQuality\Foreach_\UnusedForeachValueToArrayKeysRector::class, + CodeQuality\FuncCall\ChangeArrayPushToArrayAssignRector::class, + CodeQuality\FuncCall\CompactToVariablesRector::class, + CodeQuality\FuncCall\InlineIsAInstanceOfRector::class, + CodeQuality\FuncCall\IsAWithStringWithThirdArgumentRector::class, + CodeQuality\FuncCall\RemoveSoleValueSprintfRector::class, + CodeQuality\FuncCall\SetTypeToCastRector::class, + CodeQuality\FuncCall\SimplifyFuncGetArgsCountRector::class, + CodeQuality\FuncCall\SimplifyInArrayValuesRector::class, + CodeQuality\FuncCall\SimplifyStrposLowerRector::class, + CodeQuality\FuncCall\UnwrapSprintfOneArgumentRector::class, + CodeQuality\Identical\BooleanNotIdenticalToNotIdenticalRector::class, + CodeQuality\Identical\SimplifyArraySearchRector::class, + CodeQuality\Identical\SimplifyConditionsRector::class, + CodeQuality\Identical\StrlenZeroToIdenticalEmptyStringRector::class, + CodeQuality\If_\CombineIfRector::class, + CodeQuality\If_\CompleteMissingIfElseBracketRector::class, + CodeQuality\If_\ConsecutiveNullCompareReturnsToNullCoalesceQueueRector::class, + CodeQuality\If_\ExplicitBoolCompareRector::class, + CodeQuality\If_\ShortenElseIfRector::class, + CodeQuality\If_\SimplifyIfElseToTernaryRector::class, + CodeQuality\If_\SimplifyIfNotNullReturnRector::class, + CodeQuality\If_\SimplifyIfNullableReturnRector::class, + CodeQuality\If_\SimplifyIfReturnBoolRector::class, + CodeQuality\Include_\AbsolutizeRequireAndIncludePathRector::class, + CodeQuality\LogicalAnd\AndAssignsToSeparateLinesRector::class, + CodeQuality\LogicalAnd\LogicalToBooleanRector::class, + CodeQuality\NotEqual\CommonNotEqualRector::class, + CodeQuality\Ternary\UnnecessaryTernaryExpressionRector::class, + DeadCode\Assign\RemoveUnusedVariableAssignRector::class, + ]) + ->withPhpSets(php74: true) // apply PHP sets up to PHP 7.4 +; diff --git a/setup.php b/setup.php index 88b5d90..98fc69e 100644 --- a/setup.php +++ b/setup.php @@ -28,12 +28,13 @@ * ------------------------------------------------------------------------- */ -define('PLUGIN_DATABASEINVENTORY_VERSION', '1.0.4'); +use function Safe\define; +define('PLUGIN_DATABASEINVENTORY_VERSION', '1.1.0'); // Minimal GLPI version, inclusive -define('PLUGIN_DATABASEINVENTORY_MIN_GLPI', '10.0.0'); +define('PLUGIN_DATABASEINVENTORY_MIN_GLPI', '11.0.0'); // Maximum GLPI version, exclusive -define('PLUGIN_DATABASEINVENTORY_MAX_GLPI', '10.0.99'); +define('PLUGIN_DATABASEINVENTORY_MAX_GLPI', '11.0.99'); /** * Init hooks of the plugin. @@ -88,7 +89,7 @@ function plugin_init_databaseinventory() function plugin_version_databaseinventory() { return [ - 'name' => __('Database Inventory', 'databaseinventory'), + 'name' => __s('Database Inventory', 'databaseinventory'), 'version' => PLUGIN_DATABASEINVENTORY_VERSION, 'author' => 'Teclib\'', 'license' => 'GPL v3',