diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..622691cd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,11 @@ +name: test + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: docker-compose run tests + - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e866c8b9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -services: docker - -script: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - docker-compose run tests - -after_success: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6d754473..b114ff79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3-cli +FROM php:7.4-cli RUN apt-get update \ && apt-get install -y unzip \ diff --git a/README.md b/README.md index a5fcac86..ac6c2e9d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## PHP library for Plesk XML-RPC API -[![Build Status](https://travis-ci.com/plesk/api-php-lib.svg?branch=master)](https://travis-ci.com/plesk/api-php-lib) +[![Test Status](https://github.com/plesk/api-php-lib/actions/workflows/test.yml/badge.svg)](https://github.com/plesk/api-php-lib/actions/workflows/test.yml) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/plesk/api-php-lib/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/plesk/api-php-lib/?branch=master) [![StyleCI](https://styleci.io/repos/26514840/shield?branch=master)](https://styleci.io/repos/26514840) [![codecov](https://codecov.io/gh/plesk/api-php-lib/branch/master/graph/badge.svg?token=5Kwbddpdeb)](https://codecov.io/gh/plesk/api-php-lib) diff --git a/composer.json b/composer.json index 3142565c..29246498 100644 --- a/composer.json +++ b/composer.json @@ -14,21 +14,23 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" }, "require-dev": { "phpunit/phpunit": "^9", - "spatie/phpunit-watcher": "^1.22" + "spatie/phpunit-watcher": "^1.22", + "vimeo/psalm": "^4.10" }, "config": { "process-timeout": 0 }, "scripts": { "test": "phpunit", - "test:watch": "phpunit-watcher watch" + "test:watch": "phpunit-watcher watch", + "lint": "psalm" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 1c6fbd7f..8e37f4e7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,175 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "330651d827abd67d78e7962e9cd539d5", + "content-hash": "29ddab81b559997ef3ca40b6a2c85d56", "packages": [], "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.6.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", + "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-09-23T18:43:08+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\ByteStream\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-03-30T17:13:30+00:00" + }, { "name": "clue/stdio-react", "version": "v2.4.0", @@ -67,6 +233,10 @@ "stdio", "stdout" ], + "support": { + "issues": "https://github.com/clue/reactphp-stdio/issues", + "source": "https://github.com/clue/reactphp-stdio/tree/v2.4.0" + }, "funding": [ { "url": "https://clue.engineering/support", @@ -136,6 +306,10 @@ "vt100", "xterm" ], + "support": { + "issues": "https://github.com/clue/reactphp-term/issues", + "source": "https://github.com/clue/reactphp-term/tree/v1.3.0" + }, "funding": [ { "url": "https://clue.engineering/support", @@ -195,6 +369,10 @@ "utf-8", "utf8" ], + "support": { + "issues": "https://github.com/clue/reactphp-utf8/issues", + "source": "https://github.com/clue/reactphp-utf8/tree/v1.2.0" + }, "funding": [ { "url": "https://clue.engineering/support", @@ -207,6 +385,261 @@ ], "time": "2020-11-06T11:48:09+00:00" }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.4", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b174585d1fe49ceed21928a945138948cb394600" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", + "reference": "b174585d1fe49ceed21928a945138948cb394600", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" + }, + "funding": [ + { + "url": "https://packagist.com/", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-09-13T08:41:34+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de/" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be/" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl/" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "funding": [ + { + "url": "https://packagist.com/", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + }, + "funding": [ + { + "url": "https://packagist.com/", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-07-31T17:03:58+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -256,6 +689,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -313,20 +750,125 @@ "event-dispatcher", "event-emitter" ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/master" + }, "time": "2017-07-23T21:35:13+00:00" }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + }, + "time": "2021-02-22T14:02:09+00:00" + }, { "name": "jolicode/jolinotif", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/jolicode/JoliNotif.git", - "reference": "52f5b98f964f6009b8ec4c0e951edcd0862e2ac7" + "reference": "9cca717bbc47aa2ffeca51d77daa13b824a489ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/52f5b98f964f6009b8ec4c0e951edcd0862e2ac7", - "reference": "52f5b98f964f6009b8ec4c0e951edcd0862e2ac7", + "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/9cca717bbc47aa2ffeca51d77daa13b824a489ee", + "reference": "9cca717bbc47aa2ffeca51d77daa13b824a489ee", "shasum": "" }, "require": { @@ -344,7 +886,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { @@ -370,7 +912,17 @@ "notification", "windows" ], - "time": "2020-06-17T08:25:38+00:00" + "support": { + "issues": "https://github.com/jolicode/JoliNotif/issues", + "source": "https://github.com/jolicode/JoliNotif/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/jolicode/jolinotif", + "type": "tidelift" + } + ], + "time": "2021-03-07T12:30:00+00:00" }, { "name": "myclabs/deep-copy", @@ -418,6 +970,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -426,70 +982,178 @@ ], "time": "2020-11-13T09:40:50+00:00" }, + { + "name": "netresearch/jsonmapper", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + }, + "time": "2020-12-01T19:48:11+00:00" + }, { "name": "nikic/php-parser", - "version": "v4.10.4", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + }, + "time": "2021-09-20T12:20:58+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "php": ">=5.3.2" }, - "bin": [ - "bin/php-parse" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" + "psr-0": { + "LSS": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "Apache-2.0" ], "authors": [ { - "name": "Nikita Popov" + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com/" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com/" } ], - "description": "A PHP parser written in PHP", + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com/", "keywords": [ - "parser", - "php" + "array", + "array conversion", + "xml", + "xml conversion" ], - "time": "2020-12-20T10:01:03+00:00" + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -532,20 +1196,24 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2020-06-27T14:33:11+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "3.0.4", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", - "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { @@ -579,7 +1247,11 @@ } ], "description": "Library for handling version information and constraints", - "time": "2020-12-13T23:18:30+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -628,6 +1300,10 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, "time": "2020-06-27T09:03:43+00:00" }, { @@ -680,20 +1356,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", "shasum": "" }, "require": { @@ -701,7 +1381,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -725,37 +1406,41 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-09-17T18:55:26+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" + }, + "time": "2021-09-17T15:28:14+00:00" }, { "name": "phpspec/prophecy", - "version": "1.12.2", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "245710e971a030f42e08f4912863805570f23d39" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", - "reference": "245710e971a030f42e08f4912863805570f23d39", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "php": "^7.2 || ~8.0, <8.2", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -788,27 +1473,31 @@ "spy", "stub" ], - "time": "2020-12-19T10:15:11+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + }, + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.5", + "version": "9.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", - "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", + "nikic/php-parser": "^4.12.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -855,13 +1544,17 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-11-28T06:44:49+00:00" + "time": "2021-09-17T05:39:03+00:00" }, { "name": "phpunit/php-file-iterator", @@ -911,6 +1604,10 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -970,6 +1667,10 @@ "keywords": [ "process" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1025,6 +1726,10 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1080,6 +1785,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1090,16 +1799,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.1", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", - "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -1111,11 +1820,11 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", + "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-code-coverage": "^9.2.7", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1129,7 +1838,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3", + "sebastian/type": "^2.3.4", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -1175,6 +1884,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + }, "funding": [ { "url": "https://phpunit.de/donate.html", @@ -1185,31 +1898,26 @@ "type": "github" } ], - "time": "2021-01-17T07:42:25+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1222,7 +1930,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -1234,27 +1942,81 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" }, { "name": "react/event-loop", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "6d24de090cd59cfc830263cfba965be77b563c13" + "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6d24de090cd59cfc830263cfba965be77b563c13", - "reference": "6d24de090cd59cfc830263cfba965be77b563c13", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/be6dee480fc4692cec0504e65eb486e3be1aa6f2", + "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, "suggest": { "ext-event": "~1.0 for ExtEventLoop", @@ -1271,35 +2033,71 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ "asynchronous", "event-loop" ], - "time": "2020-01-01T18:39:52+00:00" + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2021-07-11T12:31:24+00:00" }, { "name": "react/stream", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "7c02b510ee3f582c810aeccd3a197b9c2f52ff1a" + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/7c02b510ee3f582c810aeccd3a197b9c2f52ff1a", - "reference": "7c02b510ee3f582c810aeccd3a197b9c2f52ff1a", + "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.8", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5" + "react/event-loop": "^1.2" }, "require-dev": { "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { @@ -1311,6 +2109,28 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ "event-driven", @@ -1322,7 +2142,21 @@ "stream", "writable" ], - "time": "2020-05-04T10:17:57+00:00" + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2021-07-11T12:37:55+00:00" }, { "name": "sebastian/cli-parser", @@ -1368,6 +2202,10 @@ ], "description": "Library for parsing CLI options", "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1420,6 +2258,10 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1471,6 +2313,10 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1541,6 +2387,10 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1594,6 +2444,10 @@ ], "description": "Library for calculating the complexity of PHP code units", "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1656,6 +2510,10 @@ "unidiff", "unified diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1715,6 +2573,10 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1788,6 +2650,10 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1798,16 +2664,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.2", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", "shasum": "" }, "require": { @@ -1848,13 +2714,17 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-06-11T13:31:12+00:00" }, { "name": "sebastian/lines-of-code", @@ -1901,6 +2771,10 @@ ], "description": "Library for counting the lines of code in PHP source code", "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1954,6 +2828,10 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2005,6 +2883,10 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2064,6 +2946,10 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2115,6 +3001,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2125,16 +3015,16 @@ }, { "name": "sebastian/type", - "version": "2.3.1", + "version": "2.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { @@ -2167,13 +3057,17 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { "name": "sebastian/version", @@ -2216,6 +3110,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2226,25 +3124,26 @@ }, { "name": "spatie/phpunit-watcher", - "version": "1.23.1", + "version": "1.23.2", "source": { "type": "git", "url": "https://github.com/spatie/phpunit-watcher.git", - "reference": "0c70d569658a1cad9a6869716a4351d2ccfec4d1" + "reference": "548be41abab87336ef95cef5bf5cbd564bce5c26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/0c70d569658a1cad9a6869716a4351d2ccfec4d1", - "reference": "0c70d569658a1cad9a6869716a4351d2ccfec4d1", + "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/548be41abab87336ef95cef5bf5cbd564bce5c26", + "reference": "548be41abab87336ef95cef5bf5cbd564bce5c26", "shasum": "" }, "require": { - "clue/stdio-react": "^2.0", - "jolicode/jolinotif": "^2.0", + "clue/stdio-react": "^2.4", + "jolicode/jolinotif": "^2.2", "php": "^7.2 | ^8.0", - "symfony/console": "^5.0", - "symfony/process": "^5.0", - "symfony/yaml": "^5.0", + "symfony/console": "^5.2", + "symfony/finder": "^5.2", + "symfony/process": "^5.2", + "symfony/yaml": "^5.2", "yosymfony/resource-watcher": "^2.0" }, "conflict": { @@ -2280,31 +3179,37 @@ "phpunit-watcher", "spatie" ], - "time": "2020-10-31T17:47:29+00:00" + "support": { + "issues": "https://github.com/spatie/phpunit-watcher/issues", + "source": "https://github.com/spatie/phpunit-watcher/tree/1.23.2" + }, + "time": "2021-02-26T08:00:42+00:00" }, { "name": "symfony/console", - "version": "v5.2.2", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a" + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d62ec79478b55036f65e2602e282822b8eaaff0a", - "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a", + "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", + "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.15", + "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2", "symfony/string": "^5.1" }, "conflict": { + "psr/log": ">=3", "symfony/dependency-injection": "<4.4", "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", @@ -2312,10 +3217,10 @@ "symfony/process": "<4.4" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2", "symfony/config": "^4.4|^5.0", "symfony/dependency-injection": "^4.4|^5.0", "symfony/event-dispatcher": "^4.4|^5.0", @@ -2360,6 +3265,9 @@ "console", "terminal" ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2374,20 +3282,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-08-25T20:02:16+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.2.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", - "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", "shasum": "" }, "require": { @@ -2396,7 +3304,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -2424,6 +3332,9 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2438,24 +3349,25 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2021-03-23T23:28:01+00:00" }, { "name": "symfony/finder", - "version": "v5.2.2", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e" + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/196f45723b5e618bf0e23b97e96d11652696ea9e", - "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", "shasum": "" }, "require": { - "php": ">=7.2.5" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -2482,6 +3394,9 @@ ], "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com/", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2496,20 +3411,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:01:46+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.22.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", - "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { @@ -2521,7 +3436,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2558,6 +3473,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2572,20 +3490,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.22.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", - "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", + "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "shasum": "" }, "require": { @@ -2597,7 +3515,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2636,6 +3554,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2650,20 +3571,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.22.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "6e971c891537eb617a00bb07a43d182a6915faba" + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", - "reference": "6e971c891537eb617a00bb07a43d182a6915faba", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { @@ -2675,7 +3596,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2717,6 +3638,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2731,20 +3655,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T17:09:11+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.22.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", - "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { @@ -2756,7 +3680,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2794,6 +3718,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2808,20 +3735,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.22.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", - "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { @@ -2830,7 +3757,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2870,6 +3797,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2884,20 +3814,20 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.22.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { @@ -2906,7 +3836,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2950,6 +3880,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2964,25 +3897,25 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2021-07-28T13:41:28+00:00" }, { "name": "symfony/process", - "version": "v5.2.2", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f" + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f", - "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f", + "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", + "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", "shasum": "" }, "require": { "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -3009,6 +3942,9 @@ ], "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", + "support": { + "source": "https://github.com/symfony/process/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3023,25 +3959,25 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.2.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", - "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.0" + "psr/container": "^1.1" }, "suggest": { "symfony/service-implementation": "" @@ -3049,7 +3985,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3085,6 +4021,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3099,20 +4038,20 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2021-04-01T10:43:52+00:00" }, { "name": "symfony/string", - "version": "v5.2.2", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "c95468897f408dd0aca2ff582074423dd0455122" + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/c95468897f408dd0aca2ff582074423dd0455122", - "reference": "c95468897f408dd0aca2ff582074423dd0455122", + "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", + "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", "shasum": "" }, "require": { @@ -3165,6 +4104,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3179,20 +4121,20 @@ "type": "tidelift" } ], - "time": "2021-01-25T15:14:59+00:00" + "time": "2021-08-26T08:00:08+00:00" }, { "name": "symfony/yaml", - "version": "v5.2.2", + "version": "v5.3.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e" + "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/6bb8b36c6dea8100268512bf46e858c8eb5c545e", - "reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", + "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", "shasum": "" }, "require": { @@ -3237,6 +4179,9 @@ ], "description": "Loads and dumps YAML files", "homepage": "https://symfony.com/", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.3.6" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3251,20 +4196,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:01:46+00:00" + "time": "2021-07-29T06:20:01+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { @@ -3291,34 +4236,154 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2020-07-12T23:59:07+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "vimeo/psalm", + "version": "4.10.0", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/916b098b008f6de4543892b1e0651c1c3b92cbfa", + "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.4.2", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1 || ^2.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-ctype": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.5", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.12", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0||^6.0", + "ext-curl": "*", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpdocumentor/reflection-docblock": "^5", + "phpmyadmin/sql-parser": "5.1.0||dev-master", + "phpspec/prophecy": ">=1.9.0", + "phpunit/phpunit": "^9.0", + "psalm/plugin-phpunit": "^0.16", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3 || ^5.0", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "suggest": { + "ext-igbinary": "^2.0.5" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + }, + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.10.0" + }, + "time": "2021-09-04T21:00:09+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -3340,7 +4405,61 @@ "check", "validate" ], - "time": "2020-07-08T17:02:28+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "time": "2015-12-17T08:42:14+00:00" }, { "name": "yosymfony/resource-watcher", @@ -3393,6 +4512,10 @@ "symfony", "watcher" ], + "support": { + "issues": "https://github.com/yosymfony/resource-watcher/issues", + "source": "https://github.com/yosymfony/resource-watcher/tree/master" + }, "time": "2020-01-04T15:36:55+00:00" } ], @@ -3402,11 +4525,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 00000000..ab2b5f01 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/src/Api/Client.php b/src/Api/Client.php index 3f79d3f1..4132eaeb 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -13,16 +13,16 @@ class Client const RESPONSE_SHORT = 1; const RESPONSE_FULL = 2; - protected $_host; - protected $_port; - protected $_protocol; - protected $_login; - protected $_password; - protected $_proxy = ''; - protected $_secretKey; - protected $_version = ''; + protected string $_host; + protected int $_port; + protected string $_protocol; + protected string $_login = ''; + protected string $_password = ''; + protected string $_proxy = ''; + protected string $_secretKey = ''; + protected string $_version = ''; - protected $_operatorsCache = []; + protected array $_operatorsCache = []; /** * @var callable @@ -36,7 +36,7 @@ class Client * @param int $port * @param string $protocol */ - public function __construct($host, $port = 8443, $protocol = 'https') + public function __construct(string $host, int $port = 8443, string $protocol = 'https') { $this->_host = $host; $this->_port = $port; @@ -49,7 +49,7 @@ public function __construct($host, $port = 8443, $protocol = 'https') * @param string $login * @param string $password */ - public function setCredentials($login, $password) + public function setCredentials(string $login, string $password): void { $this->_login = $login; $this->_password = $password; @@ -60,7 +60,7 @@ public function setCredentials($login, $password) * * @param string $secretKey */ - public function setSecretKey($secretKey) + public function setSecretKey(string $secretKey): void { $this->_secretKey = $secretKey; } @@ -70,7 +70,7 @@ public function setSecretKey($secretKey) * * @param string $proxy */ - public function setProxy($proxy) + public function setProxy(string $proxy): void { $this->_proxy = $proxy; } @@ -80,7 +80,7 @@ public function setProxy($proxy) * * @param string $version */ - public function setVersion($version) + public function setVersion(string $version): void { $this->_version = $version; } @@ -90,7 +90,7 @@ public function setVersion($version) * * @param callable|null $function */ - public function setVerifyResponse(callable $function = null) + public function setVerifyResponse(callable $function = null): void { $this->_verifyResponseCallback = $function; } @@ -100,7 +100,7 @@ public function setVerifyResponse(callable $function = null) * * @return string */ - public function getHost() + public function getHost(): string { return $this->_host; } @@ -110,7 +110,7 @@ public function getHost() * * @return int */ - public function getPort() + public function getPort(): int { return $this->_port; } @@ -120,7 +120,7 @@ public function getPort() * * @return string */ - public function getProtocol() + public function getProtocol(): string { return $this->_protocol; } @@ -132,7 +132,7 @@ public function getProtocol() * * @return SimpleXMLElement */ - public function getPacket($version = null) + public function getPacket($version = null): SimpleXMLElement { $protocolVersion = !is_null($version) ? $version : $this->_version; $content = ""; @@ -166,6 +166,7 @@ public function request($request, $mode = self::RESPONSE_SHORT) if ('sdk' == $this->_protocol) { $version = ('' == $this->_version) ? null : $this->_version; $requestXml = new SimpleXMLElement((string) $request); + /** @psalm-suppress UndefinedClass */ $xml = \pm_ApiRpc::getService($version)->call($requestXml->children()[0]->asXml(), $this->_login); } else { $xml = $this->_performHttpRequest($request); @@ -294,7 +295,7 @@ protected function _getHeaders() * * @throws Exception */ - protected function _verifyResponse($xml) + protected function _verifyResponse($xml): void { if ($xml->system && $xml->system->status && 'error' == (string) $xml->system->status) { throw new Exception((string) $xml->system->errtext, (int) $xml->system->errcode); @@ -314,16 +315,21 @@ protected function _verifyResponse($xml) * @param string $request * @param SimpleXMLElement $xml * - * @return string + * @return false|string */ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) { $parts = explode('.', $request); $node = $xml; + $lastParts = end($parts); foreach ($parts as $part) { @list($name, $value) = explode('=', $part); - $node = $node->addChild($name, $value); + if ($part !== $lastParts) { + $node = $node->addChild($name); + } else { + $node->{$name} = (string) $value; + } } return $xml->asXML(); @@ -345,7 +351,7 @@ protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = if (is_array($value)) { $this->_arrayToXml($value, $this->_isAssocArray($value) ? $xml->addChild($el) : $xml, $el); } else { - $xml->addChild($el, $value); + $xml->{$el} = (string) $value; } } diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index 6ec687f2..e399c965 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -16,9 +16,9 @@ public function __construct() /** * Setup login to execute requests under certain user. * - * @param $login + * @param string $login */ - public function setLogin($login) + public function setLogin(string $login): void { $this->_login = $login; } diff --git a/src/Api/Operator.php b/src/Api/Operator.php index bab9b2b3..60b5b541 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -5,17 +5,14 @@ class Operator { - /** @var string|null */ - protected $_wrapperTag = null; - - /** @var \PleskX\Api\Client */ - protected $_client; + protected string $_wrapperTag = ''; + protected Client $_client; public function __construct($client) { $this->_client = $client; - if (is_null($this->_wrapperTag)) { + if ('' === $this->_wrapperTag) { $classNameParts = explode('\\', get_class($this)); $this->_wrapperTag = end($classNameParts); $this->_wrapperTag = strtolower(preg_replace('/([a-z])([A-Z])/', '\1-\2', $this->_wrapperTag)); @@ -81,7 +78,7 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->{$field} = $value; } $getTag->addChild('dataset')->addChild($infoTag); @@ -96,7 +93,11 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul if (!isset($xmlResult->data) || !isset($xmlResult->data->$infoTag)) { continue; } - $items[] = new $structClass($xmlResult->data->$infoTag); + $item = new $structClass($xmlResult->data->$infoTag); + if (isset($xmlResult->id) && property_exists($item, 'id')) { + $item->id = (int) $xmlResult->id; + } + $items[] = $item; } return $items; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index d82969a6..9113e148 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -18,7 +18,7 @@ public function generate($properties) $info = $packet->addChild($this->_wrapperTag)->addChild('generate')->addChild('info'); foreach ($properties as $name => $value) { - $info->addChild($name, $value); + $info->{$name} = $value; } $response = $this->_client->request($packet); diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 6fcaec0d..d974c559 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -18,7 +18,7 @@ public function create($properties) $info = $packet->addChild($this->_wrapperTag)->addChild('add')->addChild('gen_info'); foreach ($properties as $name => $value) { - $info->addChild($name, $value); + $info->{$name} = $value; } $response = $this->_client->request($packet); diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 30e1458a..8e5696ae 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -43,7 +43,7 @@ private function _process($command, array $properties) $info->$name = $value; continue; } - $info->addChild($name, $value); + $info->{$name} = $value; } return $this->_client->request($packet); @@ -135,7 +135,7 @@ private function _get($command, $field, $value) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->{$field} = $value; } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 482d1d81..8b830460 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -7,7 +7,7 @@ class DatabaseServer extends \PleskX\Api\Operator { - protected $_wrapperTag = 'db_server'; + protected string $_wrapperTag = 'db_server'; /** * @return array @@ -53,7 +53,7 @@ private function _get($field = null, $value = null) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->{$field} = $value; } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 0c64980e..30920a71 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -18,7 +18,7 @@ public function create($properties) $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); foreach ($properties as $name => $value) { - $info->addChild($name, $value); + $info->{$name} = $value; } return new Struct\Info($this->_client->request($packet)); @@ -39,7 +39,7 @@ public function bulkCreate(array $records) $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); foreach ($properties as $name => $value) { - $info->addChild($name, $value); + $info->{$name} = $value; } } diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 4b79df77..b9b0af06 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -7,7 +7,7 @@ class DnsTemplate extends \PleskX\Api\Operator { - protected $_wrapperTag = 'dns'; + protected string $_wrapperTag = 'dns'; /** * @param array $properties @@ -21,7 +21,7 @@ public function create(array $properties) unset($properties['site-id'], $properties['site-alias-id']); foreach ($properties as $name => $value) { - $info->addChild($name, $value); + $info->{$name} = $value; } return new Struct\Info($this->_client->request($packet)); @@ -53,7 +53,7 @@ public function getAll($field = null, $value = null) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->{$field} = $value; } $getTag->addChild('template'); diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 6b7325a7..ae319bab 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -7,7 +7,7 @@ class EventLog extends \PleskX\Api\Operator { - protected $_wrapperTag = 'event_log'; + protected string $_wrapperTag = 'event_log'; /** * @return Struct\Event[] diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 5d5b7fb4..0fa01380 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -28,7 +28,7 @@ public function create($name, $siteId, $mailbox = false, $password = '') $mailname->addChild('mailbox')->addChild('enabled', 'true'); } if (!empty($password)) { - $mailname->addChild('password')->addChild('value', $password); + $mailname->addChild('password')->value = $password; } $response = $this->_client->request($packet); @@ -48,7 +48,7 @@ public function delete($field, $value, $siteId) $packet = $this->_client->getPacket(); $filter = $packet->addChild($this->_wrapperTag)->addChild('remove')->addChild('filter'); $filter->addChild('site-id', $siteId); - $filter->addChild($field, $value); + $filter->{$field} = $value; $response = $this->_client->request($packet); return 'ok' === (string) $response->status; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index af643b0a..80fc3819 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -7,7 +7,7 @@ class ProtectedDirectory extends \PleskX\Api\Operator { - protected $_wrapperTag = 'protected-dir'; + protected string $_wrapperTag = 'protected-dir'; /** * @param string $name @@ -81,9 +81,9 @@ public function addUser($protectedDirectory, $login, $password) $packet = $this->_client->getPacket(); $info = $packet->addChild($this->_wrapperTag)->addChild('add-user'); - $info->addChild('pd-id', $protectedDirectory->id); - $info->addChild('login', $login); - $info->addChild('password', $password); + $info->{'pd-id'} = $protectedDirectory->id; + $info->login = $login; + $info->password = $password; return new Struct\UserInfo($this->_client->request($packet)); } @@ -113,7 +113,7 @@ private function _get($command, $field, $value) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->{$field} = $value; } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 9ee8af0c..bcf76d32 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -18,7 +18,7 @@ public function create($properties) $info = $packet->addChild($this->_wrapperTag)->addChild('add')->addChild('gen-info'); foreach ($properties as $name => $value) { - $info->addChild($name, $value); + $info->{$name} = $value; } $response = $this->_client->request($packet); diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 5b739f10..a5f0ee2c 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -7,7 +7,7 @@ class SecretKey extends \PleskX\Api\Operator { - protected $_wrapperTag = 'secret_key'; + protected string $_wrapperTag = 'secret_key'; /** * @param string $ipAddress diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 65cbae61..38342b7a 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -4,13 +4,11 @@ namespace PleskX\Api\Operator; use PleskX\Api\Struct\Server as Struct; +use PleskX\Api\XmlResponse; class Server extends \PleskX\Api\Operator { - /** - * @return array - */ - public function getProtos() + public function getProtos(): array { $packet = $this->_client->getPacket(); $packet->addChild($this->_wrapperTag)->addChild('get_protos'); @@ -19,25 +17,22 @@ public function getProtos() return (array) $response->protos->proto; } - public function getGeneralInfo() + public function getGeneralInfo(): Struct\GeneralInfo { return new Struct\GeneralInfo($this->_getInfo('gen_info')); } - public function getPreferences() + public function getPreferences(): Struct\Preferences { return new Struct\Preferences($this->_getInfo('prefs')); } - public function getAdmin() + public function getAdmin(): Struct\Admin { return new Struct\Admin($this->_getInfo('admin')); } - /** - * @return array - */ - public function getKeyInfo() + public function getKeyInfo(): array { $keyInfo = []; $keyInfoXml = $this->_getInfo('key'); @@ -49,10 +44,7 @@ public function getKeyInfo() return $keyInfo; } - /** - * @return array - */ - public function getComponents() + public function getComponents(): array { $components = []; $componentsXml = $this->_getInfo('components'); @@ -64,10 +56,7 @@ public function getComponents() return $components; } - /** - * @return array - */ - public function getServiceStates() + public function getServiceStates(): array { $states = []; $statesXml = $this->_getInfo('services_state'); @@ -83,15 +72,12 @@ public function getServiceStates() return $states; } - public function getSessionPreferences() + public function getSessionPreferences(): Struct\SessionPreferences { return new Struct\SessionPreferences($this->_getInfo('session_setup')); } - /** - * @return array - */ - public function getShells() + public function getShells(): array { $shells = []; $shellsXml = $this->_getInfo('shells'); @@ -103,25 +89,19 @@ public function getShells() return $shells; } - /** - * @return array - */ - public function getNetworkInterfaces() + public function getNetworkInterfaces(): array { $interfacesXml = $this->_getInfo('interfaces'); return (array) $interfacesXml->interface; } - public function getStatistics() + public function getStatistics(): Struct\Statistics { return new Struct\Statistics($this->_getInfo('stat')); } - /** - * @return array - */ - public function getSiteIsolationConfig() + public function getSiteIsolationConfig(): array { $config = []; $configXml = $this->_getInfo('site-isolation-config'); @@ -133,7 +113,7 @@ public function getSiteIsolationConfig() return $config; } - public function getUpdatesInfo() + public function getUpdatesInfo(): Struct\UpdatesInfo { return new Struct\UpdatesInfo($this->_getInfo('updates')); } @@ -144,7 +124,7 @@ public function getUpdatesInfo() * * @return string */ - public function createSession($login, $clientIp) + public function createSession(string $login, string $clientIp): string { $packet = $this->_client->getPacket(); $sessionNode = $packet->addChild($this->_wrapperTag)->addChild('create_session'); @@ -157,12 +137,7 @@ public function createSession($login, $clientIp) return (string) $response->id; } - /** - * @param string $operation - * - * @return \SimpleXMLElement - */ - private function _getInfo($operation) + private function _getInfo(string $operation): XmlResponse { $packet = $this->_client->getPacket(); $packet->addChild($this->_wrapperTag)->addChild('get')->addChild($operation); diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index eb2970bd..71d1cc36 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -7,6 +7,28 @@ class Session extends \PleskX\Api\Operator { + /** + * @param string $username + * @param string $userIp + * + * @return string + */ + public function create($username, $userIp) + { + $packet = $this->_client->getPacket(); + $creator = $packet->addChild('server')->addChild('create_session'); + + $creator->addChild('login', $username); + $loginData = $creator->addChild('data'); + + $loginData->addChild('user_ip', base64_encode($userIp)); + $loginData->addChild('source_server', ''); + + $response = $this->_client->request($packet); + + return (string) $response->id; + } + /** * @return Struct\Info[] */ diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 170f7e32..f92eae62 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -24,7 +24,7 @@ public function create(array $properties) if (!is_scalar($value)) { continue; } - $infoGeneral->addChild($name, $value); + $infoGeneral->{$name} = $value; } // set hosting properties @@ -32,8 +32,8 @@ public function create(array $properties) $hostingNode = $info->addChild('hosting')->addChild('vrt_hst'); foreach ($properties[static::PROPERTIES_HOSTING] as $name => $value) { $propertyNode = $hostingNode->addChild('property'); - $propertyNode->addChild('name', $name); - $propertyNode->addChild('value', $value); + $propertyNode->name = $name; + $propertyNode->value = $value; } } diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index be8f735c..5135e1cf 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -71,7 +71,7 @@ public function getAll($field = null, $value = null) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->{$field} = $value; } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index ece56e4b..de1eb3a7 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -21,12 +21,12 @@ public function create($properties) if (is_array($value)) { foreach ($value as $propertyName => $propertyValue) { $property = $info->addChild($name); - $property->addChild('name', $propertyName); - $property->addChild('value', $propertyValue); + $property->name = $propertyName; + $property->value = $propertyValue; } continue; } - $info->addChild($name, $value); + $info->{$name} = $value; } $response = $this->_client->request($packet); diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index b2ac6576..187fcd24 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -31,7 +31,7 @@ public function createCustomButton($owner, $properties) $propertiesNode = $buttonNode->addChild('properties'); foreach ($properties as $name => $value) { - $propertiesNode->addChild($name, $value); + $propertiesNode->{$name} = $value; } $response = $this->_client->request($packet); diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 1c2ae8b5..0b86149b 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -5,5 +5,5 @@ class VirtualDirectory extends \PleskX\Api\Operator { - protected $_wrapperTag = 'virtdir'; + protected string $_wrapperTag = 'virtdir'; } diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index e389c576..16f77651 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -3,25 +3,26 @@ namespace PleskX\Api\Operator; +use PleskX\Api\Operator; use PleskX\Api\Struct\Webspace as Struct; -class Webspace extends \PleskX\Api\Operator +class Webspace extends Operator { - public function getPermissionDescriptor() + public function getPermissionDescriptor(): Struct\PermissionDescriptor { $response = $this->request('get-permission-descriptor.filter'); return new Struct\PermissionDescriptor($response); } - public function getLimitDescriptor() + public function getLimitDescriptor(): Struct\LimitDescriptor { $response = $this->request('get-limit-descriptor.filter'); return new Struct\LimitDescriptor($response); } - public function getPhysicalHostingDescriptor() + public function getPhysicalHostingDescriptor(): Struct\PhysicalHostingDescriptor { $response = $this->request('get-physical-hosting-descriptor.filter'); @@ -34,7 +35,7 @@ public function getPhysicalHostingDescriptor() * * @return Struct\PhpSettings */ - public function getPhpSettings($field, $value) + public function getPhpSettings(string $field, $value): Struct\PhpSettings { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); @@ -53,7 +54,7 @@ public function getPhpSettings($field, $value) * * @return Struct\Limits */ - public function getLimits($field, $value) + public function getLimits(string $field, $value): Struct\Limits { $items = $this->_getItems(Struct\Limits::class, 'limits', $field, $value); @@ -63,11 +64,11 @@ public function getLimits($field, $value) /** * @param array $properties * @param array|null $hostingProperties - * @param $planName + * @param string $planName * * @return Struct\Info */ - public function create(array $properties, array $hostingProperties = null, $planName = null) + public function create(array $properties, array $hostingProperties = null, string $planName = ''): Struct\Info { $packet = $this->_client->getPacket(); $info = $packet->addChild($this->_wrapperTag)->addChild('add'); @@ -81,8 +82,8 @@ public function create(array $properties, array $hostingProperties = null, $plan $infoHosting = $info->addChild('hosting')->addChild('vrt_hst'); foreach ($hostingProperties as $name => $value) { $property = $infoHosting->addChild('property'); - $property->addChild('name', $name); - $property->addChild('value', $value); + $property->name = $name; + $property->value = $value; } if (isset($properties['ip_address'])) { @@ -90,7 +91,7 @@ public function create(array $properties, array $hostingProperties = null, $plan } } - if ($planName) { + if ('' !== $planName) { $info->addChild('plan-name', $planName); } @@ -105,7 +106,7 @@ public function create(array $properties, array $hostingProperties = null, $plan * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->_delete($field, $value); } @@ -116,7 +117,7 @@ public function delete($field, $value) * * @return Struct\GeneralInfo */ - public function get($field, $value) + public function get(string $field, $value): Struct\GeneralInfo { $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); @@ -126,7 +127,7 @@ public function get($field, $value) /** * @return Struct\GeneralInfo[] */ - public function getAll() + public function getAll(): array { return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } @@ -137,7 +138,7 @@ public function getAll() * * @return Struct\DiskUsage */ - public function getDiskUsage($field, $value) + public function getDiskUsage(string $field, $value): Struct\DiskUsage { $items = $this->_getItems(Struct\DiskUsage::class, 'disk_usage', $field, $value); diff --git a/src/Api/Struct.php b/src/Api/Struct.php index 11d509f0..eb2a8ef4 100644 --- a/src/Api/Struct.php +++ b/src/Api/Struct.php @@ -5,7 +5,13 @@ abstract class Struct { - public function __set($property, $value) + /** + * @param string $property + * @param mixed $value + * + * @throws \Exception + */ + public function __set(string $property, $value) { throw new \Exception("Try to set an undeclared property '$property'."); } @@ -18,20 +24,26 @@ public function __set($property, $value) * * @throws \Exception */ - protected function _initScalarProperties($apiResponse, array $properties) + protected function _initScalarProperties($apiResponse, array $properties): void { foreach ($properties as $property) { if (is_array($property)) { $classPropertyName = current($property); $value = $apiResponse->{key($property)}; } else { - $classPropertyName = $this->_underToCamel(str_replace('-', '_', $property)); + $classPropertyName = $this->underToCamel(str_replace('-', '_', $property)); $value = $apiResponse->$property; } $reflectionProperty = new \ReflectionProperty($this, $classPropertyName); - $docBlock = $reflectionProperty->getDocComment(); - $propertyType = preg_replace('/^.+ @var ([a-z]+) .+$/', '\1', $docBlock); + $propertyType = $reflectionProperty->getType(); + if (is_null($propertyType)) { + $docBlock = $reflectionProperty->getDocComment(); + $propertyType = preg_replace('/^.+ @var ([a-z]+) .+$/', '\1', $docBlock); + } else { + /** @psalm-suppress UndefinedMethod */ + $propertyType = $propertyType->getName(); + } if ('string' == $propertyType) { $value = (string) $value; @@ -54,7 +66,7 @@ protected function _initScalarProperties($apiResponse, array $properties) * * @return string */ - private function _underToCamel($under) + private function underToCamel(string $under): string { $under = '_'.str_replace('_', ' ', strtolower($under)); diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 7689bcbd..2185c110 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Certificate; -class Info extends \PleskX\Api\Struct -{ - /** @var string */ - public $request; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $privateKey; +class Info extends Struct +{ + public string $request; + public string $privateKey; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['csr' => 'request'], diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index efa1f411..43f8ab20 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -3,51 +3,28 @@ namespace PleskX\Api\Struct\Customer; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $company; - - /** @var string */ - public $personalName; - - /** @var string */ - public $login; - - /** @var string */ - public $guid; - - /** @var string */ - public $email; - - /** @var string */ - public $phone; - - /** @var string */ - public $fax; - - /** @var string */ - public $address; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $postalCode; - - /** @var string */ - public $city; - - /** @var string */ - public $state; - - /** @var string */ - public $country; - - /** @var string */ - public $description; - - /** @var string */ - public $externalId; - - public function __construct($apiResponse) +class GeneralInfo extends Struct +{ + public int $id; + public string $company; + public string $personalName; + public string $login; + public string $guid; + public string $email; + public string $phone; + public string $fax; + public string $address; + public string $postalCode; + public string $city; + public string $state; + public string $country; + public string $description; + public string $externalId; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['cname' => 'company'], diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 167b2097..926b5519 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Customer; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $guid; +class Info extends Struct +{ + public int $id; + public string $guid; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 0066e4a9..9f705656 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -3,27 +3,19 @@ namespace PleskX\Api\Struct\Database; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $name; - - /** @var string */ - public $type; - - /** @var int */ - public $webspaceId; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $dbServerId; - - /** @var int */ - public $defaultUserId; - - public function __construct($apiResponse) +class Info extends Struct +{ + public int $id; + public string $name; + public string $type; + public int $webspaceId; + public int $dbServerId; + public int $defaultUserId; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index f5cb166d..cf40013a 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Database; -class UserInfo extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $login; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $dbId; +class UserInfo extends Struct +{ + public int $id; + public string $login; + public int $dbId; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 57facc61..3f2dbd5a 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\DatabaseServer; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $host; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $port; - - /** @var string */ - public $type; +class Info extends Struct +{ + public int $id; + public string $host; + public int $port; + public string $type; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 930c7201..161cbee9 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -3,30 +3,20 @@ namespace PleskX\Api\Struct\Dns; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var int */ - public $siteId; - - /** @var int */ - public $siteAliasId; - - /** @var string */ - public $type; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $host; - - /** @var string */ - public $value; - - /** @var string */ - public $opt; - - public function __construct($apiResponse) +class Info extends Struct +{ + public int $id; + public int $siteId; + public int $siteAliasId; + public string $type; + public string $host; + public string $value; + public string $opt; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index d009c08f..b1cb7c08 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -3,30 +3,20 @@ namespace PleskX\Api\Struct\EventLog; -class DetailedEvent extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $type; - - /** @var int */ - public $time; - - /** @var string */ - public $class; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $objectId; - - /** @var string */ - public $user; - - /** @var string */ - public $host; - - public function __construct($apiResponse) +class DetailedEvent extends Struct +{ + public int $id; + public string $type; + public int $time; + public string $class; + public string $objectId; + public string $user; + public string $host; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 67fdff88..cc3be1cf 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\EventLog; -class Event extends \PleskX\Api\Struct -{ - /** @var string */ - public $type; - - /** @var int */ - public $time; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $class; - - /** @var string */ - public $id; +class Event extends Struct +{ + public string $type; + public int $time; + public string $class; + public string $id; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'type', diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index ed79a6dc..17cffdd3 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\Ip; -class Info extends \PleskX\Api\Struct -{ - /** @var string */ - public $ipAddress; - - /** @var string */ - public $netmask; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $type; - - /** @var string */ - public $interface; +class Info extends Struct +{ + public string $ipAddress; + public string $netmask; + public string $type; + public string $interface; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'ip_address', diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 619e7a6a..4fbe4478 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Locale; -class Info extends \PleskX\Api\Struct -{ - /** @var string */ - public $id; - - /** @var string */ - public $language; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $country; +class Info extends Struct +{ + public string $id; + public string $language; + public string $country; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index 798aca95..dfa1615f 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Mail; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $name; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $description; +class GeneralInfo extends Struct +{ + public int $id; + public string $name; + public string $description; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 566d00bc..63cc84e0 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Mail; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $name; +class Info extends Struct +{ + public int $id; + public string $name; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index 5a14de6b..d95c3a92 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -4,40 +4,22 @@ namespace PleskX\Api\Struct\PhpHandler; use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; class Info extends Struct { - /** @var string */ - public $id; - - /** @var string */ - public $displayName; - - /** @var string */ - public $fullVersion; - - /** @var string */ - public $version; - - /** @var string */ - public $type; - - /** @var string */ - public $path; - - /** @var string */ - public $clipath; - - /** @var string */ - public $phpini; - - /** @var string */ - public $custom; - - /** @var string */ - public $handlerStatus; - - public function __construct($apiResponse) + public string $id; + public string $displayName; + public string $fullVersion; + public string $version; + public string $type; + public string $path; + public string $clipath; + public string $phpini; + public string $custom; + public string $handlerStatus; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 5dfe5dd6..4a1216cb 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -4,16 +4,14 @@ namespace PleskX\Api\Struct\ProtectedDirectory; use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; class DataInfo extends Struct { - /** @var string */ - public $name; + public string $name; + public string $header; - /** @var string */ - public $header; - - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index af3c755c..90651336 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -4,13 +4,13 @@ namespace PleskX\Api\Struct\ProtectedDirectory; use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; class Info extends Struct { - /** @var int */ - public $id; + public int $id; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 61f6040f..a6d4b74a 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -3,12 +3,14 @@ namespace PleskX\Api\Struct\ProtectedDirectory; -class UserInfo extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class UserInfo extends Struct { - /** @var int */ - public $id; + public int $id; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 6c5ebd63..c946356d 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\Reseller; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $personalName; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $login; - - /** @var array */ - public $permissions; +class GeneralInfo extends Struct +{ + public int $id; + public string $personalName; + public string $login; + public array $permissions; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse->{'gen-info'}, [ ['pname' => 'personalName'], diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index a1b6bf80..1ef61d2b 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Reseller; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $guid; +class Info extends Struct +{ + public int $id; + public string $guid; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 14d110f9..2b2eec03 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\SecretKey; -class Info extends \PleskX\Api\Struct -{ - /** @var string */ - public $key; - - /** @var string */ - public $ipAddress; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $description; - - /** @var string */ - public $login; +class Info extends Struct +{ + public string $key; + public string $ipAddress; + public string $description; + public string $login; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'key', diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index dfd0d7ac..69bff6ea 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server; -class Admin extends \PleskX\Api\Struct -{ - /** @var string */ - public $companyName; - - /** @var string */ - public $name; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $email; +class Admin extends Struct +{ + public string $companyName; + public string $name; + public string $email; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['admin_cname' => 'companyName'], diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 15fee92b..9c1f63d2 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $serverName; - - /** @var string */ - public $serverGuid; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $mode; +class GeneralInfo extends Struct +{ + public string $serverName; + public string $serverGuid; + public string $mode; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'server_name', diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index 905656c0..e6529bf3 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server; -class Preferences extends \PleskX\Api\Struct -{ - /** @var int */ - public $statTtl; - - /** @var int */ - public $trafficAccounting; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $restartApacheInterval; +class Preferences extends Struct +{ + public int $statTtl; + public int $trafficAccounting; + public int $restartApacheInterval; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'stat_ttl', diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index 654958fa..69a5c2aa 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -3,12 +3,14 @@ namespace PleskX\Api\Struct\Server; -class SessionPreferences extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class SessionPreferences extends Struct { - /** @var int */ - public $loginTimeout; + public int $loginTimeout; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'login_timeout', diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 2630ddcc..0894801e 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -3,7 +3,10 @@ namespace PleskX\Api\Struct\Server; -class Statistics extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class Statistics extends Struct { /** @var Statistics\Objects */ public $objects; @@ -26,7 +29,7 @@ class Statistics extends \PleskX\Api\Struct /** @var Statistics\DiskSpace[] */ public $diskSpace; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->objects = new Statistics\Objects($apiResponse->objects); $this->version = new Statistics\Version($apiResponse->version); diff --git a/src/Api/Struct/Server/Statistics/DiskSpace.php b/src/Api/Struct/Server/Statistics/DiskSpace.php index 1f21655f..5fb6dca8 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server\Statistics; -class DiskSpace extends \PleskX\Api\Struct -{ - /** @var int */ - public $total; - - /** @var int */ - public $used; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $free; +class DiskSpace extends Struct +{ + public int $total; + public int $used; + public int $free; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'total', diff --git a/src/Api/Struct/Server/Statistics/LoadAverage.php b/src/Api/Struct/Server/Statistics/LoadAverage.php index 266bde88..69aefc22 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server\Statistics; -class LoadAverage extends \PleskX\Api\Struct -{ - /** @var float */ - public $load1min; - - /** @var float */ - public $load5min; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var float */ - public $load15min; +class LoadAverage extends Struct +{ + public float $load1min; + public float $load5min; + public float $load15min; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->load1min = $apiResponse->l1 / 100.0; $this->load5min = $apiResponse->l5 / 100.0; diff --git a/src/Api/Struct/Server/Statistics/Memory.php b/src/Api/Struct/Server/Statistics/Memory.php index 7177f9ca..44b12a38 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -3,27 +3,19 @@ namespace PleskX\Api\Struct\Server\Statistics; -class Memory extends \PleskX\Api\Struct -{ - /** @var int */ - public $total; - - /** @var int */ - public $used; - - /** @var int */ - public $free; - - /** @var int */ - public $shared; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $buffer; - - /** @var int */ - public $cached; - - public function __construct($apiResponse) +class Memory extends Struct +{ + public int $total; + public int $used; + public int $free; + public int $shared; + public int $buffer; + public int $cached; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'total', diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index 2abb72e6..00d119c5 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -3,42 +3,24 @@ namespace PleskX\Api\Struct\Server\Statistics; -class Objects extends \PleskX\Api\Struct -{ - /** @var int */ - public $clients; - - /** @var int */ - public $domains; - - /** @var int */ - public $databases; - - /** @var int */ - public $activeDomains; - - /** @var int */ - public $mailBoxes; - - /** @var int */ - public $mailRedirects; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $mailGroups; - - /** @var int */ - public $mailResponders; - - /** @var int */ - public $databaseUsers; - - /** @var int */ - public $problemClients; - - /** @var int */ - public $problemDomains; - - public function __construct($apiResponse) +class Objects extends Struct +{ + public int $clients; + public int $domains; + public int $databases; + public int $activeDomains; + public int $mailBoxes; + public int $mailRedirects; + public int $mailGroups; + public int $mailResponders; + public int $databaseUsers; + public int $problemClients; + public int $problemDomains; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'clients', diff --git a/src/Api/Struct/Server/Statistics/Other.php b/src/Api/Struct/Server/Statistics/Other.php index 548fface..e102fb5e 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server\Statistics; -class Other extends \PleskX\Api\Struct -{ - /** @var string */ - public $cpu; - - /** @var int */ - public $uptime; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var bool */ - public $insideVz; +class Other extends Struct +{ + public string $cpu; + public int $uptime; + public bool $insideVz; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'cpu', diff --git a/src/Api/Struct/Server/Statistics/Swap.php b/src/Api/Struct/Server/Statistics/Swap.php index 8e03168f..23154ee4 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Server\Statistics; -class Swap extends \PleskX\Api\Struct -{ - /** @var int */ - public $total; - - /** @var int */ - public $used; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $free; +class Swap extends Struct +{ + public int $total; + public int $used; + public int $free; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'total', diff --git a/src/Api/Struct/Server/Statistics/Version.php b/src/Api/Struct/Server/Statistics/Version.php index 9fca7c0a..45fc541e 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -3,27 +3,19 @@ namespace PleskX\Api\Struct\Server\Statistics; -class Version extends \PleskX\Api\Struct -{ - /** @var string */ - public $internalName; - - /** @var string */ - public $version; - - /** @var string */ - public $build; - - /** @var string */ - public $osName; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $osVersion; - - /** @var string */ - public $osRelease; - - public function __construct($apiResponse) +class Version extends Struct +{ + public string $internalName; + public string $version; + public string $build; + public string $osName; + public string $osVersion; + public string $osRelease; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['plesk_name' => 'internalName'], diff --git a/src/Api/Struct/Server/UpdatesInfo.php b/src/Api/Struct/Server/UpdatesInfo.php index bdd2e7c7..34c7501d 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Server; -class UpdatesInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $lastInstalledUpdate; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var bool */ - public $installUpdatesAutomatically; +class UpdatesInfo extends Struct +{ + public string $lastInstalledUpdate; + public bool $installUpdatesAutomatically; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'last_installed_update', diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index dd53595a..794c82af 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\ServicePlan; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $name; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $guid; - - /** @var string */ - public $externalId; +class Info extends Struct +{ + public int $id; + public string $name; + public string $guid; + public string $externalId; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index 51024cbc..70d2e866 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -3,27 +3,19 @@ namespace PleskX\Api\Struct\Session; -class Info extends \PleskX\Api\Struct -{ - /** @var string */ - public $id; - - /** @var string */ - public $type; - - /** @var string */ - public $ipAddress; - - /** @var string */ - public $login; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $loginTime; - - /** @var string */ - public $idle; - - public function __construct($apiResponse) +class Info extends Struct +{ + public string $id; + public string $type; + public string $ipAddress; + public string $login; + public string $loginTime; + public string $idle; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 481ea626..f13913f3 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -3,31 +3,39 @@ namespace PleskX\Api\Struct\Site; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $name; - - /** @var string */ - public $asciiName; - - /** @var string */ - public $guid; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $status; - - /** @var string */ - public $description; +class GeneralInfo extends Struct +{ + public int $id; + public string $creationDate; + public string $name; + public string $asciiName; + public string $guid; + public string $status; + public int $realSize; + public array $ipAddresses = []; + public string $description; + public string $webspaceGuid; + public int $webspaceId; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ + ['cr_date' => 'creationDate'], 'name', 'ascii-name', 'status', + 'real_size', 'guid', 'description', + 'webspace-guid', + 'webspace-id', ]); + + foreach ($apiResponse->dns_ip_address as $ip) { + $this->ipAddresses[] = (string) $ip; + } } } diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index c473d7b8..2cb08f17 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Site; -class HostingInfo extends \PleskX\Api\Struct -{ - /** @var array */ - public $properties = []; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $ipAddress; +class HostingInfo extends Struct +{ + public array $properties = []; + public string $ipAddress; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { foreach ($apiResponse->vrt_hst->property as $property) { $this->properties[(string) $property->name] = (string) $property->value; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index ea69dd94..5a12761e 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Site; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $guid; +class Info extends Struct +{ + public int $id; + public string $guid; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index 256b5ca0..73c2c8fe 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\SiteAlias; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $name; - - /** @var string */ - public $asciiName; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $status; +class GeneralInfo extends Struct +{ + public string $name; + public string $asciiName; + public string $status; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index b60fce71..0950bcc9 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\SiteAlias; -class Info extends \PleskX\Api\Struct -{ - /** @var string */ - public $status; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $id; +class Info extends Struct +{ + public string $status; + public int $id; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 9e43dafc..a766fc73 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -3,21 +3,17 @@ namespace PleskX\Api\Struct\Subdomain; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $parent; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $name; - - /** @var array */ - public $properties; +class Info extends Struct +{ + public int $id; + public string $parent; + public string $name; + public array $properties; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->properties = []; $this->_initScalarProperties($apiResponse, [ diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index ed7a712f..8b6622df 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -3,33 +3,21 @@ namespace PleskX\Api\Struct\Ui; -class CustomButton extends \PleskX\Api\Struct -{ - /** @var string */ - public $id; - - /** @var int */ - public $sortKey; - - /** @var bool */ - public $public; - - /** @var bool */ - public $internal; - - /** @var bool */ - public $noFrame; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $place; - - /** @var string */ - public $url; - - /** @var string */ - public $text; - - public function __construct($apiResponse) +class CustomButton extends Struct +{ + public int $id; + public int $sortKey; + public bool $public; + public bool $internal; + public bool $noFrame; + public string $place; + public string $url; + public string $text; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, ['id']); $this->_initScalarProperties($apiResponse->properties, [ diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 320f105a..377700f5 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,45 +1,26 @@ _initScalarProperties($apiResponse, [ 'httpdocs', diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 0b66e59d..33d39802 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -3,42 +3,27 @@ namespace PleskX\Api\Struct\Webspace; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $creationDate; - - /** @var string */ - public $name; - - /** @var string */ - public $asciiName; - - /** @var string */ - public $status; - - /** @var int */ - public $realSize; - - /** @var int */ - public $ownerId; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var array */ - public $ipAddresses = []; - - /** @var string */ - public $guid; - - /** @var string */ - public $vendorGuid; - - /** @var string */ - public $description; - - /** @var string */ - public $adminDescription; - - public function __construct($apiResponse) +class GeneralInfo extends Struct +{ + public int $id; + public string $creationDate; + public string $name; + public string $asciiName; + public string $status; + public int $realSize; + public int $ownerId; + public array $ipAddresses = []; + public string $guid; + public string $vendorGuid; + public string $description; + + /** @var string */ + public string $adminDescription; + + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['cr_date' => 'creationDate'], diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index 7922d18c..c5f2f158 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Webspace; -class HostingPropertyInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $name; - - /** @var string */ - public $type; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $label; +class HostingPropertyInfo extends Struct +{ + public string $name; + public string $type; + public string $label; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index d71cef6d..8fac2be0 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Webspace; -class Info extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $guid; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $name; +class Info extends Struct +{ + public int $id; + public string $guid; + public string $name; - public function __construct($apiResponse, $name = '') + public function __construct(XmlResponse $apiResponse, string $name = '') { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 9faf882e..95d668d5 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Webspace; -class Limit extends \PleskX\Api\Struct -{ - /** @var string */ - public $name; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $value; +class Limit extends Struct +{ + public string $name; + public string $value; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index e1d383ba..6ceb0a74 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -3,12 +3,14 @@ namespace PleskX\Api\Struct\Webspace; -class LimitDescriptor extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class LimitDescriptor extends Struct { - /** @var array */ - public $limits; + public array $limits; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->limits = []; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index b8af3b67..c3f20ee5 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Webspace; -class LimitInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $name; - - /** @var string */ - public $type; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $label; +class LimitInfo extends Struct +{ + public string $name; + public string $type; + public string $label; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index e6313ea1..bdb970d6 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Webspace; -class Limits extends \PleskX\Api\Struct -{ - /** @var string */ - public $overuse; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var array */ - public $limits; +class Limits extends Struct +{ + public string $overuse; + public array $limits; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, ['overuse']); $this->limits = []; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index bc333ba0..3a56882e 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -3,12 +3,14 @@ namespace PleskX\Api\Struct\Webspace; -class PermissionDescriptor extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class PermissionDescriptor extends Struct { - /** @var array */ - public $permissions; + public array $permissions; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->permissions = []; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 9414a31a..8de0c84a 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -3,18 +3,16 @@ namespace PleskX\Api\Struct\Webspace; -class PermissionInfo extends \PleskX\Api\Struct -{ - /** @var string */ - public $name; - - /** @var string */ - public $type; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $label; +class PermissionInfo extends Struct +{ + public string $name; + public string $type; + public string $label; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 464b2012..37dea7d5 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -3,12 +3,14 @@ namespace PleskX\Api\Struct\Webspace; -class PhpSettings extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class PhpSettings extends Struct { - /** @var array */ - public $properties; + public array $properties; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->properties = []; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 1aff2f7a..f49e615b 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -3,12 +3,14 @@ namespace PleskX\Api\Struct\Webspace; -class PhysicalHostingDescriptor extends \PleskX\Api\Struct +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; + +class PhysicalHostingDescriptor extends Struct { - /** @var array */ - public $properties; + public array $properties; - public function __construct($apiResponse) + public function __construct(XmlResponse $apiResponse) { $this->properties = []; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index f33c9241..895162cc 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -49,6 +49,7 @@ public function testGet() $this->assertEquals('john@smith.com', $customerInfo->email); $this->assertEquals('Good guy', $customerInfo->description); $this->assertEquals('link:12345', $customerInfo->externalId); + $this->assertEquals($customer->id, $customerInfo->id); static::$_client->customer()->delete('id', $customer->id); } diff --git a/tests/MailTest.php b/tests/MailTest.php index 54f5804a..948c26c5 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -61,6 +61,7 @@ public function testGet() $mailnameInfo = static::$_client->mail()->get('test', static::$webspace->id); $this->assertEquals('test', $mailnameInfo->name); + $this->assertEquals($mailname->id, $mailnameInfo->id); static::$_client->mail()->delete('name', $mailname->name, static::$webspace->id); } diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index d27d9893..3d1c0831 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -42,6 +42,7 @@ public function testGet() $this->assertEquals('John Reseller', $resellerInfo->personalName); $this->assertEquals('reseller-unit-test', $resellerInfo->login); $this->assertGreaterThan(0, count($resellerInfo->permissions)); + $this->assertEquals($reseller->id, $resellerInfo->id); static::$_client->reseller()->delete('id', $reseller->id); } diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index e8ec4222..0e04ccaa 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -21,6 +21,13 @@ public function testCreateAutoIp() static::$_client->secretKey()->delete($keyId); } + public function testCreateMultiIps() + { + $keyId = static::$_client->secretKey()->create(join(',', ['192.168.0.1', '192.168.0.2'])); + $this->assertMatchesRegularExpression('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $keyId); + static::$_client->secretKey()->delete($keyId); + } + public function testCreateWithDescription() { $keyId = static::$_client->secretKey()->create('192.168.0.1', 'test key'); diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 8c97c5b9..4486103f 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -5,6 +5,14 @@ class SessionTest extends TestCase { + public function testCreate() + { + $sessionToken = static::$_client->session()->create('admin', '127.0.0.1'); + + $this->assertIsString($sessionToken); + $this->assertGreaterThan(10, strlen($sessionToken)); + } + public function testGet() { $sessionId = static::$_client->server()->createSession('admin', '127.0.0.1'); diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 80c84138..c1f2703b 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -61,6 +61,12 @@ public function testGet() $siteInfo = static::$_client->site()->get('id', $site->id); $this->assertEquals('addon.dom', $siteInfo->name); + $this->assertMatchesRegularExpression("/^\d{4}-\d{2}-\d{2}$/", $siteInfo->creationDate); + $this->assertEquals(36, strlen($siteInfo->guid)); + + $siteGuid = $siteInfo->guid; + $siteInfo = static::$_client->site()->get('guid', $siteGuid); + $this->assertEquals($site->id, $siteInfo->id); static::$_client->site()->delete('id', $site->id); } @@ -100,6 +106,7 @@ public function testGetAll() $this->assertCount(2, $sitesInfo); $this->assertEquals('addon.dom', $sitesInfo[0]->name); $this->assertEquals('addon.dom', $sitesInfo[0]->asciiName); + $this->assertEquals($site->id, $sitesInfo[0]->id); static::$_client->site()->delete('id', $site->id); static::$_client->site()->delete('id', $site2->id); diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index c6624919..bd75f9e9 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -61,6 +61,7 @@ public function testGet() $subdomainInfo = static::$_client->subdomain()->get('id', $subdomain->id); $this->assertEquals($name.'.'.$subdomainInfo->parent, $subdomainInfo->name); $this->assertTrue(false !== strpos($subdomainInfo->properties['www_root'], $name)); + $this->assertEquals($subdomain->id, $subdomainInfo->id); static::$_client->subdomain()->delete('id', $subdomain->id); } diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 2083642d..1c306aa2 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -5,5 +5,5 @@ class PasswordProvider { - const STRONG_PASSWORD = 'test-PWD*1@42!13#'; + const STRONG_PASSWORD = 'test-&PWD*1@42!13#'; } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index efcb5a9c..0288c525 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -182,6 +182,8 @@ public function testGet() $this->assertEquals($webspaceInfo->name, $webspaceInfo->asciiName); $this->assertIsArray($webspaceInfo->ipAddresses); $this->assertEquals(36, strlen($webspaceInfo->guid)); + $this->assertMatchesRegularExpression("/^\d{4}-\d{2}-\d{2}$/", $webspaceInfo->creationDate); + $this->assertEquals($webspace->id, $webspaceInfo->id); static::$_client->webspace()->delete('id', $webspace->id); }