diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7789632..2fa7673 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 549e7f1..09c925a 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')->in(__DIR__ . '/templates/components') ->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 886af59..88935af 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/). -## [unreleased] +## [1.13.0] - 2025-09-22 + +### Added + +- GLPI 11 compatibility ## [1.12.5] - 2025-09-19 diff --git a/ajax/alert_preview.php b/ajax/alert_preview.php index 9f399de..80eca48 100644 --- a/ajax/alert_preview.php +++ b/ajax/alert_preview.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Session::checkLoginUser(); PluginNewsAlert::displayAlert($_GET, [ diff --git a/ajax/display_alerts.php b/ajax/display_alerts.php index 264b712..dd3852e 100644 --- a/ajax/display_alerts.php +++ b/ajax/display_alerts.php @@ -29,7 +29,6 @@ */ $AJAX_INCLUDE = 1; -include('../../../inc/includes.php'); header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); Session::checkLoginUser(); diff --git a/ajax/hide_alert.php b/ajax/hide_alert.php index 763b51c..c6c31f7 100644 --- a/ajax/hide_alert.php +++ b/ajax/hide_alert.php @@ -29,7 +29,6 @@ */ $AJAX_INCLUDE = 1; -include('../../../inc/includes.php'); header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); Session::checkLoginUser(); diff --git a/ajax/targets.php b/ajax/targets.php index 0ee6c9b..887778e 100644 --- a/ajax/targets.php +++ b/ajax/targets.php @@ -29,7 +29,6 @@ */ $AJAX_INCLUDE = 1; -include('../../../inc/includes.php'); header('Content-Type: text/html; charset=UTF-8'); Html::header_nocache(); @@ -54,7 +53,7 @@ case 'Profile': Profile::dropdown(['name' => 'items_id', - 'toadd' => [-1 => __('All', 'news')], + 'toadd' => [-1 => __s('All', 'news')], ]); break; } diff --git a/composer.json b/composer.json index 582c593..ac53a7e 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,14 @@ { "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/phpstan": "^2.1" + "glpi-project/tools": "^0.8.0" }, "config": { "optimize-autoloader": true, "platform": { - "php": "7.4.0" + "php": "8.2.99" }, "sort-packages": true }, diff --git a/composer.lock b/composer.lock index fc6499f..67aaead 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": "32790c8a9b7e28ed56b0a47508dae0e1", + "content-hash": "a3a3de4fba7ca124cc1e054dc3210d27", "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.25", "source": { "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + "url": "https://github.com/symfony/console.git", + "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "url": "https://api.github.com/repos/symfony/console/zipball/273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", + "reference": "273fd29ff30ba0a88ca5fb83f7cf1ab69306adae", "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,1673 +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/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": "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.25" }, "funding": [ { @@ -2168,44 +212,38 @@ "type": "tidelift" } ], - "time": "2025-06-27T09:58:17+00:00" + "time": "2025-08-22T10:21:53+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/", @@ -2222,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": [ { @@ -2244,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": { @@ -2291,7 +316,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2300,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": [ { @@ -2338,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": { @@ -2369,11 +396,8 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2389,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": [ { @@ -2418,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": { @@ -2449,7 +478,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "classmap": [ "Resources/stubs" @@ -2460,10 +489,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2473,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": [ { @@ -2502,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": { @@ -2533,11 +567,8 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2553,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": [ { @@ -2582,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": { @@ -2678,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": [ @@ -2711,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": [ { @@ -2789,38 +697,39 @@ "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.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799" + "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799", - "reference": "136ca7d72f72b599f2631aca474a4f8e26719799", + "url": "https://api.github.com/repos/symfony/string/zipball/17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", + "reference": "17a426cce5fd1f0901fefa9b2a490d0038fd3c9c", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2859,7 +768,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.47" + "source": "https://github.com/symfony/string/tree/v7.3.3" }, "funding": [ { @@ -2870,36 +779,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-08-25T06:35:40+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" }, @@ -2943,7 +855,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": [ { @@ -2955,7 +867,7 @@ "type": "tidelift" } ], - "time": "2024-11-07T12:34:41+00:00" + "time": "2025-05-03T07:21:55+00:00" } ], "aliases": [], @@ -2964,11 +876,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4" + "php": ">=8.2" }, "platform-dev": {}, "platform-overrides": { - "php": "7.4.0" + "php": "8.2.99" }, "plugin-api-version": "2.6.0" } diff --git a/front/alert.form.php b/front/alert.form.php index ff2599c..1d44148 100644 --- a/front/alert.form.php +++ b/front/alert.form.php @@ -30,8 +30,6 @@ use Glpi\Event; -include('../../../inc/includes.php'); - Session::checkLoginUser(); if (!isset($_GET['id'])) { @@ -48,7 +46,7 @@ 'PluginNewsAlert', 4, 'admin', - sprintf(__('%s updates an item', 'news'), $_SESSION['glpiname']), + sprintf(__s('%s updates an item', 'news'), $_SESSION['glpiname']), ); } Html::back(); @@ -60,7 +58,7 @@ 'PluginNewsAlert', 4, 'admin', - sprintf(__('%1$s adds the item %2$s', 'news'), $_SESSION['glpiname'], $_POST['name']), + sprintf(__s('%1$s adds the item %2$s', 'news'), $_SESSION['glpiname'], $_POST['name']), ); if ($_SESSION['glpibackcreated']) { @@ -76,7 +74,7 @@ 'PluginNewsAlert', 4, 'admin', - sprintf(__('%s deletes an item', 'news'), $_SESSION['glpiname']), + sprintf(__s('%s deletes an item', 'news'), $_SESSION['glpiname']), ); } $alert->redirectToList(); @@ -88,7 +86,7 @@ 'PluginNewsAlert', 4, 'admin', - sprintf(__('%s restores an item', 'news'), $_SESSION['glpiname']), + sprintf(__s('%s restores an item', 'news'), $_SESSION['glpiname']), ); } Html::back(); @@ -100,7 +98,7 @@ 'PluginNewsAlert', 4, 'admin', - sprintf(__('%s purges an item', 'news'), $_SESSION['glpiname']), + sprintf(__s('%s purges an item', 'news'), $_SESSION['glpiname']), ); } $alert->redirectToList(); @@ -112,7 +110,7 @@ } Html::header( - __('Alerts', 'news'), + __s('Alerts', 'news'), $_SERVER['PHP_SELF'], 'tools', 'PluginNewsAlert', diff --git a/front/alert.php b/front/alert.php index f8c02b3..acb55e0 100644 --- a/front/alert.php +++ b/front/alert.php @@ -28,12 +28,10 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Session::checkRight("plugin_news_alert", READ); Html::header( - __('Alerts', 'news'), + __s('Alerts', 'news'), $_SERVER['PHP_SELF'], 'tools', 'PluginNewsAlert', diff --git a/front/external.php b/front/external.php index 158a852..a895c8b 100644 --- a/front/external.php +++ b/front/external.php @@ -28,7 +28,7 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); +Session::checkLoginUser(); Html::nullHeader(PluginNewsAlert::getTypeName()); $logged = isset($_SESSION['glpiID']); diff --git a/front/hidden_alerts.php b/front/hidden_alerts.php index 7fbdd59..27c1355 100644 --- a/front/hidden_alerts.php +++ b/front/hidden_alerts.php @@ -28,15 +28,13 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Session::checkLoginUser(); if ($_SESSION['glpiactiveprofile']['interface'] != 'central') { - Html::helpHeader(__('Alerts', 'news'), $_SERVER['PHP_SELF'], $_SESSION['glpiname']); + Html::helpHeader(__s('Alerts', 'news'), $_SERVER['PHP_SELF'], $_SESSION['glpiname']); } else { Html::header( - __('Alerts', 'news'), + __s('Alerts', 'news'), $_SERVER['PHP_SELF'], 'tools', 'PluginNewsAlert', diff --git a/hook.php b/hook.php index a3bece9..c1f5167 100644 --- a/hook.php +++ b/hook.php @@ -45,7 +45,7 @@ function plugin_news_install() $white = PluginNewsAlert::WHITE; $dark = PluginNewsAlert::DARK; $medium = PluginNewsAlert::MEDIUM; - $DB->query(" + $DB->doQuery(" CREATE TABLE IF NOT EXISTS `$alert_table` ( `id` INT {$default_key_sign} NOT NULL AUTO_INCREMENT, `date_mod` TIMESTAMP NOT NULL, @@ -69,7 +69,7 @@ function plugin_news_install() ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC; "); } else { - $DB->updateOrDie( + $DB->update( PluginNewsAlert_User::getTable(), [ 'state' => PluginNewsAlert_User::VISIBLE, @@ -80,7 +80,6 @@ function plugin_news_install() PluginNewsAlert::getTable() . '.is_close_allowed' => 0, ], ], - '', [ 'JOIN' => [ PluginNewsAlert::getTable() => [ @@ -95,7 +94,7 @@ function plugin_news_install() } if (!$DB->tableExists('glpi_plugin_news_alerts_users')) { - $DB->query(" + $DB->doQuery(" CREATE TABLE IF NOT EXISTS `glpi_plugin_news_alerts_users` ( `id` INT {$default_key_sign} NOT NULL AUTO_INCREMENT, `plugin_news_alerts_id` INT {$default_key_sign} NOT NULL, @@ -109,7 +108,7 @@ function plugin_news_install() } if (!$DB->tableExists('glpi_plugin_news_alerts_targets')) { - $DB->query(" + $DB->doQuery(" CREATE TABLE IF NOT EXISTS `glpi_plugin_news_alerts_targets` ( `id` INT {$default_key_sign} NOT NULL AUTO_INCREMENT, `plugin_news_alerts_id` INT {$default_key_sign} NOT NULL, @@ -125,7 +124,7 @@ function plugin_news_install() /* Remove old table */ if ($DB->tableExists('glpi_plugin_news_profiles')) { - $DB->query('DROP TABLE IF EXISTS `glpi_plugin_news_profiles`;'); + $DB->doQuery('DROP TABLE IF EXISTS `glpi_plugin_news_profiles`;'); } // add displayed on login flag @@ -138,10 +137,8 @@ function plugin_news_install() $migration->addField($alert_table, 'is_displayed_onhelpdesk', 'bool'); } - if (!$DB->fieldExists($alert_table, 'date_creation')) { - if ($migration->addField($alert_table, 'date_creation', 'date')) { - $migration->addKey($alert_table, 'date_creation'); - } + if (!$DB->fieldExists($alert_table, 'date_creation') && $migration->addField($alert_table, 'date_creation', 'date')) { + $migration->addKey($alert_table, 'date_creation'); } // add close allowed flag @@ -155,10 +152,8 @@ function plugin_news_install() } // add activity flag - if (!$DB->fieldExists($alert_table, 'is_active')) { - if ($migration->addField($alert_table, 'is_active', 'bool')) { - $migration->addKey($alert_table, 'is_active'); - } + if (!$DB->fieldExists($alert_table, 'is_active') && $migration->addField($alert_table, 'is_active', 'bool')) { + $migration->addKey($alert_table, 'is_active'); } // fix is_default default value @@ -192,7 +187,7 @@ function plugin_news_install() (plugin_news_alerts_id, itemtype, items_id) SELECT id, 'Profile', profiles_id FROM $alert_table"; - $DB->query($query_targets) or die('fail to migration targets'); + $DB->doQuery($query_targets); //drop old field $migration->dropField($alert_table, 'profiles_id'); @@ -214,7 +209,7 @@ function plugin_news_install() $dpreferences = new DisplayPreference(); $found_dpref = $dpreferences->find(['itemtype' => ['LIKE', '%PluginNews%']]); if (count($found_dpref) == 0) { - $DB->query("INSERT INTO `glpi_displaypreferences` + $DB->doQuery("INSERT INTO `glpi_displaypreferences` (`itemtype`, `num`, `rank`, `users_id`) VALUES ('PluginNewsAlert', 2, 1, 0), @@ -228,7 +223,7 @@ function plugin_news_install() $alert_table, 'is_displayed_oncentral', 'bool', - ['value' => true], + ['value' => '1'], ); } @@ -349,12 +344,12 @@ function plugin_news_uninstall() /** @var DBmysql $DB */ global $DB; - $DB->query('DROP TABLE IF EXISTS `glpi_plugin_news_alerts`;'); - $DB->query('DROP TABLE IF EXISTS `glpi_plugin_news_profiles`;'); - $DB->query('DROP TABLE IF EXISTS `glpi_plugin_news_alerts_users`;'); - $DB->query('DROP TABLE IF EXISTS `glpi_plugin_news_alerts_targets`;'); - $DB->query("DELETE FROM `glpi_profiles` WHERE `name` LIKE '%plugin_news%';"); - $DB->query("DELETE FROM `glpi_displaypreferences` WHERE `itemtype` LIKE '%PluginNews%';"); + $DB->doQuery('DROP TABLE IF EXISTS `glpi_plugin_news_alerts`;'); + $DB->doQuery('DROP TABLE IF EXISTS `glpi_plugin_news_profiles`;'); + $DB->doQuery('DROP TABLE IF EXISTS `glpi_plugin_news_alerts_users`;'); + $DB->doQuery('DROP TABLE IF EXISTS `glpi_plugin_news_alerts_targets`;'); + $DB->doQuery("DELETE FROM `glpi_profiles` WHERE `name` LIKE '%plugin_news%';"); + $DB->doQuery("DELETE FROM `glpi_displaypreferences` WHERE `itemtype` LIKE '%PluginNews%';"); return true; } diff --git a/inc/alert.class.php b/inc/alert.class.php index 99e615b..084e14c 100644 --- a/inc/alert.class.php +++ b/inc/alert.class.php @@ -27,12 +27,14 @@ * @link https://github.com/pluginsGLPI/news * ------------------------------------------------------------------------- */ - use Glpi\Application\View\TemplateRenderer; -use Glpi\Toolbox\Sanitizer; + +use function Safe\preg_match; +use function Safe\strtotime; if (!defined('GLPI_ROOT')) { - die("Sorry. You can't access directly to this file"); + echo "Sorry. You can't access directly to this file"; + return; } class PluginNewsAlert extends CommonDBTM @@ -71,7 +73,7 @@ class PluginNewsAlert extends CommonDBTM public const YELLOW = 'yellow'; public const LIME = 'lime'; - public static function canDelete() + public static function canDelete(): bool { return self::canPurge(); } @@ -84,7 +86,7 @@ public static function canDelete() */ public static function getTypeName($nb = 0) { - return __('Alerts', 'news'); + return __s('Alerts', 'news'); } /** @@ -108,7 +110,7 @@ public function rawSearchOptions() 'id' => 1, 'table' => $this->getTable(), 'field' => 'name', - 'name' => __('Name', 'news'), + 'name' => __s('Name', 'news'), 'datatype' => 'itemlink', 'itemlink_type' => $this->getType(), 'massiveaction' => false, @@ -118,7 +120,7 @@ public function rawSearchOptions() 'id' => 2, 'table' => $this->getTable(), 'field' => 'date_start', - 'name' => __('Visibility start date', 'news'), + 'name' => __s('Visibility start date', 'news'), 'datatype' => 'date', ]; @@ -126,7 +128,7 @@ public function rawSearchOptions() 'id' => 3, 'table' => $this->getTable(), 'field' => 'date_end', - 'name' => __('Visibility end date', 'news'), + 'name' => __s('Visibility end date', 'news'), 'datatype' => 'date', ]; @@ -134,7 +136,7 @@ public function rawSearchOptions() 'id' => 4, 'table' => 'glpi_entities', 'field' => 'completename', - 'name' => __('Entity', 'news'), + 'name' => __s('Entity', 'news'), 'massiveaction' => false, ]; @@ -142,7 +144,7 @@ public function rawSearchOptions() 'id' => 5, 'table' => $this->getTable(), 'field' => 'is_recursive', - 'name' => __('Recursive', 'news'), + 'name' => __s('Recursive', 'news'), 'datatype' => 'bool', 'massiveaction' => false, ]; @@ -162,7 +164,7 @@ public function rawSearchOptions() 'id' => 7, 'table' => $this->getTable(), 'field' => 'is_close_allowed', - 'name' => __('Can close alert', 'news'), + 'name' => __s('Can close alert', 'news'), 'datatype' => 'bool', 'massiveaction' => false, ]; @@ -171,7 +173,7 @@ public function rawSearchOptions() 'id' => 8, 'table' => $this->getTable(), 'field' => 'is_displayed_onlogin', - 'name' => __('Show on login page', 'news'), + 'name' => __s('Show on login page', 'news'), 'datatype' => 'bool', 'massiveaction' => false, ]; @@ -180,7 +182,7 @@ public function rawSearchOptions() 'id' => 9, 'table' => $this->getTable(), 'field' => 'is_displayed_onhelpdesk', - 'name' => __('Show on helpdesk page', 'news'), + 'name' => __s('Show on helpdesk page', 'news'), 'datatype' => 'bool', 'massiveaction' => false, ]; @@ -189,7 +191,7 @@ public function rawSearchOptions() 'id' => 10, 'table' => $this->getTable(), 'field' => 'is_active', - 'name' => __('Active', 'news'), + 'name' => __s('Active', 'news'), 'datatype' => 'bool', ]; @@ -197,7 +199,7 @@ public function rawSearchOptions() 'id' => 19, 'table' => $this->getTable(), 'field' => 'date_mod', - 'name' => __('Last update', 'news'), + 'name' => __s('Last update', 'news'), 'datatype' => 'datetime', 'massiveaction' => false, ]; @@ -206,7 +208,7 @@ public function rawSearchOptions() 'id' => 121, 'table' => $this->getTable(), 'field' => 'date_creation', - 'name' => __('Creation date', 'news'), + 'name' => __s('Creation date', 'news'), 'datatype' => 'datetime', 'massiveaction' => false, ]; @@ -261,7 +263,7 @@ public static function findAllToNotify($params = []) $utable = PluginNewsAlert_User::getTable(); $ttable = PluginNewsAlert_Target::getTable(); $hidstate = PluginNewsAlert_User::HIDDEN; - $users_id = isset($_SESSION['glpiID']) ? $_SESSION['glpiID'] : -1; + $users_id = $_SESSION['glpiID'] ?? -1; $group_u = new Group_User(); $fndgroup = []; if (isset($_SESSION['glpiID']) && $fndgroup_user = $group_u->find(['users_id' => $_SESSION['glpiID']])) { @@ -270,7 +272,7 @@ public static function findAllToNotify($params = []) } } - if (empty($fndgroup)) { + if ($fndgroup === []) { $fndgroup = [-1]; } @@ -377,23 +379,23 @@ public static function findAllToNotify($params = []) 'is_active' => 1, ], ]; - if (!empty($targets_sql)) { + if ($targets_sql !== []) { $criteria['INNER JOIN'][$ttable]['ON'][] = $targets_sql; } if (!empty($entity_sql)) { $criteria['WHERE'][] = $entity_sql; } - if (!empty($login_sql)) { + if ($login_sql !== []) { $criteria['WHERE'][] = $login_sql; } - if (!empty($show_central_sql)) { + if ($show_central_sql !== []) { $criteria['WHERE'][] = $show_central_sql; } - if (!empty($show_helpdesk_sql)) { + if ($show_helpdesk_sql !== []) { $criteria['WHERE'][] = $show_helpdesk_sql; } $it = $DB->request($criteria); - if (!count($it)) { + if (count($it) === 0) { return false; } foreach ($it as $data) { @@ -413,9 +415,9 @@ public static function getMenuContent() public function checkDate($datetime) { - if (preg_match('/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/', $datetime)) { + if (preg_match('/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/', $datetime) !== 0) { $datetime = explode(' ', $datetime); - list($year, $month, $day) = explode('-', $datetime[0]); + [$year, $month, $day] = explode('-', $datetime[0]); return checkdate((int) $month, (int) $day, (int) $year); } @@ -427,30 +429,21 @@ public function prepareInputForAdd($input) { $errors = []; - if ($this->isNewItem()) { - $missing_name = empty($input['name'] ?? ''); - } else { - $missing_name = isset($input['name']) && empty($input['name']); - } + $missing_name = $this->isNewItem() ? empty($input['name'] ?? '') : isset($input['name']) && empty($input['name']); if ($missing_name) { - array_push($errors, __('Please enter a name.', 'news')); + $errors[] = __s('Please enter a name.', 'news'); } - if ( - !empty($input['date_start']) - && !empty($input['date_end']) - ) { - if (strtotime($input['date_end']) < strtotime($input['date_start'])) { - array_push($errors, __('The end date must be greater than the start date.', 'news')); - } + if (!empty($input['date_start']) && !empty($input['date_end']) && strtotime($input['date_end']) < strtotime($input['date_start'])) { + $errors[] = __s('The end date must be greater than the start date.', 'news'); } - if ($errors) { + if ($errors !== []) { Session::addMessageAfterRedirect(implode('
', $errors)); } - return $errors ? false : $input; + return $errors !== [] ? false : $input; } public function prepareInputForUpdate($input) @@ -532,6 +525,9 @@ public static function displayOnTicket() public static function displayAlerts($params = []) { + /** @var array $CFG_GLPI */ + global $CFG_GLPI; + $p['show_only_login_alerts'] = false; $p['show_only_central_alerts'] = false; $p['show_hidden_alerts'] = false; @@ -562,8 +558,8 @@ public static function displayAlerts($params = []) && !$p['show_hidden_alerts'] ) { echo "
"; - echo ""; - echo __('You have hidden alerts valid for current date', 'news'); + echo ""; + echo __s('You have hidden alerts valid for current date', 'news'); echo ''; echo '
'; } @@ -609,7 +605,7 @@ public static function displayAlert($alert, $p) $twig->display('@news/display_alert.html.twig', [ 'size' => self::getSizeClasses($alert['size']), 'alert_fields' => $alert, - 'content' => Sanitizer::unsanitize($alert['message']), + 'content' => $alert['message'], 'can_close' => $alert['is_close_allowed'] && !$p['show_hidden_alerts'], 'show_only_login_alerts' => $p['show_only_login_alerts'], ]); @@ -623,10 +619,10 @@ public static function displayAlert($alert, $p) public static function getTypes(): array { return [ - self::GENERAL => __('General', 'news'), - self::INFO => __('Information', 'news'), - self::WARNING => __('Warning', 'news'), - self::PROBLEM => __('Problem', 'news'), + self::GENERAL => __s('General', 'news'), + self::INFO => __s('Information', 'news'), + self::WARNING => __s('Warning', 'news'), + self::PROBLEM => __s('Problem', 'news'), ]; } @@ -638,10 +634,10 @@ public static function getTypes(): array public static function getSizes(): array { return [ - self::SMALL => __('Small', 'news'), - self::MEDIUM => __('Medium', 'news'), - self::BIG => __('Big', 'news'), - self::MAXIMUM => __('Max', 'news'), + self::SMALL => __s('Small', 'news'), + self::MEDIUM => __s('Medium', 'news'), + self::BIG => __s('Big', 'news'), + self::MAXIMUM => __s('Max', 'news'), ]; } @@ -653,10 +649,10 @@ public static function getSizes(): array public static function getIcons(): array { return [ - self::SETTINGS => __('Settings', 'news'), - self::ALERT_CIRCLE => __('Alert circle', 'news'), - self::ALERT_TRIANGLE => __('Alert triangle', 'news'), - self::ALERT_OCTAGON => __('Alert octagon', 'news'), + self::SETTINGS => __s('Settings', 'news'), + self::ALERT_CIRCLE => __s('Alert circle', 'news'), + self::ALERT_TRIANGLE => __s('Alert triangle', 'news'), + self::ALERT_OCTAGON => __s('Alert octagon', 'news'), ]; } @@ -668,17 +664,17 @@ public static function getIcons(): array public static function getColors(): array { return [ - self::DARK => __('Black', 'news'), - self::WHITE => __('White', 'news'), - self::BLUE => __('Blue', 'news'), - self::CYAN => __('Cyan', 'news'), - self::INDIGO => __('Indigo', 'news'), - self::PURPLE => __('Purple', 'news'), - self::PINK => __('Pink', 'news'), - self::RED => __('Red', 'news'), - self::ORANGE => __('Orange', 'news'), - self::YELLOW => __('Yellow', 'news'), - self::LIME => __('Lime', 'news'), + self::DARK => __s('Black', 'news'), + self::WHITE => __s('White', 'news'), + self::BLUE => __s('Blue', 'news'), + self::CYAN => __s('Cyan', 'news'), + self::INDIGO => __s('Indigo', 'news'), + self::PURPLE => __s('Purple', 'news'), + self::PINK => __s('Pink', 'news'), + self::RED => __s('Red', 'news'), + self::ORANGE => __s('Orange', 'news'), + self::YELLOW => __s('Yellow', 'news'), + self::LIME => __s('Lime', 'news'), ]; } @@ -731,9 +727,7 @@ public static function preItemForm($params = []) ) { $item = $params['item']; $itemtype = get_class($item); - $entities_id = isset($params['item']->fields['entities_id']) - ? $params['item']->fields['entities_id'] - : false; // false to use current entity + $entities_id = $params['item']->fields['entities_id'] ?? false; // false to use current entity self::displayAlerts(['show_only_helpdesk_alerts' => true, 'show_hidden_alerts' => false, 'entities_id' => $entities_id, diff --git a/inc/alert_target.class.php b/inc/alert_target.class.php index f80e1fc..ded9ff2 100644 --- a/inc/alert_target.class.php +++ b/inc/alert_target.class.php @@ -29,7 +29,8 @@ */ if (!defined('GLPI_ROOT')) { - die("Sorry. You can't access directly to this file"); + echo "Sorry. You can't access directly to this file"; + return; } // @codingStandardsIgnoreStart @@ -40,15 +41,15 @@ class PluginNewsAlert_Target extends CommonDBTM public static function getTypeName($nb = 0) { - return _n('Target', 'Targets', $nb, 'news'); + return _sn('Target', 'Targets', $nb, 'news'); } - public static function canDelete() + public static function canDelete(): bool { return self::canUpdate(); } - public static function canPurge() + public static function canPurge(): bool { return self::canUpdate(); } @@ -82,7 +83,7 @@ public static function getSpecificValueToDisplay($field, $values, array $options $values['itemtype'] == 'Profile' && $values['all_items'] == 1 ) { - return $item->getTypeName() . ' - ' . __('All', 'news'); + return $item->getTypeName() . ' - ' . __s('All', 'news'); } $item->getFromDB($values['items_id']); @@ -119,6 +120,8 @@ public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $ public static function showForAlert(PluginNewsAlert $alert) { + /** @var array $CFG_GLPI */ + global $CFG_GLPI; $rand = mt_rand(); echo "
"; @@ -128,7 +131,7 @@ public static function showForAlert(PluginNewsAlert $alert) echo ""; echo ''; echo ''; $params = ['type' => '__VALUE__', @@ -138,7 +141,7 @@ public static function showForAlert(PluginNewsAlert $alert) Ajax::updateItemOnSelectEvent( 'dropdown_itemtype' . $addrand, "visibility$rand", - Plugin::getWebDir('news') . '/ajax/targets.php', + $CFG_GLPI['root_doc'] . '/plugins/news/ajax/targets.php', $params, ); echo '
'; - echo __('Add a target', 'news') . ': '; + echo __s('Add a target', 'news') . ': '; $addrand = Dropdown::showItemTypes('itemtype', $types, ['width' => '']); echo ''; @@ -152,10 +155,10 @@ public static function showForAlert(PluginNewsAlert $alert) $target = new self(); $found_target = $target->find(['plugin_news_alerts_id' => $alert->getID()]); if ($nb = count($found_target) > 0) { - Html::openMassiveActionsForm('mass' . __CLASS__ . $rand); + Html::openMassiveActionsForm('mass' . self::class . $rand); $massiveactionparams = ['num_displayed' => $nb, - 'container' => 'mass' . __CLASS__ . $rand, + 'container' => 'mass' . self::class . $rand, 'specific_actions' => ['delete' => _x('button', 'Delete permanently', 'news')], ]; Html::showMassiveActions($massiveactionparams); @@ -163,23 +166,23 @@ public static function showForAlert(PluginNewsAlert $alert) echo ""; echo ''; - echo "'; - echo ''; - echo ''; + echo "'; + echo ''; + echo ''; echo ''; foreach ($found_target as $current_target) { - if (class_exists($current_target['itemtype'])) { + if (is_a($current_target['itemtype'], CommonDBTM::class, true)) { $item = new $current_target['itemtype'](); $item->getFromDB($current_target['items_id']); $name = ($current_target['all_items'] == 1 && $current_target['itemtype'] == 'Profile') - ? __('All', 'news') + ? __s('All', 'news') : $item->getName(['complete' => true]); echo ""; echo ''; echo ''; echo ""; @@ -197,4 +200,9 @@ public static function showForAlert(PluginNewsAlert $alert) return true; } + + public static function getIcon() + { + return 'ti ti-target'; + } } diff --git a/inc/alert_user.class.php b/inc/alert_user.class.php index 16a6a1f..33a4931 100644 --- a/inc/alert_user.class.php +++ b/inc/alert_user.class.php @@ -29,7 +29,8 @@ */ if (!defined('GLPI_ROOT')) { - die("Sorry. You can't access directly to this file"); + echo "Sorry. You can't access directly to this file"; + return; } // @codingStandardsIgnoreStart @@ -71,13 +72,9 @@ public static function hideAlert($params = []) ); } - public function canCreateItem() + public function canCreateItem(): bool { - if ($this->fields['users_id'] != Session::getLoginUserID()) { - return false; - } - - return true; + return $this->fields['users_id'] == Session::getLoginUserID(); } public function rawSearchOptions() @@ -88,7 +85,7 @@ public function rawSearchOptions() 'id' => 5, 'table' => $this->getTable(), 'field' => 'state', - 'name' => __('Status', 'news'), + 'name' => __s('Status', 'news'), 'datatype' => 'dropdown', ]; 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/plugin.xml b/plugin.xml index 48db6f4..d2a03db 100644 --- a/plugin.xml +++ b/plugin.xml @@ -54,9 +54,9 @@ Fonctionnalités - 1.13.0-beta2 + 1.13.0 ~11.0.0 - https://github.com/pluginsGLPI/news/releases/download/1.13.0-beta2/glpi-news-1.13.0-beta2.tar.bz2 + https://github.com/pluginsGLPI/news/releases/download/1.13.0/glpi-news-1.13.0.tar.bz2 1.12.5 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/css/styles.css b/public/css/styles.css similarity index 100% rename from css/styles.css rename to public/css/styles.css diff --git a/js/news.js b/public/js/news.js similarity index 96% rename from js/news.js rename to public/js/news.js index d948468..85450c5 100644 --- a/js/news.js +++ b/public/js/news.js @@ -30,7 +30,7 @@ pluginNewsCloseAlerts = function() { $(document).on("mousedown", ".plugin_news_alert .alert a[data-bs-dismiss=alert]", function(event) { var alert = $(this).closest(".plugin_news_alert"); var id = alert.attr('data-id'); - var a_url = CFG_GLPI.root_doc+"/"+GLPI_PLUGINS_PATH.news+"/ajax"; + var a_url = CFG_GLPI.root_doc+"/plugins/news/ajax"; $.post(a_url+"/hide_alert.php", {'id' : id}); }); }; diff --git a/pics/icon.png b/public/pics/icon.png similarity index 100% rename from pics/icon.png rename to public/pics/icon.png diff --git a/pics/toggle_down.png b/public/pics/toggle_down.png similarity index 100% rename from pics/toggle_down.png rename to public/pics/toggle_down.png diff --git a/pics/toggle_up.png b/public/pics/toggle_up.png similarity index 100% rename from pics/toggle_up.png rename to public/pics/toggle_up.png diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..e4c2568 --- /dev/null +++ b/rector.php @@ -0,0 +1,100 @@ +. + * ------------------------------------------------------------------------- + * @copyright Copyright (C) 2015-2023 by News plugin team. + * @copyright Copyright (C) 2018-2023 by Metabase plugin team. + * @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html + * @link https://github.com/pluginsGLPI/news + * @link https://github.com/pluginsGLPI/metabase + * ------------------------------------------------------------------------- + */ + +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() . '/metabase-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 f7bf5bb..b7b13a9 100644 --- a/setup.php +++ b/setup.php @@ -28,12 +28,14 @@ * ------------------------------------------------------------------------- */ -define('PLUGIN_NEWS_VERSION', '1.12.5'); +use function Safe\define; + +define('PLUGIN_NEWS_VERSION', '1.13.0'); // Minimal GLPI version, inclusive -define('PLUGIN_NEWS_MIN_GLPI', '10.0.0'); +define('PLUGIN_NEWS_MIN_GLPI', '11.0.0'); // Maximum GLPI version, exclusive -define('PLUGIN_NEWS_MAX_GLPI', '10.0.99'); +define('PLUGIN_NEWS_MAX_GLPI', '11.0.99'); function plugin_init_news() { @@ -79,7 +81,7 @@ function plugin_init_news() function plugin_version_news() { return [ - 'name' => __('Alerts', 'news'), + 'name' => __s('Alerts', 'news'), 'version' => PLUGIN_NEWS_VERSION, 'author' => "TECLIB'", 'license' => 'GPLv2+', diff --git a/templates/alert_form.html.twig b/templates/alert_form.html.twig index 1701e1c..9f68d41 100644 --- a/templates/alert_form.html.twig +++ b/templates/alert_form.html.twig @@ -181,7 +181,7 @@ // Load preview $(".alert-preview").load( - "{{ get_plugin_web_dir('news') }}/ajax/alert_preview.php", + "{{ path('/plugins/news/ajax/alert_preview.php') }}", $("form[name=asset_form]").serialize() ); }; diff --git a/templates/components/news_fields_macros.html.twig b/templates/components/news_fields_macros.html.twig index 0d86e8f..7e8bb49 100644 --- a/templates/components/news_fields_macros.html.twig +++ b/templates/components/news_fields_macros.html.twig @@ -39,8 +39,8 @@ type="checkbox" value="1" {{ current_values[key] ? 'checked' : '' }} - {{ options.readonly ? 'readonly' : '' }} - {{ options.disabled ? 'disabled' : '' }} + {{ options.readonly|default(false) ? 'readonly' : '' }} + {{ options.disabled|default(false) ? 'disabled' : '' }} > {{ label }} @@ -62,7 +62,7 @@ name="{{ name }}" value="" class="form-selectgroup-input" - {{ value == key ? 'checked' : '' }} + {{ value is empty ? 'checked' : '' }} > {{ __('No icon', 'news') }} diff --git a/templates/display_alert.html.twig b/templates/display_alert.html.twig index 2bbc131..23881c7 100644 --- a/templates/display_alert.html.twig +++ b/templates/display_alert.html.twig @@ -50,7 +50,7 @@

- {{ alert_fields.name|verbatim_value }} + {{ alert_fields.name }} {% if show_only_login_alerts %} {% endif %}

" . Html::getCheckAllAsCheckbox('mass' . __CLASS__ . $rand) . '' . __('Type', 'news') . '' . __('Recipient', 'news') . '" . Html::getCheckAllAsCheckbox('mass' . self::class . $rand) . '' . __s('Type', 'news') . '' . __s('Recipient', 'news') . '
'; - Html::showMassiveActionCheckBox(__CLASS__, $current_target['id']); + Html::showMassiveActionCheckBox(self::class, $current_target['id']); echo '' . $item->getTypeName() . '$name