From f701e920593a88039289712a45dd535e9603e1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Wed, 10 Nov 2021 10:46:21 +0100 Subject: [PATCH] GLPI 10.0 compatibility - Permit installation on GLPI 10.0.x - Limit compatibility to GLPI 10.x - Use Guzzle library provided by GLPI - Use same PHP minimal version as GLPI core; upgrade build libs - Replace DATETIME field by TIMESTAMP - Remove deprecated usage of integer display width - Remove deprecated usage of integer display width - Force database dynamic row format - Use default sign on primary/foreign keys - Drop useless check --- .github/workflows/continuous-integration.yml | 35 + ajax/xuc.php | 2 +- composer.json | 11 +- composer.lock | 930 +++++++++++-------- css/animation.css | 2 +- css/main.css | 2 +- front/config.form.php | 2 +- front/line.form.php | 2 +- front/line.php | 2 +- front/phone.form.php | 2 +- front/phone_line.form.php | 2 +- front/phonecall.php | 2 +- hook.php | 2 +- inc/apiclient.class.php | 17 +- inc/config.class.php | 2 +- inc/inventory.class.php | 2 +- inc/line.class.php | 20 +- inc/phone.class.php | 14 +- inc/phone_line.class.php | 14 +- inc/xuc.class.php | 2 +- js/app.js.php | 2 +- js/common.js | 2 +- js/sessionStorageTabs.js | 2 +- js/store2.min.js | 2 +- js/xivo/callback.js | 2 +- js/xivo/cti.js | 2 +- js/xivo/membership.js | 2 +- js/xuc.js | 2 +- setup.php | 9 +- tools/HEADER | 2 +- 30 files changed, 672 insertions(+), 422 deletions(-) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..ba8a327 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,35 @@ +name: "Continuous integration" + +on: + push: + branches: + - "main" + tags: + - "*" + pull_request: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + generate-ci-matrix: + name: "Generate CI matrix" + uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1" + with: + glpi-version: "10.0.x" + ci: + name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}" + needs: "generate-ci-matrix" + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.generate-ci-matrix.outputs.matrix) }} + uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1" + with: + plugin-key: "xivo" + glpi-version: "${{ matrix.glpi-version }}" + php-version: "${{ matrix.php-version }}" + db-image: "${{ matrix.db-image }}" diff --git a/ajax/xuc.php b/ajax/xuc.php index 7a342d5..ed3a185 100644 --- a/ajax/xuc.php +++ b/ajax/xuc.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/composer.json b/composer.json index d1feb66..55f46ed 100644 --- a/composer.json +++ b/composer.json @@ -1,15 +1,18 @@ { "require": { - "php": "^7.2", - "guzzlehttp/guzzle": "^6.2" + "php": ">=7.4" }, "require-dev": { - "glpi-project/tools": "^0.4" + "glpi-project/tools": "^0.7", + "php-parallel-lint/php-parallel-lint": "^1.4" + }, + "provide": { + "guzzlehttp/guzzle": "*" }, "config": { "optimize-autoloader": true, "platform": { - "php": "7.2.0" + "php": "7.4.0" }, "sort-packages": true } diff --git a/composer.lock b/composer.lock index f623101..9fb3c39 100644 --- a/composer.lock +++ b/composer.lock @@ -4,168 +4,148 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8ceabe3582623ebe76a6c094dc28e8a2", - "packages": [ + "content-hash": "9b70973606999fbdbb1cfdfe28778438", + "packages": [], + "packages-dev": [ { - "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "name": "glpi-project/tools", + "version": "0.7.4", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "url": "https://github.com/glpi-project/tools.git", + "reference": "65a09a93350da6fa67d423dd94e4cb4023a17e20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/65a09a93350da6fa67d423dd94e4cb4023a17e20", + "reference": "65a09a93350da6fa67d423dd94e4cb4023a17e20", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "symfony/console": "^5.4 || ^6.0", + "twig/twig": "^3.3" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" + "nikic/php-parser": "^4.13", + "phpstan/phpstan-src": "^1.10" }, + "bin": [ + "bin/extract-locales", + "bin/licence-headers-check", + "tools/plugin-release" + ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.5-dev" - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "GlpiProject\\Tools\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "GPL-3.0-or-later" ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Teclib'", + "email": "glpi@teclib.com", + "homepage": "http://teclib-group.com" } ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", + "description": "Various tools for GLPI and its plugins", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2020-06-16T21:01:06+00:00" + "glpi", + "plugins", + "tools" + ], + "support": { + "issues": "https://github.com/glpi-project/tools/issues", + "source": "https://github.com/glpi-project/tools" + }, + "time": "2024-09-18T06:58:02+00:00" }, { - "name": "guzzlehttp/promises", - "version": "v1.3.1", + "name": "php-parallel-lint/php-parallel-lint", + "version": "v1.4.0", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e", + "reference": "6db563514f27e19595a19f45a4bf757b6401194e", "shasum": "" }, "require": { - "php": ">=5.5.0" + "ext-json": "*", + "php": ">=5.3.0" + }, + "replace": { + "grogy/php-parallel-lint": "*", + "jakub-onderka/php-parallel-lint": "*" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "nette/tester": "^1.3 || ^2.0", + "php-parallel-lint/php-console-highlighter": "0.* || ^1.0", + "squizlabs/php_codesniffer": "^3.6" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } + "suggest": { + "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet" }, + "bin": [ + "parallel-lint" + ], + "type": "library", "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" + "classmap": [ + "./src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-2-Clause" ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Jakub Onderka", + "email": "ahoj@jakubonderka.cz" } ], - "description": "Guzzle promises library", + "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": [ - "promise" + "lint", + "static analysis" ], - "time": "2016-12-20T10:07:11+00:00" + "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": "guzzlehttp/psr7", - "version": "1.6.1", + "name": "psr/container", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -173,55 +153,82 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "PSR-7 message implementation that also provides common utility methods", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2019-07-01T23:21:34+00:00" + "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/http-message", - "version": "1.0.1", + "name": "symfony/console", + "version": "v5.4.43", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/symfony/console.git", + "reference": "e86f8554de667c16dde8aeb89a3990cfde924df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/symfony/console/zipball/e86f8554de667c16dde8aeb89a3990cfde924df9", + "reference": "e86f8554de667c16dde8aeb89a3990cfde924df9", "shasum": "" }, "require": { - "php": ">=5.3.0" + "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" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "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": { - "Psr\\Http\\Message\\": "src/" - } + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -229,47 +236,71 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.43" + }, + "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-08-13T16:31:56+00:00" }, { - "name": "ralouphie/getallheaders", - "version": "3.0.3", + "name": "symfony/deprecation-contracts", + "version": "v2.5.3", "source": { "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" + "php": ">=7.1" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, "autoload": { "files": [ - "src/getallheaders.php" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -278,52 +309,72 @@ ], "authors": [ { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A polyfill for getallheaders.", - "time": "2019-03-08T08:55:37+00:00" + "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" + }, + "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": "2023-01-24T14:02:46+00:00" }, { - "name": "symfony/polyfill-intl-idn", - "version": "v1.17.1", + "name": "symfony/polyfill-ctype", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a57f8161502549a742a63c09f0a604997bf47027" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027", - "reference": "a57f8161502549a742a63c09f0a604997bf47027", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { - "ext-intl": "For best performance" + "ext-ctype": "For best performance" }, "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\\Intl\\Idn\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -331,24 +382,25 @@ ], "authors": [ { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "idn", - "intl", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -363,30 +415,27 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" + "php": ">=7.2" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { @@ -400,7 +449,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -417,17 +466,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -443,37 +493,44 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.17.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "f048e612a3905f34931127360bdd2def19a5e582" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", - "reference": "f048e612a3905f34931127360bdd2def19a5e582", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" }, "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\\Php72\\": "" - }, "files": [ "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -490,14 +547,19 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ 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-intl-normalizer/tree/v1.31.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -512,83 +574,44 @@ "type": "tidelift" } ], - "time": "2020-05-12T16:47:27+00:00" - } - ], - "packages-dev": [ + "time": "2024-09-09T11:45:10+00:00" + }, { - "name": "glpi-project/tools", - "version": "0.4.3", + "name": "symfony/polyfill-mbstring", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/glpi-project/tools.git", - "reference": "00a4f4aee6501f8e003164555fa11a64d7987e96" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/00a4f4aee6501f8e003164555fa11a64d7987e96", - "reference": "00a4f4aee6501f8e003164555fa11a64d7987e96", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "symfony/console": "^4.4 || ^5.0" - }, - "bin": [ - "bin/extract-locales", - "bin/licence-headers-check", - "tools/extract_template.sh", - "tools/plugin-release" - ], - "type": "library", - "autoload": { - "psr-4": { - "Glpi\\": "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": "2022-03-09T10:50:19+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "php": ">=7.2" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" + "provide": { + "ext-mbstring": "*" }, - "require": { - "php": ">=7.2.0" + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Psr\\Container\\": "src/" + "Symfony\\Polyfill\\Mbstring\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -597,78 +620,75 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, - "time": "2021-03-05T17:36:06+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": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/console", - "version": "v4.4.49", + "name": "symfony/polyfill-php73", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", - "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", - "symfony/lock": "<4.4", - "symfony/process": "<3.3" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "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", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "php": ">=7.2" }, "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Console\\": "" + "Symfony\\Polyfill\\Php73\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -677,18 +697,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Eases the creation of beautiful and testable command line interfaces", + "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/console/tree/v4.4.49" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -704,24 +730,24 @@ "type": "tidelift" } ], - "time": "2022-11-05T17:10:16+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.29.0", + "name": "symfony/polyfill-php80", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -735,7 +761,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "classmap": [ "Resources/stubs" @@ -746,6 +772,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -755,7 +785,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -764,7 +794,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -780,24 +810,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "name": "symfony/polyfill-php81", + "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -811,7 +841,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, "classmap": [ "Resources/stubs" @@ -822,10 +852,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -835,7 +861,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -844,7 +870,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -860,25 +886,29 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.10.0", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "afa00c500c2d6aea6e3b2f4862355f507bc5ebb4" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/afa00c500c2d6aea6e3b2f4862355f507bc5ebb4", - "reference": "afa00c500c2d6aea6e3b2f4862355f507bc5ebb4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/container": "^1.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -886,7 +916,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -923,7 +953,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.10.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -939,7 +969,173 @@ "type": "tidelift" } ], - "time": "2022-05-27T14:01:05+00:00" + "time": "2023-04-21T15:04:16+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.43", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "8be1d484951ff5ca995eaf8edcbcb8b9a5888450" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/8be1d484951ff5ca995eaf8edcbcb8b9a5888450", + "reference": "8be1d484951ff5ca995eaf8edcbcb8b9a5888450", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "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" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "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" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.43" + }, + "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-08-01T10:24:28+00:00" + }, + { + "name": "twig/twig", + "version": "v3.11.1", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "ff063afc691e1cfda6714f1915ed766cb108d188" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/ff063afc691e1cfda6714f1915ed766cb108d188", + "reference": "ff063afc691e1cfda6714f1915ed766cb108d188", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "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": { + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Resources/core.php", + "src/Resources/debug.php", + "src/Resources/escaper.php", + "src/Resources/string_loader.php" + ], + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.11.1" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2024-09-10T10:40:14+00:00" } ], "aliases": [], @@ -948,11 +1144,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2" + "php": ">=7.4" }, "platform-dev": [], "platform-overrides": { - "php": "7.2.0" + "php": "7.4.0" }, "plugin-api-version": "2.6.0" } diff --git a/css/animation.css b/css/animation.css index fe4f00a..7318517 100644 --- a/css/animation.css +++ b/css/animation.css @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/css/main.css b/css/main.css index 58a6705..2610f80 100644 --- a/css/main.css +++ b/css/main.css @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/front/config.form.php b/front/config.form.php index 5416d4d..1dac146 100644 --- a/front/config.form.php +++ b/front/config.form.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/front/line.form.php b/front/line.form.php index d44312b..fd6efca 100644 --- a/front/line.form.php +++ b/front/line.form.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/front/line.php b/front/line.php index f58177e..3485f10 100644 --- a/front/line.php +++ b/front/line.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/front/phone.form.php b/front/phone.form.php index c1abf22..40c5b89 100644 --- a/front/phone.form.php +++ b/front/phone.form.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/front/phone_line.form.php b/front/phone_line.form.php index 16854b3..0df93fb 100644 --- a/front/phone_line.form.php +++ b/front/phone_line.form.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/front/phonecall.php b/front/phonecall.php index e6be421..5274aa3 100644 --- a/front/phonecall.php +++ b/front/phonecall.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/hook.php b/hook.php index 2589349..d565538 100644 --- a/hook.php +++ b/hook.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/inc/apiclient.class.php b/inc/apiclient.class.php index 372102f..594f3ed 100644 --- a/inc/apiclient.class.php +++ b/inc/apiclient.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- @@ -32,8 +32,9 @@ die("Sorry. You can't access this file directly"); } -use GuzzleHttp\Psr7; use GuzzleHttp\Exception\GuzzleException; +use GuzzleHttp\Exception\RequestException; +use GuzzleHttp\Psr7\Message; class PluginXivoAPIClient extends CommonGLPI { private $api_config = []; @@ -417,10 +418,16 @@ function httpQuery($resource = '', $params = [], $method = 'GET') { 'title' => "XIVO API error", 'exception' => $e->getMessage(), 'params' => $params, - 'request' => Psr7\str($e->getRequest()), + 'request' => '', ]; - if ($e->hasResponse()) { - $this->last_error['response'] = Psr7\str($e->getResponse()); + + if ($e instanceof RequestException) { + $this->last_error['request'] = Message::toString($e->getRequest()); + + if ($e->hasResponse()) { + $response = $e->getResponse(); + $this->last_error['response'] = Message::toString($response); + } } if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) { Toolbox::logDebug($this->last_error); diff --git a/inc/config.class.php b/inc/config.class.php index 22b997a..39e6f51 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/inc/inventory.class.php b/inc/inventory.class.php index 19b8a1f..2aa215b 100644 --- a/inc/inventory.class.php +++ b/inc/inventory.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/inc/line.class.php b/inc/line.class.php index b6ba630..f88062a 100644 --- a/inc/line.class.php +++ b/inc/line.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- @@ -282,24 +282,28 @@ static function getAddSearchOptions($itemtype = '') { static function install(Migration $migration) { global $DB; + $default_charset = DBConnection::getDefaultCharset(); + $default_collation = DBConnection::getDefaultCollation(); + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + $table = self::getTable(); if (!$DB->tableExists($table)) { $migration->displayMessage(sprintf(__("Installing %s"), $table)); $query = "CREATE TABLE `$table` ( - `id` INT(11) NOT NULL auto_increment, - `lines_id` INT(11) NOT NULL DEFAULT 0, + `id` INT {$default_key_sign} NOT NULL auto_increment, + `lines_id` INT {$default_key_sign} NOT NULL DEFAULT 0, `protocol` VARCHAR(25) NOT NULL DEFAULT '', `provisioning_extension` VARCHAR(25) NOT NULL DEFAULT '', `provisioning_code` VARCHAR(25) NOT NULL DEFAULT '', - `device_slot` INT(11) NOT NULL DEFAULT 0, + `device_slot` INT NOT NULL DEFAULT 0, `contect` VARCHAR(25) NOT NULL DEFAULT '', - `position` INT(11) NOT NULL DEFAULT 0, + `position` INT NOT NULL DEFAULT 0, `registrar` VARCHAR(50) NOT NULL DEFAULT '', `xivo_line_id` VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `lines_id` (`lines_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die ($DB->error()); } @@ -333,12 +337,12 @@ static function install(Migration $migration) { $migration->dropField('glpi_plugin_xivo_lines', 'users_id'); $migration->dropField('glpi_plugin_xivo_lines', 'comment'); $migration->dropField('glpi_plugin_xivo_lines', 'date_mod'); - $migration->addField('glpi_plugin_xivo_lines', 'lines_id', 'integer', ['after' => 'id']); + $migration->addField('glpi_plugin_xivo_lines', 'lines_id', "INT {$default_key_sign} NOT NULL DEFAULT 0", ['after' => 'id']); $migration->changeField('glpi_plugin_xivo_lines', 'line_id', 'xivo_line_id', 'string'); $migration->migrationOneTable('glpi_plugin_xivo_lines'); // migrate phone_lines - $migration->addField('glpi_plugin_xivo_phones_lines', 'lines_id', 'integer', + $migration->addField('glpi_plugin_xivo_phones_lines', 'lines_id', "INT {$default_key_sign} NOT NULL DEFAULT 0", ['after' => 'plugin_xivo_lines_id']); $migration->dropKey('glpi_plugin_xivo_phones_lines', 'unicity'); $migration->addKey('glpi_plugin_xivo_phones_lines', ['phones_id', 'lines_id'], 'unicity', 'UNIQUE'); diff --git a/inc/phone.class.php b/inc/phone.class.php index deadecf..2bc9638 100644 --- a/inc/phone.class.php +++ b/inc/phone.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- @@ -343,20 +343,24 @@ static function displayAutoInventory(Phone $phone) { static function install(Migration $migration) { global $DB; + $default_charset = DBConnection::getDefaultCharset(); + $default_collation = DBConnection::getDefaultCollation(); + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + $table = self::getTable(); if (!$DB->tableExists($table)) { $migration->displayMessage(sprintf(__("Installing %s"), $table)); $query = "CREATE TABLE `$table` ( - `id` INT(11) NOT NULL auto_increment, - `phones_id` INT(11) NOT NULL, + `id` INT {$default_key_sign} NOT NULL auto_increment, + `phones_id` INT {$default_key_sign} NOT NULL, `xivo_id` VARCHAR(255) NOT NULL DEFAULT '', `template` VARCHAR(255) NOT NULL DEFAULT '', - `date_mod` DATETIME DEFAULT NULL, + `date_mod` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `phones_id` (`phones_id`), KEY `xivo_id` (`xivo_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die ($DB->error()); } diff --git a/inc/phone_line.class.php b/inc/phone_line.class.php index 5e7ec26..64e7306 100644 --- a/inc/phone_line.class.php +++ b/inc/phone_line.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- @@ -384,17 +384,21 @@ static function importSingle($phone_line = []) { static function install(Migration $migration) { global $DB; + $default_charset = DBConnection::getDefaultCharset(); + $default_collation = DBConnection::getDefaultCollation(); + $default_key_sign = DBConnection::getDefaultPrimaryKeySignOption(); + $table = self::getTable(); if (!$DB->tableExists($table)) { $migration->displayMessage(sprintf(__("Installing %s"), $table)); $query = "CREATE TABLE `$table` ( - `id` INT(11) NOT NULL auto_increment, - `phones_id` INT(11) NOT NULL DEFAULT 0, - `lines_id` INT(11) NOT NULL DEFAULT 0, + `id` INT {$default_key_sign} NOT NULL auto_increment, + `phones_id` INT {$default_key_sign} NOT NULL DEFAULT 0, + `lines_id` INT {$default_key_sign} NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE INDEX `unicity` (`phones_id`, `lines_id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; + ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->query($query) or die ($DB->error()); } diff --git a/inc/xuc.class.php b/inc/xuc.class.php index 7df81cb..cb59598 100644 --- a/inc/xuc.class.php +++ b/inc/xuc.class.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/app.js.php b/js/app.js.php index e3ea346..7b6bcdb 100644 --- a/js/app.js.php +++ b/js/app.js.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/common.js b/js/common.js index f7fee79..f848370 100644 --- a/js/common.js +++ b/js/common.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/sessionStorageTabs.js b/js/sessionStorageTabs.js index 50dc958..a11129b 100644 --- a/js/sessionStorageTabs.js +++ b/js/sessionStorageTabs.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/store2.min.js b/js/store2.min.js index 14370b0..e531b02 100644 --- a/js/store2.min.js +++ b/js/store2.min.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/xivo/callback.js b/js/xivo/callback.js index d83dd06..8dc6f95 100644 --- a/js/xivo/callback.js +++ b/js/xivo/callback.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/xivo/cti.js b/js/xivo/cti.js index dc51e25..a8c371f 100644 --- a/js/xivo/cti.js +++ b/js/xivo/cti.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/xivo/membership.js b/js/xivo/membership.js index a4b5760..f0ffb67 100644 --- a/js/xivo/membership.js +++ b/js/xivo/membership.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/js/xuc.js b/js/xuc.js index 5dcc735..115bee1 100644 --- a/js/xuc.js +++ b/js/xuc.js @@ -20,7 +20,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- diff --git a/setup.php b/setup.php index bc6b32c..70c6ee2 100644 --- a/setup.php +++ b/setup.php @@ -22,7 +22,7 @@ * You should have received a copy of the GNU General Public License * along with xivo. If not, see . * ------------------------------------------------------------------------- - * @copyright Copyright (C) 2017-2022 by xivo plugin team. + * @copyright Copyright (C) 2017-2024 by xivo plugin team. * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html * @link https://github.com/pluginsGLPI/xivo * ------------------------------------------------------------------------- @@ -31,9 +31,9 @@ define('PLUGIN_XIVO_VERSION', '1.0.0'); // Minimal GLPI version, inclusive -define('PLUGIN_XIVO_MIN_GLPI', '9.5'); +define('PLUGIN_XIVO_MIN_GLPI', '10.0.0'); // Maximum GLPI version, exclusive -define('PLUGIN_XIVO_MAX_GLPI', '9.6'); +define('PLUGIN_XIVO_MAX_GLPI', '10.0.99'); // disable some feature as they are considered as experimental or deprecated by the editor define('PLUGIN_XIVO_ENABLE_PRESENCE', '1'); @@ -54,9 +54,6 @@ function plugin_init_xivo() { $PLUGIN_HOOKS['csrf_compliant']['xivo'] = true; - // add autoload for vendor - include_once(PLUGINXIVO_DIR . "/vendor/autoload.php"); - // don't load hooks if plugin not enabled (or glpi not logged) if (!Plugin::isPluginActive('xivo') || !Session::getLoginUserID()) { return true; diff --git a/tools/HEADER b/tools/HEADER index fc5afd4..e6a5262 100644 --- a/tools/HEADER +++ b/tools/HEADER @@ -19,7 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with xivo. If not, see . ------------------------------------------------------------------------- -@copyright Copyright (C) 2017-2022 by xivo plugin team. +@copyright Copyright (C) 2017-2024 by xivo plugin team. @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html @link https://github.com/pluginsGLPI/xivo -------------------------------------------------------------------------