From bd349f6968bb5a221ff322419bb9f27f6d59547f Mon Sep 17 00:00:00 2001 From: Emmanuel Bernaszuk Date: Sun, 8 Sep 2024 15:54:58 +0200 Subject: [PATCH] Add DB tests and BC tests into workflow --- .env.test | 1 + .github/workflows/phpunit.yml | 58 + .gitignore | 5 + composer.json | 13 + composer.lock | 3273 +++++++++-------- core/class/DB.class.php | 171 +- core/class/log.class.php | 9 - core/config/common.config.env.php | 47 + core/php/core.inc.php | 2 +- index.php | 14 +- install/OS_specific/Docker/init.sh | 8 +- install/backup.php | 2 + install/database.php | 2 +- install/install.php | 2 +- install/install.sh | 3 + install/packages.php | 2 +- install/restore.php | 26 +- phpunit.xml.dist | 30 +- sick.php | 10 +- tests/BC/api_file | 1571 ++++++++ tests/BC/generatePhpPublicApi.php | 6 + tests/BC/pluginBCTest.php | 223 ++ tests/Legacy/cacheTest.php | 60 + tests/Legacy/class/ajaxTest.php | 57 + tests/Legacy/class/scenarioTest.php | 83 + tests/Legacy/com/shellTest.php | 132 + tests/Legacy/configTest.php | 45 + tests/Legacy/cronTest.php | 98 + tests/Legacy/logTest.php | 103 + tests/Legacy/php/utilsTest.php | 111 + tests/Legacy/scenarioExpressionTest.php | 49 + tests/Legacy/userTest.php | 63 + tests/README.md | 185 + tests/Unit/Core/DBTest.php | 649 ++++ tests/Unit/Mock/DBTestable.php | 41 + .../Mock/ObjectMock/ObjectMockBuilder.php | 299 ++ tests/Unit/Mock/PhpErrorMock.php | 7 + tests/bootstrap.php | 36 +- tests/cacheTest.php | 71 - tests/class/ajaxTest.php | 65 - tests/class/scenarioTest.php | 82 - tests/com/shellTest.php | 122 - tests/configTest.php | 55 - tests/cronTest.php | 98 - tests/logTest.php | 125 - tests/php/utilsTest.php | 101 - tests/pluginTest.php | 290 -- tests/scenarioExpressionTest.php | 52 - tests/userTest.php | 59 - 49 files changed, 5864 insertions(+), 2752 deletions(-) create mode 100644 .env.test create mode 100644 .github/workflows/phpunit.yml create mode 100644 core/config/common.config.env.php create mode 100644 tests/BC/api_file create mode 100644 tests/BC/generatePhpPublicApi.php create mode 100644 tests/BC/pluginBCTest.php create mode 100644 tests/Legacy/cacheTest.php create mode 100644 tests/Legacy/class/ajaxTest.php create mode 100644 tests/Legacy/class/scenarioTest.php create mode 100644 tests/Legacy/com/shellTest.php create mode 100644 tests/Legacy/configTest.php create mode 100644 tests/Legacy/cronTest.php create mode 100644 tests/Legacy/logTest.php create mode 100644 tests/Legacy/php/utilsTest.php create mode 100644 tests/Legacy/scenarioExpressionTest.php create mode 100644 tests/Legacy/userTest.php create mode 100644 tests/README.md create mode 100644 tests/Unit/Core/DBTest.php create mode 100644 tests/Unit/Mock/DBTestable.php create mode 100644 tests/Unit/Mock/ObjectMock/ObjectMockBuilder.php create mode 100644 tests/Unit/Mock/PhpErrorMock.php delete mode 100644 tests/cacheTest.php delete mode 100644 tests/class/ajaxTest.php delete mode 100644 tests/class/scenarioTest.php delete mode 100644 tests/com/shellTest.php delete mode 100644 tests/configTest.php delete mode 100644 tests/cronTest.php delete mode 100644 tests/logTest.php delete mode 100644 tests/php/utilsTest.php delete mode 100644 tests/pluginTest.php delete mode 100644 tests/scenarioExpressionTest.php delete mode 100644 tests/userTest.php diff --git a/.env.test b/.env.test new file mode 100644 index 0000000000..3239123e77 --- /dev/null +++ b/.env.test @@ -0,0 +1 @@ +DATABASE_DSN=mysql://root:root@127.0.0.1:3306/jeedom_test diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000000..b804e3b17d --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,58 @@ +name: Tests + +on: + push: + pull_request: + branches: + - 'master' + - 'beta' + - 'alpha' + +permissions: + contents: read + +jobs: + phpunit: + name: PHP Unit + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['7.4', '8.2'] + services: + mariadb: + image: mariadb:10.6 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: composer install --prefer-dist --no-progress --optimize-autoloader + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '${{ matrix.php-version }}' + extensions: json pdo_mysql curl gd imap xml opcache soap xml zip ssh2 mbstring ldap yaml snmp pcov + coverage: none + + # Run Legacy test suite + - name: Run legacy test suite + env: + DATABASE_DSN: mysql://root:root@localhost:3306/jeedom_test + run: composer run-script test-legacy + + # Run Unit test suite + - name: Run unit test suite + env: + DATABASE_DSN: mysql://root:root@localhost:3306/jeedom_test + run: composer run-script test-unit + + # Run Backward Compatibility test suite + # If these tests fail, it means that the PR will have to be integrated into the futur major version. + # You need to ensure compatibility if you want your changes to be taken into account in the next minor version. + - name: Run BC test suite + env: + DATABASE_DSN: mysql://root:root@localhost:3306/jeedom_test + run: composer run-script test-bc \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4be289b30d..96c7722a5d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,11 @@ Thumbs.db .vscode ui composer.lock +.env +.env.local +.env.*.local +.phpunit.result.cache +var test.php core/config/common.config.php diff --git a/composer.json b/composer.json index e95e9eee36..08296e2d5e 100644 --- a/composer.json +++ b/composer.json @@ -10,5 +10,18 @@ "allow-plugins": { "php-http/discovery": true } + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "test-legacy": "phpunit --coverage-text --colors=never --testsuite \"Legacy tests\"", + "test-unit": "phpunit --coverage-text --colors=never --testsuite \"Unit tests\"", + "test-bc": "phpunit --coverage-text --colors=never --testsuite \"Backward Compatibility tests\"" } } \ No newline at end of file diff --git a/composer.lock b/composer.lock index ce1956d64f..fa87937132 100644 --- a/composer.lock +++ b/composer.lock @@ -4,36 +4,40 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8c2342a48450c788b0c48eb841c1b3f8", + "content-hash": "d9185ac0b2e0dddb4ce71b98ef414878", "packages": [ { "name": "bacon/bacon-qr-code", - "version": "1.0.3", + "version": "2.0.8", "source": { "type": "git", "url": "https://github.com/Bacon/BaconQrCode.git", - "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee" + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee", - "reference": "5a91b62b9d37cee635bbf8d553f4546057250bee", + "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/8674e51bb65af933a5ffaf1c308a660387c35c22", + "reference": "8674e51bb65af933a5ffaf1c308a660387c35c22", "shasum": "" }, "require": { + "dasprid/enum": "^1.0.3", "ext-iconv": "*", - "php": "^5.4|^7.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phly/keep-a-changelog": "^2.1", + "phpunit/phpunit": "^7 | ^8 | ^9", + "spatie/phpunit-snapshot-assertions": "^4.2.9", + "squizlabs/php_codesniffer": "^3.4" }, "suggest": { - "ext-gd": "to generate QR code images" + "ext-imagick": "to generate QR code images" }, "type": "library", "autoload": { - "psr-0": { - "BaconQrCode": "src/" + "psr-4": { + "BaconQrCode\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -44,7 +48,7 @@ { "name": "Ben Scholzen 'DASPRiD'", "email": "mail@dasprids.de", - "homepage": "http://www.dasprids.de", + "homepage": "https://dasprids.de/", "role": "Developer" } ], @@ -52,110 +56,88 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "support": { "issues": "https://github.com/Bacon/BaconQrCode/issues", - "source": "https://github.com/Bacon/BaconQrCode/tree/master" + "source": "https://github.com/Bacon/BaconQrCode/tree/2.0.8" }, - "time": "2017-10-17T09:59:25+00:00" + "time": "2022-12-07T17:46:57+00:00" }, { - "name": "doctrine/cache", - "version": "v1.6.2", + "name": "dasprid/enum", + "version": "1.0.6", "source": { "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b" + "url": "https://github.com/DASPRiD/Enum.git", + "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b", - "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b", + "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/8dfd07c6d2cf31c8da90c53b83c026c7696dda90", + "reference": "8dfd07c6d2cf31c8da90c53b83c026c7696dda90", "shasum": "" }, "require": { - "php": "~5.5|~7.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" + "php": ">=7.1 <9.0" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" + "phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11", + "squizlabs/php_codesniffer": "*" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, "autoload": { "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + "DASPRiD\\Enum\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-2-Clause" ], "authors": [ { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "https://dasprids.de/", + "role": "Developer" } ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", + "description": "PHP 7.1 enum implementation", "keywords": [ - "cache", - "caching" + "enum", + "map" ], "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.6.x" + "issues": "https://github.com/DASPRiD/Enum/issues", + "source": "https://github.com/DASPRiD/Enum/tree/1.0.6" }, - "time": "2017-07-22T12:49:21+00:00" + "time": "2024-08-09T14:30:48+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.1", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/65b2d8ee1f10915efb3b55597da3404f096acba2", - "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", "shasum": "" }, "require": { - "php": "^7.0|^8.0" + "php": "^7.2|^8.0", + "webmozart/assert": "^1.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0" + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-webmozart-assert": "^1.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -166,11 +148,6 @@ "MIT" ], "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -184,7 +161,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v2.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -192,73 +169,33 @@ "type": "github" } ], - "time": "2020-10-13T00:52:37+00:00" + "time": "2023-08-10T19:36:49+00:00" }, { - "name": "guzzle/guzzle", - "version": "v3.9.3", + "name": "paragonie/constant_time_encoding", + "version": "v2.7.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", + "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "php": "^7|^8" }, "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -267,74 +204,66 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" }, { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" } ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" ], "support": { - "issues": "https://github.com/guzzle/guzzle3/issues", - "source": "https://github.com/guzzle/guzzle3/tree/master" + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" }, - "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18T18:23:50+00:00" + "time": "2024-05-08T12:18:48+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.5.8", + "name": "pragmarx/google2fa", + "version": "v8.0.3", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" + "url": "https://github.com/antonioribeiro/google2fa.git", + "reference": "6f8d87ebd5afbf7790bde1ffc7579c7c705e0fad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/6f8d87ebd5afbf7790bde1ffc7579c7c705e0fad", + "reference": "6f8d87ebd5afbf7790bde1ffc7579c7c705e0fad", "shasum": "" }, "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.9", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17" + "paragonie/constant_time_encoding": "^1.0|^2.0|^3.0", + "php": "^7.1|^8.0" }, "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" + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^7.5.15|^8.5|^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.5-dev" - } - }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\": "src/" + "PragmaRX\\Google2FA\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -343,104 +272,63 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "role": "Creator & Designer" } ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", + "description": "A One Time Password Authentication package, compatible with Google Authenticator.", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "2fa", + "Authentication", + "Two Factor Authentication", + "google2fa" ], "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5.8" + "issues": "https://github.com/antonioribeiro/google2fa/issues", + "source": "https://github.com/antonioribeiro/google2fa/tree/v8.0.3" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2022-06-20T22:16:07+00:00" + "time": "2024-09-05T11:56:40+00:00" }, { - "name": "guzzlehttp/promises", - "version": "1.5.2", + "name": "pragmarx/google2fa-qrcode", + "version": "v3.0.0", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "url": "https://github.com/antonioribeiro/google2fa-qrcode.git", + "reference": "ce4d8a729b6c93741c607cfb2217acfffb5bf76b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/antonioribeiro/google2fa-qrcode/zipball/ce4d8a729b6c93741c607cfb2217acfffb5bf76b", + "reference": "ce4d8a729b6c93741c607cfb2217acfffb5bf76b", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1", + "pragmarx/google2fa": ">=4.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bacon/bacon-qr-code": "^2.0", + "chillerlan/php-qrcode": "^1.0|^2.0|^3.0|^4.0", + "khanamiryan/qrcode-detector-decoder": "^1.0", + "phpunit/phpunit": "~4|~5|~6|~7|~8|~9" + }, + "suggest": { + "bacon/bacon-qr-code": "For QR Code generation, requires imagick", + "chillerlan/php-qrcode": "For QR Code generation" }, "type": "library", "extra": { + "component": "package", "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.0-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\Promise\\": "src/" + "PragmaRX\\Google2FAQRCode\\": "src/", + "PragmaRX\\Google2FAQRCode\\Tests\\": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -449,91 +337,52 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "role": "Creator & Designer" } ], - "description": "Guzzle promises library", + "description": "QR Code package for Google2FA", "keywords": [ - "promise" + "2fa", + "Authentication", + "Two Factor Authentication", + "google2fa", + "qr code", + "qrcode" ], "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "issues": "https://github.com/antonioribeiro/google2fa-qrcode/issues", + "source": "https://github.com/antonioribeiro/google2fa-qrcode/tree/v3.0.0" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2021-08-15T12:53:48+00:00" }, { - "name": "guzzlehttp/psr7", - "version": "1.9.0", + "name": "psr/cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", - "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "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.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -542,102 +391,42 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PSR-7 message implementation that also provides common utility methods", + "description": "Common interface for caching libraries", "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" + "cache", + "psr", + "psr-6" ], "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.9.0" + "source": "https://github.com/php-fig/cache/tree/master" }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2022-06-20T21:43:03+00:00" + "time": "2016-08-06T20:24:11+00:00" }, { - "name": "knplabs/github-api", - "version": "1.7.1", + "name": "psr/container", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "98d0bcd2c4c96a40ded9081f8f6289907f73823c" + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/98d0bcd2c4c96a40ded9081f8f6289907f73823c", - "reference": "98d0bcd2c4c96a40ded9081f8f6289907f73823c", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "ext-curl": "*", - "guzzle/guzzle": "~3.7", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "sllh/php-cs-fixer-styleci-bridge": "~1.3" - }, - "suggest": { - "knplabs/gaufrette": "Needed for optional Gaufrette cache" + "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, "autoload": { "psr-4": { - "Github\\": "lib/Github/" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -646,79 +435,51 @@ ], "authors": [ { - "name": "Thibault Duplessis", - "email": "thibault.duplessis@gmail.com", - "homepage": "http://ornicar.github.com" - }, - { - "name": "KnpLabs Team", - "homepage": "http://knplabs.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "GitHub API v3 client", - "homepage": "https://github.com/KnpLabs/php-github-api", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "api", - "gh", - "gist", - "github" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], "support": { - "issues": "https://github.com/KnpLabs/php-github-api/issues", - "source": "https://github.com/KnpLabs/php-github-api/tree/master" + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2016-07-26T08:49:38+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { - "name": "league/flysystem", - "version": "1.0.70", + "name": "psr/log", + "version": "1.1.4", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493" + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493", - "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "phpunit/phpunit": "^5.7.26" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -727,75 +488,79 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frenky.net" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" + "log", + "psr", + "psr-3" ], "support": { - "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.0.70" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], - "time": "2020-07-26T07:20:36+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { - "name": "league/flysystem-webdav", - "version": "1.0.10", + "name": "symfony/cache", + "version": "v5.4.42", "source": { "type": "git", - "url": "https://github.com/thephpleague/flysystem-webdav.git", - "reference": "7da805408d366dd92ba15a03a12a59104bfd91d7" + "url": "https://github.com/symfony/cache.git", + "reference": "6f5f750692bd5a212e01a4f1945fd856bceef89e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-webdav/zipball/7da805408d366dd92ba15a03a12a59104bfd91d7", - "reference": "7da805408d366dd92ba15a03a12a59104bfd91d7", + "url": "https://api.github.com/repos/symfony/cache/zipball/6f5f750692bd5a212e01a4f1945fd856bceef89e", + "reference": "6f5f750692bd5a212e01a4f1945fd856bceef89e", "shasum": "" }, "require": { - "league/flysystem": "~1.0", - "php": ">=5.6", - "sabre/dav": "~4.0|~3.1" + "php": ">=7.2.5", + "psr/cache": "^1.0|^2.0", + "psr/log": "^1.1|^2|^3", + "symfony/cache-contracts": "^1.1.7|^2", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "conflict": { + "doctrine/dbal": "<2.13.1", + "symfony/dependency-injection": "<4.4", + "symfony/http-kernel": "<4.4", + "symfony/var-dumper": "<4.4" + }, + "provide": { + "psr/cache-implementation": "1.0|2.0", + "psr/simple-cache-implementation": "1.0|2.0", + "symfony/cache-implementation": "1.0|2.0" }, "require-dev": { - "mockery/mockery": "~1.2", - "phpunit/phpunit": "~4.8|~5.0|~6.0|~7.0|~8.0|~9.0" + "cache/integration-tests": "dev-master", + "doctrine/cache": "^1.6|^2.0", + "doctrine/dbal": "^2.13.1|^3|^4", + "predis/predis": "^1.1|^2.0", + "psr/simple-cache": "^1.0|^2.0", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/filesystem": "^4.4|^5.0|^6.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0", + "symfony/messenger": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { - "League\\Flysystem\\WebDAV\\": "src" - } + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -803,51 +568,73 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frenky.net" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Flysystem adapter for WebDAV", + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], "support": { - "issues": "https://github.com/thephpleague/flysystem-webdav/issues", - "source": "https://github.com/thephpleague/flysystem-webdav/tree/1.0.10" + "source": "https://github.com/symfony/cache/tree/v5.4.42" }, - "time": "2021-12-31T10:30: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": "2024-07-10T06:02:18+00:00" }, { - "name": "league/oauth2-client", - "version": "2.6.1", + "name": "symfony/cache-contracts", + "version": "v2.5.3", "source": { "type": "git", - "url": "https://github.com/thephpleague/oauth2-client.git", - "reference": "2334c249907190c132364f5dae0287ab8666aa19" + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "fee6db04d913094e2fb55ff8e7db5685a8134463" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/2334c249907190c132364f5dae0287ab8666aa19", - "reference": "2334c249907190c132364f5dae0287ab8666aa19", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/fee6db04d913094e2fb55ff8e7db5685a8134463", + "reference": "fee6db04d913094e2fb55ff8e7db5685a8134463", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0 || ^7.0", - "paragonie/random_compat": "^1 || ^2 || ^9.99", - "php": "^5.6 || ^7.0 || ^8.0" + "php": ">=7.2.5", + "psr/cache": "^1.0|^2.0|^3.0" }, - "require-dev": { - "mockery/mockery": "^1.3.5", - "php-parallel-lint/php-parallel-lint": "^1.3.1", - "phpunit/phpunit": "^5.7 || ^6.0 || ^9.5", - "squizlabs/php_codesniffer": "^2.3 || ^3.0" + "suggest": { + "symfony/cache-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-2.x": "2.0.x-dev" + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "League\\OAuth2\\Client\\": "src/" + "Symfony\\Contracts\\Cache\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -856,69 +643,576 @@ ], "authors": [ { - "name": "Alex Bilbie", - "email": "hello@alexbilbie.com", - "homepage": "http://www.alexbilbie.com", - "role": "Developer" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Woody Gilk", - "homepage": "https://github.com/shadowhand", - "role": "Contributor" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "OAuth 2.0 Client Library", + "description": "Generic abstractions related to caching", + "homepage": "https://symfony.com", "keywords": [ - "Authentication", - "SSO", - "authorization", - "identity", - "idp", - "oauth", - "oauth2", - "single sign on" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "issues": "https://github.com/thephpleague/oauth2-client/issues", - "source": "https://github.com/thephpleague/oauth2-client/tree/2.6.1" + "source": "https://github.com/symfony/cache-contracts/tree/v2.5.3" }, - "time": "2021-12-22T16:42:49+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-01-23T13:51:25+00:00" }, { - "name": "matthiasmullie/minify", - "version": "1.3.69", + "name": "symfony/deprecation-contracts", + "version": "v2.5.3", "source": { "type": "git", - "url": "https://github.com/matthiasmullie/minify.git", - "reference": "a61c949cccd086808063611ef9698eabe42ef22f" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/a61c949cccd086808063611ef9698eabe42ef22f", - "reference": "a61c949cccd086808063611ef9698eabe42ef22f", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { - "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.1", - "php": ">=5.3.0" + "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": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.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/expression-language", + "version": "v5.4.43", + "source": { + "type": "git", + "url": "https://github.com/symfony/expression-language.git", + "reference": "9d23f7bfd1d602fddc6d6520decedc99739497dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/9d23f7bfd1d602fddc6d6520decedc99739497dd", + "reference": "9d23f7bfd1d602fddc6d6520decedc99739497dd", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/cache": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ExpressionLanguage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an engine that can compile and evaluate expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/expression-language/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-09T07:10:35+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.31.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "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" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "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" + ], + "support": { + "source": "https://github.com/symfony/service-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-04-21T15:04:16+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v5.4.40", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "6a13d37336d512927986e09f19a4bed24178baa6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/6a13d37336d512927986e09f19a4bed24178baa6", + "reference": "6a13d37336d512927986e09f19a4bed24178baa6", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { + "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "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": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v5.4.40" + }, + "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-05-31T14:33:22+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "matthiasmullie/scrapbook": "dev-master", - "phpunit/phpunit": ">=4.8" + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, - "suggest": { - "psr/cache-implementation": "Cache implementation to use with Minify::cache" - }, - "bin": [ - "bin/minifycss", - "bin/minifyjs" - ], "type": "library", "autoload": { "psr-4": { - "MatthiasMullie\\Minify\\": "src/" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -927,962 +1221,1024 @@ ], "authors": [ { - "name": "Matthias Mullie", - "email": "minify@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "http://www.minifier.org", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "JS", - "css", - "javascript", - "minifier", - "minify" + "constructor", + "instantiate" ], "support": { - "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.69" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { - "url": "https://github.com/matthiasmullie", - "type": "github" + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" } ], - "time": "2022-08-01T09:00:18+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "matthiasmullie/path-converter", - "version": "1.1.3", + "name": "myclabs/deep-copy", + "version": "1.12.0", "source": { "type": "git", - "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { - "ext-pcre": "*", - "php": ">=5.3.0" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { - "MatthiasMullie\\PathConverter\\": "src/" + "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "pathconverter@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "Relative path converter", - "homepage": "http://github.com/matthiasmullie/path-converter", + "description": "Create deep copies (clones) of your objects", "keywords": [ - "converter", - "path", - "paths", - "relative" + "clone", + "copy", + "duplicate", + "object", + "object graph" ], "support": { - "issues": "https://github.com/matthiasmullie/path-converter/issues", - "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, - "time": "2019-02-05T23:41:09+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-06-12T14:39:25+00:00" }, { - "name": "monolog/monolog", - "version": "1.27.1", + "name": "nikic/php-parser", + "version": "v5.2.0", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "904713c5929655dc9b97288b69cfeedad610c9a1" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/904713c5929655dc9b97288b69cfeedad610c9a1", - "reference": "904713c5929655dc9b97288b69cfeedad610c9a1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", + "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" }, "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpstan/phpstan": "^0.12.59", - "phpunit/phpunit": "~4.5", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, "autoload": { "psr-4": { - "Monolog\\": "src/Monolog" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Nikita Popov" } ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", + "description": "A PHP parser written in PHP", "keywords": [ - "log", - "logging", - "psr-3" + "parser", + "php" ], "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/1.27.1" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.2.0" }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2022-06-09T08:53:42+00:00" + "time": "2024-09-15T16:40:33+00:00" }, { - "name": "paragonie/constant_time_encoding", - "version": "v2.6.3", + "name": "phar-io/manifest", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "58c3f47f650c94ec05a151692652a868995d2938" + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", - "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { - "php": "^7|^8" - }, - "require-dev": { - "phpunit/phpunit": "^6|^7|^8|^9", - "vimeo/psalm": "^1|^2|^3|^4" + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", - "autoload": { - "psr-4": { - "ParagonIE\\ConstantTime\\": "src/" + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com", - "role": "Maintainer" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" }, { - "name": "Steve 'Sc00bz' Thomas", - "email": "steve@tobtu.com", - "homepage": "https://www.tobtu.com", - "role": "Original Developer" + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", - "keywords": [ - "base16", - "base32", - "base32_decode", - "base32_encode", - "base64", - "base64_decode", - "base64_encode", - "bin2hex", - "encoding", - "hex", - "hex2bin", - "rfc4648" - ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/constant_time_encoding/issues", - "source": "https://github.com/paragonie/constant_time_encoding" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2022-06-14T06:56:20+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { - "name": "paragonie/random_compat", - "version": "v9.99.100", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "php": "^7.2 || ^8.0" }, "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], + "description": "Library for handling version information and constraints", "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2020-10-15T08:29:30+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { - "name": "pragmarx/google2fa", - "version": "v7.0.0", + "name": "phpunit/php-code-coverage", + "version": "9.2.32", "source": { "type": "git", - "url": "https://github.com/antonioribeiro/google2fa.git", - "reference": "0afb47f8a686bd203fe85a05bab85139f3c1971e" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/0afb47f8a686bd203fe85a05bab85139f3c1971e", - "reference": "0afb47f8a686bd203fe85a05bab85139f3c1971e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { - "paragonie/constant_time_encoding": "~1.0|~2.0", - "paragonie/random_compat": ">=1", - "php": ">=5.4", - "symfony/polyfill-php56": "~1.2" + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "~4|~5|~6|~7|~8" + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { - "component": "package", "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { - "psr-4": { - "PragmaRX\\Google2FA\\": "src/", - "PragmaRX\\Google2FA\\Tests\\": "tests/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Antonio Carlos Ribeiro", - "email": "acr@antoniocarlosribeiro.com", - "role": "Creator & Designer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A One Time Password Authentication package, compatible with Google Authenticator.", + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", "keywords": [ - "2fa", - "Authentication", - "Two Factor Authentication", - "google2fa" + "coverage", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/antonioribeiro/google2fa/issues", - "source": "https://github.com/antonioribeiro/google2fa/tree/v7.0.0" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, - "time": "2019-10-21T17:49:22+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" }, { - "name": "pragmarx/google2fa-qrcode", - "version": "v1.0.3", + "name": "phpunit/php-file-iterator", + "version": "3.0.6", "source": { "type": "git", - "url": "https://github.com/antonioribeiro/google2fa-qrcode.git", - "reference": "fd5ff0531a48b193a659309cc5fb882c14dbd03f" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa-qrcode/zipball/fd5ff0531a48b193a659309cc5fb882c14dbd03f", - "reference": "fd5ff0531a48b193a659309cc5fb882c14dbd03f", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "bacon/bacon-qr-code": "~1.0|~2.0", - "php": ">=5.4", - "pragmarx/google2fa": ">=4.0" + "php": ">=7.3" }, "require-dev": { - "khanamiryan/qrcode-detector-decoder": "^1.0", - "phpunit/phpunit": "~4|~5|~6|~7" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { - "component": "package", "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "PragmaRX\\Google2FAQRCode\\": "src/", - "PragmaRX\\Google2FAQRCode\\Tests\\": "tests/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Antonio Carlos Ribeiro", - "email": "acr@antoniocarlosribeiro.com", - "role": "Creator & Designer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "QR Code package for Google2FA", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "2fa", - "Authentication", - "Two Factor Authentication", - "google2fa", - "qr code", - "qrcode" + "filesystem", + "iterator" ], "support": { - "issues": "https://github.com/antonioribeiro/google2fa-qrcode/issues", - "source": "https://github.com/antonioribeiro/google2fa-qrcode/tree/master" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, - "time": "2019-03-20T16:42:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.1-dev" } }, "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Common interface for caching libraries", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "cache", - "psr", - "psr-6" + "process" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, - "time": "2016-08-06T20:24:11+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "psr/http-message", - "version": "1.0.1", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "template" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, - "time": "2016-08-06T14:39:51+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "psr/log", - "version": "1.1.4", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "log", - "psr", - "psr-3" + "timer" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, - "time": "2021-05-03T11:20:27+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" }, { - "name": "psr/simple-cache", - "version": "1.0.1", + "name": "phpunit/phpunit", + "version": "9.6.20", "source": { "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "49d7820565836236411f5dc002d16dd689cde42f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f", + "reference": "49d7820565836236411f5dc002d16dd689cde42f", "shasum": "" }, "require": { - "php": ">=5.3.0" + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.12.0", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.31", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, + "bin": [ + "phpunit" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "9.6-dev" } }, "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Common interfaces for simple caching", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" + "phpunit", + "testing", + "xunit" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20" }, - "time": "2017-10-23T01:57:42+00:00" + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-07-10T11:45:39+00:00" }, { - "name": "ralouphie/getallheaders", - "version": "3.0.3", + "name": "sebastian/cli-parser", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { - "files": [ - "src/getallheaders.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A polyfill for getallheaders.", + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, - "time": "2019-03-08T08:55:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" }, { - "name": "sabre/dav", - "version": "4.0.3", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/sabre-io/dav.git", - "reference": "b793fb4ce27cf0f981b540ad771281c430ffe818" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/dav/zipball/b793fb4ce27cf0f981b540ad771281c430ffe818", - "reference": "b793fb4ce27cf0f981b540ad771281c430ffe818", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-date": "*", - "ext-dom": "*", - "ext-iconv": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-pcre": "*", - "ext-simplexml": "*", - "ext-spl": "*", - "lib-libxml": ">=2.7.0", - "php": ">=7.0.0", - "psr/log": "^1.0", - "sabre/event": "^5.0", - "sabre/http": "^5.0", - "sabre/uri": "^2.0", - "sabre/vobject": "^4.2.0-alpha1", - "sabre/xml": "^2.0.1" + "php": ">=7.3" }, "require-dev": { - "evert/phpdoc-md": "~0.1.0", - "monolog/monolog": "^1.18", - "phpunit/phpunit": "^6" - }, - "suggest": { - "ext-curl": "*", - "ext-imap": "*", - "ext-pdo": "*" + "phpunit/phpunit": "^9.3" }, - "bin": [ - "bin/sabredav", - "bin/naturalselection" - ], "type": "library", - "autoload": { - "psr-4": { - "Sabre\\DAV\\": "lib/DAV/", - "Sabre\\CalDAV\\": "lib/CalDAV/", - "Sabre\\DAVACL\\": "lib/DAVACL/", - "Sabre\\CardDAV\\": "lib/CardDAV/" + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "WebDAV Framework for PHP", - "homepage": "http://sabre.io/", - "keywords": [ - "CalDAV", - "CardDAV", - "WebDAV", - "framework", - "iCalendar" - ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/dav/issues", - "source": "https://github.com/fruux/sabre-dav" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, - "time": "2020-01-10T07:52:45+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" }, { - "name": "sabre/event", - "version": "5.0.3", + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sabre-io/event.git", - "reference": "f5cf802d240df1257866d8813282b98aee3bc548" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/event/zipball/f5cf802d240df1257866d8813282b98aee3bc548", - "reference": "f5cf802d240df1257866d8813282b98aee3bc548", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": ">=6", - "sabre/cs": "~1.0.0" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "files": [ - "lib/coroutine.php", - "lib/Loop/functions.php", - "lib/Promise/functions.php" - ], - "psr-4": { - "Sabre\\Event\\": "lib/" + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "sabre/event is a library for lightweight event-based programming", - "homepage": "http://sabre.io/event/", - "keywords": [ - "EventEmitter", - "async", - "coroutine", - "eventloop", - "events", - "hooks", - "plugin", - "promise", - "reactor", - "signal" - ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/event/issues", - "source": "https://github.com/fruux/sabre-event" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, - "time": "2018-03-05T13:55:47+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { - "name": "sabre/http", - "version": "5.0.5", + "name": "sebastian/comparator", + "version": "4.0.8", "source": { "type": "git", - "url": "https://github.com/sabre-io/http.git", - "reference": "85962a2ed867e7e5beb9f9d3a15cd53cd521a09b" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/http/zipball/85962a2ed867e7e5beb9f9d3a15cd53cd521a09b", - "reference": "85962a2ed867e7e5beb9f9d3a15cd53cd521a09b", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-curl": "*", - "ext-mbstring": "*", - "php": "^7.0", - "sabre/event": ">=4.0 <6.0", - "sabre/uri": "^2.0" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0 || ^7.0" - }, - "suggest": { - "ext-curl": " to make http requests with the Client class" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Sabre\\HTTP\\": "lib/" + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "The sabre/http library provides utilities for dealing with http requests and responses. ", - "homepage": "https://github.com/fruux/sabre-http", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ - "http" + "comparator", + "compare", + "equality" ], "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/http/issues", - "source": "https://github.com/fruux/sabre-http" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, - "time": "2019-11-28T19:35:25+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" }, { - "name": "sabre/uri", - "version": "2.1.3", + "name": "sebastian/complexity", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sabre-io/uri.git", - "reference": "18f454324f371cbcabdad3d0d3755b4b0182095d" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/18f454324f371cbcabdad3d0d3755b4b0182095d", - "reference": "18f454324f371cbcabdad3d0d3755b4b0182095d", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "php": ">=7" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Sabre\\Uri\\": "lib/" + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Functions for making sense out of URIs.", - "homepage": "http://sabre.io/uri/", - "keywords": [ - "rfc3986", - "uri", - "url" - ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/uri/issues", - "source": "https://github.com/fruux/sabre-uri" + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, - "time": "2019-09-09T23:00:25+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" }, { - "name": "sabre/vobject", - "version": "4.2.2", + "name": "sebastian/diff", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sabre-io/vobject.git", - "reference": "449616b2d45b95c8973975de23f34a3d14f63b4b" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/vobject/zipball/449616b2d45b95c8973975de23f34a3d14f63b4b", - "reference": "449616b2d45b95c8973975de23f34a3d14f63b4b", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=5.5", - "sabre/xml": ">=1.5 <3.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "> 4.8.35, <6.0.0" - }, - "suggest": { - "hoa/bench": "If you would like to run the benchmark scripts" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, - "bin": [ - "bin/vobject", - "bin/generate_vcards" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { - "psr-4": { - "Sabre\\VObject\\": "lib/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1890,842 +2246,684 @@ ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - }, - { - "name": "Dominik Tobschall", - "email": "dominik@fruux.com", - "homepage": "http://tobschall.de/", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Ivan Enderlin", - "email": "ivan.enderlin@hoa-project.net", - "homepage": "http://mnt.io/", - "role": "Developer" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects", - "homepage": "http://sabre.io/vobject/", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "availability", - "freebusy", - "iCalendar", - "ical", - "ics", - "jCal", - "jCard", - "recurrence", - "rfc2425", - "rfc2426", - "rfc2739", - "rfc4770", - "rfc5545", - "rfc5546", - "rfc6321", - "rfc6350", - "rfc6351", - "rfc6474", - "rfc6638", - "rfc6715", - "rfc6868", - "vCalendar", - "vCard", - "vcf", - "xCal", - "xCard" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/vobject/issues", - "source": "https://github.com/fruux/sabre-vobject" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, - "time": "2020-01-14T10:18:45+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" }, { - "name": "sabre/xml", - "version": "2.1.3", + "name": "sebastian/environment", + "version": "5.1.5", "source": { "type": "git", - "url": "https://github.com/sabre-io/xml.git", - "reference": "f08a58f57e2b0d7df769a432756aa371417ab9eb" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/f08a58f57e2b0d7df769a432756aa371417ab9eb", - "reference": "f08a58f57e2b0d7df769a432756aa371417ab9eb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "lib-libxml": ">=2.6.20", - "php": ">=7.0", - "sabre/uri": ">=1.0,<3.0.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", - "autoload": { - "files": [ - "lib/Deserializer/functions.php", - "lib/Serializer/functions.php" - ], - "psr-4": { - "Sabre\\Xml\\": "lib/" + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", - "role": "Developer" - }, - { - "name": "Markus Staab", - "email": "markus.staab@redaxo.de", - "role": "Developer" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "sabre/xml is an XML library that you may not hate.", - "homepage": "https://sabre.io/xml/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "XMLReader", - "XMLWriter", - "dom", - "xml" + "Xdebug", + "environment", + "hhvm" ], "support": { - "forum": "https://groups.google.com/group/sabredav-discuss", - "issues": "https://github.com/sabre-io/xml/issues", - "source": "https://github.com/fruux/sabre-xml" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, - "time": "2019-08-14T15:41:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" }, { - "name": "symfony/cache", - "version": "v3.3.6", + "name": "sebastian/exporter", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "cf1ad9191c3d2176c81e7fcc6ea32603186ceddc" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/cf1ad9191c3d2176c81e7fcc6ea32603186ceddc", - "reference": "cf1ad9191c3d2176c81e7fcc6ea32603186ceddc", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { - "php": ">=5.5.9", - "psr/cache": "~1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0" - }, - "conflict": { - "symfony/var-dumper": "<3.3" - }, - "provide": { - "psr/cache-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "~1.6", - "doctrine/dbal": "~2.4", - "predis/predis": "~1.0" - }, - "suggest": { - "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Symfony Cache component with PSR-6, PSR-16, and tags", - "homepage": "https://symfony.com", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ - "caching", - "psr6" + "export", + "exporter" ], "support": { - "source": "https://github.com/symfony/cache/tree/3.3" + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, - "time": "2017-07-23T08:41:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:33:00+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v2.8.52", + "name": "sebastian/global-state", + "version": "5.0.7", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" + "ext-dom": "*", + "phpunit/phpunit": "^9.3" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "5.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + }, + "funding": [ { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v2.8.50" - }, - "time": "2018-11-21T14:20:20+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { - "name": "symfony/expression-language", - "version": "v3.3.6", + "name": "sebastian/lines-of-code", + "version": "1.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/expression-language.git", - "reference": "48abe52c5b80babe29e956d900b7ab06faf50eef" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/expression-language/zipball/48abe52c5b80babe29e956d900b7ab06faf50eef", - "reference": "48abe52c5b80babe29e956d900b7ab06faf50eef", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/cache": "~3.1" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\ExpressionLanguage\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony ExpressionLanguage Component", - "homepage": "https://symfony.com", + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "source": "https://github.com/symfony/expression-language/tree/master" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, - "time": "2017-05-01T15:01:29+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" }, { - "name": "symfony/polyfill-intl-idn", - "version": "v1.19.0", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/4ad5115c0f5d5172a9fe8147675ec6de266d8826", - "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, - "suggest": { - "ext-intl": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "4.0-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.19.0" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2020-10-21T09:57:48+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.19.0", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8db0ae7936b42feb370840cf24de1a144fb0ef27", - "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" }, - "suggest": { - "ext-intl": "For best performance" + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "2.0-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.19.0" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "symfony/polyfill-php56", - "version": "v1.19.0", + "name": "sebastian/recursion-context", + "version": "4.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "ea19621731cbd973a6702cfedef3419768bf3372" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ea19621731cbd973a6702cfedef3419768bf3372", - "reference": "ea19621731cbd973a6702cfedef3419768bf3372", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/polyfill-util": "~1.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "4.0-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php56\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { - "source": "https://github.com/symfony/polyfill-php56/tree/v1.19.0" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.19.0", + "name": "sebastian/resource-operations", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3fe414077251a81a1b15b1c709faf5c2fbae3d4e", - "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-main": "3.0-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.19.0" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.19.0", + "name": "sebastian/type", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "beecef6b463b06954638f02378f52496cb84bacc" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/beecef6b463b06954638f02378f52496cb84bacc", - "reference": "beecef6b463b06954638f02378f52496cb84bacc", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.2-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.19.0" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { - "name": "symfony/polyfill-util", - "version": "v1.19.0", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-util.git", - "reference": "8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a", - "reference": "8df0c3e6a4b85df9a5c6f3f2f46fba5c5c47058a", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Util\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony utilities for portability of PHP codes", - "homepage": "https://symfony.com", - "keywords": [ - "compat", - "compatibility", - "polyfill", - "shim" - ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "source": "https://github.com/symfony/polyfill-util/tree/v1.19.0" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2020-10-21T09:57:48+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "touki/ftp", - "version": "v1.2.1", + "name": "theseer/tokenizer", + "version": "1.2.3", "source": { "type": "git", - "url": "https://github.com/touki653/php-ftp-wrapper.git", - "reference": "318595fb8b1bff215b4af092c3faae83a532b822" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/touki653/php-ftp-wrapper/zipball/318595fb8b1bff215b4af092c3faae83a532b822", - "reference": "318595fb8b1bff215b4af092c3faae83a532b822", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { - "php": ">=5.3.2" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { - "psr-0": { - "Touki\\FTP": [ - "lib/", - "tests/" - ] - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Touki", - "email": "g.vincendon@vithemis.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "A fully object oriented library for PHP FTP functions", + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/touki653/php-ftp-wrapper/issues", - "source": "https://github.com/touki653/php-ftp-wrapper/tree/master" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, - "time": "2017-01-04T08:59:38+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], @@ -2733,8 +2931,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "platform-overrides": { - "php": "7.0.0" - }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/core/class/DB.class.php b/core/class/DB.class.php index 95ff71f874..058f7f02c0 100644 --- a/core/class/DB.class.php +++ b/core/class/DB.class.php @@ -57,7 +57,7 @@ public static function getLastInsertId() { public static function getConnection() { if (static::$connection == null) { static::initConnection(); - static::$lastConnection = strtotime('now'); + self::updateLastConnection(); } elseif (static::$lastConnection + 120 < strtotime('now')) { try { $result = @static::$connection->query('select 1;'); @@ -67,7 +67,7 @@ public static function getConnection() { } catch (Exception $e) { static::initConnection(); } - static::$lastConnection = strtotime('now'); + self::updateLastConnection(); } return static::$connection; } @@ -87,67 +87,42 @@ public static function &CallStoredProc($_procName, $_params, $_fetch_type, $_cla } } - public static function &Prepare($_query, $_params, $_fetchType = self::FETCH_TYPE_ROW, $_fetch_param = PDO::FETCH_ASSOC, $_fetch_opt = NULL) { + public static function &Prepare($_query, $_params, $_fetchType = self::FETCH_TYPE_ROW, $_fetch_param = PDO::FETCH_ASSOC, $_fetch_opt = null) { + /** @var PDOStatement $stmt */ $stmt = static::getConnection()->prepare($_query); - $res = NULL; - if ($stmt != false && $stmt->execute($_params) != false) { - if(preg_match('/^update|^replace|^delete|^create|^drop|^alter|^truncate/i', $_query)){ - $errorInfo = $stmt->errorInfo(); - if ($errorInfo[0] != 0000) { - static::$lastConnection = 0; - throw new Exception('[MySQL] Error code : ' . $errorInfo[0] . ' (' . $errorInfo[1] . '). ' . $errorInfo[2] . ' : ' . $_query); - } - static::$lastConnection = strtotime('now'); - return $res; - } - if ($_fetchType == static::FETCH_TYPE_ROW) { - if ($_fetch_opt === null) { - $res = $stmt->fetch($_fetch_param); - } elseif ($_fetch_param == PDO::FETCH_CLASS) { - $res = $stmt->fetchObject($_fetch_opt); - } - } else { - if ($_fetch_opt === null) { - $res = $stmt->fetchAll($_fetch_param); - } else { - $res = $stmt->fetchAll($_fetch_param, $_fetch_opt); - } - } - } - $errorInfo = $stmt->errorInfo(); - if ($errorInfo[0] != 0000) { - static::$lastConnection = 0; - throw new Exception('[MySQL] Error code : ' . $errorInfo[0] . ' (' . $errorInfo[1] . '). ' . $errorInfo[2] . ' : ' . $_query); - } - static::$lastConnection = strtotime('now'); - if ($_fetch_param == PDO::FETCH_CLASS) { - if (is_array($res) && count($res) > 0) { - foreach ($res as &$obj) { - if (is_object($obj) && method_exists($obj, 'decrypt')) { - $obj->decrypt(); - if (method_exists($obj, 'setChanged')) { - $obj->setChanged(false); - } - } - } - } else { - if (is_object($res) && method_exists($res, 'decrypt')) { - $res->decrypt(); - if (method_exists($res, 'setChanged')) { - $res->setChanged(false); - } - } - } - } - return $res; - } + $stmt->execute($_params); + + $errorInfo = $stmt->errorInfo(); + if ($errorInfo[0] != 0000) { + self::resetLastConnection(); + throw new Exception('[MySQL] Error code : ' . $errorInfo[0] . ' (' . $errorInfo[1] . '). ' . $errorInfo[2] . ' : ' . $_query); + } + + $res = null; + if(preg_match('/^update|^replace|^delete|^create|^drop|^alter|^truncate/i', $_query)) { + self::updateLastConnection(); + + return $res; + } + + if ($_fetchType == static::FETCH_TYPE_ROW) { + self::handleFetchRow($_fetch_opt, $stmt, $_fetch_param, $res); + } else { + self::handleFetchAll($_fetch_opt, $stmt, $_fetch_param, $res); + } + + self::postPrepare($_fetch_param, $res); - public function __clone() { + return $res; + } + + + public function __clone() { trigger_error('DB : Cloner cet objet n\'est pas permis', E_USER_ERROR); } public static function optimize() { - $tables = static::Prepare("SELECT TABLE_NAME FROM information_schema.TABLES WHERE Data_Free > 0", array(), DB::FETCH_TYPE_ALL); + $tables = static::getTablesToOptimize(); foreach ($tables as $table) { $table = array_values($table); $table = $table[0]; @@ -155,7 +130,16 @@ public static function optimize() { } } - public static function beginTransaction() { + /** + * @return array{TABLE_NAME: string}[] + */ + protected static function getTablesToOptimize(): array + { + return static::Prepare("SELECT TABLE_NAME FROM information_schema.TABLES WHERE Data_Free > 0", array(), DB::FETCH_TYPE_ALL); + } + + + public static function beginTransaction() { static::getConnection()->beginTransaction(); } @@ -470,7 +454,7 @@ private static function setField($object, $field, $value) { $object->$method($value); } else { $reflection = static::getReflectionClass($object); - if ($reflection->hasProperty($field)) { + if (!$reflection->hasProperty($field)) { throw new InvalidArgumentException('Unknown field ' . get_class($object) . '::' . $field); } $property = $reflection->getProperty($field); @@ -871,4 +855,73 @@ public static function buildDefinitionIndex($_index, $_table_name) { $return .= ')'; return $return; } + + private static function handleDecrypt($obj): void + { + if (!is_object($obj)) { + return; + } + + if (!method_exists($obj, 'decrypt')) { + return; + } + + $obj->decrypt(); + + if (!method_exists($obj, 'setChanged')) { + return; + } + + $obj->setChanged(false); + } + + private static function postPrepare($_fetch_param, &$res): void + { + self::updateLastConnection(); + if ($_fetch_param != PDO::FETCH_CLASS) { + return; + } + + if (!is_array($res)) { + self::handleDecrypt($res); + + return; + } + + foreach ($res as $obj) { + self::handleDecrypt($obj); + } + } + + private static function updateLastConnection(): void + { + static::$lastConnection = strtotime('now'); + } + + private static function resetLastConnection(): void + { + static::$lastConnection = 0; + } + + private static function handleFetchRow($_fetch_opt, PDOStatement $stmt, $_fetch_param, &$res): void + { + if ($_fetch_opt === null) { + $res = $stmt->fetch($_fetch_param); + return; + } + + if ($_fetch_param == PDO::FETCH_CLASS) { + $res = $stmt->fetchObject($_fetch_opt); + } + } + + private static function handleFetchAll($_fetch_opt, PDOStatement $stmt, $_fetch_param, &$res): void + { + if ($_fetch_opt === null) { + $res = $stmt->fetchAll($_fetch_param); + return; + } + + $res = $stmt->fetchAll($_fetch_param, $_fetch_opt); + } } diff --git a/core/class/log.class.php b/core/class/log.class.php index 065effbf1a..d9f10ed9cd 100644 --- a/core/class/log.class.php +++ b/core/class/log.class.php @@ -491,15 +491,6 @@ public static function define_error_reporting($log_level) { case 300: error_reporting(E_ERROR | E_WARNING | E_PARSE); break; - case 400: - error_reporting(E_ERROR | E_PARSE); - break; - case 500: - error_reporting(E_ERROR | E_PARSE); - break; - case 600: - error_reporting(E_ERROR | E_PARSE); - break; default: error_reporting(E_ERROR | E_PARSE); } diff --git a/core/config/common.config.env.php b/core/config/common.config.env.php new file mode 100644 index 0000000000..fccef954e6 --- /dev/null +++ b/core/config/common.config.env.php @@ -0,0 +1,47 @@ + [ + 'host' => $databaseConfig['host'], + 'port' => (string) ($databaseConfig['port'] ?? 3306), + 'dbname' => ltrim($databaseConfig['path'], '/'), + 'username' => $databaseConfig['user'], + 'password' => $databaseConfig['pass'], + ], +]; + +function readEnv(string $name): array +{ + $dotenv = dirname(__DIR__, 2) . '/'. $name; + if (!is_readable($dotenv)) { + return []; + } + + return parse_ini_file($dotenv, false) ?: []; +} \ No newline at end of file diff --git a/core/php/core.inc.php b/core/php/core.inc.php index 2502e1ea54..c6e20e33ab 100644 --- a/core/php/core.inc.php +++ b/core/php/core.inc.php @@ -17,7 +17,7 @@ */ date_default_timezone_set('Europe/Brussels'); require_once __DIR__ . '/../../vendor/autoload.php'; -require_once __DIR__ . '/../config/common.config.php'; +require_once __DIR__ . '/../config/common.config.env.php'; require_once __DIR__ . '/../class/DB.class.php'; require_once __DIR__ . '/../class/config.class.php'; require_once __DIR__ . '/../class/jeedom.class.php'; diff --git a/index.php b/index.php index 56e40f71c0..fb423738ae 100644 --- a/index.php +++ b/index.php @@ -16,13 +16,15 @@ * along with Jeedom. If not, see . */ try { - //no config, install Jeedom! - if (!file_exists(__DIR__ . '/core/config/common.config.php')) { - echo 'Jeedom not configure, no common.config.php found'; - die(); - } + //no config, error! + require_once __DIR__ . '/core/config/common.config.env.php'; +} catch (\RuntimeException $e) { + echo 'Jeedom not configure, no common.config.php found'; + die(); +} - require_once __DIR__ . "/core/php/core.inc.php"; +try { + require_once __DIR__ . "/core/php/core.inc.php"; if ((!isset($_GET['ajax']) || $_GET['ajax'] != 1) && count(system::ps('install/restore.php', 'sudo')) > 0) { require_once __DIR__.'/restoring.php'; diff --git a/install/OS_specific/Docker/init.sh b/install/OS_specific/Docker/init.sh index 1bb9c50f77..bd09fa8e53 100644 --- a/install/OS_specific/Docker/init.sh +++ b/install/OS_specific/Docker/init.sh @@ -75,7 +75,10 @@ echo 'Start init' # $WEBSERVER_HOME and $VERSION env variables comes from Dockerfile -if [ -f ${WEBSERVER_HOME}/core/config/common.config.php ]; then +if [ -f ${WEBSERVER_HOME}/.env ]; then + echo 'Jeedom is already install' + JEEDOM_INSTALL=1 +elif [ -f ${WEBSERVER_HOME}/core/config/common.config.php ]; then echo 'Jeedom is already install' JEEDOM_INSTALL=1 else @@ -95,12 +98,15 @@ else echo "DROP DATABASE IF EXISTS jeedom;" | mysql echo "CREATE DATABASE jeedom;" | mysql echo "GRANT ALL PRIVILEGES ON jeedom.* TO 'jeedom'@'localhost';" | mysql + # Part to remove cp ${WEBSERVER_HOME}/core/config/common.config.sample.php ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#PASSWORD#/${MYSQL_JEEDOM_PASSWD}/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#DBNAME#/jeedom/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#USERNAME#/jeedom/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#PORT#/3306/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#HOST#/localhost/g" ${WEBSERVER_HOME}/core/config/common.config.php + + echo "DATABASE_DSN=mysql://jeedom:${MYSQL_JEEDOM_PASSWD}@localhost/jeedom" > ${WEBSERVER_HOME}/.env /root/install.sh -s 10 -v ${VERSION} -w ${WEBSERVER_HOME} /root/install.sh -s 11 -v ${VERSION} -w ${WEBSERVER_HOME} fi diff --git a/install/backup.php b/install/backup.php index 43c7225e58..50c75ca514 100644 --- a/install/backup.php +++ b/install/backup.php @@ -141,6 +141,8 @@ '.gitignore', 'node_modules', '.log', + '.env', + '.env.local', 'core/config/common.config.php', 'data/imgOs', 'python_venv', diff --git a/install/database.php b/install/database.php index 0dfb23fb2a..40b7142cdf 100644 --- a/install/database.php +++ b/install/database.php @@ -20,7 +20,7 @@ */ require_once dirname(__DIR__).'/core/php/console.php'; -require_once __DIR__ . '/../core/config/common.config.php'; +require_once __DIR__ . '/../core/config/common.config.env.php'; require_once __DIR__ . '/../core/class/DB.class.php'; echo "[START CHECK AND FIX DB]\n"; try { diff --git a/install/install.php b/install/install.php index 598d71503f..a584206925 100644 --- a/install/install.php +++ b/install/install.php @@ -28,7 +28,7 @@ try { date_default_timezone_set('Europe/Brussels'); require_once __DIR__ . '/../vendor/autoload.php'; - require_once __DIR__ . '/../core/config/common.config.php'; + require_once __DIR__ . '/../core/config/common.config.env.php'; require_once __DIR__ . '/../core/class/DB.class.php'; require_once __DIR__ . '/../core/class/system.class.php'; if (count(system::ps('install/install.php', 'sudo')) > 1) { diff --git a/install/install.sh b/install/install.sh index 11e7acfc55..735a834d89 100644 --- a/install/install.sh +++ b/install/install.sh @@ -309,12 +309,15 @@ step_9_jeedom_configuration() { mariadb_sql "CREATE DATABASE jeedom;" mariadb_sql "GRANT ALL PRIVILEGES ON jeedom.* TO 'jeedom'@'localhost';" + # Path to remove cp ${WEBSERVER_HOME}/core/config/common.config.sample.php ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#PASSWORD#/${MARIADB_JEEDOM_PASSWD}/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#DBNAME#/jeedom/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#USERNAME#/jeedom/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#PORT#/3306/g" ${WEBSERVER_HOME}/core/config/common.config.php sed -i "s/#HOST#/localhost/g" ${WEBSERVER_HOME}/core/config/common.config.php + + echo "DATABASE_DSN=\"mysql://jeedom:${MARIADB_JEEDOM_PASSWD}@localhost:3306/jeedom\"" > ${WEBSERVER_HOME}/.env fi chmod 775 -R ${WEBSERVER_HOME} chown -R www-data:www-data ${WEBSERVER_HOME} diff --git a/install/packages.php b/install/packages.php index c6f62a3c06..2215019815 100644 --- a/install/packages.php +++ b/install/packages.php @@ -20,7 +20,7 @@ */ require_once dirname(__DIR__).'/core/php/console.php'; -require_once __DIR__ . '/../core/config/common.config.php'; +require_once __DIR__ . '/../core/config/common.config.env.php'; require_once __DIR__ . '/../core/class/system.class.php'; echo "[START CHECK AND FIX PACKAGES]\n"; try { diff --git a/install/restore.php b/install/restore.php index a478e11253..669879d641 100644 --- a/install/restore.php +++ b/install/restore.php @@ -93,7 +93,15 @@ if (!copy(__DIR__ . '/../core/config/common.config.php', '/tmp/common.config.php')) { echo 'Cannot copy ' . __DIR__ . "/../core/config/common.config.php\n"; } - + + if (!copy(__DIR__ . '/../.env', '/tmp/.env')) { + echo 'Cannot copy ' . dirname(__DIR__) . ".env\n"; + } + + if (!copy(__DIR__ . '/../.env', '/tmp/.env.local')) { + echo 'Cannot copy ' . dirname(__DIR__) . ".env.local\n"; + } + echo "OK\n"; try { @@ -111,6 +119,8 @@ '.git', '.log', 'core/config/common.config.php', + '.env', + '.env.local', '/vendor', config::byKey('backup::path'), ); @@ -184,7 +194,19 @@ copy('/tmp/common.config.php', __DIR__ . '/../core/config/common.config.php'); echo "OK\n"; } - + + if (!file_exists(dirname(__DIR__) . '/.env')) { + echo "Restoring .env file..."; + copy('/tmp/.env', dirname(__DIR__) . '/.env'); + echo "OK\n"; + } + + if (!file_exists(dirname(__DIR__) . '/.env.local')) { + echo "Restoring .env.local file..."; + copy('/tmp/.env.local', dirname(__DIR__) . '/.env.local'); + echo "OK\n"; + } + echo "Restoring cache..."; try { cache::restore(); diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 602e7ee4a6..2f84c79d11 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,27 @@ - - - ./tests - + + + + + + + + ./tests/BC/ + + + ./tests/Legacy + + + ./tests/Legacy + + + + + + core/class + + + \ No newline at end of file diff --git a/sick.php b/sick.php index 0f8f290cea..4bcd054015 100644 --- a/sick.php +++ b/sick.php @@ -63,13 +63,13 @@ echo "Driver mysql disponible.\n"; } // check database configuration -if(!file_exists(__DIR__ . '/core/config/common.config.php')){ - echo 'Configuration manquante ! core/config/common.config.php non généré.'; - exit(1); +try { + require_once __DIR__ . '/core/config/common.config.env.php'; +} catch (\RuntimeException $e) { + echo 'Configuration manquante : ' . $e->getMessage(); + exit(1); } -require_once __DIR__ . '/core/config/common.config.php'; - // check local socket if localhost is configured if(isset($CONFIG['db']['unix_socket']) || (isset($CONFIG['db']['host']) && $CONFIG['db']['host'] == 'localhost')) { diff --git a/tests/BC/api_file b/tests/BC/api_file new file mode 100644 index 0000000000..d30a70ceb6 --- /dev/null +++ b/tests/BC/api_file @@ -0,0 +1,1571 @@ +DB,getLastInsertId,,0,0,1,1 +DB,getConnection,,0,0,1,1 +DB,CallStoredProc,,0,0,1,1,,_procName,,,_params,,,_fetch_type,,,_className,1,,_fetch_opt,1 +DB,Prepare,,0,0,1,1,,_query,,,_params,,,_fetchType,1,,_fetch_param,1,,_fetch_opt,1 +DB,__clone,,0,0,1,0 +DB,optimize,,0,0,1,1 +DB,beginTransaction,,0,0,1,1 +DB,commit,,0,0,1,1 +DB,rollBack,,0,0,1,1 +DB,save,,0,0,1,1,,object,,,_direct,1,,_replace,1 +DB,refresh,,0,0,1,1,,object, +DB,getWithFilter,,0,0,1,1,array,_filters,,,_object, +DB,remove,,0,0,1,1,,object, +DB,checksum,,0,0,1,1,,_table, +DB,lock,,0,0,1,1,,object, +DB,buildField,,0,0,1,1,,_class,,,_prefix,1 +DB,compareAndFix,,0,0,1,1,,_database,,,_table,1,,_verbose,1,,_loop,1 +DB,compareDatabase,,0,0,1,1,,_database, +DB,compareTable,,0,0,1,1,,_table, +DB,prepareIndexCompare,,0,0,1,1,,indexes, +DB,compareField,,0,0,1,1,,_ref_field,,,_real_field,,,_table_name, +DB,compareIndex,,0,0,1,1,,_ref_index,,,_real_index,,,_table_name,,,_forceRebuild,1 +DB,buildDefinitionField,,0,0,1,1,,_field, +DB,buildDefinitionIndex,,0,0,1,1,,_index,,,_table_name, +ajax,init,,0,0,1,1,,_allowGetAction,1 +ajax,getToken,,0,0,1,1 +ajax,success,,0,0,1,1,,_data,1 +ajax,error,,0,0,1,1,,_data,1,,_errorCode,1 +ajax,getResponse,,0,0,1,1,,_data,1,,_errorCode,1 +cache,getEngine,,0,0,1,1 +cache,set,,0,0,1,1,,_key,,,_value,,,_lifetime,1 +cache,delete,,0,0,1,1,,_key, +cache,byKey,,0,0,1,1,,_key, +cache,exist,,0,0,1,1,,_key, +cache,flush,,0,0,1,1 +cache,persist,,0,0,1,1 +cache,isPersistOk,bool,0,0,1,1 +cache,restore,,0,0,1,1 +cache,clean,,0,0,1,1 +cache,save,,0,0,1,0 +cache,remove,,0,0,1,0 +cache,getKey,,0,0,1,0 +cache,setKey,self,0,0,1,0,,_key, +cache,getValue,,0,0,1,0,,_default,1 +cache,setValue,self,0,0,1,0,,_value, +cache,getLifetime,,0,0,1,0 +cache,setLifetime,self,0,0,1,0,,_lifetime, +cache,getDatetime,,0,0,1,0 +cache,setDatetime,self,0,0,1,0,,_datetime, +cache,getTimestamp,,0,0,1,0 +cache,setTimestamp,,0,0,1,0,,_timestamp, +cmd,byId,,0,0,1,1,,_id, +cmd,byIds,,0,0,1,1,,_ids, +cmd,all,,0,0,1,1 +cmd,isHistorized,,0,0,1,1,,_state,1 +cmd,allHistoryCmd,,0,0,1,1 +cmd,byEqLogicId,,0,0,1,1,,_eqLogic_id,,,_type,1,,_visible,1,,_eqLogic,1,,_has_generic_type,1 +cmd,byLogicalId,,0,0,1,1,,_logical_id,,,_type,1 +cmd,byGenericType,,0,0,1,1,,_generic_type,,,_eqLogic_id,1,,_one,1 +cmd,searchByString,,0,0,1,1,,_search, +cmd,searchConfiguration,,0,0,1,1,,_configuration,,,_eqType,1 +cmd,searchDisplay,,0,0,1,1,,_display,,,_eqType,1 +cmd,searchConfigurationEqLogic,,0,0,1,1,,_eqLogic_id,,,_configuration,,,_type,1 +cmd,searchTemplate,,0,0,1,1,,_template,,,_eqType,1,,_type,1,,_subtype,1 +cmd,byEqLogicIdAndLogicalId,,0,0,1,1,,_eqLogic_id,,,_logicalId,,,_multiple,1,,_type,1,,_eqLogic,1 +cmd,byEqLogicIdAndGenericType,,0,0,1,1,,_eqLogic_id,,,_generic_type,,,_multiple,1,,_type,1,,_eqLogic,1 +cmd,byGenericTypeObjectId,,0,0,1,1,,_generic_type,,,_object_id,1,,_type,1 +cmd,byValue,,0,0,1,1,,_value,,,_type,1,,_onlyEnable,1 +cmd,byTypeEqLogicNameCmdName,,0,0,1,1,,_eqType_name,,,_eqLogic_name,,,_cmd_name, +cmd,byEqLogicIdCmdName,,0,0,1,1,,_eqLogic_id,,,_cmd_name, +cmd,byObjectNameEqLogicNameCmdName,,0,0,1,1,,_object_name,,,_eqLogic_name,,,_cmd_name, +cmd,byObjectNameCmdName,,0,0,1,1,,_object_name,,,_cmd_name, +cmd,byTypeSubType,,0,0,1,1,,_type,,,_subType,1 +cmd,cmdToHumanReadable,,0,0,1,1,,_input, +cmd,humanReadableToCmd,,0,0,1,1,,_input, +cmd,byString,,0,0,1,1,,_string, +cmd,cmdToValue,,0,0,1,1,,_input,,,_quote,1 +cmd,allType,,0,0,1,1 +cmd,allSubType,,0,0,1,1,,_type,1 +cmd,allUnite,,0,0,1,1 +cmd,convertColor,,0,0,1,1,,_color, +cmd,availableWidget,,0,0,1,1,,_version, +cmd,getSelectOptionsByTypeAndSubtype,,0,0,1,1,,_type,1,,_subtype,1,,_version,1,,_availWidgets,1 +cmd,returnState,,0,0,1,1,,_options, +cmd,deadCmd,,0,0,1,1 +cmd,cmdAlert,,0,0,1,1,,_options, +cmd,formatValue,,0,0,1,0,,_value,,,_quote,1 +cmd,getLastValue,,0,0,1,0 +cmd,dontRemoveCmd,,0,0,1,0 +cmd,getTableName,,0,0,1,0 +cmd,save,,0,0,1,0,,_direct,1 +cmd,refresh,,0,0,1,0 +cmd,remove,,0,0,1,0 +cmd,execute,,0,0,1,0,,_options,1 +cmd,preExecCmd,,0,0,1,0,,_values,1 +cmd,postExecCmd,,0,0,1,0,,_values,1 +cmd,isAlreadyInStateAllow,,0,0,1,0 +cmd,alreadyInState,,0,0,1,0,,_options, +cmd,execCmd,,0,0,1,0,,_options,1,,_sendNodeJsEvent,1,,_quote,1 +cmd,getWidgetsSelectOptions,,0,0,1,0,,_version,1,,_availWidgets,1 +cmd,getGenericTypeSelectOptions,,0,0,1,0 +cmd,getWidgetHelp,,0,0,1,0,,_version,1,,_widgetName,1 +cmd,cleanWidgetCode,,0,0,1,0,,_template, +cmd,getWidgetTemplateCode,,0,0,1,0,,_version,1,,_clean,1,,_widgetName,1 +cmd,autoValueArray,,0,0,1,1,,_value,,,_decimal,1,,_unit,1,,_space,1 +cmd,toHtml,,0,0,1,0,,_version,1,,_options,1 +cmd,event,,0,0,1,0,,_value,,,_datetime,1,,_loop,1 +cmd,checkReturnState,,0,0,1,0,,_value, +cmd,checkCmdAlert,,0,0,1,0,,_value, +cmd,executeAlertCmdAction,,0,0,1,0 +cmd,checkAlertLevel,,0,0,1,0,,_value,,,_allowDuring,1,,_checkLevel,1 +cmd,duringAlertLevel,,0,0,1,1,,_options, +cmd,actionAlertLevel,,0,0,1,0,,_level,,,_value, +cmd,pushUrl,,0,0,1,0,,_value, +cmd,computeInfluxData,,0,0,1,0,,_value,,,_timestamp,1 +cmd,getInflux,,0,0,1,0,,_cmdId,1 +cmd,pushInflux,,0,0,1,0,,_value,1 +cmd,dropInfluxDatabase,,0,0,1,0 +cmd,dropInflux,,0,0,1,0 +cmd,historyInfluxAll,,0,0,1,0 +cmd,sendHistoryInflux,,0,0,1,0,,_params, +cmd,historyInflux,,0,0,1,0,,_type,1 +cmd,generateAskResponseLink,,0,0,1,0,,_response,,,_plugin,1,,_network,1 +cmd,askResponse,,0,0,1,0,,_response, +cmd,emptyHistory,,0,0,1,0,,_date,1 +cmd,addHistoryValue,,0,0,1,0,,_value,,,_datetime,1 +cmd,getStatistique,,0,0,1,0,,_startTime,,,_endTime, +cmd,getTemporalAvg,,0,0,1,0,,_startTime,,,_endTime, +cmd,getTendance,,0,0,1,0,,_startTime,,,_endTime, +cmd,getCmdValue,,0,0,1,0 +cmd,getHumanName,,0,0,1,0,,_tag,1,,_prettify,1 +cmd,getHistory,,0,0,1,0,,_dateStart,1,,_dateEnd,1,,_groupingType,1,,_addFirstPreviousValue,1 +cmd,getLastHistory,,0,0,1,0,,_time,,,_previous,1 +cmd,getOldest,,0,0,1,0 +cmd,getPluralityHistory,,0,0,1,0,,_dateStart,1,,_dateEnd,1,,_period,1,,_offset,1 +cmd,widgetPossibility,,0,0,1,0,,_key,1,,_default,1 +cmd,migrateCmd,,0,0,1,1,,_sourceId,,,_targetId, +cmd,export,,0,0,1,0 +cmd,getDirectUrlAccess,,0,0,1,0 +cmd,checkAccessCode,,0,0,1,0,,_code, +cmd,exportApi,,0,0,1,0 +cmd,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +cmd,getUsedBy,,0,0,1,0,,_array,1 +cmd,getUse,,0,0,1,0 +cmd,hasRight,,0,0,1,0,,_user,1 +cmd,getId,,0,0,1,0 +cmd,getName,,0,0,1,0 +cmd,getGeneric_type,,0,0,1,0 +cmd,setGeneric_type,,0,0,1,0,,_generic_type, +cmd,getType,,0,0,1,0 +cmd,getSubType,,0,0,1,0 +cmd,getEqType_name,,0,0,1,0 +cmd,getEqLogic_id,,0,0,1,0 +cmd,getIsHistorized,,0,0,1,0 +cmd,getUnite,,0,0,1,0 +cmd,getEqLogic,,0,0,1,0 +cmd,setEqLogic,,0,0,1,0,,_eqLogic, +cmd,getEventOnly,,0,0,1,0 +cmd,setId,,0,0,1,0,,_id,1 +cmd,setName,,0,0,1,0,,_name, +cmd,setType,,0,0,1,0,,_type, +cmd,setSubType,,0,0,1,0,,_subType, +cmd,setEqLogic_id,,0,0,1,0,,_eqLogic_id, +cmd,setIsHistorized,,0,0,1,0,,_isHistorized, +cmd,setUnite,,0,0,1,0,,_unite, +cmd,getTemplate,,0,0,1,0,,_key,1,,_default,1 +cmd,setTemplate,,0,0,1,0,,_key,,,_value, +cmd,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +cmd,setConfiguration,,0,0,1,0,,_key,,,_value, +cmd,getDisplay,,0,0,1,0,,_key,1,,_default,1 +cmd,setDisplay,,0,0,1,0,,_key,,,_value, +cmd,getAlert,,0,0,1,0,,_key,1,,_default,1 +cmd,setAlert,,0,0,1,0,,_key,,,_value, +cmd,getCollectDate,,0,0,1,0 +cmd,setCollectDate,,0,0,1,0,,_collectDate, +cmd,getValueDate,,0,0,1,0 +cmd,setValueDate,,0,0,1,0,,_valueDate, +cmd,getValue,,0,0,1,0 +cmd,setValue,,0,0,1,0,,_value, +cmd,getIsVisible,,0,0,1,0 +cmd,setIsVisible,,0,0,1,0,,isVisible, +cmd,getOrder,,0,0,1,0 +cmd,setOrder,,0,0,1,0,,order, +cmd,getLogicalId,,0,0,1,0 +cmd,setLogicalId,,0,0,1,0,,_logicalId, +cmd,getEqType,,0,0,1,0 +cmd,setEqType,,0,0,1,0,,_eqType, +cmd,getCache,,0,0,1,0,,_key,1,,_default,1 +cmd,setCache,,0,0,1,0,,_key,,,_value,1 +cmd,getChanged,,0,0,1,0 +cmd,setChanged,,0,0,1,0,,_changed, +config,getDefaultConfiguration,,0,0,1,1,string,_plugin,1 +config,save,,0,0,1,1,,_key,,,_value,,,_plugin,1 +config,remove,,0,0,1,1,string,_key,,string,_plugin,1 +config,byKey,,0,0,1,1,,_key,,,_plugin,1,,_default,1,,_forceFresh,1 +config,byKeys,,0,0,1,1,,_keys,,,_plugin,1,,_default,1 +config,searchKey,,0,0,1,1,,_key,,,_plugin,1 +config,genKey,,0,0,1,1,,_car,1 +config,getPluginEnable,,0,0,1,1 +config,getLogLevelPlugin,,0,0,1,1 +config,getGenericTypes,,0,0,1,1,,_coreOnly,1 +config,checkValueBetween,,0,0,1,1,,_value,,,_min,1,,_max,1 +config,postConfig_market_allowDns,,0,0,1,1,,_value, +config,postConfig_theme_start_day_hour,,0,0,1,1,,_value, +config,postConfig_theme_end_day_hour,,0,0,1,1,,_value, +config,postConfig_object_summary,,0,0,1,1,,_value, +config,preConfig_historyArchivePackage,,0,0,1,1,,_value, +config,preConfig_historyArchiveTime,,0,0,1,1,,_value, +config,preConfig_market_password,,0,0,1,1,,_value, +config,preConfig_widget_margin,,0,0,1,1,,_value, +config,preConfig_widget_step_width,,0,0,1,1,,_value, +config,preConfig_widget_step_height,,0,0,1,1,,_value, +config,preConfig_css_background_opacity,,0,0,1,1,,_value, +config,preConfig_css_border_radius,,0,0,1,1,,_value, +config,preConfig_name,,0,0,1,1,,_value, +config,preConfig_info_latitude,,0,0,1,1,,_value, +config,preConfig_info_longitude,,0,0,1,1,,_value, +config,preConfig_tts_engine,,0,0,1,1,,_value, +config,getHistorizedCmdNum,,0,0,1,1 +config,getTimelinedCmdNum,,0,0,1,1 +cron,all,,0,0,1,1,,_order,1 +cron,byId,,0,0,1,1,,_id, +cron,byClassAndFunction,,0,0,1,1,,_class,,,_function,,,_option,1 +cron,searchClassAndFunction,,0,0,1,1,,_class,,,_function,,,_option,1 +cron,clean,,0,0,1,1 +cron,nbCronRun,,0,0,1,1 +cron,nbProcess,,0,0,1,1 +cron,loadAvg,,0,0,1,1 +cron,setPidFile,,0,0,1,1 +cron,getPidFile,,0,0,1,1 +cron,jeeCronRun,,0,0,1,1 +cron,convertDateToCron,,0,0,1,1,,_date, +cron,preSave,,0,0,1,0 +cron,postInsert,,0,0,1,0 +cron,save,,0,0,1,0 +cron,remove,,0,0,1,0,,halt_before,1 +cron,start,,0,0,1,0 +cron,run,,0,0,1,0,,_noErrorReport,1 +cron,running,,0,0,1,0 +cron,refresh,,0,0,1,0 +cron,stop,,0,0,1,0 +cron,halt,,0,0,1,0 +cron,isDue,,0,0,1,0,,_datetime,1 +cron,getNextRunDate,,0,0,1,0 +cron,getName,,0,0,1,0 +cron,toArray,,0,0,1,0 +cron,getId,,0,0,1,0 +cron,getClass,,0,0,1,0 +cron,getFunction,,0,0,1,0 +cron,getLastRun,,0,0,1,0 +cron,getState,,0,0,1,0 +cron,getEnable,,0,0,1,0,,_default,1 +cron,getPID,,0,0,1,0,,_default,1 +cron,setId,,0,0,1,0,,_id, +cron,setEnable,,0,0,1,0,,_enable, +cron,setClass,,0,0,1,0,,_class, +cron,setFunction,,0,0,1,0,,_function, +cron,setLastRun,,0,0,1,0,,lastRun, +cron,setState,,0,0,1,0,,state, +cron,setPID,,0,0,1,0,,pid,1 +cron,getSchedule,,0,0,1,0 +cron,setSchedule,,0,0,1,0,,_schedule, +cron,getDeamon,,0,0,1,0 +cron,setDeamon,,0,0,1,0,,_deamons, +cron,getTimeout,,0,0,1,0 +cron,setTimeout,,0,0,1,0,,_timeout, +cron,getDeamonSleepTime,,0,0,1,0 +cron,setDeamonSleepTime,,0,0,1,0,,_deamonSleepTime, +cron,getOption,,0,0,1,0 +cron,getOnce,,0,0,1,0,,_default,1 +cron,setOption,,0,0,1,0,,_option, +cron,setOnce,,0,0,1,0,,_once, +cron,getCache,,0,0,1,0,,_key,1,,_default,1 +cron,setCache,,0,0,1,0,,_key,,,_value,1 +cron,getChanged,,0,0,1,0 +cron,setChanged,,0,0,1,0,,_changed, +dataStore,byId,,0,0,1,1,,_id, +dataStore,byTypeLinkIdKey,,0,0,1,1,,_type,,,_link_id,,,_key, +dataStore,byTypeLinkId,,0,0,1,1,,_type,,,_link_id,1 +dataStore,removeByTypeLinkId,,0,0,1,1,,_type,,,_link_id, +dataStore,preSave,,0,0,1,0 +dataStore,save,,0,0,1,0 +dataStore,postSave,,0,0,1,0 +dataStore,remove,,0,0,1,0 +dataStore,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +dataStore,getUsedBy,,0,0,1,0,,_array,1 +dataStore,getId,,0,0,1,0 +dataStore,setId,,0,0,1,0,,_id, +dataStore,getType,,0,0,1,0 +dataStore,setType,,0,0,1,0,,_type, +dataStore,getLink_id,,0,0,1,0 +dataStore,setLink_id,,0,0,1,0,,_link_id, +dataStore,getKey,,0,0,1,0 +dataStore,setKey,,0,0,1,0,,_key, +dataStore,getValue,,0,0,1,0,,_default,1 +dataStore,setValue,,0,0,1,0,,_value, +dataStore,getChanged,,0,0,1,0 +dataStore,setChanged,,0,0,1,0,,_changed, +eqLogic,getAllTags,,0,0,1,1 +eqLogic,byId,,0,0,1,1,,_id, +eqLogic,all,,0,0,1,1,,_onlyEnable,1 +eqLogic,byObjectId,,0,0,1,1,,_object_id,,,_onlyEnable,1,,_onlyVisible,1,,_eqType_name,1,,_logicalId,1,,_orderByName,1,,_onlyHasCmds,1 +eqLogic,byLogicalId,,0,0,1,1,,_logicalId,,,_eqType_name,,,_multiple,1 +eqLogic,byType,,0,0,1,1,,_eqType_name,,,_onlyEnable,1 +eqLogic,byCategorie,,0,0,1,1,,_category, +eqLogic,byTypeAndSearchConfiguration,,0,0,1,1,,_eqType_name,,,_configuration,,,_onlyEnable,1,,_onlyVisible,1 +eqLogic,byTypeAndSearhConfiguration,,0,0,1,1,,_eqType_name,,,_configuration,,,_onlyEnable,1,,_onlyVisible,1 +eqLogic,searchByString,,0,0,1,1,,_search, +eqLogic,searchConfiguration,,0,0,1,1,,_configuration,,,_eqType_name,1 +eqLogic,listByTypeAndCmdType,,0,0,1,1,,_eqType_name,,,_typeCmd,,,subTypeCmd,1 +eqLogic,listByObjectAndCmdType,,0,0,1,1,,_object_id,,,_typeCmd,,,subTypeCmd,1 +eqLogic,allType,,0,0,1,1 +eqLogic,checkAlive,,0,0,1,1 +eqLogic,byTimeout,,0,0,1,1,,_timeout,1,,_onlyEnable,1 +eqLogic,byObjectNameEqLogicName,,0,0,1,1,,_object_name,,,_eqLogic_name, +eqLogic,toHumanReadable,,0,0,1,1,,_input, +eqLogic,fromHumanReadable,,0,0,1,1,,_input, +eqLogic,byString,,0,0,1,1,,_string, +eqLogic,generateHtmlTable,,0,0,1,1,,_nbLine,,,_nbColumn,,,_options,1 +eqLogic,batteryWidget,,0,0,1,0,,_version,1 +eqLogic,checkAndUpdateCmd,,0,0,1,0,,_logicalId,,,_value,,,_updateTime,1 +eqLogic,copy,,0,0,1,0,,_name, +eqLogic,getTableName,,0,0,1,0 +eqLogic,hasOnlyEventOnlyCmd,,0,0,1,0 +eqLogic,preToHtml,,0,0,1,0,,_version,1,,_default,1,,_noCache,1 +eqLogic,toHtml,,0,0,1,0,,_version,1 +eqLogic,postToHtml,,0,0,1,0,,_version,,,_html, +eqLogic,emptyCacheWidget,,0,0,1,0 +eqLogic,getAlert,,0,0,1,0 +eqLogic,getMaxCmdAlert,,0,0,1,0 +eqLogic,getShowOnChild,,0,0,1,0 +eqLogic,remove,,0,0,1,0 +eqLogic,save,,0,0,1,0,,_direct,1 +eqLogic,refresh,,0,0,1,0 +eqLogic,getLinkToConfiguration,,0,0,1,0 +eqLogic,getHumanName,,0,0,1,0,,_tag,1,,_prettify,1 +eqLogic,getPrimaryCategory,,0,0,1,0 +eqLogic,displayDebug,,0,0,1,0,,_message, +eqLogic,batteryStatus,,0,0,1,0,,_pourcent,1,,_datetime,1 +eqLogic,refreshWidget,,0,0,1,0 +eqLogic,hasRight,,0,0,1,0,,_right,,,_user,1 +eqLogic,migrateEqlogic,,0,0,1,1,,_sourceId,,,_targetId,,,_mode,1 +eqLogic,import,,0,0,1,0,,_configuration,,,_dontRemove,1 +eqLogic,export,,0,0,1,0,,_withCmd,1 +eqLogic,widgetPossibility,,0,0,1,0,,_key,1,,_default,1 +eqLogic,toArray,,0,0,1,0 +eqLogic,getCustomImage,,0,0,1,0 +eqLogic,getImage,,0,0,1,0 +eqLogic,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +eqLogic,getUse,,0,0,1,0 +eqLogic,getUsedBy,,0,0,1,0,,_array,1 +eqLogic,deadCmdGeneric,,0,0,1,1,,_plugin_id, +eqLogic,getUsage,,0,0,1,0 +eqLogic,getId,,0,0,1,0 +eqLogic,getName,,0,0,1,0 +eqLogic,getLogicalId,,0,0,1,0 +eqLogic,getObject_id,,0,0,1,0 +eqLogic,getObject,,0,0,1,0 +eqLogic,setObject,,0,0,1,0,,_object, +eqLogic,getEqType_name,,0,0,1,0 +eqLogic,getIsVisible,,0,0,1,0,,_default,1 +eqLogic,getIsEnable,,0,0,1,0,,_default,1 +eqLogic,getCmd,,0,0,1,0,,_type,1,,_logicalId,1,,_visible,1,,_multiple,1 +eqLogic,getCmdByGenericType,,0,0,1,0,,_type,1,,_generic_type,1,,_visible,1,,_multiple,1 +eqLogic,searchCmdByConfiguration,,0,0,1,0,,_configuration,,,_type,1 +eqLogic,setId,,0,0,1,0,,_id, +eqLogic,setName,,0,0,1,0,,_name, +eqLogic,setLogicalId,,0,0,1,0,,_logicalId, +eqLogic,setObject_id,,0,0,1,0,,object_id,1 +eqLogic,setEqType_name,,0,0,1,0,,eqType_name, +eqLogic,setIsVisible,,0,0,1,0,,_isVisible, +eqLogic,setIsEnable,,0,0,1,0,,_isEnable, +eqLogic,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +eqLogic,setConfiguration,,0,0,1,0,,_key,,,_value, +eqLogic,getDisplay,,0,0,1,0,,_key,1,,_default,1 +eqLogic,setDisplay,,0,0,1,0,,_key,,,_value, +eqLogic,getTimeout,,0,0,1,0,,_default,1 +eqLogic,setTimeout,,0,0,1,0,,_timeout, +eqLogic,getCategory,,0,0,1,0,,_key,1,,_default,1 +eqLogic,setCategory,,0,0,1,0,,_key,,,_value, +eqLogic,getGenericType,,0,0,1,0 +eqLogic,setGenericType,,0,0,1,0,,_generic_type, +eqLogic,getComment,,0,0,1,0 +eqLogic,setComment,,0,0,1,0,,_comment, +eqLogic,getTags,,0,0,1,0 +eqLogic,setTags,,0,0,1,0,,_tags, +eqLogic,getDebug,,0,0,1,0 +eqLogic,setDebug,,0,0,1,0,,_debug, +eqLogic,getOrder,,0,0,1,0 +eqLogic,setOrder,,0,0,1,0,,_order, +eqLogic,getCache,,0,0,1,0,,_key,1,,_default,1 +eqLogic,setCache,,0,0,1,0,,_key,,,_value,1 +eqLogic,getStatus,,0,0,1,0,,_key,1,,_default,1 +eqLogic,setStatus,,0,0,1,0,,_key,,,_value,1 +eqLogic,getChanged,,0,0,1,0 +eqLogic,setChanged,,0,0,1,0,,_changed, +event,add,,0,0,1,1,,_event,,,_option,1,,_clean,1 +event,adds,,0,0,1,1,,_event,,,_values,1 +event,cleanEvent,,0,0,1,1 +event,changes,,0,0,1,1,,_datetime,,,_longPolling,1,,_filter,1 +event,save,,0,0,1,0,,_direct,1 +event,remove,,0,0,1,0 +event,getDatetime,,0,0,1,0 +event,setDatetime,,0,0,1,0,,_datetime, +event,getName,,0,0,1,0 +event,setName,,0,0,1,0,,_name, +event,getOption,,0,0,1,0,,_key,1,,_default,1 +event,setOption,,0,0,1,0,,_key,,,_value, +history,removeHistoryInFutur,,0,0,1,1 +history,checkCurrentValueAndHistory,,0,0,1,1 +history,exportToCSV,,0,0,1,1,,histories, +history,copyHistoryToCmd,,0,0,1,1,,_source_id,,,_target_id, +history,byCmdIdDatetime,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime,1,,_oldValue,1 +history,byCmdIdAtDatetime,,0,0,1,1,,_cmd_id,,,_time,,,_previous,1 +history,byCmdIdAtDatetimeFromCalcul,,0,0,1,1,,_strcalcul,,,_time,,,_previous,1 +history,archive,,0,0,1,1 +history,all,,0,0,1,1,,_cmd_id,,,_startTime,1,,_endTime,1,,_groupingType,1,,_addFirstPreviousValue,1 +history,getOldestValue,,0,0,1,1,,_cmd_id,,,_limit,1 +history,removes,,0,0,1,1,,_cmd_id,,,_startTime,1,,_endTime,1 +history,getPlurality,,0,0,1,1,,_cmd_id,,,_startTime,1,,_endTime,1,,_period,1,,_offset,1 +history,getTemporalAvg,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime, +history,getStatistique,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime, +history,getTendance,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime, +history,stateDuration,,0,0,1,1,,_cmd_id,,,_value,1 +history,lastStateDuration,,0,0,1,1,,_cmd_id,,,_value,1 +history,lastChangeStateDuration,,0,0,1,1,,_cmd_id,,,_value, +history,stateChanges,,0,0,1,1,,_cmd_id,,,_value,1,,_startTime,1,,_endTime,1 +history,emptyHistory,,0,0,1,1,,_cmd_id,,,_date,1 +history,getHistoryFromCalcul,,0,0,1,1,,_strcalcul,,,_dateStart,1,,_dateEnd,1,,_noCalcul,1,,_groupingType,1 +history,save,,0,0,1,0,,_cmd,1,,_direct,1 +history,remove,,0,0,1,0 +history,getCmd_id,,0,0,1,0 +history,getCmd,,0,0,1,0 +history,getValue,,0,0,1,0 +history,getDatetime,,0,0,1,0 +history,getTableName,,0,0,1,0 +history,setTableName,,0,0,1,0,,_tableName, +history,setCmd_id,,0,0,1,0,,_cmd_id, +history,setValue,,0,0,1,0,,_value, +history,setDatetime,,0,0,1,0,,_datetime, +history,getChanged,,0,0,1,0 +history,setChanged,,0,0,1,0,,_changed, +history,removeHistoryInFutur,,0,0,1,1 +history,checkCurrentValueAndHistory,,0,0,1,1 +history,exportToCSV,,0,0,1,1,,histories, +history,copyHistoryToCmd,,0,0,1,1,,_source_id,,,_target_id, +history,byCmdIdDatetime,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime,1,,_oldValue,1 +history,byCmdIdAtDatetime,,0,0,1,1,,_cmd_id,,,_time,,,_previous,1 +history,byCmdIdAtDatetimeFromCalcul,,0,0,1,1,,_strcalcul,,,_time,,,_previous,1 +history,archive,,0,0,1,1 +history,all,,0,0,1,1,,_cmd_id,,,_startTime,1,,_endTime,1,,_groupingType,1,,_addFirstPreviousValue,1 +history,getOldestValue,,0,0,1,1,,_cmd_id,,,_limit,1 +history,removes,,0,0,1,1,,_cmd_id,,,_startTime,1,,_endTime,1 +history,getPlurality,,0,0,1,1,,_cmd_id,,,_startTime,1,,_endTime,1,,_period,1,,_offset,1 +history,getTemporalAvg,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime, +history,getStatistique,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime, +history,getTendance,,0,0,1,1,,_cmd_id,,,_startTime,,,_endTime, +history,stateDuration,,0,0,1,1,,_cmd_id,,,_value,1 +history,lastStateDuration,,0,0,1,1,,_cmd_id,,,_value,1 +history,lastChangeStateDuration,,0,0,1,1,,_cmd_id,,,_value, +history,stateChanges,,0,0,1,1,,_cmd_id,,,_value,1,,_startTime,1,,_endTime,1 +history,emptyHistory,,0,0,1,1,,_cmd_id,,,_date,1 +history,getHistoryFromCalcul,,0,0,1,1,,_strcalcul,,,_dateStart,1,,_dateEnd,1,,_noCalcul,1,,_groupingType,1 +history,save,,0,0,1,0,,_cmd,1,,_direct,1 +history,remove,,0,0,1,0 +history,getCmd_id,,0,0,1,0 +history,getCmd,,0,0,1,0 +history,getValue,,0,0,1,0 +history,getDatetime,,0,0,1,0 +history,getTableName,,0,0,1,0 +history,setTableName,,0,0,1,0,,_tableName, +history,setCmd_id,,0,0,1,0,,_cmd_id, +history,setValue,,0,0,1,0,,_value, +history,setDatetime,,0,0,1,0,,_datetime, +history,getChanged,,0,0,1,0 +history,setChanged,,0,0,1,0,,_changed, +interactDef,byId,,0,0,1,1,,_id, +interactDef,all,,0,0,1,1,,_group,1 +interactDef,listGroup,,0,0,1,1,,_group,1 +interactDef,generateTextVariant,,0,0,1,1,,_text, +interactDef,searchByQuery,,0,0,1,1,,_query, +interactDef,regenerateInteract,,0,0,1,1 +interactDef,getTagFromQuery,,0,0,1,1,,_def,,,_query, +interactDef,sanitizeQuery,,0,0,1,1,,_query, +interactDef,deadCmd,,0,0,1,1 +interactDef,cleanInteract,,0,0,1,1 +interactDef,searchByUse,,0,0,1,1,,_search, +interactDef,checkQuery,,0,0,1,0,,_query, +interactDef,selectReply,,0,0,1,0 +interactDef,preInsert,,0,0,1,0 +interactDef,preSave,,0,0,1,0 +interactDef,save,,0,0,1,0 +interactDef,postSave,,0,0,1,0 +interactDef,remove,,0,0,1,0 +interactDef,preRemove,,0,0,1,0 +interactDef,postRemove,,0,0,1,0 +interactDef,generateQueryVariant,,0,0,1,0 +interactDef,generateSynonymeVariante,,0,0,1,1,,_text,,,_synonymes,,,_deep,1 +interactDef,getLinkToConfiguration,,0,0,1,0 +interactDef,getHumanName,,0,0,1,0 +interactDef,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +interactDef,getId,,0,0,1,0 +interactDef,setId,,0,0,1,0,,_id, +interactDef,getQuery,,0,0,1,0 +interactDef,setQuery,,0,0,1,0,,_query, +interactDef,getReply,,0,0,1,0 +interactDef,setReply,,0,0,1,0,,_reply, +interactDef,getPerson,,0,0,1,0 +interactDef,setPerson,,0,0,1,0,,_person, +interactDef,getOptions,,0,0,1,0,,_key,1,,_default,1 +interactDef,setOptions,,0,0,1,0,,_key,,,_value, +interactDef,getFiltres,,0,0,1,0,,_key,1,,_default,1 +interactDef,setFiltres,,0,0,1,0,,_key,,,_value, +interactDef,getEnable,,0,0,1,0 +interactDef,setEnable,,0,0,1,0,,_enable, +interactDef,getName,,0,0,1,0 +interactDef,setName,,0,0,1,0,,_name, +interactDef,getComment,,0,0,1,0 +interactDef,setComment,,0,0,1,0,,_comment, +interactDef,getGroup,,0,0,1,0 +interactDef,setGroup,,0,0,1,0,,_group, +interactDef,getActions,,0,0,1,0,,_key,1,,_default,1 +interactDef,setActions,,0,0,1,0,,_key,,,_value, +interactDef,getDisplay,,0,0,1,0,,_key,1,,_default,1 +interactDef,setDisplay,,0,0,1,0,,_key,,,_value, +interactDef,getChanged,,0,0,1,0 +interactDef,setChanged,,0,0,1,0,,_changed, +interactQuery,byId,,0,0,1,1,,_id, +interactQuery,byQuery,,0,0,1,1,,_query,,,_interactDef_id,1 +interactQuery,byInteractDefId,,0,0,1,1,,_interactDef_id, +interactQuery,searchQueries,,0,0,1,1,,_query, +interactQuery,searchActions,,0,0,1,1,,_action, +interactQuery,all,,0,0,1,1 +interactQuery,removeByInteractDefId,,0,0,1,1,,_interactDef_id, +interactQuery,recognize,,0,0,1,1,,_query, +interactQuery,getQuerySynonym,,0,0,1,1,,_query,,,_for, +interactQuery,findInQuery,,0,0,1,1,,_type,,,_query,,,_data,1 +interactQuery,cmp_objectName,,0,0,1,1,,a,,,b, +interactQuery,autoInteract,,0,0,1,1,,_query,,,_parameters,1 +interactQuery,autoInteractWordFind,,0,0,1,1,,_string,,,_word, +interactQuery,pluginReply,,0,0,1,1,,_query,,,_parameters,1 +interactQuery,warnMe,,0,0,1,1,,_query,,,_parameters,1 +interactQuery,warnMeExecute,,0,0,1,1,,_options, +interactQuery,tryToReply,,0,0,1,1,,_query,,,_parameters,1 +interactQuery,addLastInteract,,0,0,1,1,,_lastCmd,,,_identifier,1 +interactQuery,contextualReply,,0,0,1,1,,_query,,,_parameters,1,,_lastCmd,1 +interactQuery,replaceForContextual,,0,0,1,0,,_replace,,,_by,,,_in, +interactQuery,brainReply,,0,0,1,1,,_query,,,_parameters, +interactQuery,dontUnderstand,,0,0,1,1,,_parameters, +interactQuery,replyOk,,0,0,1,1 +interactQuery,doIn,,0,0,1,1,,_params, +interactQuery,save,,0,0,1,0 +interactQuery,remove,,0,0,1,0 +interactQuery,executeAndReply,,0,0,1,0,,_parameters, +interactQuery,getInteractDef,,0,0,1,0 +interactQuery,getInteractDef_id,,0,0,1,0 +interactQuery,setInteractDef_id,,0,0,1,0,,_interactDef_id, +interactQuery,getId,,0,0,1,0 +interactQuery,setId,,0,0,1,0,,_id, +interactQuery,getQuery,,0,0,1,0 +interactQuery,setQuery,,0,0,1,0,,_query, +interactQuery,getActions,,0,0,1,0,,_key,1,,_default,1 +interactQuery,setActions,,0,0,1,0,,_key,,,_value, +interactQuery,getChanged,,0,0,1,0 +interactQuery,setChanged,,0,0,1,0,,_changed, +jeeObject,byId,,0,0,1,1,,_id, +jeeObject,byName,,0,0,1,1,,_name, +jeeObject,all,,0,0,1,1,,_onlyVisible,1,,_byPosition,1 +jeeObject,rootObject,,0,0,1,1,,_all,1,,_onlyVisible,1 +jeeObject,toHumanReadable,,0,0,1,1,,_input, +jeeObject,fromHumanReadable,,0,0,1,1,,_input, +jeeObject,buildTree,,0,0,1,1,,_object,1,,_visible,1 +jeeObject,getUISelectList,,0,0,1,1,,_none,1 +jeeObject,fullData,,0,0,1,1,,_restrict,1,,_user,1 +jeeObject,searchConfiguration,,0,0,1,1,,_search, +jeeObject,deadCmd,,0,0,1,1 +jeeObject,checkSummaryUpdate,,0,0,1,1,,_cmd_id, +jeeObject,getGlobalSummary,,0,0,1,1,,_key, +jeeObject,getGlobalHtmlSummary,,0,0,1,1,,_version,1 +jeeObject,getGlobalArraySummary,,0,0,1,1,,_version,1 +jeeObject,createSummaryToVirtual,,0,0,1,1,,_key,1 +jeeObject,actionOnSummary,,0,0,1,1,,_cmd,,,_options,1 +jeeObject,cronDaily,,0,0,1,1 +jeeObject,orderEqLogicByUsage,,0,0,1,0 +jeeObject,summaryAction,,0,0,1,0,,_cmd,,,_options,1 +jeeObject,getTableName,,0,0,1,0 +jeeObject,checkTreeConsistency,,0,0,1,0,,_fathers,1 +jeeObject,preSave,,0,0,1,0 +jeeObject,refresh,,0,0,1,0 +jeeObject,save,,0,0,1,0,,_direct,1 +jeeObject,getChild,,0,0,1,0,,_visible,1 +jeeObject,getChilds,,0,0,1,0 +jeeObject,getEqLogic,,0,0,1,0,,_onlyEnable,1,,_onlyVisible,1,,_eqType_name,1,,_logicalId,1,,_searchOnchild,1 +jeeObject,getEqLogicsFromSummary,,0,0,1,0,,_summary,1,,_onlyEnable,1,,_onlyVisible,1,,_eqType_name,1,,_logicalId,1 +jeeObject,getEqLogicBySummary,,0,0,1,0,,_summary,1,,_onlyEnable,1,,_onlyVisible,1,,_eqType_name,1,,_logicalId,1 +jeeObject,getScenario,,0,0,1,0,,_onlyEnable,1,,_onlyVisible,1 +jeeObject,preRemove,,0,0,1,0 +jeeObject,remove,,0,0,1,0 +jeeObject,getFather,,0,0,1,0 +jeeObject,parentNumber,,0,0,1,0 +jeeObject,getHumanName,,0,0,1,0,,_tag,1,,_prettify,1 +jeeObject,cleanSummary,,0,0,1,0 +jeeObject,getSummary,,0,0,1,0,,_key,1,,_raw,1 +jeeObject,getHtmlSummary,,0,0,1,0,,_version,1 +jeeObject,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +jeeObject,getUse,,0,0,1,0 +jeeObject,getImgLink,,0,0,1,0 +jeeObject,toArray,,0,0,1,0 +jeeObject,hasRight,,0,0,1,0,,_right,,,_user,1 +jeeObject,getId,,0,0,1,0 +jeeObject,getName,,0,0,1,0 +jeeObject,getFather_id,,0,0,1,0,,_default,1 +jeeObject,getIsVisible,,0,0,1,0,,_default,1 +jeeObject,setId,,0,0,1,0,,_id, +jeeObject,setName,,0,0,1,0,,_name, +jeeObject,setFather_id,,0,0,1,0,,_father_id,1 +jeeObject,setIsVisible,,0,0,1,0,,_isVisible, +jeeObject,getPosition,,0,0,1,0,,_default,1 +jeeObject,setPosition,,0,0,1,0,,_position, +jeeObject,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +jeeObject,setConfiguration,,0,0,1,0,,_key,,,_value, +jeeObject,getDisplay,,0,0,1,0,,_key,1,,_default,1 +jeeObject,setDisplay,,0,0,1,0,,_key,,,_value, +jeeObject,getCache,,0,0,1,0,,_key,1,,_default,1 +jeeObject,setCache,,0,0,1,0,,_key,,,_value,1 +jeeObject,getImage,,0,0,1,0,,_key,1,,_default,1 +jeeObject,setImage,,0,0,1,0,,_key,,,_value, +jeeObject,getChanged,,0,0,1,0 +jeeObject,setChanged,,0,0,1,0,,_changed, +jeedom,minify,,0,0,1,1 +jeedom,getThemeConfig,,0,0,1,1 +jeedom,addRemoveHistory,,0,0,1,1,,_data, +jeedom,deadCmd,,0,0,1,1 +jeedom,health,,0,0,1,1 +jeedom,sick,,0,0,1,1 +jeedom,getApiKey,,0,0,1,1,,_plugin,1,,_mode,1 +jeedom,apiModeResult,,0,0,1,1,,_mode,1 +jeedom,apiAccess,,0,0,1,1,,_apikey,1,,_plugin,1 +jeedom,isOk,,0,0,1,1 +jeedom,getUsbDetails,,0,0,1,1,,_usb,1,,_usbMapping,1 +jeedom,getUsbLegacy,,0,0,1,1,,_usbMapping,1 +jeedom,getUsbMapping,,0,0,1,1,,_name,1,,_getGPIO,1 +jeedom,getBluetoothMapping,,0,0,1,1,,_name,1 +jeedom,consistency,,0,0,1,1 +jeedom,backup,,0,0,1,1,,_background,1 +jeedom,listBackup,,0,0,1,1 +jeedom,removeBackup,,0,0,1,1,,_backup, +jeedom,restore,,0,0,1,1,,_backup,1,,_background,1 +jeedom,update,,0,0,1,1,,_options,1 +jeedom,getConfiguration,,0,0,1,1,,_key,1,,_default,1 +jeedom,version,,0,0,1,1 +jeedom,stop,,0,0,1,1 +jeedom,start,,0,0,1,1 +jeedom,isStarted,,0,0,1,1 +jeedom,isDateOk,,0,0,1,1 +jeedom,event,,0,0,1,1,,_event,,,_forceSyncMode,1,,_options,1 +jeedom,cron5,,0,0,1,1 +jeedom,cron10,,0,0,1,1 +jeedom,cron,,0,0,1,1 +jeedom,cronDaily,,0,0,1,1 +jeedom,cronHourly,,0,0,1,1 +jeedom,replaceTag,,0,0,1,1,array,_replaces, +jeedom,checkOngoingThread,,0,0,1,1,,_cmd, +jeedom,retrievePidThread,,0,0,1,1,,_cmd, +jeedom,versionAlias,,0,0,1,1,,_version,,,_lightMode,1 +jeedom,toHumanReadable,,0,0,1,1,,_input, +jeedom,fromHumanReadable,,0,0,1,1,,_input, +jeedom,evaluateExpression,,0,0,1,1,,_input,,,_scenario,1 +jeedom,calculStat,,0,0,1,1,,_calcul,,,_values,,,_round,1 +jeedom,getTypeUse,,0,0,1,1,,_string,1 +jeedom,getRemovehistory,,0,0,1,1 +jeedom,massReplace,,0,0,1,1,,_options,1,,_eqlogics,1,,_cmds,1 +jeedom,haltSystem,,0,0,1,1 +jeedom,rebootSystem,,0,0,1,1 +jeedom,forceSyncHour,,0,0,1,1 +jeedom,cleanDatabase,,0,0,1,1 +jeedom,cleanFileSytemRight,,0,0,1,1 +jeedom,cleanFileSystemRight,,0,0,1,1 +jeedom,checkSpaceLeft,,0,0,1,1,,_dir,1 +jeedom,getTmpFolder,,0,0,1,1,,_plugin,1 +jeedom,getHardwareKey,,0,0,1,1 +jeedom,getHardwareName,,0,0,1,1 +jeedom,isCapable,,0,0,1,1,,_function,,,_forceRefresh,1 +jeedom,benchmark,,0,0,1,1 +jsonrpc,__construct,,0,0,1,0,,_jsonrpc, +jsonrpc,makeError,,0,0,1,0,,_code,,,_message, +jsonrpc,makeSuccess,,0,0,1,0,,_result,1 +jsonrpc,getStartTime,,0,0,1,0 +jsonrpc,getApplicationName,,0,0,1,0 +jsonrpc,getJsonrpc,,0,0,1,0 +jsonrpc,getMethod,,0,0,1,0 +jsonrpc,getParams,,0,0,1,0 +jsonrpc,getId,,0,0,1,0 +jsonrpc,setApplicationName,,0,0,1,0,,applicationName, +jsonrpc,getAdditionnalParams,,0,0,1,0,,_key,1,,_default,1 +jsonrpc,setAdditionnalParams,,0,0,1,0,,_key,,,_value, +jsonrpcClient,__construct,,0,0,1,0,,_apiAddr,,,_apikey,,,_options,1 +jsonrpcClient,sendRequest,,0,0,1,0,,_method,,,_params,1,,_timeout,1,,_file,1,,_maxRetry,1 +jsonrpcClient,getError,,0,0,1,0 +jsonrpcClient,getResult,,0,0,1,0 +jsonrpcClient,getRawResult,,0,0,1,0 +jsonrpcClient,getErrorCode,,0,0,1,0 +jsonrpcClient,getErrorMessage,,0,0,1,0 +jsonrpcClient,getCb_function,,0,0,1,0 +jsonrpcClient,getCb_class,,0,0,1,0 +jsonrpcClient,setCb_function,,0,0,1,0,,cb_function, +jsonrpcClient,setCb_class,,0,0,1,0,,cb_class, +jsonrpcClient,setCertificate_path,,0,0,1,0,,certificate_path, +jsonrpcClient,getCertificate_path,,0,0,1,0 +jsonrpcClient,setDisable_ssl_verifiy,,0,0,1,0,,noSslCheck, +jsonrpcClient,getNoSslCheck,,0,0,1,0 +jsonrpcClient,setNoSslCheck,,0,0,1,0,,noSslCHeck, +listener,clean,,0,0,1,1 +listener,all,,0,0,1,1 +listener,byId,,0,0,1,1,,_id, +listener,byClass,,0,0,1,1,,_class, +listener,byClassAndFunction,,0,0,1,1,,_class,,,_function,,,_option,1 +listener,searchClassFunctionOption,,0,0,1,1,,_class,,,_function,,,_option,1 +listener,byClassFunctionAndEvent,,0,0,1,1,,_class,,,_function,,,_event, +listener,removeByClassFunctionAndEvent,,0,0,1,1,,_class,,,_function,,,_event,,,_option,1 +listener,searchEvent,,0,0,1,1,,_event, +listener,check,,0,0,1,1,,_event,,,_value,,,_datetime,1,,_object,1 +listener,backgroundCalculDependencyCmd,,0,0,1,1,,_event, +listener,getName,,0,0,1,0 +listener,run,,0,0,1,0,,_event,,,_value,,,_datetime,1,,_object,1 +listener,execute,,0,0,1,0,,_event,,,_value,,,_datetime,1,,_object,1 +listener,preSave,,0,0,1,0 +listener,save,,0,0,1,0,,_once,1 +listener,remove,,0,0,1,0 +listener,emptyEvent,,0,0,1,0 +listener,addEvent,,0,0,1,0,,_id,,,_type,1 +listener,getId,,0,0,1,0 +listener,getEvent,,0,0,1,0 +listener,getClass,,0,0,1,0 +listener,getFunction,,0,0,1,0 +listener,getOption,,0,0,1,0,,_key,1,,_default,1 +listener,setId,,0,0,1,0,,_id, +listener,setEvent,,0,0,1,0,,_event, +listener,setClass,,0,0,1,0,,_class, +listener,setFunction,,0,0,1,0,,_function, +listener,setOption,,0,0,1,0,,_key,,,_value,1 +listener,getChanged,,0,0,1,0 +listener,setChanged,,0,0,1,0,,_changed, +log,getConfig,,0,0,1,1,,_key,,,_default,1 +log,getLogLevel,,0,0,1,1,,_log, +log,convertLogLevel,,0,0,1,1,,_level,1 +log,add,,0,0,1,1,,_log,,,_type,,,_message,,,_logicalId,1 +log,chunk,,0,0,1,1,,_log,1 +log,chunkLog,,0,0,1,1,,_path, +log,getPathToLog,,0,0,1,1,,_log,1 +log,authorizeClearLog,,0,0,1,1,,_log,,,_subPath,1 +log,clear,,0,0,1,1,,_log, +log,clearAll,,0,0,1,1 +log,remove,,0,0,1,1,,_log, +log,removeAll,,0,0,1,1 +log,get,,0,0,1,1,,_log,,,_begin,,,_nbLines, +log,getDelta,,0,0,1,1,,_log,1,,_position,1,,_search,1,,_colored,1,,_numbered,1,,_numStart,1,,_max,1 +log,getLastLine,,0,0,1,1,,_log, +log,liste,,0,0,1,1,,_filtre,1 +log,define_error_reporting,,0,0,1,1,,log_level, +log,exception,,0,0,1,1,,e, +message,add,,0,0,1,1,,_type,,,_message,,,_action,1,,_logicalId,1,,_writeMessage,1,,_channel,1 +message,removeAll,,0,0,1,1,,_plugin,1,,_logicalId,1,,_search,1 +message,nbMessage,,0,0,1,1 +message,byId,,0,0,1,1,,_id, +message,byPluginLogicalId,,0,0,1,1,,_plugin,,,_logicalId, +message,removeByPluginLogicalId,,0,0,1,1,,_plugin,,,_logicalId, +message,byPlugin,,0,0,1,1,,_plugin, +message,listPlugin,,0,0,1,1 +message,all,,0,0,1,1 +message,save,,0,0,1,0,,_writeMessage,1,,_channel,1 +message,remove,,0,0,1,0 +message,toArray,,0,0,1,0 +message,getId,,0,0,1,0 +message,getDate,,0,0,1,0 +message,getPlugin,,0,0,1,0 +message,getMessage,,0,0,1,0,,display,1 +message,getAction,,0,0,1,0,,display,1 +message,getOccurrences,,0,0,1,0 +message,setId,,0,0,1,0,,_id, +message,setDate,,0,0,1,0,,_date, +message,setPlugin,,0,0,1,0,,_plugin, +message,setMessage,,0,0,1,0,,_message, +message,setAction,,0,0,1,0,,_action, +message,getLogicalId,,0,0,1,0 +message,setLogicalId,,0,0,1,0,,_logicalId, +message,getChanged,,0,0,1,0 +message,setChanged,,0,0,1,0,,_changed, +network,getUserLocation,,0,0,1,1 +network,getClientIp,,0,0,1,1 +network,getNetworkAccess,,0,0,1,1,,_mode,1,,_protocol,1,,_default,1,,_test,1 +network,checkConf,,0,0,1,1,,_mode,1 +network,test,,0,0,1,1,,_mode,1,,_timeout,1 +network,dns_create,,0,0,1,1 +network,dns_start,,0,0,1,1 +network,dns_run,,0,0,1,1 +network,dns_stop,,0,0,1,1 +network,portOpen,,0,0,1,1,,host,,,port, +network,getInterfacesInfo,,0,0,1,1 +network,cron10,,0,0,1,1 +note,byId,,0,0,1,1,,_id, +note,all,,0,0,1,1 +note,preSave,,0,0,1,0 +note,save,,0,0,1,0 +note,remove,,0,0,1,0 +note,searchByString,,0,0,1,1,,_search, +note,getId,,0,0,1,0 +note,getName,,0,0,1,0 +note,getText,,0,0,1,0 +note,setId,,0,0,1,0,,_id, +note,setName,,0,0,1,0,,_name, +note,setText,,0,0,1,0,,_text, +note,getChanged,,0,0,1,0 +note,setChanged,,0,0,1,0,,_changed, +plan,byId,,0,0,1,1,,_id, +plan,byPlanHeaderId,,0,0,1,1,,_planHeader_id, +plan,byLinkTypeLinkId,,0,0,1,1,,_link_type,,,_link_id, +plan,byLinkTypeLinkIdPlanHeaderId,,0,0,1,1,,_link_type,,,_link_id,,,_planHeader_id, +plan,removeByLinkTypeLinkIdPlanHeaderId,,0,0,1,1,,_link_type,,,_link_id,,,_planHeader_id, +plan,all,,0,0,1,1 +plan,searchByDisplay,,0,0,1,1,,_search, +plan,searchByConfiguration,,0,0,1,1,,_search,,,_not,1 +plan,preInsert,,0,0,1,0 +plan,preSave,,0,0,1,0 +plan,refresh,,0,0,1,0 +plan,save,,0,0,1,0 +plan,remove,,0,0,1,0 +plan,copy,,0,0,1,0 +plan,getLink,,0,0,1,0 +plan,execute,,0,0,1,0 +plan,doAction,,0,0,1,0,,_action, +plan,getHtml,,0,0,1,0,,_version,1 +plan,getPlanHeader,,0,0,1,0 +plan,getId,,0,0,1,0 +plan,getLink_type,,0,0,1,0 +plan,getLink_id,,0,0,1,0 +plan,getPosition,,0,0,1,0,,_key,1,,_default,1 +plan,getDisplay,,0,0,1,0,,_key,1,,_default,1 +plan,getCss,,0,0,1,0,,_key,1,,_default,1 +plan,setId,,0,0,1,0,,_id, +plan,setLink_type,,0,0,1,0,,_link_type, +plan,setLink_id,,0,0,1,0,,_link_id, +plan,setPosition,,0,0,1,0,,_key,,,_value, +plan,setDisplay,,0,0,1,0,,_key,,,_value, +plan,setCss,,0,0,1,0,,_key,,,_value, +plan,getPlanHeader_id,,0,0,1,0 +plan,setPlanHeader_id,,0,0,1,0,,_planHeader_id, +plan,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +plan,setConfiguration,,0,0,1,0,,_key,,,_value, +plan,getChanged,,0,0,1,0 +plan,setChanged,,0,0,1,0,,_changed, +plan3d,byId,,0,0,1,1,,_id, +plan3d,byPlan3dHeaderId,,0,0,1,1,,_plan3dHeader_id, +plan3d,byLinkTypeLinkId,,0,0,1,1,,_link_type,,,_link_id, +plan3d,byName3dHeaderId,,0,0,1,1,,_name,,,_plan3dHeader_id, +plan3d,byLinkTypeLinkId3dHeaderId,,0,0,1,1,,_link_type,,,_link_id,,,_plan3dHeader_id, +plan3d,removeByLinkTypeLinkId3dHeaderId,,0,0,1,1,,_link_type,,,_link_id,,,_plan3dHeader_id, +plan3d,all,,0,0,1,1 +plan3d,searchByDisplay,,0,0,1,1,,_search, +plan3d,searchByConfiguration,,0,0,1,1,,_search,,,_not,1 +plan3d,refresh,,0,0,1,0 +plan3d,preInsert,,0,0,1,0 +plan3d,preSave,,0,0,1,0 +plan3d,save,,0,0,1,0 +plan3d,remove,,0,0,1,0 +plan3d,getLink,,0,0,1,0 +plan3d,getHtml,,0,0,1,0,,_version,1 +plan3d,additionalData,,0,0,1,0 +plan3d,getPlan3dHeader,,0,0,1,0 +plan3d,getId,,0,0,1,0 +plan3d,getName,,0,0,1,0 +plan3d,getLink_type,,0,0,1,0 +plan3d,getLink_id,,0,0,1,0 +plan3d,getPosition,,0,0,1,0,,_key,1,,_default,1 +plan3d,getDisplay,,0,0,1,0,,_key,1,,_default,1 +plan3d,getCss,,0,0,1,0,,_key,1,,_default,1 +plan3d,setId,,0,0,1,0,,_id, +plan3d,setName,,0,0,1,0,,_name, +plan3d,setLink_type,,0,0,1,0,,_link_type, +plan3d,setLink_id,,0,0,1,0,,_link_id, +plan3d,setPosition,,0,0,1,0,,_key,,,_value, +plan3d,setDisplay,,0,0,1,0,,_key,,,_value, +plan3d,setCss,,0,0,1,0,,_key,,,_value, +plan3d,getPlan3dHeader_id,,0,0,1,0 +plan3d,setPlan3dHeader_id,,0,0,1,0,,_plan3dHeader_id, +plan3d,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +plan3d,setConfiguration,,0,0,1,0,,_key,,,_value, +plan3d,getChanged,,0,0,1,0 +plan3d,setChanged,,0,0,1,0,,_changed, +plan3dHeader,byId,,0,0,1,1,,_id, +plan3dHeader,all,,0,0,1,1 +plan3dHeader,searchByUse,,0,0,1,1,,_type,,,_id, +plan3dHeader,refresh,,0,0,1,0 +plan3dHeader,preSave,,0,0,1,0 +plan3dHeader,save,,0,0,1,0 +plan3dHeader,remove,,0,0,1,0 +plan3dHeader,getPlan3d,,0,0,1,0 +plan3dHeader,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +plan3dHeader,hasRight,,0,0,1,0,,_right,,,_user,1 +plan3dHeader,getId,,0,0,1,0 +plan3dHeader,getName,,0,0,1,0 +plan3dHeader,getOrder,,0,0,1,0 +plan3dHeader,setId,,0,0,1,0,,_id, +plan3dHeader,setName,,0,0,1,0,,_name, +plan3dHeader,setOrder,,0,0,1,0,,_order, +plan3dHeader,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +plan3dHeader,setConfiguration,,0,0,1,0,,_key,,,_value, +plan3dHeader,getChanged,,0,0,1,0 +plan3dHeader,setChanged,,0,0,1,0,,_changed, +planHeader,byId,,0,0,1,1,,_id, +planHeader,all,,0,0,1,1 +planHeader,searchByUse,,0,0,1,1,,_type,,,_id, +planHeader,report,,0,0,1,0,,_format,1,,_parameters,1 +planHeader,copy,,0,0,1,0,,_name, +planHeader,preSave,,0,0,1,0 +planHeader,refresh,,0,0,1,0 +planHeader,save,,0,0,1,0 +planHeader,remove,,0,0,1,0 +planHeader,displayImage,,0,0,1,0 +planHeader,getPlan,,0,0,1,0 +planHeader,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +planHeader,hasRight,,0,0,1,0,,_right,,,_user,1 +planHeader,getId,,0,0,1,0 +planHeader,getName,,0,0,1,0 +planHeader,getOrder,,0,0,1,0 +planHeader,setId,,0,0,1,0,,_id, +planHeader,setName,,0,0,1,0,,_name, +planHeader,setOrder,,0,0,1,0,,_order, +planHeader,getImage,,0,0,1,0,,_key,1,,_default,1 +planHeader,setImage,,0,0,1,0,,_key,,,_value, +planHeader,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +planHeader,setConfiguration,,0,0,1,0,,_key,,,_value, +planHeader,getChanged,,0,0,1,0 +planHeader,setChanged,,0,0,1,0,,_changed, +plugin,byId,,0,0,1,1,,_id,,,_full,1 +plugin,forceDisablePlugin,,0,0,1,1,,_id, +plugin,getPluginPath,,0,0,1,1,,_pluginId, +plugin,getPathById,,0,0,1,1,,_id, +plugin,getPathToConfigurationById,,0,0,1,0 +plugin,listPlugin,,0,0,1,1,,_activateOnly,1,,_orderByCategory,1,,_translate,1,,_nameOnly,1 +plugin,getTranslation,,0,0,1,1,,_plugin,,,_language, +plugin,orderPlugin,,0,0,1,1,,a,,,b, +plugin,heartbeat,,0,0,1,1 +plugin,cron,,0,0,1,1 +plugin,cron5,,0,0,1,1 +plugin,cron10,,0,0,1,1 +plugin,cron15,,0,0,1,1 +plugin,cron30,,0,0,1,1 +plugin,cronDaily,,0,0,1,1 +plugin,cronHourly,,0,0,1,1 +plugin,start,,0,0,1,1 +plugin,stop,,0,0,1,1 +plugin,checkDeamon,,0,0,1,1 +plugin,report,,0,0,1,0,,_format,1,,_parameters,1 +plugin,isActive,,0,0,1,0 +plugin,callInstallFunction,,0,0,1,0,,_function,,,_direct,1 +plugin,dependancy_info,,0,0,1,0,,_refresh,1 +plugin,dependancy_install,,0,0,1,0,,_force,1,,_foreground,1 +plugin,dependancy_changeAutoMode,,0,0,1,0,,_mode, +plugin,deamon_changeAutoMode,,0,0,1,0,,_mode, +plugin,deamon_info,,0,0,1,0 +plugin,deamon_start,,0,0,1,0,,_forceRestart,1,,_auto,1 +plugin,deamon_stop,,0,0,1,0 +plugin,setIsEnable,,0,0,1,0,,_state,,,_force,1,,_foreground,1 +plugin,launch,,0,0,1,0,,_function,,,_callInstallFunction,1 +plugin,getUpdate,,0,0,1,0 +plugin,getPathImgIcon,,0,0,1,0 +plugin,getLogList,,0,0,1,0 +plugin,getLinkToConfiguration,,0,0,1,0 +plugin,getConfigForCommunity,,0,0,1,1,,_separator,1 +plugin,getId,,0,0,1,0 +plugin,getName,,0,0,1,0 +plugin,getDescription,,0,0,1,0 +plugin,getSpecialAttributes,,0,0,1,0 +plugin,getInfo,,0,0,1,0,,_name,1,,_default,1 +plugin,getAuthor,,0,0,1,0 +plugin,getRequire,,0,0,1,0 +plugin,getRequireOsVersion,,0,0,1,0 +plugin,getCategory,,0,0,1,0 +plugin,getLicense,,0,0,1,0 +plugin,getFilepath,,0,0,1,0 +plugin,getInstallation,,0,0,1,0 +plugin,getIndex,,0,0,1,0 +plugin,getInclude,,0,0,1,0 +plugin,getDisplay,,0,0,1,0 +plugin,setDisplay,,0,0,1,0,,display, +plugin,getMobile,,0,0,1,0 +plugin,setMobile,,0,0,1,0,,mobile, +plugin,getEventjs,,0,0,1,0 +plugin,setEventjs,,0,0,1,0,,eventjs, +plugin,getHasDependency,,0,0,1,0 +plugin,setHasDependency,,0,0,1,0,,hasDependency, +plugin,getHasOwnDeamon,,0,0,1,0 +plugin,setHasOwnDeamony,,0,0,1,0,,hasOwnDeamon, +plugin,getHasTtsEngine,,0,0,1,0 +plugin,setHasTtsEngine,,0,0,1,0,,hasTtsEngine, +plugin,getMaxDependancyInstallTime,,0,0,1,0 +plugin,setMaxDependancyInstallTime,,0,0,1,0,,maxDependancyInstallTime, +plugin,getIssue,,0,0,1,0 +plugin,setIssue,,0,0,1,0,,issue, +plugin,getChangelog,,0,0,1,0 +plugin,setChangelog,,0,0,1,0,,changelog, +plugin,getDocumentation,,0,0,1,0 +plugin,setDocumentation,,0,0,1,0,,documentation, +plugin,getChangelog_beta,,0,0,1,0 +plugin,setChangelog_beta,,0,0,1,0,,changelog_beta, +plugin,getDocumentation_beta,,0,0,1,0 +plugin,setDocumentation_beta,,0,0,1,0,,documentation_beta, +plugin,getSource,,0,0,1,0 +plugin,getWhiteListFolders,,0,0,1,0 +plugin,setWhiteListFolders,,0,0,1,0,,paths, +plugin,getCache,,0,0,1,0,,_key,1,,_default,1 +plugin,setCache,,0,0,1,0,,_key,,,_value,1,,_lifetime,1 +queue,all,,0,0,1,1 +queue,byId,,0,0,1,1,,_id, +queue,allQueueId,,0,0,1,1 +queue,byQueueId,,0,0,1,1,,_queueId, +queue,firstByQueueId,,0,0,1,1,,_queueId, +queue,cron,,0,0,1,1 +queue,canRun,,0,0,1,0 +queue,run,,0,0,1,0,,_noErrorReport,1 +queue,start,,0,0,1,0 +queue,refresh,,0,0,1,0 +queue,stop,,0,0,1,0 +queue,halt,,0,0,1,0 +queue,running,,0,0,1,0 +queue,preSave,,0,0,1,0 +queue,save,,0,0,1,0,,_direct,1 +queue,remove,,0,0,1,0,,halt_before,1 +queue,getHumanName,,0,0,1,0 +queue,toArray,,0,0,1,0 +queue,getId,,0,0,1,0 +queue,setId,,0,0,1,0,,_id, +queue,getQueueId,,0,0,1,0 +queue,setQueueId,,0,0,1,0,,_queueId, +queue,getClass,,0,0,1,0 +queue,setClass,,0,0,1,0,,_class, +queue,getFunction,,0,0,1,0 +queue,setFunction,,0,0,1,0,,_function, +queue,getCreateTime,,0,0,1,0 +queue,setCreateTime,,0,0,1,0,,_createTime, +queue,getArguments,,0,0,1,0 +queue,setArguments,,0,0,1,0,,_arguments, +queue,getOptions,,0,0,1,0,,_key,1,,_default,1 +queue,setOptions,,0,0,1,0,,_options, +queue,getTimeout,,0,0,1,0 +queue,setTimeout,,0,0,1,0,,_timeout, +queue,getPID,,0,0,1,0,,_default,1 +queue,getLastRun,,0,0,1,0 +queue,getState,,0,0,1,0 +queue,setLastRun,,0,0,1,0,,_lastRun, +queue,setState,,0,0,1,0,,state, +queue,setPID,,0,0,1,0,,pid,1 +queue,getCache,,0,0,1,0,,_key,1,,_default,1 +queue,setCache,,0,0,1,0,,_key,,,_value,1 +report,clean,,0,0,1,1 +report,generate,,0,0,1,1,,_url,,,_type,,,_name,,,_format,1,,_parameter,1 +scenario,byId,,0,0,1,1,,_id, +scenario,byString,,0,0,1,1,,_string, +scenario,all,,0,0,1,1,,_group,1 +scenario,allOrderedByGroupObjectName,,0,0,1,1,,_asGroup,1 +scenario,schedule,,0,0,1,1 +scenario,listGroup,,0,0,1,1,,_group,1 +scenario,byTrigger,,0,0,1,1,,_cmd_id,,,_onlyEnable,1 +scenario,byGenericTrigger,,0,0,1,1,,_generic,,,_object,,,_onlyEnable,1 +scenario,byElement,,0,0,1,1,,_element_id, +scenario,byObjectId,,0,0,1,1,,_object_id,,,_onlyEnable,1,,_onlyVisible,1 +scenario,check,,0,0,1,1,,_event,1,,_forceSyncMode,1,,_generic,1,,_object,1,,_value,1,,_options,1 +scenario,control,,0,0,1,1 +scenario,doIn,,0,0,1,1,,_options, +scenario,cleanTable,,0,0,1,1 +scenario,consystencyCheck,,0,0,1,1,,_needsReturn,1 +scenario,byObjectNameGroupNameScenarioName,,0,0,1,1,,_object_name,,,_group_name,,,_scenario_name, +scenario,toHumanReadable,,0,0,1,1,,_input, +scenario,fromHumanReadable,,0,0,1,1,,_input, +scenario,searchByUse,,0,0,1,1,,searchs, +scenario,searchByTrigger,,0,0,1,1,,_search,,,_options,1,,_and,1 +scenario,getTemplate,,0,0,1,1 +scenario,testTrigger,,0,0,1,0,,_event, +scenario,launch,,0,0,1,0,,_forceSyncMode,1 +scenario,execute,,0,0,1,0,,instance_id,1 +scenario,copy,,0,0,1,0,,_name, +scenario,toHtml,,0,0,1,0,,_version, +scenario,emptyCacheWidget,,0,0,1,0 +scenario,getIcon,,0,0,1,0,,_only_class,1 +scenario,getLinkToConfiguration,,0,0,1,0 +scenario,preSave,,0,0,1,0 +scenario,postInsert,,0,0,1,0 +scenario,save,,0,0,1,0 +scenario,refresh,,0,0,1,0 +scenario,remove,,0,0,1,0 +scenario,removeData,,0,0,1,0,,_key,,,_private,1 +scenario,setData,,0,0,1,0,,_key,,,_value,,,_private,1 +scenario,getData,,0,0,1,0,,_key,,,_private,1,,_default,1 +scenario,calculateScheduleDate,,0,0,1,0 +scenario,isDue,,0,0,1,0,,_datetime,1 +scenario,running,,0,0,1,0 +scenario,stop,,0,0,1,0 +scenario,getElement,,0,0,1,0 +scenario,export,,0,0,1,0,,_mode,1 +scenario,getObject,,0,0,1,0 +scenario,getHumanName,,0,0,1,0,,_complete,1,,_noGroup,1,,_tag,1,,_prettify,1,,_withoutScenarioName,1,,_object_name,1 +scenario,hasRight,,0,0,1,0,,_right,,,_user,1 +scenario,persistLog,,0,0,1,0,,_partial,1 +scenario,toArray,,0,0,1,0 +scenario,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +scenario,getUse,,0,0,1,0 +scenario,getUsedBy,,0,0,1,0,,_array,1 +scenario,clearLog,,0,0,1,0 +scenario,resetRepeatIfStatus,,0,0,1,0 +scenario,addTag,,0,0,1,0,,_key,,,value, +scenario,getTag,,0,0,1,0,,_key,,,_default,1 +scenario,getId,,0,0,1,0 +scenario,getName,,0,0,1,0 +scenario,getState,,0,0,1,0 +scenario,getIsActive,,0,0,1,0 +scenario,getGroup,,0,0,1,0 +scenario,getLastLaunch,,0,0,1,0 +scenario,setId,,0,0,1,0,,_id, +scenario,setName,,0,0,1,0,,_name, +scenario,setIsActive,,0,0,1,0,,_isActive, +scenario,setGroup,,0,0,1,0,,_group, +scenario,setState,,0,0,1,0,,state, +scenario,setLastLaunch,,0,0,1,0,,lastLaunch, +scenario,getMode,,0,0,1,0 +scenario,setMode,,0,0,1,0,,_mode, +scenario,getOrder,,0,0,1,0 +scenario,setOrder,,0,0,1,0,,_order, +scenario,getSchedule,,0,0,1,0 +scenario,setSchedule,,0,0,1,0,,_schedule, +scenario,getPID,,0,0,1,0 +scenario,setPID,,0,0,1,0,,pid,1 +scenario,getScenarioElement,,0,0,1,0 +scenario,setScenarioElement,,0,0,1,0,,_scenarioElement, +scenario,getTrigger,,0,0,1,0 +scenario,setTrigger,,0,0,1,0,,_trigger, +scenario,getLog,,0,0,1,0 +scenario,setLog,,0,0,1,0,,log, +scenario,getTimeout,,0,0,1,0,,_default,1 +scenario,setTimeout,,0,0,1,0,,_timeout, +scenario,getObject_id,,0,0,1,0,,_default,1 +scenario,getIsVisible,,0,0,1,0,,_default,1 +scenario,setObject_id,,0,0,1,0,,object_id,1 +scenario,setIsVisible,,0,0,1,0,,_isVisible, +scenario,getDisplay,,0,0,1,0,,_key,1,,_default,1 +scenario,setDisplay,,0,0,1,0,,_key,,,_value, +scenario,getDescription,,0,0,1,0 +scenario,setDescription,,0,0,1,0,,_description, +scenario,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +scenario,setConfiguration,,0,0,1,0,,_key,,,_value, +scenario,getReturn,,0,0,1,0 +scenario,setReturn,,0,0,1,0,,_return, +scenario,getTags,,0,0,1,0 +scenario,setTags,,0,0,1,0,,_tags, +scenario,getDo,,0,0,1,0 +scenario,setDo,,0,0,1,0,,_do, +scenario,getCache,,0,0,1,0,,_key,1,,_default,1 +scenario,setCache,,0,0,1,0,,_key,,,_value,1 +scenario,getChanged,,0,0,1,0 +scenario,setChanged,,0,0,1,0,,_changed, +scenarioElement,byId,,0,0,1,1,,_id, +scenarioElement,saveAjaxElement,,0,0,1,1,,element_ajax, +scenarioElement,refresh,void,0,0,1,0 +scenarioElement,save,bool,0,0,1,0 +scenarioElement,remove,void,0,0,1,0 +scenarioElement,execute,,0,0,1,0,,_scenario,1 +scenarioElement,getSubElement,,0,0,1,0,,_type,1 +scenarioElement,getAjaxElement,,0,0,1,0,,_mode,1 +scenarioElement,getAllId,,0,0,1,0 +scenarioElement,resetRepeatIfStatus,,0,0,1,0 +scenarioElement,export,,0,0,1,0 +scenarioElement,copy,,0,0,1,0 +scenarioElement,getScenario,,0,0,1,0 +scenarioElement,getId,,0,0,1,0 +scenarioElement,setId,,0,0,1,0,,_id, +scenarioElement,getName,,0,0,1,0 +scenarioElement,setName,,0,0,1,0,,_name, +scenarioElement,getType,,0,0,1,0 +scenarioElement,setType,,0,0,1,0,,_type, +scenarioElement,getOptions,,0,0,1,0,,_key,1,,_default,1 +scenarioElement,setOptions,,0,0,1,0,,_key,,,_value, +scenarioElement,getOrder,,0,0,1,0 +scenarioElement,setOrder,,0,0,1,0,,_order, +scenarioElement,getChanged,,0,0,1,0 +scenarioElement,setChanged,,0,0,1,0,,_changed, +scenarioExpression,byId,,0,0,1,1,,_id, +scenarioExpression,all,,0,0,1,1 +scenarioExpression,byscenarioSubElementId,,0,0,1,1,,_scenarioSubElementId, +scenarioExpression,searchExpression,,0,0,1,1,,_expression,,,_options,1,,_and,1 +scenarioExpression,byElement,,0,0,1,1,,_element_id, +scenarioExpression,getExpressionOptions,,0,0,1,1,,_expression,,,_options, +scenarioExpression,humanAction,,0,0,1,1,,_action, +scenarioExpression,sun,,0,0,1,1,,_name, +scenarioExpression,getDatesFromPeriod,,0,0,1,1,,_period,1 +scenarioExpression,randText,,0,0,1,1,,_sValue, +scenarioExpression,scenario,,0,0,1,1,,_scenario, +scenarioExpression,eqEnable,,0,0,1,1,,_eqLogic_id, +scenarioExpression,average,,0,0,1,1,,_cmd_id,,,_period,1,,_round,1 +scenarioExpression,averageBetween,,0,0,1,1,,_cmd_id,,,_startDate,,,_endDate,,,_round,1 +scenarioExpression,averageTemporal,,0,0,1,1,,_cmd_id,,,_period,1,,_round,1 +scenarioExpression,averageTemporalBetween,,0,0,1,1,,_cmd_id,,,_startDate,,,_endDate,,,_round,1 +scenarioExpression,max,,0,0,1,1,,_cmd_id,,,_period,1,,_round,1 +scenarioExpression,min,,0,0,1,1,,_cmd_id,,,_period,1,,_round,1 +scenarioExpression,color_gradient,,0,0,1,1,,_from_color,,,_to_color,,,_min,,,_max,,,_value, +scenarioExpression,maxBetween,,0,0,1,1,,_cmd_id,,,_startDate,,,_endDate,,,_round,1 +scenarioExpression,wait,,0,0,1,1,,_condition,,,_timeout,1 +scenarioExpression,minBetween,,0,0,1,1,,_cmd_id,,,_startDate,,,_endDate,,,_round,1 +scenarioExpression,median,,0,0,1,1 +scenarioExpression,avg,,0,0,1,1 +scenarioExpression,tendance,,0,0,1,1,,_cmd_id,,,_period,1,,_threshold,1 +scenarioExpression,lastStateDuration,,0,0,1,1,,_cmd_id,,,_value,1 +scenarioExpression,age,,0,0,1,1,,_cmd_id,1 +scenarioExpression,stateChanges,,0,0,1,1,,_cmd_id,,,_value,1,,_period,1 +scenarioExpression,stateChangesBetween,,0,0,1,1,,_cmd_id,,,_value,,,_startDate,,,_endDate,1 +scenarioExpression,duration,,0,0,1,1,,_cmd_id,,,_value,,,_period,1,,_unit,1,,_operator,1 +scenarioExpression,durationBetween,,0,0,1,1,,_cmd_id,,,_value,,,_startDate,,,_endDate,,,_unit,1 +scenarioExpression,lastBetween,,0,0,1,1,,_cmd_id,,,_startDate,,,_endDate, +scenarioExpression,statistics,,0,0,1,1,,_cmd_id,,,_calc,,,_period,1 +scenarioExpression,statisticsBetween,,0,0,1,1,,_cmd_id,,,_calc,,,_startDate,,,_endDate, +scenarioExpression,variable,,0,0,1,1,,_name,,,_default,1 +scenarioExpression,genericType,,0,0,1,1,,_genericType,,,_object,1,,_default,1 +scenarioExpression,stateDuration,,0,0,1,1,,_cmd_id,,,_value,1 +scenarioExpression,lastChangeStateDuration,,0,0,1,1,,_cmd_id,,,_value, +scenarioExpression,odd,,0,0,1,1,,_value, +scenarioExpression,lastScenarioExecution,,0,0,1,1,,_scenario_id, +scenarioExpression,collectDate,,0,0,1,1,,_cmd_id,,,_format,1 +scenarioExpression,valueDate,,0,0,1,1,,_cmd_id,,,_format,1 +scenarioExpression,lastCommunication,,0,0,1,1,,_eqLogic_id,,,_format,1 +scenarioExpression,value,,0,0,1,1,,_cmd_id, +scenarioExpression,randomColor,,0,0,1,1,,_rangeLower,,,_rangeHighter, +scenarioExpression,triggerChange,,0,0,1,1,,_during,,,_scenario,1 +scenarioExpression,triggerId,,0,0,1,1,,_scenario,1 +scenarioExpression,trigger,,0,0,1,1,,_name,1,,_scenario,1 +scenarioExpression,triggerValue,,0,0,1,1,,_scenario,1 +scenarioExpression,round,,0,0,1,1,,_value,,,_decimal,1 +scenarioExpression,time_op,,0,0,1,1,,_time,,,_value,1 +scenarioExpression,time_between,,0,0,1,1,,_time,,,_start,,,_end, +scenarioExpression,time_diff,,0,0,1,1,,_date1,,,_date2,,,_format,1,,_rnd,1 +scenarioExpression,time,,0,0,1,1,,_value, +scenarioExpression,formatTime,,0,0,1,1,,_time, +scenarioExpression,name,,0,0,1,1,,_type,,,_cmd_id, +scenarioExpression,getRequestTags,,0,0,1,1,,_expression, +scenarioExpression,tag,,0,0,1,1,,_scenario,,,_name,,,_default,1 +scenarioExpression,setTags,,0,0,1,1,,_expression,,,_scenario,1,,_quote,1,,_nbCall,1 +scenarioExpression,createAndExec,,0,0,1,1,,_type,,,_cmd,,,_options,1 +scenarioExpression,checkBackground,,0,0,1,0 +scenarioExpression,execute,,0,0,1,0,,scenario,1 +scenarioExpression,refresh,,0,0,1,0 +scenarioExpression,save,,0,0,1,0 +scenarioExpression,remove,,0,0,1,0 +scenarioExpression,getAllId,,0,0,1,0 +scenarioExpression,copy,,0,0,1,0,,_scenarioSubElement_id, +scenarioExpression,emptyOptions,,0,0,1,0 +scenarioExpression,resetRepeatIfStatus,,0,0,1,0 +scenarioExpression,export,,0,0,1,0 +scenarioExpression,getId,,0,0,1,0 +scenarioExpression,setId,,0,0,1,0,,_id, +scenarioExpression,getType,,0,0,1,0 +scenarioExpression,setType,,0,0,1,0,,_type, +scenarioExpression,getScenarioSubElement_id,,0,0,1,0 +scenarioExpression,getSubElement,,0,0,1,0 +scenarioExpression,setScenarioSubElement_id,,0,0,1,0,,_scenarioSubElement_id, +scenarioExpression,getSubtype,,0,0,1,0 +scenarioExpression,setSubtype,,0,0,1,0,,_subtype, +scenarioExpression,getExpression,,0,0,1,0 +scenarioExpression,setExpression,,0,0,1,0,,_expression, +scenarioExpression,getOptions,,0,0,1,0,,_key,1,,_default,1 +scenarioExpression,setOptions,,0,0,1,0,,_key,,,_value, +scenarioExpression,getOrder,,0,0,1,0 +scenarioExpression,setOrder,,0,0,1,0,,_order, +scenarioExpression,setLog,,0,0,1,0,,_scenario,,,log, +scenarioExpression,getChanged,,0,0,1,0 +scenarioExpression,setChanged,,0,0,1,0,,_changed, +scenarioSubElement,byId,,0,0,1,1,,_id, +scenarioSubElement,byScenarioElementId,,0,0,1,1,,_scenarioElementId,,,_type,1 +scenarioSubElement,execute,,0,0,1,0,,_scenario,1 +scenarioSubElement,refresh,,0,0,1,0 +scenarioSubElement,save,,0,0,1,0 +scenarioSubElement,remove,,0,0,1,0 +scenarioSubElement,getExpression,,0,0,1,0 +scenarioSubElement,getAllId,,0,0,1,0 +scenarioSubElement,copy,,0,0,1,0,,_scenarioElement_id, +scenarioSubElement,getId,,0,0,1,0 +scenarioSubElement,setId,,0,0,1,0,,_id, +scenarioSubElement,getName,,0,0,1,0 +scenarioSubElement,setName,,0,0,1,0,,_name, +scenarioSubElement,getType,,0,0,1,0 +scenarioSubElement,setType,,0,0,1,0,,_type, +scenarioSubElement,getScenarioElement_id,,0,0,1,0 +scenarioSubElement,getElement,,0,0,1,0 +scenarioSubElement,setScenarioElement_id,,0,0,1,0,,_scenarioElement_id, +scenarioSubElement,getOptions,,0,0,1,0,,_key,1,,_default,1 +scenarioSubElement,setOptions,,0,0,1,0,,_key,,,_value, +scenarioSubElement,getOrder,,0,0,1,0 +scenarioSubElement,setOrder,,0,0,1,0,,_order, +scenarioSubElement,getSubtype,,0,0,1,0 +scenarioSubElement,setSubtype,,0,0,1,0,,_subtype, +scenarioSubElement,getChanged,,0,0,1,0 +scenarioSubElement,setChanged,,0,0,1,0,,_changed, +system,loadCommand,,0,0,1,1 +system,getDistrib,,0,0,1,1 +system,get,,0,0,1,1,,_key,1 +system,getCmdSudo,string,0,0,1,1 +system,fuserk,void,0,0,1,1,,_port,,,_protocol,1 +system,ps,,0,0,1,1,,_find,,,_without,1 +system,kill,,0,0,1,1,,_find,1,,_kill9,1 +system,php,,0,0,1,1,,arguments,,,_sudo,1 +system,getArch,string,0,0,1,1 +system,getUpgradablePackage,,0,0,1,1,,_type,,,_forceRefresh,1 +system,upgradePackage,,0,0,1,1,,_type,,,_package,1 +system,getCmdPython3,,0,0,1,1,,_plugin, +system,getInstallPackage,,0,0,1,1,,_type,,,_plugin, +system,os_incompatible,bool,0,0,1,1,,_type,,,_package,,,_info, +system,checkAndInstall,,0,0,1,1,,_packages,,,_fix,1,,_foreground,1,,_plugin,1,,_force,1 +system,installPackageInProgress,bool,0,0,1,1,,_plugin,1 +system,launchScriptPackage,,0,0,1,1,,_plugin,1,,_force,1 +system,installPackage,,0,0,1,1,,_type,,,_package,,,_version,1,,_plugin,1 +system,checkHasExec,,0,0,1,1,,_exec, +system,getOsVersion,,0,0,1,1 +system,checkInstallationLog,string,0,0,1,1,,_plugin,1 +timeline,all,,0,0,1,1 +timeline,byDateRange,,0,0,1,1,,_startTime,,,_endTime,1 +timeline,getLength,,0,0,1,1,,_folder,1 +timeline,byFolder,,0,0,1,1,,_folder,1,,_start,1,,_offset,1 +timeline,byId,,0,0,1,1,,_id, +timeline,clean,,0,0,1,1,,_all,1 +timeline,listFolder,,0,0,1,1 +timeline,removeEventInFutur,,0,0,1,1 +timeline,preSave,,0,0,1,0 +timeline,save,,0,0,1,0 +timeline,remove,,0,0,1,0 +timeline,hasRight,,0,0,1,0,,_user,1 +timeline,getDisplay,,0,0,1,0 +timeline,getId,,0,0,1,0 +timeline,getName,,0,0,1,0 +timeline,getLink_id,,0,0,1,0 +timeline,getType,,0,0,1,0 +timeline,getFolder,,0,0,1,0 +timeline,getSubtype,,0,0,1,0 +timeline,getDatetime,,0,0,1,0 +timeline,getOptions,,0,0,1,0,,_key,1,,_default,1 +timeline,setId,,0,0,1,0,,_id,1 +timeline,setName,,0,0,1,0,,_name, +timeline,setType,,0,0,1,0,,_type, +timeline,setFolder,,0,0,1,0,,_folder, +timeline,setSubtype,,0,0,1,0,,_subtype, +timeline,setDatetime,,0,0,1,0,,_datetime, +timeline,setOptions,,0,0,1,0,,_key,,,_value,1 +timeline,setLink_id,,0,0,1,0,,_link_id,1 +translate,getConfig,,0,0,1,1,,_key,,,_default,1 +translate,getTranslation,,0,0,1,1,,_plugin, +translate,getWidgetTranslation,,0,0,1,1,,_widget, +translate,sentence,,0,0,1,1,,_content,,,_name,,,_backslash,1 +translate,getPluginFromName,,0,0,1,1,,_name, +translate,exec,,0,0,1,1,,_content,,,_name,1,,_backslash,1 +translate,getPathTranslationFile,,0,0,1,1,,_language, +translate,getWidgetPathTranslationFile,,0,0,1,1,,_widgetName, +translate,loadTranslation,,0,0,1,1,,_plugin,1 +translate,getLanguage,,0,0,1,1 +translate,setLanguage,,0,0,1,1,,_langage, +update,checkAllUpdate,,0,0,1,1,,_filter,1,,_findNewObject,1 +update,listRepo,,0,0,1,1 +update,repoById,,0,0,1,1,,_id, +update,updateAll,,0,0,1,1,,_filter,1 +update,byId,,0,0,1,1,,_id, +update,byStatus,,0,0,1,1,,_status, +update,byLogicalId,,0,0,1,1,,_logicalId, +update,byType,,0,0,1,1,,_type, +update,byTypeAndLogicalId,,0,0,1,1,,_type,,,_logicalId, +update,all,,0,0,1,1,,_filter,1 +update,nbNeedUpdate,,0,0,1,1 +update,findNewUpdateObject,,0,0,1,1 +update,listCoreUpdate,,0,0,1,1 +update,getInfo,,0,0,1,0 +update,doUpdate,,0,0,1,0 +update,deleteObjet,,0,0,1,0 +update,preInstallUpdate,,0,0,1,0 +update,postInstallUpdate,,0,0,1,0,,_infos, +update,getLastAvailableVersion,,0,0,1,1 +update,checkUpdate,,0,0,1,0 +update,preSave,,0,0,1,0 +update,save,,0,0,1,0 +update,postSave,,0,0,1,0 +update,remove,,0,0,1,0 +update,postRemove,,0,0,1,0 +update,refresh,,0,0,1,0 +update,getId,,0,0,1,0 +update,getName,,0,0,1,0 +update,getStatus,,0,0,1,0 +update,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +update,setId,,0,0,1,0,,_id, +update,setName,,0,0,1,0,,_name, +update,setStatus,,0,0,1,0,,_status, +update,setConfiguration,,0,0,1,0,,_key,,,_value, +update,getType,,0,0,1,0 +update,setType,,0,0,1,0,,_type, +update,getLocalVersion,,0,0,1,0 +update,getRemoteVersion,,0,0,1,0 +update,setLocalVersion,,0,0,1,0,,_localVersion, +update,setRemoteVersion,,0,0,1,0,,_remoteVersion, +update,getLogicalId,,0,0,1,0 +update,setLogicalId,,0,0,1,0,,_logicalId, +update,getSource,,0,0,1,0 +update,setSource,,0,0,1,0,,_source, +update,getUpdateDate,,0,0,1,0 +update,setUpdateDate,,0,0,1,0,,_updateDate, +update,getChanged,,0,0,1,0 +update,setChanged,,0,0,1,0,,_changed, +user,byId,,0,0,1,1,,_id, +user,connect,,0,0,1,1,string,_login,,string,_mdp, +user,connectToLDAP,,0,0,1,1 +user,byLogin,,0,0,1,1,,_login, +user,byHash,,0,0,1,1,,_hash, +user,byLoginAndHash,,0,0,1,1,,_login,,,_hash, +user,byLoginAndPassword,,0,0,1,1,string,_login,,string,_password, +user,all,,0,0,1,1 +user,searchByRight,,0,0,1,1,string,_rights, +user,searchByOptions,,0,0,1,1,,_search, +user,byProfils,,0,0,1,1,,_profils,,,_enable,1 +user,byEnable,,0,0,1,1,,_enable, +user,failedLogin,void,0,0,1,1 +user,removeBanIp,void,0,0,1,1 +user,isBan,bool,0,0,1,1 +user,getAccessKeyForReport,string,0,0,1,1 +user,supportAccess,,0,0,1,1,,_enable,1 +user,deadCmd,,0,0,1,1 +user,regenerateHash,,0,0,1,1 +user,preInsert,void,0,0,1,0 +user,preSave,void,0,0,1,0 +user,encrypt,void,0,0,1,0 +user,decrypt,void,0,0,1,0 +user,save,,0,0,1,0 +user,preRemove,void,0,0,1,0 +user,remove,,0,0,1,0 +user,refresh,void,0,0,1,0 +user,is_Connected,bool,0,0,1,0 +user,validateTwoFactorCode,,0,0,1,0,,_code, +user,getId,,0,0,1,0 +user,getLogin,,0,0,1,0 +user,getPassword,,0,0,1,0 +user,setId,self,0,0,1,0,,_id, +user,setLogin,self,0,0,1,0,,_login, +user,setPassword,self,0,0,1,0,string,_password, +user,getOptions,,0,0,1,0,,_key,1,,_default,1 +user,setOptions,,0,0,1,0,,_key,,,_value, +user,getRights,,0,0,1,0,,_key,1,,_default,1 +user,setRights,self,0,0,1,0,,_key,,,_value, +user,getEnable,,0,0,1,0 +user,setEnable,self,0,0,1,0,,_enable, +user,getHash,,0,0,1,0 +user,setHash,,0,0,1,0,,_hash, +user,getProfils,,0,0,1,0 +user,setProfils,self,0,0,1,0,,_profils, +user,getChanged,,0,0,1,0 +user,setChanged,self,0,0,1,0,,_changed, +utils,attrChanged,,0,0,1,1,,_changed,,,_old,,,_new, +utils,o2a,,0,0,1,1,,_object,,,_noToArray,1 +utils,a2o,,0,0,1,1,,_object,,,_data, +utils,processJsonObject,,0,0,1,1,,_class,,,_ajaxList,,,_dbList,1,,_remove,1 +utils,setJsonAttr,,0,0,1,1,,_attr,,,_key,,,_value,1 +utils,getJsonAttr,,0,0,1,1,,_attr,,,_key,1,,_default,1 +utils,getEncryptionPassword,,0,0,1,1 +utils,encrypt,,0,0,1,1,,plaintext,,,password,1 +utils,decrypt,,0,0,1,1,,ciphertext,,,password,1 +utils,executeAsync,,0,0,1,1,,class,,,method,,,options,1,,datetime,1 +view,all,,0,0,1,1 +view,byId,,0,0,1,1,,_id, +view,searchByUse,,0,0,1,1,,_type,,,_id, +view,copy,,0,0,1,0,,_name, +view,report,,0,0,1,0,,_format,1,,_parameters,1 +view,presave,,0,0,1,0 +view,refresh,void,0,0,1,0 +view,save,,0,0,1,0 +view,remove,,0,0,1,0 +view,getviewZone,,0,0,1,0 +view,removeviewZone,,0,0,1,0 +view,getImgLink,,0,0,1,0 +view,toArray,,0,0,1,0 +view,toAjax,,0,0,1,0,,_version,1,,_html,1 +view,getLinkData,,0,0,1,0,,_data,1,,_level,1,,_drill,1 +view,hasRight,bool,0,0,1,0,,_right,,,_user,1 +view,getId,,0,0,1,0 +view,setId,,0,0,1,0,,_id, +view,getName,,0,0,1,0 +view,setName,,0,0,1,0,,_name, +view,getOrder,,0,0,1,0,,_default,1 +view,setOrder,,0,0,1,0,,_order, +view,getDisplay,,0,0,1,0,,_key,1,,_default,1 +view,setDisplay,,0,0,1,0,,_key,,,_value, +view,getImage,,0,0,1,0,,_key,1,,_default,1 +view,setImage,,0,0,1,0,,_key,,,_value, +view,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +view,setConfiguration,,0,0,1,0,,_key,,,_value, +view,getChanged,,0,0,1,0 +view,setChanged,,0,0,1,0,,_changed, +viewData,all,,0,0,1,1 +viewData,byId,,0,0,1,1,,_id, +viewData,byTypeLinkId,,0,0,1,1,,_type,,,_link_id, +viewData,byviewZoneId,,0,0,1,1,,_viewZone_id, +viewData,searchByConfiguration,,0,0,1,1,,_search, +viewData,removeByTypeLinkId,,0,0,1,1,,_type,,,_link_id, +viewData,refresh,,0,0,1,0 +viewData,save,,0,0,1,0 +viewData,remove,,0,0,1,0 +viewData,getviewZone,,0,0,1,0 +viewData,getId,,0,0,1,0 +viewData,setId,,0,0,1,0,,_id, +viewData,getOrder,,0,0,1,0 +viewData,setOrder,,0,0,1,0,,_order, +viewData,getviewZone_id,,0,0,1,0 +viewData,setviewZone_id,,0,0,1,0,,_viewZone_id, +viewData,getType,,0,0,1,0 +viewData,setType,,0,0,1,0,,_type, +viewData,getLink_id,,0,0,1,0 +viewData,setLink_id,,0,0,1,0,,_link_id, +viewData,getLinkObject,,0,0,1,0 +viewData,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +viewData,setConfiguration,,0,0,1,0,,_key,,,_value, +viewData,getChanged,,0,0,1,0 +viewData,setChanged,,0,0,1,0,,_changed, +viewZone,all,,0,0,1,1 +viewZone,byId,,0,0,1,1,,_id, +viewZone,byView,,0,0,1,1,,_view_id, +viewZone,removeByViewId,,0,0,1,1,,_view_id, +viewZone,refresh,,0,0,1,0 +viewZone,save,,0,0,1,0 +viewZone,remove,,0,0,1,0 +viewZone,getviewData,,0,0,1,0 +viewZone,getView,,0,0,1,0 +viewZone,getId,,0,0,1,0 +viewZone,setId,,0,0,1,0,,_id, +viewZone,getView_id,,0,0,1,0 +viewZone,setView_id,,0,0,1,0,,_view_id, +viewZone,getType,,0,0,1,0 +viewZone,setType,,0,0,1,0,,_type, +viewZone,getName,,0,0,1,0 +viewZone,setName,,0,0,1,0,,_name, +viewZone,getPosition,,0,0,1,0 +viewZone,setPosition,,0,0,1,0,,_position, +viewZone,getConfiguration,,0,0,1,0,,_key,1,,_default,1 +viewZone,setConfiguration,,0,0,1,0,,_key,,,_value, +viewZone,getChanged,,0,0,1,0 +viewZone,setChanged,,0,0,1,0,,_changed, +widgets,all,,0,0,1,1 +widgets,byId,,0,0,1,1,,_id, +widgets,byTypeSubtypeAndName,,0,0,1,1,,_type,,,_subtype,,,_name, +widgets,listTemplate,,0,0,1,1 +widgets,getTemplateConfiguration,,0,0,1,1,,_template, +widgets,replacement,,0,0,1,1,,_version,,,_replace,,,_by, +widgets,preSave,,0,0,1,0 +widgets,preUpdate,,0,0,1,0 +widgets,save,,0,0,1,0 +widgets,remove,,0,0,1,0 +widgets,getUsedBy,,0,0,1,0 +widgets,emptyTest,,0,0,1,0 +widgets,getId,,0,0,1,0 +widgets,getName,,0,0,1,0 +widgets,getType,,0,0,1,0 +widgets,getSubtype,,0,0,1,0 +widgets,getTemplate,,0,0,1,0 +widgets,getReplace,,0,0,1,0,,_key,1,,_default,1 +widgets,getTest,,0,0,1,0,,_key,1,,_default,1 +widgets,setId,,0,0,1,0,,_id,1 +widgets,setName,,0,0,1,0,,_name, +widgets,setType,,0,0,1,0,,_type, +widgets,setSubtype,,0,0,1,0,,_subtype, +widgets,setTemplate,,0,0,1,0,,_template, +widgets,setReplace,,0,0,1,0,,_key,,,_value, +widgets,setTest,,0,0,1,0,,_key,,,_value, +widgets,getDisplay,,0,0,1,0,,_key,1,,_default,1 +widgets,setDisplay,,0,0,1,0,,_key,,,_value, diff --git a/tests/BC/generatePhpPublicApi.php b/tests/BC/generatePhpPublicApi.php new file mode 100644 index 0000000000..ad1391c599 --- /dev/null +++ b/tests/BC/generatePhpPublicApi.php @@ -0,0 +1,6 @@ +getFile($class); + + $this->assertFileIsReadable($file, 'File '.$file.' is not readable'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_method_exists(string $class, string $method): void + { + $this->assertTrue(method_exists($class, $method), 'Method '.$class.'::'.$method.' not found'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_return_type(string $class, string $method, string $expectedReturnType, bool $isFinal): void + { + $reflectionMethod = new ReflectionMethod($class, $method); + + $reflectionReturnType = $reflectionMethod->getReturnType(); + $actualReturnType = $reflectionReturnType ? $reflectionReturnType->getName() : ''; + $returnTypeAdded = '' === $expectedReturnType && '' !== $actualReturnType; + if ($isFinal && $returnTypeAdded) { + $this->noBreakingChangeWarning('Return type added detected on '.$class.'::'.$method.'.'); + + return; + } + + $returnTypeRemoved = '' === $actualReturnType && '' !== $expectedReturnType; + if ($returnTypeRemoved) { + $this->noBreakingChangeWarning('Return type removed detected on '.$class.'::'.$method.'.'); + + return; + } + + $this->assertFalse($returnTypeAdded, 'BC: Return type added detected on '.$class.'::'.$method.'.'); + + $returnTypeChangedToParent = is_a($expectedReturnType, $actualReturnType, true); + if ($returnTypeChangedToParent) { + $this->noBreakingChangeWarning('Return type changed to parent detected on '.$class.'::'.$method.'.'); + + return; + } + $returnTypeChanged = $expectedReturnType !== $actualReturnType; + $this->assertFalse($returnTypeChanged, 'BC: Return type changed detected on '.$class.'::'.$method.'.'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_final(string $class, string $method, $void, bool $expectedFinal): void + { + $reflectionMethod = new ReflectionMethod($class, $method); + $actualFinal = $reflectionMethod->isFinal(); + $finalRemoved = !$actualFinal && $expectedFinal; + if ($finalRemoved) { + $this->noBreakingChangeWarning('Final removed detected on '.$class.'::'.$method.'.'); + + return; + } + + $this->assertSame($expectedFinal, $actualFinal, 'BC: Final addition detected on '.$class.'::'.$method.'.'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_abstract(string $class, string $method, $void1, $void2, bool $expectedAbstract): void + { + $reflectionMethod = new ReflectionMethod($class, $method); + $actualAbstract = $reflectionMethod->isAbstract(); + $abstractRemoved = !$actualAbstract && $expectedAbstract; + if ($abstractRemoved) { + $this->noBreakingChangeWarning('Abstract removed detected on '.$class.'::'.$method.'.'); + + return; + } + + $this->assertSame($expectedAbstract, $actualAbstract, 'BC: Abstract addition detected on '.$class.'::'.$method.'.'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_visibility(string $class, string $method, $void1, $void2, $void3, bool $expectedPublic): void + { + $reflectionMethod = new ReflectionMethod($class, $method); + $actualPublic = $reflectionMethod->isPublic(); + $publicAdded = $actualPublic && !$expectedPublic; + if ($publicAdded) { + $this->noBreakingChangeWarning('Public visibility added detected on '.$class.'::'.$method.'.'); + + return; + } + + $this->assertSame($expectedPublic, $actualPublic, 'BC: Public visibility deletion detected on '.$class.'::'.$method.'.'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_static(string $class, string $method, $void1, $void2, $void3, $void4, bool $expectedStatic): void + { + $reflectionMethod = new ReflectionMethod($class, $method); + $actualStatic = $reflectionMethod->isStatic(); + $staticAdded = $actualStatic && !$expectedStatic; + if ($staticAdded) { + $this->noBreakingChangeWarning('Static added detected on '.$class.'::'.$method.'.'); + + return; + } + + $this->assertSame($expectedStatic, $actualStatic, 'BC: Static deletion detected on '.$class.'::'.$method.'.'); + } + + /** + * @dataProvider getMethodsSignatures + */ + public function test_parameters(string $class, string $method, $void1, $void2, $void3, $void4, $void5, array $expectedParameters): void + { + $reflectionMethod = new ReflectionMethod($class, $method); + $arguments = $reflectionMethod->getParameters(); + foreach ($arguments as $count => $argument) { + $this->assertNotCount(0, $expectedParameters, 'BC: Parameter added on '.$class.'::'.$method.'.'); + $expectedType = (string) array_shift($expectedParameters); + $actualTypeReflection = $argument->getType(); + $actualType = null === $actualTypeReflection ? '' : $actualTypeReflection->getName(); + $this->assertSame($expectedType, $actualType, 'BC: Parameter type '.$count.' changed on '.$class.'::'.$method.'.'); + + $expectedName = (string) array_shift($expectedParameters); + $this->assertSame($expectedName, $argument->getName(), 'BC: Parameter name '.$count.' changed on '.$class.'::'.$method.'.'); + + $expectedDefault = (bool) array_shift($expectedParameters); + $actualDefault = $argument->isDefaultValueAvailable(); + $this->assertSame($expectedDefault, $actualDefault, 'BC: Parameter default value '.$count.' changed on '.$class.'::'.$method.'.'); + } + + if (count($expectedParameters) > 0) { + $this->noBreakingChangeWarning('Parameter removed on '.$class.'::'.$method.'.'); + } + + $this->assertTrue(true); + } + + public static function generateMethodsSignatures(): void + { + $flag = 0; + foreach (glob(dirname(__DIR__, 2).'/core/class/*.php') as $file) { + $class = basename($file, '.class.php'); + require_once $file; + + $reflection = new ReflectionClass($class); + foreach ($reflection->getMethods() as $method) { + if ($method->isPrivate()) { + continue; + } + $a = []; + $a[] = $method->getDeclaringClass()->getName(); + $a[] = $method->getName(); + $a[] = $method->getReturnType() ?? ''; + $a[] = (int) $method->isFinal(); + $a[] = (int) $method->isAbstract(); + $a[] = (int) $method->isPublic(); + $a[] = (int) $method->isStatic(); + foreach ($method->getParameters() as $parameter) { + $reflectionNamedType = $parameter->getType(); + $a[] = null === $reflectionNamedType ? '' : $reflectionNamedType->getName(); + $a[] = $parameter->getName(); + $a[] = $parameter->isOptional(); + } + file_put_contents(self::API_FILE, implode(',', $a)."\n", $flag); + $flag = FILE_APPEND; + } + } + } + + private function getFile(string $class): string + { + return dirname(__DIR__, 2).'/core/class/'.$class.'.class.php'; + } + + public function noBreakingChangeWarning(string $str): void + { + $this->addWarning($str.'It is not a breaking change, but you need to regenerate the api_file.'); + } +} diff --git a/tests/Legacy/cacheTest.php b/tests/Legacy/cacheTest.php new file mode 100644 index 0000000000..755889e9d9 --- /dev/null +++ b/tests/Legacy/cacheTest.php @@ -0,0 +1,60 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class cacheTest extends TestCase +{ + public function test_default(): void + { + $cache = cache::byKey('toto'); + $this->assertSame('', $cache->getValue()); + } + + // not working on ci (TODO: mock the engine) + // public function testLoad(): void{ + // cache::set('toto', 'toto'); + // $cache = cache::byKey('toto'); + // $this->assertSame('toto', $cache->getValue()); + // } + + public function test_remove(): void + { + cache::set('toto', 'toto'); + $cache = cache::byKey('toto'); + $cache->remove(); + $cache = cache::byKey('toto'); + $this->assertSame('', $cache->getValue()); + } + + // not working on ci (TODO: mock the engine) + // public function testLifetime(): void { + // cache::set('toto', 'toto', 1); + // $cache = cache::byKey('toto'); + // $this->assertSame('toto', $cache->getValue()); + // } + + public function test_expired(): void + { + $this->markTestSkipped('Too long to run'); + cache::set('toto', 'toto', 1); + sleep(2); + $cache = cache::byKey('toto'); + $this->assertSame('', $cache->getValue()); + } +} diff --git a/tests/Legacy/class/ajaxTest.php b/tests/Legacy/class/ajaxTest.php new file mode 100644 index 0000000000..7939091d2f --- /dev/null +++ b/tests/Legacy/class/ajaxTest.php @@ -0,0 +1,57 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class ajaxTest extends TestCase +{ + public static function getSuccessResponses(): iterable + { + yield [ + ['foo' => 'bar', 'bar' => 'baz'], + '{"state":"ok","result":{"foo":"bar","bar":"baz"}}', + ]; + } + + public static function getErrorResponses(): iterable + { + yield [ + ['foo' => 'bar', 'bar' => 'baz'], + 1234, + '{"state":"error","result":{"foo":"bar","bar":"baz"},"code":1234}', + ]; + } + + /** + * @dataProvider getSuccessResponses + */ + public function test_success(array $data, string $out): void + { + $response = ajax::getResponse($data); + $this->assertEquals($out, $response); + } + + /** + * @dataProvider getErrorResponses + */ + public function test_error(array $data, int $code, string $out): void + { + $response = ajax::getResponse($data, $code); + $this->assertEquals($out, $response); + } +} diff --git a/tests/Legacy/class/scenarioTest.php b/tests/Legacy/class/scenarioTest.php new file mode 100644 index 0000000000..dbb23002d7 --- /dev/null +++ b/tests/Legacy/class/scenarioTest.php @@ -0,0 +1,83 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class scenarioTest extends TestCase +{ + public static function getGetSets() + { + return [ + ['Id', 'foo', 'foo'], + ['Name', 'foo', 'foo'], + // array('State', 'foo', 'foo'), // TODO: not working on ci + ['IsActive', true, true], + ['Group', 'foo', 'foo'], + // array('LastLaunch', 'foo', 'foo'), // TODO: not working on ci + ['Mode', 'foo', 'foo'], + ['Schedule', ['foo' => 'bar'], ['foo' => 'bar']], + ['Schedule', '{"foo":"bar"}', ['foo' => 'bar']], + ['Schedule', 'foo', 'foo'], + // array('PID', 1, 1), // TODO: not working on ci + ['ScenarioElement', ['foo' => 'bar'], ['foo' => 'bar']], + ['ScenarioElement', '{"foo":"bar"}', ['foo' => 'bar']], + ['ScenarioElement', 'foo', 'foo'], + ['Trigger', ['foo' => 'bar'], ['foo' => 'bar']], + ['Trigger', '{"foo":"bar"}', ['foo' => 'bar']], + ['Trigger', 'foo', ['foo']], + ['Timeout', '', 0], + ['Timeout', 'foo', 0], + ['Timeout', 0.9, 0], + ['Timeout', 1.1, 1.1], + ['Timeout', 15, 15], + ['Object_id', null, null], + ['Object_id', ['foo'], null], + // array('Object_id', 0, 0), + ['Object_id', 150, 150], + ['IsVisible', true, 0], + ['IsVisible', 5, 5], + ['IsVisible', 'foo', 0], + ['Description', 'foo', 'foo'], + ]; + } + + /** + * @dataProvider getGetSets + */ + public function test_getter_setter($attribute, $in, $out) + { + $scenario = new scenario(); + $getter = 'get'.$attribute; + $setter = 'set'.$attribute; + $scenario->$setter($in); + $this->assertSame($out, $scenario->$getter()); + } + + public function test_persist_log() + { + $path = dirname(__DIR__, 3).'/log/scenarioLog/scenarioTest.log'; + if (file_exists($path)) { + $this->markTestSkipped('Le fichier "'.$path.'" existe déjà. Veuillez le supprimer.'); + } + $scenario = new scenario(); + $scenario->setId('Test'); + $scenario->persistLog(); + $this->assertTrue(file_exists($path)); + shell_exec('rm '.$path); + } +} diff --git a/tests/Legacy/com/shellTest.php b/tests/Legacy/com/shellTest.php new file mode 100644 index 0000000000..c8ab31e7eb --- /dev/null +++ b/tests/Legacy/com/shellTest.php @@ -0,0 +1,132 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class shellTest extends TestCase +{ + /******************* Base ********************/ + public static function getBackgrounds() + { + return [ + [true], + [false], + ]; + } + + public function test_get_cmd() + { + $shell = new com_shell('ls'); + $this->assertSame('ls', $shell->getCmd()); + } + + public function test_command_exist() + { + $shell = new com_shell(); + $this->assertTrue($shell->commandExists('ls')); + $this->assertFalse($shell->commandExists('foo')); + } + + /** + * @dataProvider getBackgrounds + * + * @var bool + */ + public function test_background($in) + { + $shell = new com_shell(); + $shell->setBackground($in); + $this->assertSame($in, $shell->getBackground()); + } + + public function test_exec() + { + if (file_exists('foo.txt')) { + $this->markTestSkipped( + 'Un fichier foo.txt existe. Veuillez le supprimer.' + ); + } + $shell = new com_shell('touch foo.txt'); + $return = $shell->exec(); + $this->assertEmpty($return); + $this->assertTrue(file_exists('foo.txt')); + + $shell = new com_shell('rm foo.txt'); + $return = $shell->exec(); + $this->assertEmpty($return); + $this->assertFalse(file_exists('foo.txt')); + + $shell = new com_shell('echo foo'); + $return = $shell->exec(); + $this->assertSame('foo', $return); + } + + /*************** Improvement *****************/ + public function test_instance() + { + $shell = com_shell::getInstance(); + $this->assertInstanceOf('com_shell', $shell); + } + + public function test_execute() + { + if (file_exists('bar.txt')) { + $this->markTestSkipped( + 'Un fichier bar.txt existe. Veuillez le supprimer.' + ); + } + $result = com_shell::execute('touch bar.txt'); + $this->assertEmpty($result); + $this->assertTrue(file_exists('bar.txt')); + + $result = com_shell::execute('rm bar.txt'); + $this->assertEmpty($result); + $this->assertFalse(file_exists('bar.txt')); + + $result = com_shell::execute('echo bar'); + $this->assertSame('bar', $result); + } + + public function test_cache() + { + $shell = com_shell::getInstance(); + $shell->clearHistory(); + $shell->addCmd('echo foo'); + $result = com_shell::execute('echo bar'); + $this->assertSame('bar', $result); + $this->assertSame(['echo bar 2>&1'], $shell->getHistory()); + $result = $shell->exec(); + $this->assertSame('foo', $result); + } + + public function test_history() + { + $shell = com_shell::getInstance(); + $shell->clearHistory(); + $this->assertSame([], $shell->getHistory()); + com_shell::execute('echo foo'); + $this->assertSame(['echo foo 2>&1'], $shell->getHistory()); + $shell->addCmd('echo bar'); + $shell->addCmd('echo baz'); + $this->assertSame(['echo foo 2>&1'], $shell->getHistory()); + $shell->exec(); + $this->assertSame(['echo foo 2>&1', 'echo bar 2>&1', 'echo baz 2>&1'], $shell->getHistory()); + $shell->clearHistory(); + $this->assertSame([], $shell->getHistory()); + } +} diff --git a/tests/Legacy/configTest.php b/tests/Legacy/configTest.php new file mode 100644 index 0000000000..c9e93495b5 --- /dev/null +++ b/tests/Legacy/configTest.php @@ -0,0 +1,45 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class configTest extends TestCase +{ + public function test_config_is_empty_by_default(): void + { + $this->assertSame('', config::byKey('toto')); + } + + public function test_define_default_value(): void + { + $this->assertEquals('plop', config::byKey('toto', 'core', 'plop')); + } + + public function test_return_setted_value(): void + { + config::save('toto', 'titi'); + $this->assertEquals('titi', config::byKey('toto')); + } + + public function test_remove_config(): void + { + config::save('toto', 'titi'); + config::remove('toto'); + $this->assertSame('', config::byKey('toto')); + } +} diff --git a/tests/Legacy/cronTest.php b/tests/Legacy/cronTest.php new file mode 100644 index 0000000000..4565c80b1f --- /dev/null +++ b/tests/Legacy/cronTest.php @@ -0,0 +1,98 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class cronTest extends TestCase +{ + public function test_create() + { + $cron1 = new cron(); + $cron1->setClass('calendar'); + $cron1->setFunction('pull'); + $cron1->setLastRun(date('Y-m-d H:i:s')); + $cron1->setSchedule('00 00 * * * 2020'); + $cron1->save(); + + $cron2 = new cron(); + $cron2->setClass('calendar'); + $cron2->setFunction('pull'); + $cron2->setLastRun(date('Y-m-d H:i:s')); + $cron2->setSchedule('00 00 * * * 2020'); + $cron2->save(); + + $this->assertEquals($cron1->getId(), $cron2->getId()); + + $cron1 = cron::byClassAndFunction('calendar', 'pull'); + if (!is_object($cron1)) { + throw new Exception('Impossible de trouver calend::pull'); + } + $cron1->remove(); + } + + public function test_create_with_option() + { + $cron1 = cron::byClassAndFunction('calendar', 'pull', ['event_id' => intval(1)]); + if (!is_object($cron1)) { + $cron1 = new cron(); + $cron1->setClass('calendar'); + $cron1->setFunction('pull'); + $cron1->setOption(['event_id' => intval(1)]); + $cron1->setLastRun(date('Y-m-d H:i:s')); + } + $cron1->setSchedule('00 00 * * * 2020'); + $cron1->save(); + + $cron2 = cron::byClassAndFunction('calendar', 'pull', ['event_id' => intval(2)]); + if (!is_object($cron2)) { + $cron2 = new cron(); + $cron2->setClass('calendar'); + $cron2->setFunction('pull'); + $cron2->setOption(['event_id' => intval(2)]); + $cron2->setLastRun(date('Y-m-d H:i:s')); + } + $cron2->setSchedule('00 00 * * * 2020'); + $cron2->save(); + + $this->assertNotSame($cron1->getId(), $cron2->getId()); + + $cron3 = cron::byClassAndFunction('calendar', 'pull', ['event_id' => intval(1)]); + if (!is_object($cron3)) { + $cron3 = new cron(); + $cron3->setClass('calendar'); + $cron3->setFunction('pull'); + $cron3->setOption(['event_id' => intval(1)]); + $cron3->setLastRun(date('Y-m-d H:i:s')); + } + $cron3->setSchedule('00 00 * * * 2020'); + $cron3->save(); + + $this->assertEquals($cron1->getId(), $cron3->getId()); + + $cron1 = cron::byClassAndFunction('calendar', 'pull', ['event_id' => intval(1)]); + if (!is_object($cron1)) { + throw new Exception('Impossible de trouver calend::pull (1)'); + } + $cron1->remove(); + $cron2 = cron::byClassAndFunction('calendar', 'pull', ['event_id' => intval(2)]); + if (!is_object($cron2)) { + throw new Exception('Impossible de trouver calend::pull (2)'); + } + $cron2->remove(); + } +} diff --git a/tests/Legacy/logTest.php b/tests/Legacy/logTest.php new file mode 100644 index 0000000000..b2e94e9584 --- /dev/null +++ b/tests/Legacy/logTest.php @@ -0,0 +1,103 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class logTest extends TestCase +{ + public static function getLogs(): iterable + { + return [ + ['StreamHandler', 'foo', false, true], + ]; + } + + public static function getReturnListe(): iterable + { + return [ + ['StreamHandler', ['StreamHandler']], + ]; + } + + public static function getLevels(): iterable + { + return [ + ['StreamHandler', 'debug'], + ['StreamHandler', 'info'], + ['StreamHandler', 'notice'], + ['StreamHandler', 'warning'], + ['StreamHandler', 'error'], + ]; + } + + public static function getErrorReporting(): iterable + { + return [ + [100, E_ERROR | E_WARNING | E_PARSE | E_NOTICE], + [200, E_ERROR | E_WARNING | E_PARSE | E_NOTICE], + [250, E_ERROR | E_WARNING | E_PARSE | E_NOTICE], + [300, E_ERROR | E_WARNING | E_PARSE], + [400, E_ERROR | E_PARSE], + [500, E_ERROR | E_PARSE], + [600, E_ERROR | E_PARSE], + [700, E_ERROR | E_PARSE], + ]; + } + + /** + * @dataProvider getLogs + */ + public function test_add_get_remove(string $engin, string $message, bool $get, bool $removeAll): void + { + config::save('log::engine', $engin); + log::remove($engin); + log::add($engin, 'debug', $message); // <- Effet de bord! + $this->assertSame($get, log::get($engin, 0, 1)); + $this->assertSame($removeAll, log::removeAll()); + } + + /** + * @dataProvider getLevels + */ + public function test_add_levels(string $engin, string $level): void + { + config::save('log::engine', $engin); + log::remove($engin); + log::add($engin, $level, 'testLevel'); + $this->assertTrue(true); + } + + /** + * @dataProvider getReturnListe + */ + public function test_liste(string $engin, array $return): void + { + config::save('log::engine', $engin); + log::add($engin, 'debug', 'toto'); + $this->assertSame($return, log::liste()); + } + + /** + * @dataProvider getErrorReporting + */ + public function test_error_reporting(int $level, int $result): void + { + log::define_error_reporting($level); + $this->assertSame($result, error_reporting()); + } +} diff --git a/tests/Legacy/php/utilsTest.php b/tests/Legacy/php/utilsTest.php new file mode 100644 index 0000000000..4928d442cc --- /dev/null +++ b/tests/Legacy/php/utilsTest.php @@ -0,0 +1,111 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class utilsTest extends TestCase +{ + public static function getTemplates() + { + return [ + ['Vous êtes sur {{Nom}} version {{Version}}', 'Vous êtes sur Jeedom version 1.2.3'], + ['{{La poule}} {{pond}}', 'L\'oeuf est pondu'], + ]; + } + + /** + * @dataProvider getTemplates + */ + public function test_templace_replace($template, $out) + { + $rules = [ + '{{Nom}}' => 'Jeedom', + '{{Version}}' => '1.2.3', + '{{La poule}}' => 'L\'oeuf', + '{{pond}}' => 'est pondu', + ]; + $result = template_replace($rules, $template); + $this->assertSame($out, $result); + } + + public function test_init() + { + $_GET['get'] = 'foo'; + $_POST['post'] = 'bar'; + $_REQUEST['request'] = 'baz'; + $this->assertSame('foo', init('get')); + $this->assertSame('bar', init('post')); + $this->assertSame('baz', init('request')); + $this->assertSame('foobar', init('default', 'foobar')); + } + + public static function getTimes() + { + return [ + [0, '0s'], + [60, '1min 0s'], + [65, '1min 5s'], + [186, '3min 6s'], + [3600, '1h 0min 0s'], + [86400, '1j 0h 0min 0s'], + [86401, '1j 0h 0min 1s'], + [259199, '2j 23h 59min 59s'], + ]; + } + + /** + * @dataProvider getTimes + */ + public function test_convert_duartion($in, $out) + { + $this->assertSame($out, convertDuration($in)); + } + + public static function getJsons() + { + return [ + [json_encode(['foo', 'bar']), true], + [json_encode(['foo' => 'bar']), true], + ['{"foo":"bar"}', true], + ['foo bar', false], + ]; + } + + /** + * @dataProvider getJsons + */ + public function test_is_json($in, $out) + { + $this->assertSame($out, is_json($in)); + } + + public static function getPaths() + { + return [ + ['/home/user/doc/../../me/docs', '/home/me/docs'], + ]; + } + + /** + * @dataProvider getPaths + */ + public function test_clean_path($in, $out) + { + $this->assertSame($out, cleanPath($in)); + } +} diff --git a/tests/Legacy/scenarioExpressionTest.php b/tests/Legacy/scenarioExpressionTest.php new file mode 100644 index 0000000000..ca88ed0ccf --- /dev/null +++ b/tests/Legacy/scenarioExpressionTest.php @@ -0,0 +1,49 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class scenarioExpressionTest extends TestCase +{ + public function test_calcul_condition() + { + $tests = [ + '1+1' => 2, + ]; + foreach ($tests as $key => $value) { + $result = scenarioExpression::createAndExec('condition', $key); + $this->assertEquals(2, $value); + } + } + + public function test_variable() + { + scenarioExpression::createAndExec('action', 'variable', ['value' => 'plop', 'name' => 'test']); + $result = scenarioExpression::createAndExec('condition', 'variable(test)'); + $this->assertEquals('plop', $result); + } + + /** + * @depends test_variable + */ + public function test_string_condition() + { + $result = scenarioExpression::createAndExec('condition', 'variable(test) == "plop"'); + $this->assertTrue($result); + } +} diff --git a/tests/Legacy/userTest.php b/tests/Legacy/userTest.php new file mode 100644 index 0000000000..7c532e2927 --- /dev/null +++ b/tests/Legacy/userTest.php @@ -0,0 +1,63 @@ +. +*/ + +use PHPUnit\Framework\TestCase; + +class userTest extends TestCase +{ + public function test_create() + { + $user = $this->createUser('test', 'test', 'test', 'test'); + + $this->assertTrue(is_numeric($user->getId()) && '' != $user->getId()); + $this->assertEquals('test', $user->getLogin()); + $this->assertEquals(sha512('test'), $user->getPassword()); + } + + public function test_connect() + { + $_user = $this->createUser('test2', 'test'); + $user = user::connect('test2', 'test'); + $this->assertEquals($user->getId(), $_user->getId()); + } + + public function test_remove() + { + $_user = $this->createUser('test3', 'test'); + $id = $_user->getId(); + $_user->remove(); + $this->assertEquals(null, user::byId($id)); + } + + /** + * @throws Exception + */ + public function createUser(string $login, string $password): user + { + $user_array = [ + 'login' => $login, + 'password' => $password, + ]; + $user = new user(); + utils::a2o($user, $user_array); + $user->setPassword(sha512($user_array['password'])); + $user->save(); + + return $user; + } +} diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000000..5e517d1d0f --- /dev/null +++ b/tests/README.md @@ -0,0 +1,185 @@ +# Tests Jeedom Core + +Ce document décrit les différentes suites de tests disponibles dans Jeedom Core et comment les exécuter. + +## Installation préalable + +Avant de pouvoir exécuter les tests, vous devez installer PHPUnit. Il y a deux méthodes possibles : + +### Installation locale (recommandée) +Cette méthode installe PHPUnit uniquement pour ce projet : +```bash +# Dans le répertoire du projet +composer require --dev phpunit/phpunit ^9.5 + +# Vérifiez l'installation +./vendor/bin/phpunit --version +``` + +### Installation globale +Si vous préférez installer PHPUnit globalement sur votre système : +```bash +# Via Composer +composer global require phpunit/phpunit ^9.5 + +# Vérifiez que le dossier bin de Composer est dans votre PATH +echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc +source ~/.bashrc + +# Vérifiez l'installation +phpunit --version +``` + +Note : Assurez-vous d'utiliser PHP 7.4 ou supérieur pour la compatibilité avec PHPUnit 9.5. + +## Prérequis base de données + +⚠️ **Important : Dépendance à la base de données** + +En raison de l'architecture actuelle du Core Jeedom, les tests nécessitent un accès à une base de données MySQL/MariaDB fonctionnelle. Cette dépendance s'applique à toutes les suites de tests (Legacy, Unitaires et BC). + +### Configuration requise +- Une base de données MySQL/MariaDB +- Un utilisateur avec les droits appropriés + +### Configuration pour les tests +Les paramètres de connexion à la base de données pour les tests peuvent être configurés dans le fichier `.env.test.local` à la racine du projet. Ce fichier vous permet de définir des paramètres spécifiques pour l'environnement de test, distincts de votre environnement de production. + +La configuration se fait via la variable `DATABASE_DSN` qui suit le format suivant : +```env +DATABASE_DSN=mysql://root:root@localhost:3306/jeedom_test +``` + +Détail des composants de l'URL de connexion : +- `mysql://` : Protocole de connexion (obligatoire, seul MySQL est supporté) +- `root` : Nom d'utilisateur de la base de données +- `:root` : Mot de passe de l'utilisateur (après le `:`) +- `@localhost` : Hôte de la base de données +- `:3306` : Port de connexion MySQL (3306 est le port par défaut) +- `/jeedom_test` : Nom de la base de données + +Exemple avec des valeurs différentes : +```env +DATABASE_DSN=mysql://jeedom_user:password123@database.local:3306/jeedom_testing +``` + +### Note technique +Cette dépendance à la base de données n'est pas idéale pour des tests unitaires, qui devraient idéalement être isolés et indépendants de toute ressource externe. C'est une contrainte héritée de l'architecture historique qui sera potentiellement revue dans le futur. + +## Vue d'ensemble + +Le projet contient trois types de tests distincts : +- Tests Legacy (anciens tests) +- Tests Unitaires (nouveaux tests) +- Tests BC (tests de compatibilité ascendante) + +## Tests Legacy + +### Description +Ces tests sont les tests historiques du projet. Bien qu'ils soient destinés à être progressivement remplacés, ils fournissent actuellement une couverture de code acceptable et restent donc maintenus. + +### Exécution +```bash +php vendor/bin/phpunit tests/Legacy +``` + +### Structure +Les tests legacy se trouvent dans le dossier `tests/Legacy` et suivent l'ancienne structure de tests. Ils couvrent principalement : +- Les fonctionnalités core +- Les interactions avec la base de données +- Les scénarios +- Les interactions entre objets + +## Tests Unitaires + +### Description +Il s'agit des nouveaux tests unitaires, écrits selon les bonnes pratiques modernes. Ils sont plus atomiques, plus maintenables et plus fiables que les tests legacy. + +### Caractéristiques +- Tests isolés et indépendants +- Un seul concept testé par méthode +- Utilisation des mocks et des stubs quand nécessaire +- Meilleure organisation du code de test + +### Exécution +```bash +php vendor/bin/phpunit tests/Unit +``` + +### Structure +Les tests unitaires sont organisés dans le dossier `tests/Unit` et suivent la structure du code source : +``` +tests/Unit/ +├── Core/ +│ ├── ConfigTest.php +│ ├── CronTest.php +│ └── ... +├── Mock/ +└── ... +``` + +## Tests BC (Backward Compatibility) + +### Description +Ces tests sont conçus pour détecter les ruptures de compatibilité ascendante (BC breaks) dans l'API PHP. Ils sont particulièrement importants car ils permettent d'assurer que les modifications du Core ne casseront pas les plugins existants. + +### Ce qui est vérifié +- Signatures des méthodes +- Types de retour +- Paramètres (nombre, type, ordre) +- Classes et interfaces publiques +- Constantes + +### Exécution +```bash +php vendor/bin/phpunit tests/BC +``` + +### En cas d'échec +Si ces tests échouent, cela signifie qu'une modification pourrait potentiellement casser la compatibilité avec les plugins existants. Il faut alors : +1. Examiner les changements proposés +2. Évaluer l'impact sur les plugins +3. Soit modifier le changement pour maintenir la compatibilité +4. Soit documenter le changement comme une rupture de compatibilité majeure + +### Mise à jour des contraintes BC +Le fichier `/tests/BC/api_file` contient la liste des contraintes de compatibilité ascendante qui doivent être respectées. Pour mettre à jour ce fichier après des modifications de l'API : + +```bash +# Placez-vous à la racine du projet +cd /chemin/vers/jeedom/core + +# Générez une nouvelle liste des contraintes BC +php tests/BC/generateBCList.php +``` + +⚠️ Important : +- Générez ce fichier uniquement sur une version stable du code +- Vérifiez attentivement les différences avant de commiter les changements +- La génération doit se faire sur la branche principale (beta ou master) pour servir de référence + +## Exécution complète des tests + +Pour lancer tous les tests d'un coup : +```bash +php vendor/bin/phpunit +``` + +## Configuration + +Les configurations des tests se trouvent dans le fichier `phpunit.xml.dist` + +## Contribution + +Lors de l'ajout de nouvelles fonctionnalités : +1. Ajoutez de nouveaux tests unitaires dans `tests/Unit` +2. Si nécessaire, ajoutez des tests BC dans `tests/BC` +3. Ne modifiez les tests legacy que si absolument nécessaire + +## Bonnes pratiques + +- Écrivez les nouveaux tests dans la suite de tests unitaires +- N'ajoutez pas de nouveaux tests dans la suite legacy +- Vérifiez toujours la compatibilité ascendante avec les tests BC +- Documenter les cas de test complexes +- Utiliser des noms de méthodes descriptifs diff --git a/tests/Unit/Core/DBTest.php b/tests/Unit/Core/DBTest.php new file mode 100644 index 0000000000..d60acede52 --- /dev/null +++ b/tests/Unit/Core/DBTest.php @@ -0,0 +1,649 @@ +assertSame(['test' => '1'], $result); + } + + public function test_a_simple_query_with_parameters(): void + { + $result = \DB::Prepare('SELECT :test AS test', ['test' => '1']); + + $this->assertSame(['test' => '1'], $result); + } + + public function test_fetch_all(): void + { + $result = \DB::Prepare('SELECT 1 AS test', [], \DB::FETCH_TYPE_ALL); + + $this->assertSame([['test' => '1']], $result); + } + + public function test_fetch_class(): void + { + $result = \DB::Prepare('SELECT 1 AS test', [], \DB::FETCH_TYPE_ROW, \PDO::FETCH_CLASS, \stdClass::class); + + $this->assertInstanceOf(\stdClass::class, $result); + $this->assertSame('1', $result->test); + } + + public function test_fetch_all_class(): void + { + $results = \DB::Prepare('SELECT 1 AS test', [], \DB::FETCH_TYPE_ALL, \PDO::FETCH_CLASS, \stdClass::class); + + $this->assertIsArray($results); + $this->assertCount(1, $results); + $this->assertInstanceOf(\stdClass::class, $results[0]); + $this->assertSame('1', $results[0]->test); + } + + public function test_insert(): void + { + $this->thereIsATable('test_table', 'test VARCHAR(255)'); + + $result = \DB::Prepare('INSERT INTO test_table (test) VALUES (:test)', ['test' => 'foo']); + + $this->assertFalse($result); // TODO: Est-ce qu’un return du nombre de lignes insérées ne serait pas plus intéressant ? + $this->assertSame([ + ['test' => 'foo'], + ], $this->contentOfTable('test_table')); + } + + public function test_update(): void + { + $this->thereIsATable('test_table', 'test VARCHAR(255)', [['test' => 'foo']]); + + $result = \DB::Prepare('UPDATE test_table SET test = :test WHERE test = :old', ['test' => 'bar', 'old' => 'foo']); + + $this->assertNull($result); // TODO: Est-ce qu’un return du nombre de lignes modifiées ne serait pas plus intéressant ? + $this->assertSame([ + ['test' => 'bar'], + ], $this->contentOfTable('test_table')); + } + + public function test_delete(): void + { + $this->thereIsATable('test_table', 'test VARCHAR(255)', [['test' => 'foo']]); + + $result = \DB::Prepare('DELETE FROM test_table WHERE test = :old', ['old' => 'foo']); + + $this->assertNull($result); // TODO: Est-ce qu’un return du nombre de lignes supprimées ne serait pas plus intéressant ? + $this->assertSame([], $this->contentOfTable('test_table')); + } + + public function test_bad_sql_syntax(): void + { + $this->expectExceptionMessageMatches('/syntax/'); + \DB::Prepare('SELECT FROM', []); + } + + public function test_query_on_bad_table(): void + { + $this->expectExceptionMessageMatches("/doesn't exist/"); + \DB::Prepare('DELETE FROM unexistant_table', []); + } + + public function test_query_with_bad_parameter(): void + { + $this->thereIsATable('test_table', 'test VARCHAR(255)', [['test' => 'foo']]); + + $result = \DB::Prepare('update test_table set test = :test', ['foo' => 'bar']); + + $this->assertNull($result); // TODO: throw exception ? + $this->assertSame([['test' => 'foo']], $this->contentOfTable('test_table')); + } + + public function test_fetch_all_class_decrypt(): void + { + $class = $this->thereIsAnObject()->withHook('decrypt')->className(); + $results = \DB::Prepare('SELECT 1 AS var', [], \DB::FETCH_TYPE_ALL, \PDO::FETCH_CLASS, $class); + + $this->assertInstanceOf($class, $results[0]); + $this->assertSame('1', $results[0]->var); + $this->assertTrue($results[0]->isMethodCalled('decrypt')); + } + + public function test_fetch_all_class_decrypt_changed(): void + { + $class = $this->thereIsAnObject()->changeable()->withHook('decrypt')->className(); + $results = \DB::Prepare('SELECT 1 AS publicVar', [], \DB::FETCH_TYPE_ALL, \PDO::FETCH_CLASS, $class); + + $this->assertInstanceOf($class, $results[0]); + $this->assertTrue($results[0]->isMethodCalled('setChanged')); + $this->assertFalse($results[0]->getChanged()); + } + + public function test_fetch_class_decrypt(): void + { + $class = $this->thereIsAnObject()->withHook('decrypt')->className(); + $results = \DB::Prepare('SELECT 1 AS publicVar', [], \DB::FETCH_TYPE_ROW, \PDO::FETCH_CLASS, $class); + + $this->assertInstanceOf($class, $results); + $this->assertSame('1', $results->publicVar); + $this->assertTrue($results->isMethodCalled('decrypt')); + } + + public function test_fetch_class_decrypt_changed(): void + { + $class = $this->thereIsAnObject()->changeable()->withHook('decrypt')->className(); + $results = \DB::Prepare('SELECT 1 AS publicVar', [], \DB::FETCH_TYPE_ROW, \PDO::FETCH_CLASS, $class); + + $this->assertInstanceOf($class, $results); + $this->assertTrue($results->isMethodCalled('setChanged')); + $this->assertFalse($results->getChanged()); + } + + public function test_fetch_class_no_decrypt_do_not_set_changed(): void + { + $class = $this->thereIsAnObject()->changeable()->className(); + $results = \DB::Prepare('SELECT 1 AS publicVar', [], \DB::FETCH_TYPE_ROW, \PDO::FETCH_CLASS, $class); + + $this->assertInstanceOf($class, $results); + $this->assertNull($results->getChanged()); + } + + public function test_fetch_all_class_no_decrypt_do_not_set_changed(): void + { + $class = $this->thereIsAnObject()->changeable()->className(); + $results = \DB::Prepare('SELECT 1 AS publicVar', [], \DB::FETCH_TYPE_ALL, \PDO::FETCH_CLASS, $class); + + $this->assertInstanceOf($class, $results[0]); + $this->assertNull($results[0]->getChanged()); + } + + public function test_bad_database_configuration(): void + { + $this->thereIsABadDatabaseConfiguration(); + + $this->expectExceptionMessageMatches('/failure in name resolution/'); + \DB::Prepare('SELECT 1 AS test', []); + } + + public function test_can_not_clone_object(): void + { + $db = new \DB(); + + $this->expectPhpErrorMessage('DB : Cloner cet objet n\'est pas permis'); + + $clone = clone $db; + } + + public function test_no_need_to_optimize_database(): void + { + DBTestable::optimize(); + + $optimizationQueries = DBTestable::getOptimizationQueries(); + $this->assertCount(0, $optimizationQueries); + } + + public function test_optimize_database(): void + { + $this->thereIsATable('test_table', 'test VARCHAR(255)'); + DBTestable::addTableToOptimize('test_table'); + + DBTestable::optimize(); + + $optimizationQueries = DBTestable::getOptimizationQueries(); + $this->assertCount(1, $optimizationQueries); + } + + public function test_save_data(): void + { + $object = $this->thereIsAnObject()->object(); + + $result = \DB::save($object); + + $this->assertCount(1, $this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + public static function saveInsertHookProvider(): iterable + { + yield from self::hookCalledWithDirectFlagProvider(); + yield from self::saveInsertHookSkippedWithDirectFlagProvider(); + } + + /** + * @dataProvider saveInsertHookProvider + */ + public function test_save_call_hooks(string $hook): void + { + $object = $this->thereIsAnObject()->withHook($hook)->object(); + + $result = \DB::save($object); + + $this->assertMethodCalledOnObject($object, $hook); + $this->assertFalse($result); + } + + public static function saveInsertHookSkippedWithDirectFlagProvider(): iterable + { + yield ['preSave']; + yield ['preInsert']; + yield ['postInsert']; + yield ['postSave']; + } + + /** + * @dataProvider saveInsertHookSkippedWithDirectFlagProvider + */ + public function test_save_skip_hook_with_direct_flag(string $hook): void + { + $object = $this->thereIsAnObject()->withHook($hook)->object(); + + $result = \DB::save($object, true); + + $this->assertMethodNotCalledOnObject($object, $hook); + $this->assertSame(false, $result); + } + + public function test_save_set_private_id(): void + { + $object = $this->thereIsAnObject()->withField('id')->object(); + + $result = \DB::save($object); + + $this->assertTrue($object->isIdSet()); + $this->assertFalse($result); + } + + /** + * @dataProvider saveInsertHookProvider + */ + public function test_save_skip_call_hook_on_object_without_method(string $hook): void + { + $object = $this->thereIsAnObject()->withoutHook($hook)->object(); + + $result = \DB::save($object); + + $this->assertMethodNotCalledOnObject($object, $hook); + $this->assertFalse($result); + } + + public static function hookCalledWithDirectFlagProvider(): iterable + { + yield ['encrypt']; + yield ['decrypt']; + } + + /** + * @dataProvider hookCalledWithDirectFlagProvider + */ + public function test_save_insert_call_hook_with_direct_flag(string $hook): void + { + $object = $this->thereIsAnObject()->withHook($hook)->object(); + + $result = \DB::save($object, true); + + $this->assertMethodCalledOnObject($object, $hook); + $this->assertFalse($result); + } + + public function test_insert_with_duplicate_unique_field_fail(): void + { + $object = $this->thereIsAnObject()->withUniqueField()->persisted()->object(); + + $this->expectException(\Exception::class); + $result = \DB::save($object); + $this->assertFalse($result); + } + + public function test_replace_with_duplicate_unique_field(): void + { + $object = $this->thereIsAnObject()->withUniqueField()->persisted()->object(); + + $result = \DB::save($object, false, true); + + $this->assertCount(1, $this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + public function test_insert_hooks_order(): void + { + $object = $this->thereIsAnObject() + ->withHooks('preSave', 'postSave', 'preInsert', 'postInsert', 'preUpdate', 'postUpdate', 'encrypt', 'decrypt') + ->object() + ; + + $result = \DB::save($object); + + $this->assertSame([ + 'preSave', + 'preInsert', + 'encrypt', + 'decrypt', + 'postInsert', + 'postSave', + ], $object->getMethodsCalled()); + $this->assertFalse($result); + } + + public function test_insert_direct_hooks_order(): void + { + $object = $this->thereIsAnObject() + ->withHooks('preSave', 'postSave', 'preInsert', 'postInsert', 'preUpdate', 'postUpdate', 'encrypt', 'decrypt') + ->object() + ; + + $result = \DB::save($object, true); + + $this->assertSame([ + 'encrypt', + 'decrypt', + ], $object->getMethodsCalled()); + $this->assertFalse($result); + } + + public function test_save_object_identifiable(): void + { + $object = $this->thereIsAnObject()->identifiable()->object(); + + $result = \DB::save($object); + + $this->assertCount(1, $this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + public function test_save_unknown_object_identified_do_nothing(): void + { + $object = $this->thereIsAnObject()->identifiedBy($this->randomPositiveInt())->object(); + + $result = \DB::save($object); + + $this->assertCount(0, $this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + public function test_save_unknown_object_identified_with_replace_flag_insert_new_row(): void + { + $object = $this->thereIsAnObject()->identifiedBy($this->randomPositiveInt())->object(); + + $result = \DB::save($object, false, true); + + $this->assertCount(1, $this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + public function test_save_object_identified_update_row(): void + { + $object = $this->thereIsAnObject()->identifiable()->persisted()->object(); + + $object->publicVar = 'update'; + $result = \DB::save($object); + + $contentOfTable = $this->contentOfTable($object->getTableName()); + $this->assertCount(1, $contentOfTable); + $this->assertSame('update', $contentOfTable[0]['publicVar']); + $this->assertFalse($result); + } + + public static function saveUpdateHookProvider(): iterable + { + yield from self::hookCalledWithDirectFlagProvider(); + yield from self::saveUpdateHookSkippedWithDirectFlagProvider(); + } + + /** + * @dataProvider saveUpdateHookProvider + */ + public function test_save_update_call_hooks(string $hook): void + { + $object = $this->thereIsAnObject() + ->identifiable() + ->withHook($hook) + ->persisted() + ->object(); + + $result = \DB::save($object); + + $this->assertMethodCalledOnObject($object, $hook); + $this->assertFalse($result); + } + + public static function saveUpdateHookSkippedWithDirectFlagProvider(): iterable + { + yield ['preSave']; + yield ['preUpdate']; + yield ['postUpdate']; + yield ['postSave']; + } + + /** + * @dataProvider saveUpdateHookSkippedWithDirectFlagProvider + */ + public function test_save_update_skip_hook_with_direct_flag(string $hook): void + { + $object = $this->thereIsAnObject() + ->identifiable() + ->withHook($hook) + ->persisted() + ->object(); + + $result = \DB::save($object, true); + + $this->assertMethodNotCalledOnObject($object, $hook); + $this->assertFalse($result); + } + + /** + * @dataProvider hookCalledWithDirectFlagProvider + */ + public function test_save_update_call_hook_with_direct_flag(string $hook): void + { + $object = $this->thereIsAnObject() + ->identifiable() + ->withHook($hook) + ->persisted() + ->object(); + + $result = \DB::save($object, true); + + $this->assertMethodCalledOnObject($object, $hook); + $this->assertFalse($result); + } + + public function test_save_update_do_not_update_when_object_is_not_changed(): void + { + $object = $this->thereIsAnObject() + ->identifiable() + ->changeable() + ->persisted() + ->object(); + + $object->publicVar = 'update'; + $object->setChanged(false); + $result = \DB::save($object); + + $contentOfTable = $this->contentOfTable($object->getTableName()); + $this->assertCount(1, $contentOfTable); + $this->assertNull($contentOfTable[0]['publicVar']); // Not updated + $this->assertTrue($result); + } + + public function test_save_update_do_not_encrypt_when_object_is_not_changed(): void + { + $object = $this->thereIsAnObject() + ->identifiable() + ->changeable() + ->withHook('encrypt') + ->withHook('decrypt') + ->persisted() + ->object(); + + $object->setChanged(false); + $result = \DB::save($object, true); + + $this->assertMethodNotCalledOnObject($object, 'encrypt'); + // $this->assertMethodNotCalledOnObject($object, 'decrypt'); // TODO: pourquoi decrypt alors qu’on n’est censé rien save ici ? + $this->assertTrue($result); + } + + public function test_checksum_empty_table(): void + { + $object = $this->thereIsAnObject()->object(); + + $result = \DB::checksum($object->getTableName()); + + $this->assertSame('0', $result); + } + + public function test_checksum_with_one_row_table(): void + { + $object = $this->thereIsAnObject()->persisted()->object(); + + $result = \DB::checksum($object->getTableName()); + + $this->assertSame('3036305396', $result); + } + + public function test_remove_not_identifiable_object(): void + { + $object = $this->thereIsAnObject()->withField('publicVar', 'Hello')->persisted()->object(); + $this->thereIsAnObjectFrom($object)->persisted(3); + + $result = \DB::remove($object); + + $this->assertCount(2,$this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + public function test_remove_identifiable_object(): void + { + $object = $this->thereIsAnObject() + ->persisted(3) + ->object(); + + $result = \DB::remove($object); + + $this->assertCount(2, $this->contentOfTable($object->getTableName())); + $this->assertFalse($result); + } + + private function thereIsAnObject(): ObjectMockBuilder + { + return new ObjectMockBuilder(); + } + + private function thereIsAnObjectFrom(object $object): ObjectMockBuilder + { + return new ObjectMockBuilder($object); + } + + /** + * @before + */ + protected function beginTransaction(): void + { + $connection = \DB::getConnection(); + $connection->beginTransaction(); + $this->inTransaction = true; + } + + /** + * @after + */ + protected function rollback(): void + { + if (false === $this->inTransaction) { + return; + } + + $connection = \DB::getConnection(); + $connection->rollBack(); + $this->inTransaction = false; + } + + protected function setUp(): void + { + global $CONFIG; + $this->originalConfig = $CONFIG; + } + + protected function tearDown(): void + { + restore_error_handler(); + + global $CONFIG; + $CONFIG = $this->originalConfig; + } + + private function thereIsATable(string $tableName, string $structure, array $data = []): void + { + $connection = \DB::getConnection(); + $connection->exec('DROP TABLE IF EXISTS '.$tableName); + $connection->exec('CREATE TABLE '.$tableName.' ('.$structure.')'); + if ('00000' !== $connection->errorCode()) { + $this->fail($connection->errorInfo()[2]); + } + + foreach ($data as $row) { + $statement = $statement ?? $connection->prepare('INSERT INTO '.$tableName.' ('.implode(', ', array_keys($row)).') VALUES ('.implode(', ', array_map(function ($value) { + return ':'.$value; + }, array_keys($row))).')'); + $statement->execute($row); + } + } + + private function contentOfTable(string $table): array + { + $connection = \DB::getConnection(); + + $statement = $connection->query('SELECT * FROM '.$table); + + return $statement->fetchAll(\PDO::FETCH_ASSOC); + } + + private function thereIsABadDatabaseConfiguration(): void + { + $this->rollback(); + + global $CONFIG; + $CONFIG['db']['host'] = 'badhost'; + $reflection = new \ReflectionClass(\DB::class); + $reflection->setStaticPropertyValue('connection', null); + } + + private function expectPhpErrorMessage(string $message): void + { + $this->rollback(); + + set_error_handler(function (int $errno, string $errstr): void { + throw new PhpErrorMock($errstr, $errno); + }); + + $this->expectExceptionMessage($message); + } + + private function randomPositiveInt(): int + { + return random_int(1, 2 ** 30); + } + + private function assertMethodCalledOnObject(object $object, string $hook): void + { + $this->assertTrue($object->isMethodCalled($hook), sprintf('Method %s expects to be called on object %s.', $hook, get_class($object))); + } + + private function assertMethodNotCalledOnObject(object $object, string $hook): void + { + $this->assertFalse($object->isMethodCalled($hook), sprintf('Method %s expects to be NOT called on object %s.', $hook, get_class($object))); + } +} diff --git a/tests/Unit/Mock/DBTestable.php b/tests/Unit/Mock/DBTestable.php new file mode 100644 index 0000000000..f2114af3fb --- /dev/null +++ b/tests/Unit/Mock/DBTestable.php @@ -0,0 +1,41 @@ + $table]; + } + + /** + * @return array{TABLE_NAME: string}[] + */ + protected static function getTablesToOptimize(): array + { + return self::$tablesToOptimize; + } +} diff --git a/tests/Unit/Mock/ObjectMock/ObjectMockBuilder.php b/tests/Unit/Mock/ObjectMock/ObjectMockBuilder.php new file mode 100644 index 0000000000..0d4ea9c2cf --- /dev/null +++ b/tests/Unit/Mock/ObjectMock/ObjectMockBuilder.php @@ -0,0 +1,299 @@ + null, + ]; + + private $publicFields = [ + 'publicVar', + ]; + + private $uniqueFields = []; + + public function __construct(?object $baseObject = null) + { + if (null === $baseObject) { + $this->tableName = str_replace('.', '_', uniqid('mock_', true)); + $this->classMethods = $this->getBaseClassMethods(); + $this->tableStructure = 'id INT NOT NULL AUTO_INCREMENT PRIMARY KEY'; + } else { + $this->tableName = $baseObject->getTableName(); + $this->className = get_class($baseObject); + } + } + + public function changeable(): self + { + $this->addClassMethods(<<methodsCalled[] = 'setChanged'; + \$this->changed = \$changed; + } + + public function getChanged(): ?bool + { + \$this->methodsCalled[] = 'getChanged'; + return \$this->changed; + } +PHP + ); + + return $this; + } + + public function withHook(string $hook): self + { + $this->addClassMethods(<<methodsCalled[] = '{$hook}'; + } + + PHP); + + return $this; + } + + public function withField(string $field, $value = null): self + { + $this->fields[$field] = $value; + + if ('id' !== $field) { + return $this; + } + + $this->addClassMethods(<<id !== null; + } + +PHP + ); + + return $this; + } + + public function withoutHook(string $method): self + { + return $this; + } + + public function withUniqueField(string $field = 'publicVar', $value = 'test'): self + { + $this->fields[$field] = $value; + $this->uniqueFields[] = 'publicVar'; + + $codeValue = var_export($value, true); + $this->addClassMethods(<<{$field} = {$codeValue}; + } + +PHP + ); + + return $this; + } + + public function className(): string + { + return $this->buildClass(); + } + + public function withHooks(string ...$hooks): self + { + $object = $this; + foreach ($hooks as $hook) { + $object = $object->withHook($hook); + } + + return $object; + } + + public function identifiable(): self + { + $this->fields['id'] = null; + + $this->addClassMethods(<<id; + } + + public function setId(?int \$id): void + { + \$this->id = \$id; + } + + PHP); + + return $this; + } + + private function addClassMethods(string $code): void + { + $this->classMethods .= $code; + } + + public function identifiedBy(int $id): self + { + $this->identifiable(); + $this->id = $id; + + return $this; + } + + public function persisted(int $count = 1): self + { + $this->persistCount = $count; + + return $this; + } + + public function object(): object + { + $className = $this->buildClass(); + $object = new $className($this->tableName); + if (null !== $this->id) { + if (!method_exists($object, 'setId')) { + throw new \Exception('Can not set id.'); + } + $object->setId($this->id); + } + foreach ($this->fields as $key => $value) { + if ($key === 'id') { + continue; + } + $object->{$key} = $value; + } + + $this->createObjectTable(); + while ($this->persistCount > 1) { + $persistedObject = clone $object; + \DB::save($persistedObject); + --$this->persistCount; + } + + if ($this->persistCount > 0) { + \DB::save($object); + } + $object->clearMethodsCalled(); + + return $object; + } + + private function createObjectTable(): void + { + $tableName = $this->tableName; + $structure = $this->tableStructure; + foreach ($this->fields as $key => $value) { + if ($key === 'id') { + continue; + } + $structure .= ', '.$key.' VARCHAR(255) DEFAULT NULL'; + } + + foreach ($this->uniqueFields as $key) { + $structure .= ', UNIQUE ('.$key.')'; + } + $connection = \DB::getConnection(); + $connection->exec('DROP TABLE IF EXISTS '.$tableName); + $connection->exec('CREATE TABLE '.$tableName.' ('.$structure.')'); + if ('00000' !== $connection->errorCode()) { + throw new \Exception($connection->errorInfo()[2]); + } + } + + private function getBaseClassMethods(): string + { + return <<tableName}'; + } + + public function __call(string \$method, array \$arguments) + { + \$this->methodsCalled[] = \$method; + } + + public function isMethodCalled(string \$method): bool + { + return in_array(\$method, \$this->methodsCalled ?? [], true); + } + + public function getMethodsCalled(): array + { + return \$this->methodsCalled; + } + + public function clearMethodsCalled(): void + { + \$this->methodsCalled = []; + } + +PHP; + } + + private function buildClass(): string + { + if (null !== $this->className) { + return $this->className; + } + + $newClassName = str_replace('.', '_', uniqid('ObjectMock_', true)); + $classProperties = ''; + foreach ($this->fields as $parameter => $value) { + $visibility = 'private'; + if (in_array($parameter, $this->publicFields, true)) { + $visibility = 'public'; + } + $classProperties .= <<classMethods} + } + PHP; + eval($code); + + $this->className = $newClassName; + + return $this->className; + } +} diff --git a/tests/Unit/Mock/PhpErrorMock.php b/tests/Unit/Mock/PhpErrorMock.php new file mode 100644 index 0000000000..9498a9b5bb --- /dev/null +++ b/tests/Unit/Mock/PhpErrorMock.php @@ -0,0 +1,7 @@ + + +require_once dirname(__DIR__).'/core/config/common.config.env.php'; +global $CONFIG; + +$connection = new PDO(sprintf('mysql:host=%s;port=%u;charset=utf8', $CONFIG['db']['host'], $CONFIG['db']['port']), $CONFIG['db']['username'], $CONFIG['db']['password']); +$connection->query('DROP DATABASE IF EXISTS '.$CONFIG['db']['dbname']); +$connection->query('CREATE DATABASE '.$CONFIG['db']['dbname']); +$connection->query('GRANT ALL PRIVILEGES ON '.$CONFIG['db']['dbname'].'.* TO "'.$CONFIG['db']['username'].'"@"%" IDENTIFIED BY "'.$CONFIG['db']['password'].'"'); +$connection->query('FLUSH PRIVILEGES'); + +ob_start(); +require_once dirname(__DIR__).'/install/database.php'; + +require_once dirname(__DIR__).'/core/class/config.class.php'; +config::save('api', config::genKey()); + +$user = new user(); +$user->setLogin('admin'); +$user->setPassword(sha512('admin')); +$user->setProfils('admin'); +$user->save(); + +ob_end_clean(); + +require_once dirname(__DIR__).'/core/php/core.inc.php'; + +function dd(...$vars) +{ + foreach ($vars as $var) { + var_dump($var); + } + exit; +} diff --git a/tests/cacheTest.php b/tests/cacheTest.php deleted file mode 100644 index cc80764611..0000000000 --- a/tests/cacheTest.php +++ /dev/null @@ -1,71 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - - -class cacheTest extends TestCase { - public function testSave() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - cache::set('toto', 'toto'); - $this->assertTrue(true); - } - - /** - * @depends testSave - */ - public function testLoad() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cache = cache::byKey('toto'); - $this->assertEquals('toto', $cache->getValue()); - } - - /** - * @depends testLoad - */ - public function testRemove() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cache = cache::byKey('toto'); - $cache->remove(); - $this->assertTrue(true); - } - - /** - * @depends testRemove - */ - public function testDefault() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cache = cache::byKey('toto'); - $this->assertEquals(null, $cache->getValue()); - } - - /** - * @depends testDefault - */ - public function testTime() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - cache::set('toto', 'toto', 1); - $cache = cache::byKey('toto'); - $this->assertEquals('toto', $cache->getValue()); - sleep(2); - $cache = cache::byKey('toto'); - $this->assertEquals(null, $cache->getValue()); - } - -} -?> diff --git a/tests/class/ajaxTest.php b/tests/class/ajaxTest.php deleted file mode 100644 index fd177b7272..0000000000 --- a/tests/class/ajaxTest.php +++ /dev/null @@ -1,65 +0,0 @@ -. -*/ -use PHPUnit\Framework\TestCase; - -class ajaxTest extends TestCase -{ - public function getSuccessResponses() - { - return array( - array( - array('foo'=>'bar','bar'=>'baz'), - '{"state":"ok","result":{"foo":"bar","bar":"baz"}}', - ), - ); - } - - public function getErrorResponses() - { - return array( - array( - array('foo'=>'bar','bar'=>'baz'), - 1234, - '{"state":"error","result":{"foo":"bar","bar":"baz"},"code":1234}', - ), - ); - } - - /** - * @dataProvider getSuccessResponses - * @param mixed $data - * @param string $out - */ - public function testSuccess($data, $out) - { - $response = ajax::getResponse($data); - $this->assertEquals($out, $response); - } - - /** - * @dataProvider getErrorResponses - * @param mixed $data - * @param int $code - * @param string $out - */ - public function testError($data, $code, $out) - { - $response = ajax::getResponse($data, $code); - $this->assertEquals($out, $response); - } -} diff --git a/tests/class/scenarioTest.php b/tests/class/scenarioTest.php deleted file mode 100644 index 139329d9a9..0000000000 --- a/tests/class/scenarioTest.php +++ /dev/null @@ -1,82 +0,0 @@ -. -*/ -use PHPUnit\Framework\TestCase; - -class scenarioTest extends TestCase { - - public function getGetSets() { - return array( - array('Id', 'foo', 'foo'), - array('Name', 'foo', 'foo'), - array('State', 'foo', 'foo'), - array('IsActive', true, true), - array('Group', 'foo', 'foo'), - array('LastLaunch', 'foo', 'foo'), - array('Mode', 'foo', 'foo'), - array('Schedule', array('foo' => 'bar'), array('foo' => 'bar')), - array('Schedule', '{"foo":"bar"}', array('foo' => 'bar')), - array('Schedule', 'foo', 'foo'), - array('PID', 1, 1), - array('ScenarioElement', array('foo' => 'bar'), array('foo' => 'bar')), - array('ScenarioElement', '{"foo":"bar"}', array('foo' => 'bar')), - array('ScenarioElement', 'foo', 'foo'), - array('Trigger', array('foo' => 'bar'), array('foo' => 'bar')), - array('Trigger', '{"foo":"bar"}', array('foo' => 'bar')), - array('Trigger', 'foo', array('foo')), - array('Timeout', '', 0), - array('Timeout', 'foo', 0), - array('Timeout', 0.9, 0), - array('Timeout', 1.1, 1.1), - array('Timeout', 15, 15), - array('Object_id', null, null), - array('Object_id', array('foo'), null), - array('Object_id', 0, null), - array('Object_id', 150, 150), - array('IsVisible', true, 0), - array('IsVisible', 5, 5), - array('IsVisible', 'foo', 0), - array('Description', 'foo', 'foo'), - ); - } - - /** - * @dataProvider getGetSets - * @param unknown $attribute - * @param unknown $in - * @param unknown $out - */ - public function testGetterSetter($attribute, $in, $out) { - $scenario = new scenario(); - $getter = 'get' . $attribute; - $setter = 'set' . $attribute; - $scenario->$setter($in); - $this->assertSame($out, $scenario->$getter()); - } - - public function testPersistLog() { - $path = __DIR__ . '/../../log/scenarioLog/scenarioTest.log'; - if (file_exists($path)) { - $this->markTestSkipped('Le fichier "' . $path . '" existe déjà. Veuillez le supprimer.'); - } - $scenario = new scenario(); - $scenario->setId('Test'); - $scenario->persistLog(); - $this->assertTrue(file_exists($path)); - shell_exec('rm ' . $path); - } -} diff --git a/tests/com/shellTest.php b/tests/com/shellTest.php deleted file mode 100644 index 6cf191287e..0000000000 --- a/tests/com/shellTest.php +++ /dev/null @@ -1,122 +0,0 @@ -. -*/ -use PHPUnit\Framework\TestCase; - -class shellTest extends TestCase { - /******************* Base ********************/ - public function getBackgrounds() { - return array( - array(true), - array(false), - ); - } - - public function testGetCmd() { - $shell = new com_shell('ls'); - $this->assertSame('ls', $shell->getCmd()); - } - - public function testCommandExist() { - $shell = new com_shell(); - $this->assertTrue($shell->commandExist('ls')); - $this->assertFalse($shell->commandExist('foo')); - } - - /** - * @dataProvider getBackgrounds - * @var bool $in - */ - public function testBackground($in) { - $shell = new com_shell(); - $shell->setBackground($in); - $this->assertSame($in, $shell->getBackground()); - } - - public function testExec() { - if (file_exists('foo.txt')) - { - $this->markTestSkipped( - 'Un fichier foo.txt existe. Veuillez le supprimer.' - ); - } - $shell = new com_shell('touch foo.txt'); - $return = $shell->exec(); - $this->assertEmpty($return); - $this->assertTrue(file_exists('foo.txt')); - - $shell = new com_shell('rm foo.txt'); - $return = $shell->exec(); - $this->assertEmpty($return); - $this->assertFalse(file_exists('foo.txt')); - - $shell = new com_shell('echo foo'); - $return = $shell->exec(); - $this->assertSame('foo', $return); - } - - /*************** Improvement *****************/ - public function testInstance() { - $shell = com_shell::getInstance(); - $this->assertInstanceOf('com_shell', $shell); - } - - public function testExecute() { - if (file_exists('bar.txt')) - { - $this->markTestSkipped( - 'Un fichier bar.txt existe. Veuillez le supprimer.' - ); - } - $result = com_shell::execute('touch bar.txt'); - $this->assertEmpty($result); - $this->assertTrue(file_exists('bar.txt')); - - $result = com_shell::execute('rm bar.txt'); - $this->assertEmpty($result); - $this->assertFalse(file_exists('bar.txt')); - - $result = com_shell::execute('echo bar'); - $this->assertSame('bar', $result); - } - - public function testCache() { - $shell = com_shell::getInstance(); - $shell->clearHistory(); - $shell->addCmd('echo foo'); - $result = com_shell::execute('echo bar'); - $this->assertSame('bar', $result); - $this->assertSame(array('echo bar 2>&1'), $shell->getHistory()); - $result = $shell->exec(); - $this->assertSame('foo', $result); - } - - public function testHistory() { - $shell = com_shell::getInstance(); - $shell->clearHistory(); - $this->assertSame(array(), $shell->getHistory()); - com_shell::execute('echo foo'); - $this->assertSame(array('echo foo 2>&1'), $shell->getHistory()); - $shell->addCmd('echo bar'); - $shell->addCmd('echo baz'); - $this->assertSame(array('echo foo 2>&1'), $shell->getHistory()); - $shell->exec(); - $this->assertSame(array('echo foo 2>&1', 'echo bar 2>&1', 'echo baz 2>&1'), $shell->getHistory()); - $shell->clearHistory(); - $this->assertSame(array(), $shell->getHistory()); - } -} diff --git a/tests/configTest.php b/tests/configTest.php deleted file mode 100644 index 42847d188c..0000000000 --- a/tests/configTest.php +++ /dev/null @@ -1,55 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - - -class configTest extends TestCase { - public function testSave() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - config::save('toto', 'toto'); - $this->assertTrue(true); - } - - /** - * @depends testSave - */ - public function testLoad() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $this->assertEquals('toto', config::byKey('toto')); - } - - /** - * @depends testLoad - */ - public function testRemove() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - config::remove('toto'); - $this->assertTrue(config::byKey('toto') == ''); - } - - /** - * @depends testRemove - */ - public function testDefault() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $this->assertEquals('plop', config::byKey('toto', 'core', 'plop')); - } - -} -?> diff --git a/tests/cronTest.php b/tests/cronTest.php deleted file mode 100644 index f402768772..0000000000 --- a/tests/cronTest.php +++ /dev/null @@ -1,98 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - -class cronTest extends TestCase { - public function testCreate() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cron1 = new cron(); - $cron1->setClass('calendar'); - $cron1->setFunction('pull'); - $cron1->setLastRun(date('Y-m-d H:i:s')); - $cron1->setSchedule('00 00 * * * 2020'); - $cron1->save(); - - $cron2 = new cron(); - $cron2->setClass('calendar'); - $cron2->setFunction('pull'); - $cron2->setLastRun(date('Y-m-d H:i:s')); - $cron2->setSchedule('00 00 * * * 2020'); - $cron2->save(); - - $this->assertSame($cron1->getId(), $cron2->getId()); - - $cron1 = cron::byClassAndFunction('calendar', 'pull'); - if (!is_object($cron1)) { - throw new Exception("Impossible de trouver calend::pull"); - } - $cron1->remove(); - } - - public function testCreateWithOption() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cron1 = cron::byClassAndFunction('calendar', 'pull', array('event_id' => intval(1))); - if (!is_object($cron1)) { - $cron1 = new cron(); - $cron1->setClass('calendar'); - $cron1->setFunction('pull'); - $cron1->setOption(array('event_id' => intval(1))); - $cron1->setLastRun(date('Y-m-d H:i:s')); - } - $cron1->setSchedule('00 00 * * * 2020'); - $cron1->save(); - - $cron2 = cron::byClassAndFunction('calendar', 'pull', array('event_id' => intval(2))); - if (!is_object($cron2)) { - $cron2 = new cron(); - $cron2->setClass('calendar'); - $cron2->setFunction('pull'); - $cron2->setOption(array('event_id' => intval(2))); - $cron2->setLastRun(date('Y-m-d H:i:s')); - } - $cron2->setSchedule('00 00 * * * 2020'); - $cron2->save(); - - $this->assertNotSame($cron1->getId(), $cron2->getId()); - - $cron3 = cron::byClassAndFunction('calendar', 'pull', array('event_id' => intval(1))); - if (!is_object($cron3)) { - $cron3 = new cron(); - $cron3->setClass('calendar'); - $cron3->setFunction('pull'); - $cron3->setOption(array('event_id' => intval(1))); - $cron3->setLastRun(date('Y-m-d H:i:s')); - } - $cron3->setSchedule('00 00 * * * 2020'); - $cron3->save(); - - $this->assertSame($cron1->getId(), $cron3->getId()); - - $cron1 = cron::byClassAndFunction('calendar', 'pull', array('event_id' => intval(1))); - if (!is_object($cron1)) { - throw new Exception("Impossible de trouver calend::pull (1)"); - } - $cron1->remove(); - $cron2 = cron::byClassAndFunction('calendar', 'pull', array('event_id' => intval(2))); - if (!is_object($cron2)) { - throw new Exception("Impossible de trouver calend::pull (2)"); - } - $cron2->remove(); - } -} -?> diff --git a/tests/logTest.php b/tests/logTest.php deleted file mode 100644 index 9e24ccabac..0000000000 --- a/tests/logTest.php +++ /dev/null @@ -1,125 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - -class logTest extends TestCase { - public function getEngins() { - return array( - array('StreamHandler', 'Monolog\Handler\StreamHandler'), - array('foo', 'Monolog\Handler\StreamHandler'), - ); - } - - public function getLogs() { - return array( - array('StreamHandler', 'foo', false, true), - ); - } - - public function getReturnListe() { - return array( - array('StreamHandler', array('http.error')), - ); - } - - public function getLevels() { - return array( - array('StreamHandler', 'debug'), - array('StreamHandler', 'info'), - array('StreamHandler', 'notice'), - array('StreamHandler', 'warning'), - array('StreamHandler', 'error'), - ); - } - - public function getErrorReporting() { - return array( - array(Monolog\Logger::DEBUG, E_ERROR | E_WARNING | E_PARSE | E_NOTICE), - array(Monolog\Logger::INFO, E_ERROR | E_WARNING | E_PARSE | E_NOTICE), - array(Monolog\Logger::NOTICE, E_ERROR | E_WARNING | E_PARSE | E_NOTICE), - array(Monolog\Logger::WARNING, E_ERROR | E_WARNING | E_PARSE), - array(Monolog\Logger::ERROR, E_ERROR | E_PARSE), - array(Monolog\Logger::CRITICAL, E_ERROR | E_PARSE), - array(Monolog\Logger::ALERT, E_ERROR | E_PARSE), - array(Monolog\Logger::EMERGENCY, E_ERROR | E_PARSE), - ); - } - - /** - * @dataProvider getEngins - * @param string $name - * @param string $instance - */ - public function testLoggerHandler($name, $instance) { - config::save('log::engine', $name); - $logger = log::getLogger($name); - $this->assertInstanceOf('Monolog\\Logger', $logger); - $handler = $logger->popHandler(); - $this->assertInstanceOf($instance, $handler); - } - - /** - * @dataProvider getLogs - * @param string $engin - * @param string $message - * @param string $get - * @param string $removeAll - */ - public function testAddGetRemove($engin, $message, $get, $removeAll) { - config::save('log::engine', $engin); - log::remove($engin); - $add = log::add($engin, 'debug', $message); // <- Effet de bord! - $this->assertNull($add); - $this->assertSame($get, log::get($engin, 0, 1)); - $this->assertSame($removeAll, log::removeAll()); - } - - /** - * @dataProvider getLevels - * @param string $engin - * @param string $level - */ - public function testAddLevels($engin, $level) { - config::save('log::engine', $engin); - log::remove($engin); - $add = log::add($engin, $level, 'testLevel'); - $this->assertTrue(true); - } - - /** - * @dataProvider getReturnListe - * @param string $engin - * @param string $return - */ - public function testListe($engin, $return) { - config::save('log::engine', $engin); - log::add($engin, 'debug', 'toto'); - $this->assertSame($return, log::liste()); - } - - /** - * @dataProvider getErrorReporting - * @param int $level - * @param int $result - */ - public function testErrorReporting($level, $result) { - $this->assertNull(log::define_error_reporting($level)); - $this->assertSame($result, error_reporting()); - } -} diff --git a/tests/php/utilsTest.php b/tests/php/utilsTest.php deleted file mode 100644 index 6122ca4226..0000000000 --- a/tests/php/utilsTest.php +++ /dev/null @@ -1,101 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - -class utilsTest extends TestCase { - public function getTemplates() { - return array( - array('Vous êtes sur {{Nom}} version {{Version}}', 'Vous êtes sur Jeedom version 1.2.3'), - array('{{La poule}} {{pond}}', 'L\'oeuf est pondu'), - ); - } - - /** - * @dataProvider getTemplates - */ - public function testTemplace_replace($template, $out) { - $rules = array( - '{{Nom}}' => 'Jeedom', - '{{Version}}' => '1.2.3', - '{{La poule}}' => 'L\'oeuf', - '{{pond}}' => 'est pondu', - ); - $result = template_replace($rules, $template); - $this->assertSame($out, $result); - } - - public function testInit() { - $_GET['get'] = 'foo'; - $_POST['post'] = 'bar'; - $_REQUEST['request'] = 'baz'; - $this->assertSame('foo', init('get')); - $this->assertSame('bar', init('post')); - $this->assertSame('baz', init('request')); - $this->assertSame('foobar', init('default','foobar')); - } - - public function getTimes() { - return array( - array(0, '0s'), - array(60, '1min 0s'), - array(65, '1min 5s'), - array(186, '3min 6s'), - array(3600, '1h 0min 0s'), - array(86400, '1j 0h 0min 0s'), - array(86401, '1j 0h 0min 1s'), - array(259199, '2j 23h 59min 59s'), - ); - } - - /** - * @dataProvider getTimes - */ - public function testConvertDuartion($in, $out) { - $this->assertSame($out, convertDuration($in)); - } - - public function getJsons() { - return array( - array(json_encode(array('foo','bar')), true), - array(json_encode(array('foo'=>'bar')), true), - array('{"foo":"bar"}', true), - array('foo bar', false), - ); - } - - /** - * @dataProvider getJsons - */ - public function testIs_json($in, $out) { - $this->assertSame($out, is_json($in)); - } - - public function getPaths() { - return array( - array('/home/user/doc/../../me/docs', '/home/me/docs'), - ); - } - - /** - * @dataProvider getPaths - */ - public function testCleanPath($in, $out) { - $this->assertSame($out, cleanPath($in)); - } -} diff --git a/tests/pluginTest.php b/tests/pluginTest.php deleted file mode 100644 index 3f419083e0..0000000000 --- a/tests/pluginTest.php +++ /dev/null @@ -1,290 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - -class pluginTest extends TestCase { - public function getSources() { - return array( - array('market', array( - 'version' => 'stable', - )) - ); - } - - /** - * @dataProvider getSources - */ - public function testInstall($source, $config) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - config::save('github::enable', 1); - config::save('market::enable', 1); - try { - $plugin = plugin::byId('virtual'); - } catch (Exception $e) { - $update = new update(); - $update->setLogicalId('virtual'); - $update->setSource($source); - foreach ($config as $key => $value) { - $update->setConfiguration($key, $value); - } - $update->save(); - $update->doUpdate(); - $plugin = plugin::byId('virtual'); - } - if (!$plugin->isActive()) { - $plugin->setIsEnable(1); - } - $this->assertSame('1', $plugin->isActive()); - } - - /** - * @depends testInstall - */ - public function testCreateEqVirtual() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - require_once __DIR__ .'/../plugins/virtual/core/class/virtual.class.php'; - $virtual = virtual::byLogicalId('virtual_test', 'virtual'); - if (is_object($virtual)) { - $virtual->remove(); - } - $virtual = new virtual(); - $virtual->setEqType_name('virtual'); - $virtual->setName('virtual_test'); - $virtual->setLogicalId('virtual_test'); - $virtual->setIsEnable(1); - $virtual->save(); - $this->assertTrue((is_numeric($virtual->getId()) && $virtual->getId() != '')); - return $virtual; - } - - /** - * @depends testCreateEqVirtual - */ - public function testCreateCmdVirtualBinary($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = new virtualCmd(); - $cmd->setName('test_calcul_binary'); - $cmd->setType('info'); - $cmd->setSubtype('binary'); - $cmd->setLogicalId('virtual_test_1'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('calcul', 1); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCreateCmdVirtualNumeric($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = new virtualCmd(); - $cmd->setName('test_calcul_numeric'); - $cmd->setType('info'); - $cmd->setSubtype('numeric'); - $cmd->setLogicalId('virtual_test_2'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('calcul', '1+1'); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCmdVirtualNumeric($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = $virtual->getCmd(null, 'virtual_test_2'); - $this->assertSame(2.0, $cmd->execCmd()); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCreateCmdVirtualString($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = new virtualCmd(); - $cmd->setName('test_calcul_string'); - $cmd->setType('info'); - $cmd->setSubtype('string'); - $cmd->setLogicalId('virtual_test_3'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('calcul', 'toto'); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCmdVirtualString($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = $virtual->getCmd(null, 'virtual_test_3'); - $this->assertSame('toto', $cmd->execCmd()); - $cmd->event('tata'); - $this->assertSame('tata', $cmd->execCmd()); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCreateCmdVirtualActionOther($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = new virtualCmd(); - $cmd->setName('test_action_other_on'); - $cmd->setType('action'); - $cmd->setSubtype('other'); - $cmd->setLogicalId('virtual_test_4'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('infoName', 'test_action_other_info'); - $cmd->setConfiguration('value', 1); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - - $virtual = virtual::byLogicalId('virtual_test', 'virtual'); - $cmd = new virtualCmd(); - $cmd->setName('test_action_other_off'); - $cmd->setType('action'); - $cmd->setSubtype('other'); - $cmd->setLogicalId('virtual_test_5'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('infoName', 'test_action_other_info'); - $cmd->setConfiguration('value', 0); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - - $virtual = virtual::byLogicalId('virtual_test', 'virtual'); - $cmd = new virtualCmd(); - $cmd->setName('test_action_other_string'); - $cmd->setType('action'); - $cmd->setSubtype('other'); - $cmd->setLogicalId('virtual_test_6'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('infoName', 'test_action_other_info'); - $cmd->setConfiguration('value', 'plop'); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - - $info = virtualCmd::byEqLogicIdCmdName($virtual->getId(), 'test_action_other_info'); - $virtual = virtual::byLogicalId('virtual_test', 'virtual'); - $cmd = new virtualCmd(); - $cmd->setName('test_action_other_toggle'); - $cmd->setType('action'); - $cmd->setSubtype('other'); - $cmd->setLogicalId('virtual_test_7'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('infoName', 'test_action_other_info'); - $cmd->setConfiguration('value', 'not(#' . $info->getId() . '#)'); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCmdVirtualActionOther($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $info = virtualCmd::byEqLogicIdCmdName($virtual->getId(), 'test_action_other_info'); - $action_on = $virtual->getCmd(null, 'virtual_test_4'); - $action_on->execCmd(); - $this->assertSame(1, intval($info->execCmd())); - - $action_off = $virtual->getCmd(null, 'virtual_test_5'); - $action_off->execCmd(); - $this->assertSame(0, intval($info->execCmd())); - - $action_toggle = $virtual->getCmd(null, 'virtual_test_7'); - $action_toggle->execCmd(); - $this->assertSame(1, intval($info->execCmd())); - - $action_other = $virtual->getCmd(null, 'virtual_test_6'); - $action_other->execCmd(); - $this->assertSame('plop', $info->execCmd()); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCreateCmdVirtualActionNumeric($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = new virtualCmd(); - $cmd->setName('test_action_slider'); - $cmd->setType('action'); - $cmd->setSubtype('slider'); - $cmd->setLogicalId('virtual_test_8'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('infoName', 'test_action_slider_info'); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCmdVirtualActionNumeric($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $action = $virtual->getCmd(null, 'virtual_test_8'); - $info = virtualCmd::byEqLogicIdCmdName($virtual->getId(), 'test_action_slider_info'); - $action->execCmd(array('slider' => 12)); - $this->assertSame(12, intval($info->execCmd())); - $action->execCmd(array('slider' => 95)); - $this->assertSame(95, intval($info->execCmd())); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCreateCmdVirtualActionColor($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $cmd = new virtualCmd(); - $cmd->setName('test_action_color'); - $cmd->setType('action'); - $cmd->setSubtype('color'); - $cmd->setLogicalId('virtual_test_9'); - $cmd->setEqLogic_id($virtual->getId()); - $cmd->setConfiguration('infoName', 'test_action_color_info'); - $cmd->save(); - $this->assertTrue((is_numeric($cmd->getId()) && $cmd->getId() != '')); - } - - /** - * @depends testCreateEqVirtual - */ - public function testCmdVirtualActionColor($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $action = $virtual->getCmd(null, 'virtual_test_9'); - $info = virtualCmd::byEqLogicIdCmdName($virtual->getId(), 'test_action_color_info'); - $action->execCmd(array('color' => '#451256')); - $this->assertSame('#451256', $info->execCmd()); - $action->execCmd(array('color' => '#895475')); - $this->assertSame('#895475', $info->execCmd()); - } - - /** - * @depends testCreateEqVirtual - */ - public function testRemove($virtual) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $id = $virtual->getId(); - $virtual->remove(); - $this->assertEquals(null,virtual::byId($id)); - } - -} -?> diff --git a/tests/scenarioExpressionTest.php b/tests/scenarioExpressionTest.php deleted file mode 100644 index 03acb12182..0000000000 --- a/tests/scenarioExpressionTest.php +++ /dev/null @@ -1,52 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - -class scenarioExpressionTest extends TestCase { - - public function testCalculCondition() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $tests = array( - '1+1' => 2, - ); - foreach ($tests as $key => $value) { - echo "\n\t " . $key . ' = ' . $value; - $result = scenarioExpression::createAndExec('condition', $key); - $this->assertEquals(2, $value); - } - echo "\n"; - } - - public function testVariable() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - scenarioExpression::createAndExec('action', 'variable', array('value' => 'plop', 'name' => 'test')); - $result = scenarioExpression::createAndExec('condition', 'variable(test)'); - $this->assertEquals('plop', $result); - } - - /** - * @depends testVariable - */ - public function testStringCondition() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $result = scenarioExpression::createAndExec('condition', 'variable(test) == "plop"'); - $this->assertTrue($result); - } -} -?> diff --git a/tests/userTest.php b/tests/userTest.php deleted file mode 100644 index f41a4df22d..0000000000 --- a/tests/userTest.php +++ /dev/null @@ -1,59 +0,0 @@ -. -*/ - -use PHPUnit\Framework\TestCase; - -class userTest extends TestCase { - public function testCreate() { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $user_array = array( - 'login' => 'test', - 'password' => 'test', - ); - $user = new user(); - utils::a2o($user, $user_array); - $user->setPassword(sha512($user_array['password'])); - $user->save(); - - $this->assertTrue((is_numeric($user->getId()) && $user->getId() != '')); - $this->assertEquals($user_array['login'], $user->getLogin()); - $this->assertEquals(sha512($user_array['password']), $user->getPassword()); - return $user; - } - - /** - * @depends testCreate - */ - public function testConnect($_user) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $user = user::connect('test', 'test'); - $this->assertEquals($user->getId(), $_user->getId()); - } - - /** - * @depends testCreate - */ - public function testRemove($_user) { - echo "\n" . __CLASS__ . '::' . __FUNCTION__ . ' : '; - $id = $_user->getId(); - $_user->remove(); - $this->assertEquals(null,user::byId($id)); - } - -} -?>