From 2995bf099fa6e8d1cdcda670c3bd58fb16ba4699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Fri, 7 Feb 2020 14:23:46 +0100 Subject: [PATCH 1/4] Run CS checks in strict mode --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0196f5e..b389e06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_script: - composer install --optimize-autoloader --prefer-dist --no-interaction --no-progress --no-suggest script: - - vendor/bin/robo --no-interaction code:cs + - vendor/bin/robo --no-interaction code:cs --strict matrix: allow_failures: From e2b02f902d9f6a5a3c132b8d9ed63d30369a8c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 14 Nov 2019 15:33:38 +0100 Subject: [PATCH 2/4] Add GLPI 9.5 compatibility * Replace usage of deprecated 'DBMysql::fetch_assoc()' * Add marketplace compatibility * Add menu icon * Use GLPI 9.5 min required PHP version * Add 2.4.0 version definition --- .travis.yml | 7 +- composer.json | 9 +- composer.lock | 827 +++++++++++++++++++++++------------ hook.php | 16 +- inc/category.class.php | 10 +- inc/category_group.class.php | 2 +- inc/menu.class.php | 3 +- itilcategorygroups.xml | 4 +- scripts/filtergroups.js.php | 3 +- setup.php | 37 +- 10 files changed, 576 insertions(+), 342 deletions(-) diff --git a/.travis.yml b/.travis.yml index b389e06..17203bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: php php: - - 5.6 + - 7.2 - 7.4 - - nightly before_script: - composer self-update @@ -11,10 +10,6 @@ before_script: script: - vendor/bin/robo --no-interaction code:cs --strict -matrix: - allow_failures: - - php: nightly - cache: directories: - $HOME/.composer/cache diff --git a/composer.json b/composer.json index e21ea28..d3318a0 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,15 @@ { + "require": { + "php": "^7.2" + }, "require-dev": { "glpi-project/tools": "^0.1" }, "config": { + "optimize-autoloader": true, "platform": { - "php": "5.6" - } + "php": "7.2.0" + }, + "sort-packages": true } } diff --git a/composer.lock b/composer.lock index a716401..ac3b4d4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,36 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1780e587040d1a21844800dc378c2f2e", + "content-hash": "469eca19f475207181e67a99b51f34a4", "packages": [], "packages-dev": [ { "name": "consolidation/annotated-command", - "version": "2.12.0", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789" + "reference": "efc58dc0f34a45539787c5190b41b5d2a50a08da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", - "reference": "512a2e54c98f3af377589de76c43b24652bcb789", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/efc58dc0f34a45539787c5190b41b5d2a50a08da", + "reference": "efc58dc0f34a45539787c5190b41b5d2a50a08da", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.4", - "php": ">=5.4.5", - "psr/log": "^1", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "consolidation/output-formatters": "^4.1.1", + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/console": "^4.4.8|^5", + "symfony/event-dispatcher": "^4.4.8|^5", + "symfony/finder": "^4.4.8|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", + "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2.7" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { @@ -47,42 +47,10 @@ "php": "7.1.3" } } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -101,7 +69,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2019-03-08T16:55:03+00:00" + "time": "2020-05-27T21:11:36+00:00" }, { "name": "consolidation/config", @@ -186,74 +154,45 @@ }, { "name": "consolidation/log", - "version": "1.1.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" + "reference": "ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", - "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "url": "https://api.github.com/repos/consolidation/log/zipball/ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf", + "reference": "ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf", "shasum": "" }, "require": { - "php": ">=5.4.5", + "php": ">=7.1.3", "psr/log": "^1.0", - "symfony/console": "^2.8|^3|^4" + "symfony/console": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", + "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2" + "squizlabs/php_codesniffer": "^3" }, "type": "library", "extra": { "scenarios": { "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - }, - "phpunit4": { - "require-dev": { - "phpunit/phpunit": "^4.8.36" + "symfony/console": "^4" }, - "remove": [ - "php-coveralls/php-coveralls" - ], "config": { "platform": { - "php": "5.4.8" + "php": "7.1.3" } } } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -272,35 +211,35 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2019-01-01T17:30:51+00:00" + "time": "2020-05-27T17:06:13+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.5.0", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605" + "reference": "9deeddd6a916d0a756b216a8b40ce1016e17c0b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/99ec998ffb697e0eada5aacf81feebfb13023605", - "reference": "99ec998ffb697e0eada5aacf81feebfb13023605", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/9deeddd6a916d0a756b216a8b40ce1016e17c0b9", + "reference": "9deeddd6a916d0a756b216a8b40ce1016e17c0b9", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", - "php": ">=5.4.0", - "symfony/console": "^2.8|^3|^4", - "symfony/finder": "^2.5|^3|^4" + "php": ">=7.1.3", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" }, "require-dev": { "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^2.7", - "symfony/var-dumper": "^2.8|^3|^4", - "victorjonsson/markdowndocs": "^1.3" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^3", + "symfony/var-dumper": "^4", + "symfony/yaml": "^4" }, "suggest": { "symfony/var-dumper": "For using the var_dump formatter" @@ -312,49 +251,15 @@ "require": { "symfony/console": "^4.0" }, - "require-dev": { - "phpunit/phpunit": "^6" - }, "config": { "platform": { "php": "7.1.3" } } - }, - "symfony3": { - "require": { - "symfony/console": "^3.4", - "symfony/finder": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "config": { - "platform": { - "php": "5.6.32" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - }, - "scenario-options": { - "create-lockfile": "false" - } } }, "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -373,30 +278,30 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2019-05-30T23:16:01+00:00" + "time": "2020-05-27T20:51:17+00:00" }, { "name": "consolidation/robo", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80" + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/5fa1d901776a628167a325baa9db95d8edf13a80", - "reference": "5fa1d901776a628167a325baa9db95d8edf13a80", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", + "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0", - "consolidation/config": "^1.2", - "consolidation/log": "~1", - "consolidation/output-formatters": "^3.1.13", - "consolidation/self-update": "^1", - "grasmash/yaml-expander": "^1.3", - "league/container": "^2.2", + "consolidation/annotated-command": "^2.11.0|^4.1", + "consolidation/config": "^1.2.1", + "consolidation/log": "^1.1.1|^2", + "consolidation/output-formatters": "^3.1.13|^4.1", + "consolidation/self-update": "^1.1.5", + "grasmash/yaml-expander": "^1.4", + "league/container": "^2.4.1", "php": ">=5.5.0", "symfony/console": "^2.8|^3|^4", "symfony/event-dispatcher": "^2.5|^3|^4", @@ -408,20 +313,13 @@ "codegyre/robo": "< 1.0" }, "require-dev": { - "codeception/aspect-mock": "^1|^2.1.1", - "codeception/base": "^2.3.7", - "codeception/verify": "^0.3.2", "g1a/composer-test-scenarios": "^3", - "goaop/framework": "~2.1.2", - "goaop/parser-reflection": "^1.1.0", "natxet/cssmin": "3.0.4", - "nikic/php-parser": "^3.1.5", - "patchwork/jsqueeze": "~2", + "patchwork/jsqueeze": "^2", "pear/archive_tar": "^1.4.4", "php-coveralls/php-coveralls": "^1", - "phpunit/php-code-coverage": "~2|~4", - "sebastian/comparator": "^1.2.4", - "squizlabs/php_codesniffer": "^2.8" + "phpunit/phpunit": "^5.7.27", + "squizlabs/php_codesniffer": "^3" }, "suggest": { "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", @@ -449,8 +347,11 @@ "require": { "symfony/console": "^2.8" }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, "remove": [ - "goaop/framework" + "php-coveralls/php-coveralls" ], "config": { "platform": { @@ -463,7 +364,7 @@ } }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -482,26 +383,26 @@ } ], "description": "Modern task runner", - "time": "2019-10-29T15:50:02+00:00" + "time": "2020-02-18T17:31:26+00:00" }, { "name": "consolidation/self-update", - "version": "1.1.5", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/consolidation/self-update.git", - "reference": "a1c273b14ce334789825a09d06d4c87c0a02ad54" + "reference": "dba6b2c0708f20fa3ba8008a2353b637578849b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/self-update/zipball/a1c273b14ce334789825a09d06d4c87c0a02ad54", - "reference": "a1c273b14ce334789825a09d06d4c87c0a02ad54", + "url": "https://api.github.com/repos/consolidation/self-update/zipball/dba6b2c0708f20fa3ba8008a2353b637578849b4", + "reference": "dba6b2c0708f20fa3ba8008a2353b637578849b4", "shasum": "" }, "require": { "php": ">=5.5.0", - "symfony/console": "^2.8|^3|^4", - "symfony/filesystem": "^2.5|^3|^4" + "symfony/console": "^2.8|^3|^4|^5", + "symfony/filesystem": "^2.5|^3|^4|^5" }, "bin": [ "scripts/release" @@ -522,17 +423,17 @@ "MIT" ], "authors": [ - { - "name": "Greg Anderson", - "email": "greg.1.anderson@greenknowe.org" - }, { "name": "Alexander Menk", "email": "menk@mestrona.net" + }, + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" } ], "description": "Provides a self:update command for Symfony Console applications.", - "time": "2018-10-28T01:52:03+00:00" + "time": "2020-04-13T02:49:20+00:00" }, { "name": "container-interop/container-interop", @@ -563,6 +464,7 @@ ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "homepage": "https://github.com/container-interop/container-interop", + "abandoned": "psr/container", "time": "2017-02-14T19:40:03+00:00" }, { @@ -663,16 +565,16 @@ }, { "name": "glpi-project/tools", - "version": "0.1.8", + "version": "0.1.13", "source": { "type": "git", "url": "https://github.com/glpi-project/tools.git", - "reference": "39ca503a00454e6c5d7d97bd8baff358d262a897" + "reference": "2028ecf9acd8b838cff37771dcab77ced9391f41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/39ca503a00454e6c5d7d97bd8baff358d262a897", - "reference": "39ca503a00454e6c5d7d97bd8baff358d262a897", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/2028ecf9acd8b838cff37771dcab77ced9391f41", + "reference": "2028ecf9acd8b838cff37771dcab77ced9391f41", "shasum": "" }, "require": { @@ -709,7 +611,7 @@ "plugins", "tools" ], - "time": "2019-06-07T09:46:17+00:00" + "time": "2020-06-19T10:29:26+00:00" }, { "name": "grasmash/expander", @@ -1011,16 +913,16 @@ }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1054,20 +956,20 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.4", + "version": "3.5.5", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dceec07328401de6211037abbb18bda423677e26" + "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26", - "reference": "dceec07328401de6211037abbb18bda423677e26", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6", + "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6", "shasum": "" }, "require": { @@ -1105,29 +1007,33 @@ "phpcs", "standards" ], - "time": "2020-01-30T22:20:29+00:00" + "time": "2020-04-17T01:09:41+00:00" }, { "name": "symfony/console", - "version": "v3.4.37", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "7c5bdd346f9d90a2d22d4e1fe61e02dc19b98f12" + "reference": "326b064d804043005526f5a0494cfb49edb59bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/7c5bdd346f9d90a2d22d4e1fe61e02dc19b98f12", - "reference": "7c5bdd346f9d90a2d22d4e1fe61e02dc19b98f12", + "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0", + "reference": "326b064d804043005526f5a0494cfb49edb59bb0", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0|~4.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2" }, "conflict": { "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3|>=5", + "symfony/lock": "<4.4", "symfony/process": "<3.3" }, "provide": { @@ -1135,11 +1041,12 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.3|~4.0" + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/event-dispatcher": "^4.3", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1150,7 +1057,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1177,41 +1084,69 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-01-10T07:52:48+00:00" + "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": "2020-05-30T20:06:45+00:00" }, { - "name": "symfony/debug", - "version": "v3.4.37", + "name": "symfony/event-dispatcher", + "version": "v4.4.10", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "70dd18e93bb8bdf3c4db7fde832619fef9828cf8" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/70dd18e93bb8bdf3c4db7fde832619fef9828cf8", - "reference": "70dd18e93bb8bdf3c4db7fde832619fef9828cf8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866", + "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "psr/log": "~1.0" + "php": ">=7.1.3", + "symfony/event-dispatcher-contracts": "^1.1" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "psr/log": "~1.0", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^3.4|^4.0|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Debug\\": "" + "Symfony\\Component\\EventDispatcher\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1231,54 +1166,55 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2020-01-08T16:36:15+00:00" + "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": "2020-05-20T08:37:50+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v3.4.37", + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.7", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "79ede8f2836e5ec910ebb325bde40f987244baa8" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/79ede8f2836e5ec910ebb325bde40f987244baa8", - "reference": "79ede8f2836e5ec910ebb325bde40f987244baa8", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18", + "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0|~4.0", - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/expression-language": "~2.8|~3.0|~4.0", - "symfony/stopwatch": "~2.8|~3.0|~4.0" + "php": "^7.1.3" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "1.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Contracts\\EventDispatcher\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1286,40 +1222,48 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Generic abstractions related to dispatching event", "homepage": "https://symfony.com", - "time": "2020-01-04T12:05:51+00:00" + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-09-17T09:54:03+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.37", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "0a0d3b4bda11aa3a0464531c40e681e184e75628" + "reference": "b27f491309db5757816db672b256ea2e03677d30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0a0d3b4bda11aa3a0464531c40e681e184e75628", - "reference": "0a0d3b4bda11aa3a0464531c40e681e184e75628", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b27f491309db5757816db672b256ea2e03677d30", + "reference": "b27f491309db5757816db672b256ea2e03677d30", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1346,29 +1290,43 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2020-01-17T08:50:08+00:00" + "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": "2020-05-30T18:50:54+00:00" }, { "name": "symfony/finder", - "version": "v3.4.37", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a90a9d3b9f458a5cdeabfa4090b20c000ca3962f" + "reference": "5729f943f9854c5781984ed4907bbb817735776b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a90a9d3b9f458a5cdeabfa4090b20c000ca3962f", - "reference": "a90a9d3b9f458a5cdeabfa4090b20c000ca3962f", + "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", + "reference": "5729f943f9854c5781984ed4907bbb817735776b", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1395,20 +1353,34 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2020-01-01T11:03:25+00:00" + "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": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "shasum": "" }, "require": { @@ -1420,7 +1392,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1453,20 +1429,34 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "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": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "7110338d81ce1cbc3e273136e4574663627037a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7", + "reference": "7110338d81ce1cbc3e273136e4574663627037a7", "shasum": "" }, "require": { @@ -1478,7 +1468,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1512,29 +1506,199 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "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": "2020-06-06T08:46:27+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a", + "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "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" + ], + "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": "2020-06-06T08:46:27+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.17.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.17-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "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": "2020-06-06T08:46:27+00:00" }, { "name": "symfony/process", - "version": "v3.4.37", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5b9d2bcffe4678911a4c941c00b7c161252cf09a" + "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5b9d2bcffe4678911a4c941c00b7c161252cf09a", - "reference": "5b9d2bcffe4678911a4c941c00b7c161252cf09a", + "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5", + "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1561,31 +1725,103 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2020-01-01T11:03:25+00:00" + "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": "2020-05-30T20:06:45+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v1.1.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffc7f5692092df31515df2a5ecf3b7302b3ddacf", + "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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 writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-10-14T12:27:06+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.37", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "aa46bc2233097d5212332c907f9911533acfbf80" + "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/aa46bc2233097d5212332c907f9911533acfbf80", - "reference": "aa46bc2233097d5212332c907f9911533acfbf80", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", + "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~3.4|~4.0" + "symfony/console": "^3.4|^4.0|^5.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1593,7 +1829,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -1620,7 +1856,21 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2020-01-13T08:00:59+00:00" + "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": "2020-05-20T08:37:50+00:00" } ], "aliases": [], @@ -1628,9 +1878,12 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], + "platform": { + "php": "^7.2" + }, "platform-dev": [], "platform-overrides": { - "php": "5.6" - } + "php": "7.2.0" + }, + "plugin-api-version": "1.1.0" } diff --git a/hook.php b/hook.php index aa21d45..7cb7b09 100644 --- a/hook.php +++ b/hook.php @@ -29,12 +29,14 @@ ---------------------------------------------------------------------- */ function plugin_itilcategorygroups_install() { + $dir = Plugin::getPhpDir('itilcategorygroups'); + $migration = new Migration("0.84"); //order is important for install - include_once(GLPI_ROOT."/plugins/itilcategorygroups/inc/category.class.php"); - include_once(GLPI_ROOT."/plugins/itilcategorygroups/inc/category_group.class.php"); - include_once(GLPI_ROOT."/plugins/itilcategorygroups/inc/group_level.class.php"); + include_once($dir . "/inc/category.class.php"); + include_once($dir . "/inc/category_group.class.php"); + include_once($dir . "/inc/group_level.class.php"); PluginItilcategorygroupsCategory::install($migration); PluginItilcategorygroupsCategory_Group::install($migration); PluginItilcategorygroupsGroup_Level::install($migration); @@ -42,9 +44,11 @@ function plugin_itilcategorygroups_install() { } function plugin_itilcategorygroups_uninstall() { - include_once(GLPI_ROOT."/plugins/itilcategorygroups/inc/category_group.class.php"); - include_once(GLPI_ROOT."/plugins/itilcategorygroups/inc/category.class.php"); - include_once(GLPI_ROOT."/plugins/itilcategorygroups/inc/group_level.class.php"); + $dir = Plugin::getPhpDir('itilcategorygroups'); + + include_once($dir . "/inc/category_group.class.php"); + include_once($dir . "/inc/category.class.php"); + include_once($dir . "/inc/group_level.class.php"); PluginItilcategorygroupsCategory_Group::uninstall(); PluginItilcategorygroupsCategory::uninstall(); PluginItilcategorygroupsGroup_Level::uninstall(); diff --git a/inc/category.class.php b/inc/category.class.php index b262570..51d83e1 100644 --- a/inc/category.class.php +++ b/inc/category.class.php @@ -144,7 +144,7 @@ function multipleDropdownGroup($level) { OR `plugin_itilcategorygroups_categories_id` = {$this->getID()} ) AND level = $level"); - while ($data_val = $DB->fetch_assoc($res_val)) { + while ($data_val = $DB->fetchAssoc($res_val)) { $values[] = $data_val['groups_id']; } } @@ -167,7 +167,7 @@ function multipleDropdownGroup($level) { echo ""; echo "