From 9bc430bacd211b7bcde563363f4833ea6b360355 Mon Sep 17 00:00:00 2001 From: Rom1-B Date: Thu, 9 Jan 2025 14:08:20 +0100 Subject: [PATCH] feature/glpi-11.0 ci --- .github/workflows/continuous-integration.yml | 3 +- ajax/alert_preview.php | 2 - ajax/display_alerts.php | 1 - ajax/hide_alert.php | 1 - ajax/targets.php | 1 - composer.json | 17 +- composer.lock | 702 ++++++++++--------- front/alert.form.php | 2 - front/alert.php | 2 - front/external.php | 2 - front/hidden_alerts.php | 2 - hook.php | 27 +- inc/alert.class.php | 12 +- inc/alert_target.class.php | 11 +- inc/alert_user.class.php | 5 +- js/news.js | 2 +- phpstan.neon | 2 - setup.php | 4 +- templates/alert_form.html.twig | 3 +- templates/display_alert.html.twig | 2 +- 20 files changed, 403 insertions(+), 400 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7789632..25dd1f2 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -4,6 +4,7 @@ on: push: branches: - "main" + - "feature/glpi-11.0" tags: - "*" pull_request: @@ -20,7 +21,7 @@ jobs: name: "Generate CI matrix" uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1" with: - glpi-version: "10.0.x" + glpi-version: "11.0.x" ci: name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}" needs: "generate-ci-matrix" diff --git a/ajax/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..bcb2bab 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(); diff --git a/composer.json b/composer.json index d3aa87a..893d77e 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,23 @@ { "require": { - "php": ">=7.4" + "php": ">=8.2" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.64", - "glpi-project/tools": "^0.7.4", + "friendsofphp/php-cs-fixer": "^3.67", + "glpi-project/tools": "^0.7", "php-parallel-lint/php-parallel-lint": "^1.4", - "phpstan/phpstan": "^1.12" + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-deprecation-rules": "^2.0" }, "config": { "optimize-autoloader": true, "platform": { - "php": "7.4.0" + "php": "8.2.99" }, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "phpstan/extension-installer": true + } } } diff --git a/composer.lock b/composer.lock index 3237173..a195da4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3f3e0485603e0618bc2eba1584d35c53", + "content-hash": "685ced648d392b7dea32d4bda288bfb5", "packages": [], "packages-dev": [ { @@ -73,16 +73,16 @@ }, { "name": "composer/pcre", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", "shasum": "" }, "require": { @@ -92,19 +92,19 @@ "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.10", - "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -132,7 +132,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.1" + "source": "https://github.com/composer/pcre/tree/3.3.2" }, "funding": [ { @@ -148,28 +148,28 @@ "type": "tidelift" } ], - "time": "2024-08-27T18:44:43+00:00" + "time": "2024-11-12T16:29:46+00:00" }, { "name": "composer/semver", - "version": "3.4.2", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", - "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" }, "type": "library", "extra": { @@ -213,7 +213,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.2" + "source": "https://github.com/composer/semver/tree/3.4.3" }, "funding": [ { @@ -229,7 +229,7 @@ "type": "tidelift" } ], - "time": "2024-07-12T11:35:52+00:00" + "time": "2024-09-19T14:15:21+00:00" }, { "name": "composer/xdebug-handler", @@ -407,16 +407,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.64.0", + "version": "v3.67.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "58dd9c931c785a79739310aef5178928305ffa67" + "reference": "0ad34c75d1172f7d30320460e803887981830cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67", - "reference": "58dd9c931c785a79739310aef5178928305ffa67", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/0ad34c75d1172f7d30320460e803887981830cbf", + "reference": "0ad34c75d1172f7d30320460e803887981830cbf", "shasum": "" }, "require": { @@ -426,38 +426,38 @@ "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.0", + "fidry/cpu-core-counter": "^1.2", "php": "^7.4 || ^8.0", "react/child-process": "^0.6.5", "react/event-loop": "^1.0", "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0", - "symfony/console": "^5.4 || ^6.0 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", - "symfony/finder": "^5.4 || ^6.0 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", - "symfony/polyfill-mbstring": "^1.28", - "symfony/polyfill-php80": "^1.28", - "symfony/polyfill-php81": "^1.28", - "symfony/process": "^5.4 || ^6.0 || ^7.0", - "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + "sebastian/diff": "^4.0 || ^5.1 || ^6.0", + "symfony/console": "^5.4 || ^6.4 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", + "symfony/polyfill-mbstring": "^1.31", + "symfony/polyfill-php80": "^1.31", + "symfony/polyfill-php81": "^1.31", + "symfony/process": "^5.4 || ^6.4 || ^7.2", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3 || ^2.3", - "infection/infection": "^0.29.5", - "justinrainbow/json-schema": "^5.2", + "facile-it/paraunit": "^1.3.1 || ^2.4", + "infection/infection": "^0.29.8", + "justinrainbow/json-schema": "^5.3 || ^6.0", "keradus/cli-executor": "^2.1", - "mikey179/vfsstream": "^1.6.11", + "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2", - "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0", - "symfony/yaml": "^5.4 || ^6.0 || ^7.0" + "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", + "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -498,7 +498,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.67.0" }, "funding": [ { @@ -506,7 +506,7 @@ "type": "github" } ], - "time": "2024-08-30T23:09:38+00:00" + "time": "2025-01-08T10:17:40+00:00" }, { "name": "glpi-project/tools", @@ -625,22 +625,70 @@ }, "time": "2024-03-27T12:14:49+00:00" }, + { + "name": "phpstan/extension-installer", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0 || ^2.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" + }, + "time": "2024-09-04T20:21:43+00:00" + }, { "name": "phpstan/phpstan", - "version": "1.12.7", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0" + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", - "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", + "reference": "cd6e973e04b4c2b94c86e8612b5a65f0da0e08e7", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -681,26 +729,78 @@ "type": "github" } ], - "time": "2024-10-18T11:12:07+00:00" + "time": "2025-01-05T16:43:48+00:00" + }, + { + "name": "phpstan/phpstan-deprecation-rules", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "reference": "1cc1259cb91ee4cfbb5c39bca9f635f067c910b4", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", + "support": { + "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.1" + }, + "time": "2024-11-28T21:56:36+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -727,9 +827,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -783,30 +883,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -827,9 +927,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "react/cache", @@ -905,33 +1005,33 @@ }, { "name": "react/child-process", - "version": "v0.6.5", + "version": "v0.6.6", "source": { "type": "git", "url": "https://github.com/reactphp/child-process.git", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "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.2" + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/socket": "^1.8", + "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" + "React\\ChildProcess\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -968,19 +1068,15 @@ ], "support": { "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + "source": "https://github.com/reactphp/child-process/tree/v0.6.6" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-09-16T13:41:56+00:00" + "time": "2025-01-01T16:37:48+00:00" }, { "name": "react/dns", @@ -1363,29 +1459,29 @@ }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544", + "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1417,7 +1513,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2" }, "funding": [ { @@ -1425,56 +1522,51 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-07-03T04:53:05+00:00" }, { "name": "symfony/console", - "version": "v5.4.44", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5b5a0aa66e3296e303e22490f90f521551835a83" + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5b5a0aa66e3296e303e22490f90f521551835a83", - "reference": "5b5a0aa66e3296e303e22490f90f521551835a83", + "url": "https://api.github.com/repos/symfony/console/zipball/799445db3f15768ecc382ac5699e6da0520a0a04", + "reference": "799445db3f15768ecc382ac5699e6da0520a0a04", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" }, "type": "library", "autoload": { @@ -1508,7 +1600,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.44" + "source": "https://github.com/symfony/console/tree/v6.4.17" }, "funding": [ { @@ -1524,33 +1616,33 @@ "type": "tidelift" } ], - "time": "2024-09-20T07:56:40+00:00" + "time": "2024-12-07T12:07:30+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.3", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -1575,7 +1667,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -1591,48 +1683,43 @@ "type": "tidelift" } ], - "time": "2023-01-24T14:02:46+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.40", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a54e2a8a114065f31020d6a89ede83e34c3b27a4" + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a54e2a8a114065f31020d6a89ede83e34c3b27a4", - "reference": "a54e2a8a114065f31020d6a89ede83e34c3b27a4", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<6.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/error-handler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1660,7 +1747,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.40" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" }, "funding": [ { @@ -1676,37 +1763,34 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.3", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "540f4c73e87fd0c71ca44a6aa305d024ac68cb73" + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/540f4c73e87fd0c71ca44a6aa305d024ac68cb73", - "reference": "540f4c73e87fd0c71ca44a6aa305d024ac68cb73", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -1739,7 +1823,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" }, "funding": [ { @@ -1755,30 +1839,29 @@ "type": "tidelift" } ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.41", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "6d29dd9340b372fa603f04e6df4dd76bb808591e" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6d29dd9340b372fa603f04e6df4dd76bb808591e", - "reference": "6d29dd9340b372fa603f04e6df4dd76bb808591e", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^5.4|^6.4" + "symfony/process": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1806,7 +1889,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.41" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" }, "funding": [ { @@ -1822,26 +1905,27 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:36:24+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/finder", - "version": "v5.4.43", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ae25a9145a900764158d439653d5630191155ca0" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ae25a9145a900764158d439653d5630191155ca0", - "reference": "ae25a9145a900764158d439653d5630191155ca0", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" + }, + "require-dev": { + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1869,7 +1953,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.43" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -1885,27 +1969,25 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:03:51+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.40", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "bd1afbde6613a8d6b956115e0e14b196191fd0c4" + "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/bd1afbde6613a8d6b956115e0e14b196191fd0c4", - "reference": "bd1afbde6613a8d6b956115e0e14b196191fd0c4", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/7da8fbac9dcfef75ffc212235d76b2754ce0cf50", + "reference": "7da8fbac9dcfef75ffc212235d76b2754ce0cf50", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -1938,7 +2020,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.40" + "source": "https://github.com/symfony/options-resolver/tree/v7.2.0" }, "funding": [ { @@ -1954,7 +2036,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-11-20T11:17:29+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1982,8 +2064,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2058,8 +2140,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2136,8 +2218,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2220,8 +2302,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2274,82 +2356,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.31.0", @@ -2370,8 +2376,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2450,8 +2456,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2508,21 +2514,20 @@ }, { "name": "symfony/process", - "version": "v5.4.46", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4" + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/01906871cb9b5e3cf872863b91aba4ec9767daf4", - "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -2550,7 +2555,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.46" + "source": "https://github.com/symfony/process/tree/v7.2.0" }, "funding": [ { @@ -2566,47 +2571,47 @@ "type": "tidelift" } ], - "time": "2024-11-06T09:18:28+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.3", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2633,7 +2638,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -2649,25 +2654,25 @@ "type": "tidelift" } ], - "time": "2023-04-21T15:04:16+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.40", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "0e9daf3b7c805c747638b2cc48f1649e594f9625" + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0e9daf3b7c805c747638b2cc48f1649e594f9625", - "reference": "0e9daf3b7c805c747638b2cc48f1649e594f9625", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e46690d5b9d7164a6d061cab1e8d46141b9f49df", + "reference": "e46690d5b9d7164a6d061cab1e8d46141b9f49df", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.2", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -2695,7 +2700,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.40" + "source": "https://github.com/symfony/stopwatch/tree/v7.2.2" }, "funding": [ { @@ -2711,38 +2716,39 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-12-18T14:28:33+00:00" }, { "name": "symfony/string", - "version": "v5.4.44", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "832caa16b6d9aac6bf11747315225f5aba384c24" + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/832caa16b6d9aac6bf11747315225f5aba384c24", - "reference": "832caa16b6d9aac6bf11747315225f5aba384c24", + "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2781,7 +2787,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.44" + "source": "https://github.com/symfony/string/tree/v7.2.0" }, "funding": [ { @@ -2797,31 +2803,31 @@ "type": "tidelift" } ], - "time": "2024-09-20T07:56:40+00:00" + "time": "2024-11-13T13:31:26+00:00" }, { "name": "twig/twig", - "version": "v3.11.2", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "5b580ec1882b54c98cbd8c0f8a3ca5d1904db6b1" + "reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/5b580ec1882b54c98cbd8c0f8a3ca5d1904db6b1", - "reference": "5b580ec1882b54c98cbd8c0f8a3ca5d1904db6b1", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50", + "reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php80": "^1.22", "symfony/polyfill-php81": "^1.29" }, "require-dev": { + "phpstan/phpstan": "^2.0", "psr/container": "^1.0|^2.0", "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" }, @@ -2865,7 +2871,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.11.2" + "source": "https://github.com/twigphp/Twig/tree/v3.18.0" }, "funding": [ { @@ -2877,7 +2883,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T18:50:16+00:00" + "time": "2024-12-29T10:51:50+00:00" } ], "aliases": [], @@ -2886,11 +2892,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 d96ffe3..8d381d2 100644 --- a/front/alert.form.php +++ b/front/alert.form.php @@ -30,8 +30,6 @@ use Glpi\Event; -include('../../../inc/includes.php'); - if (!isset($_GET['id'])) { $_GET['id'] = ''; } diff --git a/front/alert.php b/front/alert.php index 81a2395..43f8546 100644 --- a/front/alert.php +++ b/front/alert.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Html::header( __('Alerts', 'news'), $_SERVER['PHP_SELF'], diff --git a/front/external.php b/front/external.php index 158a852..6ddb8d2 100644 --- a/front/external.php +++ b/front/external.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - Html::nullHeader(PluginNewsAlert::getTypeName()); $logged = isset($_SESSION['glpiID']); PluginNewsAlert::displayAlerts(['show_only_login_alerts' => !$logged]); diff --git a/front/hidden_alerts.php b/front/hidden_alerts.php index 82e24a2..4718445 100644 --- a/front/hidden_alerts.php +++ b/front/hidden_alerts.php @@ -28,8 +28,6 @@ * ------------------------------------------------------------------------- */ -include('../../../inc/includes.php'); - if ($_SESSION['glpiactiveprofile']['interface'] != 'central') { Html::helpHeader(__('Alerts', 'news'), $_SERVER['PHP_SELF'], $_SESSION['glpiname']); } else { diff --git a/hook.php b/hook.php index a3bece9..ec87983 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 @@ -192,7 +191,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 +213,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), @@ -349,12 +348,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..ef160dc 100644 --- a/inc/alert.class.php +++ b/inc/alert.class.php @@ -32,7 +32,8 @@ use Glpi\Toolbox\Sanitizer; 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 +72,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(); } @@ -532,6 +533,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,7 +566,7 @@ public static function displayAlerts($params = []) && !$p['show_hidden_alerts'] ) { echo "
"; - echo ""; + echo ""; echo __('You have hidden alerts valid for current date', 'news'); echo ''; echo '
'; @@ -609,7 +613,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'], ]); diff --git a/inc/alert_target.class.php b/inc/alert_target.class.php index f80e1fc..37768b6 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 @@ -43,12 +44,12 @@ public static function getTypeName($nb = 0) return _n('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(); } @@ -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 "
"; @@ -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 ''; diff --git a/inc/alert_user.class.php b/inc/alert_user.class.php index 16a6a1f..f4813ef 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,7 +72,7 @@ public static function hideAlert($params = []) ); } - public function canCreateItem() + public function canCreateItem(): bool { if ($this->fields['users_id'] != Session::getLoginUserID()) { return false; diff --git a/js/news.js b/js/news.js index d948468..85450c5 100644 --- a/js/news.js +++ b/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/phpstan.neon b/phpstan.neon index 455f2e7..ebf8ffd 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -2,8 +2,6 @@ parameters: parallel: maximumNumberOfProcesses: 2 level: 5 - bootstrapFiles: - - ../../inc/based_config.php paths: - inc - front diff --git a/setup.php b/setup.php index dff119b..84a30b7 100644 --- a/setup.php +++ b/setup.php @@ -31,9 +31,9 @@ define('PLUGIN_NEWS_VERSION', '1.12.4'); // 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() { diff --git a/templates/alert_form.html.twig b/templates/alert_form.html.twig index 20c994c..0c81c1e 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() ); }; @@ -254,4 +254,3 @@ {% endblock %} - diff --git a/templates/display_alert.html.twig b/templates/display_alert.html.twig index 88f3062..78194ec 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 %}