From 9be3148b14307d48d397075b1a734215824a4b81 Mon Sep 17 00:00:00 2001 From: Simon Solutions Date: Sat, 20 Feb 2021 17:18:17 +0100 Subject: [PATCH 001/126] Update SecretKey.php Make IP address optional. If not provided don't add the ip_address child to the request. This will make Plesk take the IP of the sender. ("If this node is not specified, the IP address of the request sender will be used.") --- src/Api/Operator/SecretKey.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 677de824..f005806a 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -11,13 +11,20 @@ class SecretKey extends \PleskX\Api\Operator /** * @param string $ipAddress + * @param string $keyDescription * * @return string */ - public function create($ipAddress) + public function create($ipAddress = '', $keyDescription = '') { $packet = $this->_client->getPacket(); - $packet->addChild($this->_wrapperTag)->addChild('create')->addChild('ip_address', $ipAddress); + $creator = $packet->addChild($this->_wrapperTag)->addChild('create'); + + if ($ipAddress != '') { + $creator->addChild('ip_address', $ipAddress); + } + $creator->addChild('description', $keyDescription); + $response = $this->_client->request($packet); return (string) $response->key; From c9de9a6819bd8b0e998e5f1068f1038ad4a41c48 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 25 Feb 2021 11:26:57 +0700 Subject: [PATCH 002/126] Style fixes --- src/Api/Operator/SecretKey.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index f005806a..5b739f10 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -11,19 +11,22 @@ class SecretKey extends \PleskX\Api\Operator /** * @param string $ipAddress - * @param string $keyDescription + * @param string $description * * @return string */ - public function create($ipAddress = '', $keyDescription = '') + public function create($ipAddress = '', $description = '') { $packet = $this->_client->getPacket(); - $creator = $packet->addChild($this->_wrapperTag)->addChild('create'); + $createTag = $packet->addChild($this->_wrapperTag)->addChild('create'); - if ($ipAddress != '') { - $creator->addChild('ip_address', $ipAddress); + if ('' !== $ipAddress) { + $createTag->addChild('ip_address', $ipAddress); + } + + if ('' !== $description) { + $createTag->addChild('description', $description); } - $creator->addChild('description', $keyDescription); $response = $this->_client->request($packet); From 3933ee1b3afc1652dc20ebe786fa34720999d272 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 25 Feb 2021 11:27:30 +0700 Subject: [PATCH 003/126] Cover new secret key options with unit tests --- tests/SecretKeyTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 6d56293f..e8ec4222 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -14,6 +14,23 @@ public function testCreate() static::$_client->secretKey()->delete($keyId); } + public function testCreateAutoIp() + { + $keyId = static::$_client->secretKey()->create(); + $this->assertNotEmpty($keyId); + static::$_client->secretKey()->delete($keyId); + } + + public function testCreateWithDescription() + { + $keyId = static::$_client->secretKey()->create('192.168.0.1', 'test key'); + $keyInfo = static::$_client->secretKey()->get($keyId); + + $this->assertEquals('test key', $keyInfo->description); + + static::$_client->secretKey()->delete($keyId); + } + public function testGet() { $keyId = static::$_client->secretKey()->create('192.168.0.1'); From f4aa65ea093ff6ee9d9432a007955fdbff959f15 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 26 Feb 2021 22:00:29 +0700 Subject: [PATCH 004/126] Add missed stat details (based on rene-gates work) --- src/Api/Struct/Server/Statistics.php | 24 ++++++++++++ .../Struct/Server/Statistics/DiskSpace.php | 25 +++++++++++++ .../Struct/Server/Statistics/LoadAverage.php | 23 ++++++++++++ src/Api/Struct/Server/Statistics/Memory.php | 37 +++++++++++++++++++ src/Api/Struct/Server/Statistics/Objects.php | 36 ++++++++++++++++++ src/Api/Struct/Server/Statistics/Other.php | 25 +++++++++++++ src/Api/Struct/Server/Statistics/Swap.php | 25 +++++++++++++ tests/ServerTest.php | 10 +++++ 8 files changed, 205 insertions(+) create mode 100644 src/Api/Struct/Server/Statistics/DiskSpace.php create mode 100644 src/Api/Struct/Server/Statistics/LoadAverage.php create mode 100644 src/Api/Struct/Server/Statistics/Memory.php create mode 100644 src/Api/Struct/Server/Statistics/Other.php create mode 100644 src/Api/Struct/Server/Statistics/Swap.php diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index e15b5c22..2630ddcc 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -11,9 +11,33 @@ class Statistics extends \PleskX\Api\Struct /** @var Statistics\Version */ public $version; + /** @var Statistics\Other */ + public $other; + + /** @var Statistics\LoadAverage */ + public $loadAverage; + + /** @var Statistics\Memory */ + public $memory; + + /** @var Statistics\Swap */ + public $swap; + + /** @var Statistics\DiskSpace[] */ + public $diskSpace; + public function __construct($apiResponse) { $this->objects = new Statistics\Objects($apiResponse->objects); $this->version = new Statistics\Version($apiResponse->version); + $this->other = new Statistics\Other($apiResponse->other); + $this->loadAverage = new Statistics\LoadAverage($apiResponse->load_avg); + $this->memory = new Statistics\Memory($apiResponse->mem); + $this->swap = new Statistics\Swap($apiResponse->swap); + + $this->diskSpace = []; + foreach ($apiResponse->diskspace as $disk) { + $this->diskSpace[(string) $disk->device->name] = new Statistics\DiskSpace($disk->device); + } } } diff --git a/src/Api/Struct/Server/Statistics/DiskSpace.php b/src/Api/Struct/Server/Statistics/DiskSpace.php new file mode 100644 index 00000000..1f21655f --- /dev/null +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -0,0 +1,25 @@ +_initScalarProperties($apiResponse, [ + 'total', + 'used', + 'free', + ]); + } +} diff --git a/src/Api/Struct/Server/Statistics/LoadAverage.php b/src/Api/Struct/Server/Statistics/LoadAverage.php new file mode 100644 index 00000000..266bde88 --- /dev/null +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -0,0 +1,23 @@ +load1min = $apiResponse->l1 / 100.0; + $this->load5min = $apiResponse->l5 / 100.0; + $this->load15min = $apiResponse->l15 / 100.0; + } +} diff --git a/src/Api/Struct/Server/Statistics/Memory.php b/src/Api/Struct/Server/Statistics/Memory.php new file mode 100644 index 00000000..7177f9ca --- /dev/null +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -0,0 +1,37 @@ +_initScalarProperties($apiResponse, [ + 'total', + 'used', + 'free', + 'shared', + 'buffer', + 'cached', + ]); + } +} diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index 7428b1ae..2abb72e6 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -11,11 +11,47 @@ class Objects extends \PleskX\Api\Struct /** @var int */ public $domains; + /** @var int */ + public $databases; + + /** @var int */ + public $activeDomains; + + /** @var int */ + public $mailBoxes; + + /** @var int */ + public $mailRedirects; + + /** @var int */ + public $mailGroups; + + /** @var int */ + public $mailResponders; + + /** @var int */ + public $databaseUsers; + + /** @var int */ + public $problemClients; + + /** @var int */ + public $problemDomains; + public function __construct($apiResponse) { $this->_initScalarProperties($apiResponse, [ 'clients', 'domains', + 'databases', + ['active_domains' => 'activeDomains'], + ['mail_boxes' => 'mailBoxes'], + ['mail_redirects' => 'mailRedirects'], + ['mail_groups' => 'mailGroups'], + ['mail_responders' => 'mailResponders'], + ['database_users' => 'databaseUsers'], + ['problem_clients' => 'problemClients'], + ['problem_domains' => 'problemDomains'], ]); } } diff --git a/src/Api/Struct/Server/Statistics/Other.php b/src/Api/Struct/Server/Statistics/Other.php new file mode 100644 index 00000000..548fface --- /dev/null +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -0,0 +1,25 @@ +_initScalarProperties($apiResponse, [ + 'cpu', + 'uptime', + ['inside_vz' => 'insideVz'], + ]); + } +} diff --git a/src/Api/Struct/Server/Statistics/Swap.php b/src/Api/Struct/Server/Statistics/Swap.php new file mode 100644 index 00000000..8e03168f --- /dev/null +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -0,0 +1,25 @@ +_initScalarProperties($apiResponse, [ + 'total', + 'used', + 'free', + ]); + } +} diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 4408a948..29be9d6c 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -92,9 +92,19 @@ public function testGetStatistics() { $stats = static::$_client->server()->getStatistics(); $this->assertIsNumeric($stats->objects->clients); + $this->assertIsNumeric($stats->objects->domains); + $this->assertIsNumeric($stats->objects->databases); $this->assertEquals('psa', $stats->version->internalName); $this->assertNotEmpty($stats->version->osName); $this->assertNotEmpty($stats->version->osVersion); + $this->assertGreaterThan(0, $stats->other->uptime); + $this->assertGreaterThan(0, strlen($stats->other->cpu)); + $this->assertIsFloat($stats->loadAverage->load1min); + $this->assertGreaterThan(0, $stats->memory->total); + $this->assertGreaterThan($stats->memory->free, $stats->memory->total); + $this->assertIsNumeric($stats->swap->total); + $this->assertIsArray($stats->diskSpace); + $this->assertGreaterThan(0, array_pop($stats->diskSpace)->total); } public function testGetSiteIsolationConfig() From 859c16fc33808b05fbb874edbc6444c2d7d9bf65 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 28 Mar 2021 17:39:44 +0700 Subject: [PATCH 005/126] Add additional fields for webspace (based on Etmolf work) --- src/Api/Struct/Webspace/GeneralInfo.php | 39 +++++++++++++++++++++++-- tests/WebspaceTest.php | 3 ++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index f5736538..0b66e59d 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -5,21 +5,56 @@ class GeneralInfo extends \PleskX\Api\Struct { + /** @var string */ + public $creationDate; + /** @var string */ public $name; /** @var string */ - public $guid; + public $asciiName; + + /** @var string */ + public $status; /** @var int */ public $realSize; + /** @var int */ + public $ownerId; + + /** @var array */ + public $ipAddresses = []; + + /** @var string */ + public $guid; + + /** @var string */ + public $vendorGuid; + + /** @var string */ + public $description; + + /** @var string */ + public $adminDescription; + public function __construct($apiResponse) { $this->_initScalarProperties($apiResponse, [ + ['cr_date' => 'creationDate'], 'name', - 'guid', + 'ascii-name', + 'status', 'real_size', + 'owner-id', + 'guid', + 'vendor-guid', + 'description', + 'admin-description', ]); + + foreach ($apiResponse->dns_ip_address as $ip) { + $this->ipAddresses[] = (string) $ip; + } } } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index b8444537..efcb5a9c 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -179,6 +179,9 @@ public function testGet() $this->assertNotEmpty($webspaceInfo->name); $this->assertEquals(0, $webspaceInfo->realSize); + $this->assertEquals($webspaceInfo->name, $webspaceInfo->asciiName); + $this->assertIsArray($webspaceInfo->ipAddresses); + $this->assertEquals(36, strlen($webspaceInfo->guid)); static::$_client->webspace()->delete('id', $webspace->id); } From e0bc21b23463e9675238f692fdab4811927dde42 Mon Sep 17 00:00:00 2001 From: Nikolay Vizovitin Date: Fri, 4 Jun 2021 17:18:40 +0700 Subject: [PATCH 006/126] Switch to new Plesk image for tests in docker. The new image contains real systemd and is required for Plesk >= 18.0.36. It already contains all components required by tests. --- docker-compose.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 501c85a2..0a2e35bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,17 @@ version: '2' services: plesk: - image: plesk/plesk:tests + image: plesk/plesk:latest logging: driver: none ports: ["8443:8443"] + tmpfs: + - /tmp + - /run + - /run/lock + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro tests: build: . environment: @@ -18,4 +24,3 @@ services: - plesk volumes: - .:/opt/api-php-lib - From 9d36db668bbc9074e71d35668f9930ec3179f825 Mon Sep 17 00:00:00 2001 From: Simon Solutions Date: Thu, 2 Sep 2021 10:08:51 +0200 Subject: [PATCH 007/126] Add additional fields for site --- src/Api/Struct/Site/GeneralInfo.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 481ea626..7058b7f5 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -5,6 +5,9 @@ class GeneralInfo extends \PleskX\Api\Struct { + /** @var string */ + public $crDate; + /** @var string */ public $name; @@ -17,17 +20,37 @@ class GeneralInfo extends \PleskX\Api\Struct /** @var string */ public $status; + /** @var int */ + public $realSize; + + /** @var array */ + public $ipAddresses = []; + /** @var string */ public $description; + /** @var string */ + public $webspaceGuid; + + /** @var int */ + public $webspaceId; + public function __construct($apiResponse) { $this->_initScalarProperties($apiResponse, [ + 'cr_date', 'name', 'ascii-name', 'status', + 'real_size', 'guid', 'description', + 'webspace-guid', + 'webspace-id', ]); + + foreach ($apiResponse->dns_ip_address as $ip) { + $this->ipAddresses[] = (string) $ip; + } } } From fd74ae25625660f2433224c6d73bc224adb0b422 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 13 Sep 2021 22:44:01 +0700 Subject: [PATCH 008/126] Test additional properties for sites --- src/Api/Struct/Site/GeneralInfo.php | 4 ++-- tests/SiteTest.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 7058b7f5..94b1b4c1 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -6,7 +6,7 @@ class GeneralInfo extends \PleskX\Api\Struct { /** @var string */ - public $crDate; + public $creationDate; /** @var string */ public $name; @@ -38,7 +38,7 @@ class GeneralInfo extends \PleskX\Api\Struct public function __construct($apiResponse) { $this->_initScalarProperties($apiResponse, [ - 'cr_date', + ['cr_date' => 'creationDate'], 'name', 'ascii-name', 'status', diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 80c84138..5ad2ca4c 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -61,6 +61,8 @@ 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)); static::$_client->site()->delete('id', $site->id); } From 8f4f9f4da21b9a9482b68ae5363a93e9d025075f Mon Sep 17 00:00:00 2001 From: Simon Solutions Date: Wed, 8 Sep 2021 20:32:03 +0200 Subject: [PATCH 009/126] Add create session for automatic login with token Add create session tokens for automatic login with token according to: https://docs.plesk.com/en-US/obsidian/api-rpc/about-xml-api/reference/managing-plesk-server/creating-session-tokens.73865/ --- src/Api/Operator/Session.php | 23 +++++++++++++++++++++++ tests/SessionTest.php | 8 ++++++++ 2 files changed, 31 insertions(+) diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index eb2970bd..af2b7c68 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -7,6 +7,29 @@ class Session extends \PleskX\Api\Operator { + /** + * @param string $username + * @param string $userIp + * @param string $sourceServer + * + * @return string + */ + public function create($username, $userIp, $sourceServer = '') + { + $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', base64_encode($sourceServer)); + + $response = $this->_client->request($packet); + + return (string) $response->id; + } + /** * @return Struct\Info[] */ diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 8c97c5b9..dba80779 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); + } + public function testGet() { $sessionId = static::$_client->server()->createSession('admin', '127.0.0.1'); From b0aba3010fedf0fda016653c20b6c6e6500f42cc Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 15 Sep 2021 16:55:42 +0700 Subject: [PATCH 010/126] Fix style issue --- src/Api/Operator/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index af2b7c68..c587a490 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -29,7 +29,7 @@ public function create($username, $userIp, $sourceServer = '') return (string) $response->id; } - + /** * @return Struct\Info[] */ From f2df92b812ee18b9147abc8ea9099c31cb0aa61c Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 15 Sep 2021 16:59:37 +0700 Subject: [PATCH 011/126] Remove deprecated parameter --- src/Api/Operator/Session.php | 5 ++--- tests/SessionTest.php | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index c587a490..71d1cc36 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -10,11 +10,10 @@ class Session extends \PleskX\Api\Operator /** * @param string $username * @param string $userIp - * @param string $sourceServer * * @return string */ - public function create($username, $userIp, $sourceServer = '') + public function create($username, $userIp) { $packet = $this->_client->getPacket(); $creator = $packet->addChild('server')->addChild('create_session'); @@ -23,7 +22,7 @@ public function create($username, $userIp, $sourceServer = '') $loginData = $creator->addChild('data'); $loginData->addChild('user_ip', base64_encode($userIp)); - $loginData->addChild('source_server', base64_encode($sourceServer)); + $loginData->addChild('source_server', ''); $response = $this->_client->request($packet); diff --git a/tests/SessionTest.php b/tests/SessionTest.php index dba80779..ff60b731 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -8,9 +8,10 @@ class SessionTest extends TestCase public function testCreate() { - $sessionToken = static::$_client->session()->create('admin', '127.0.0.1', ''); + $sessionToken = static::$_client->session()->create('admin', '127.0.0.1'); $this->assertIsString($sessionToken); + $this->assertGreaterThan(10, strlen($sessionToken)); } public function testGet() From ecd3f5c70746b4771c0ce27119886d596b9f5085 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 15 Sep 2021 17:51:31 +0700 Subject: [PATCH 012/126] Remove redundant new line --- tests/SessionTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/SessionTest.php b/tests/SessionTest.php index ff60b731..4486103f 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -5,7 +5,6 @@ class SessionTest extends TestCase { - public function testCreate() { $sessionToken = static::$_client->session()->create('admin', '127.0.0.1'); From c8a200eaddc8c7f89ad594cdca1e4a9e5fc5e2f2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 15 Sep 2021 18:08:32 +0700 Subject: [PATCH 013/126] Demonstrate how to create a secret key for multiple IP addresses --- tests/SecretKeyTest.php | 7 +++++++ 1 file changed, 7 insertions(+) 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'); From ca9bbac31ceb6346bbfdca809f206f34a18133a2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 16 Sep 2021 11:12:56 +0700 Subject: [PATCH 014/126] Introduce GitHub Action for CI --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/test.yml 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 From 9fb853c8d2eb3f484e4aa7cd245ef2cbd14af808 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 16 Sep 2021 11:36:06 +0700 Subject: [PATCH 015/126] Get rid of TravisCI integration --- .travis.yml | 8 -------- README.md | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .travis.yml 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/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) From a665af5ebf853f6fedf83b010c7c32d5744d94ee Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 17 Sep 2021 22:53:04 +0700 Subject: [PATCH 016/126] Prefill object id for fetch operations --- src/Api/Operator.php | 6 +++++- src/Api/Struct/Customer/GeneralInfo.php | 3 +++ src/Api/Struct/Site/GeneralInfo.php | 3 +++ src/Api/Struct/Webspace/GeneralInfo.php | 3 +++ tests/CustomerTest.php | 1 + tests/MailTest.php | 1 + tests/ResellerTest.php | 1 + tests/SiteTest.php | 5 +++++ tests/SubdomainTest.php | 1 + tests/WebspaceTest.php | 2 ++ 10 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Api/Operator.php b/src/Api/Operator.php index bab9b2b3..1179d1e7 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -96,7 +96,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/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index efa1f411..345d35af 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -5,6 +5,9 @@ class GeneralInfo extends \PleskX\Api\Struct { + /** @var int */ + public $id; + /** @var string */ public $company; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 94b1b4c1..99c65154 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -5,6 +5,9 @@ class GeneralInfo extends \PleskX\Api\Struct { + /** @var int */ + public $id; + /** @var string */ public $creationDate; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 0b66e59d..fab75043 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -5,6 +5,9 @@ class GeneralInfo extends \PleskX\Api\Struct { + /** @var int */ + public $id; + /** @var string */ public $creationDate; 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/SiteTest.php b/tests/SiteTest.php index 5ad2ca4c..c1f2703b 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -64,6 +64,10 @@ public function testGet() $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); } @@ -102,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/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); } From a7e1c46b3e12322a2a2313a7d49a7f16be62a8c5 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 1 Oct 2021 11:48:40 +0700 Subject: [PATCH 017/126] Bump min PHP version to 7.4 --- Dockerfile | 2 +- composer.json | 2 +- composer.lock | 670 ++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 483 insertions(+), 191 deletions(-) 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/composer.json b/composer.json index 3142565c..7e338eb9 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" diff --git a/composer.lock b/composer.lock index 1c6fbd7f..b3c5da1a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "330651d827abd67d78e7962e9cd539d5", + "content-hash": "8433bb66b607b76ea1c1e4d9255eabaa", "packages": [], "packages-dev": [ { @@ -67,6 +67,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 +140,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 +203,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", @@ -256,6 +268,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 +329,24 @@ "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": "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 +364,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { @@ -370,7 +390,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 +448,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", @@ -428,16 +462,16 @@ }, { "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/c6d052fc58cb876152f89f532b95a8d7907e7f0e", - "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -476,20 +510,24 @@ "parser", "php" ], - "time": "2020-12-20T10:01:03+00:00" + "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": "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 +570,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 +621,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 +674,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 +730,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 +755,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -725,37 +780,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 +847,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 +918,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 +978,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 +1041,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 +1100,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 +1159,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 +1173,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 +1194,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 +1212,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 +1258,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 +1272,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 +1304,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 +1316,31 @@ "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": "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 +1357,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 +1433,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 +1466,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 +1526,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 +1582,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 +1637,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 +1711,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 +1768,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 +1834,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 +1897,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 +1974,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 +1988,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 +2038,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 +2095,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 +2152,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 +2207,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 +2270,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 +2325,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 +2339,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 +2381,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 +2434,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 +2448,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 +2503,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 +2541,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 +2589,9 @@ "console", "terminal" ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2374,20 +2606,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 +2628,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -2424,6 +2656,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 +2673,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 +2718,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 +2735,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 +2760,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2558,6 +2797,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2572,20 +2814,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 +2839,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2636,6 +2878,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2650,20 +2895,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 +2920,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2717,6 +2962,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2731,20 +2979,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 +3004,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2794,6 +3042,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2808,20 +3059,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 +3081,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2870,6 +3121,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2884,20 +3138,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 +3160,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "1.23-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2950,6 +3204,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2964,25 +3221,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 +3266,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 +3283,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 +3309,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "2.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -3085,6 +3345,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3099,20 +3362,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 +3428,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.3.7" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -3179,20 +3445,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 +3503,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 +3520,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 +3560,49 @@ } ], "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": "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 +3624,11 @@ "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": "yosymfony/resource-watcher", @@ -3393,6 +3681,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 +3694,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" } From 15837e8a4501936a526fdadfb6ef88755ce3b667 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 1 Oct 2021 12:11:17 +0700 Subject: [PATCH 018/126] Introduce code linting using Psalm --- composer.json | 6 +- composer.lock | 833 ++++++++++++++++++++++++++++++++++++++++++++- psalm.xml | 15 + src/Api/Client.php | 1 + 4 files changed, 852 insertions(+), 3 deletions(-) create mode 100644 psalm.xml diff --git a/composer.json b/composer.json index 7e338eb9..29246498 100644 --- a/composer.json +++ b/composer.json @@ -21,14 +21,16 @@ }, "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 b3c5da1a..0c022bf2 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": "8433bb66b607b76ea1c1e4d9255eabaa", + "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", @@ -219,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", @@ -335,6 +756,107 @@ }, "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.3.0", @@ -460,6 +982,57 @@ ], "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.13.0", @@ -516,6 +1089,59 @@ }, "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/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "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": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com/", + "keywords": [ + "array", + "array conversion", + "xml", + "xml conversion" + ], + "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.3", @@ -1322,6 +1948,56 @@ }, "time": "2021-03-05T17:36:06+00:00" }, + { + "name": "psr/log", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "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/2.0.0" + }, + "time": "2021-07-14T16:41:46+00:00" + }, { "name": "react/event-loop", "version": "v1.2.0", @@ -3572,6 +4248,111 @@ ], "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.10.0", @@ -3630,6 +4411,56 @@ }, "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", "version": "v2.0.1", diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 00000000..7c0333df --- /dev/null +++ b/psalm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/src/Api/Client.php b/src/Api/Client.php index 3f79d3f1..85094041 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -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); From 0fdd640872971a78378cd0efe17a87df8e40b409 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 1 Oct 2021 13:20:14 +0700 Subject: [PATCH 019/126] Fix psr/log dependecy conflict instroduced due to PHP 8 usage --- composer.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.lock b/composer.lock index 0c022bf2..8e37f4e7 100644 --- a/composer.lock +++ b/composer.lock @@ -1950,30 +1950,30 @@ }, { "name": "psr/log", - "version": "2.0.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1994,9 +1994,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2021-07-14T16:41:46+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "react/event-loop", From 8ad734553e67e90ffdebdef296e6a25287f5ce10 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 1 Oct 2021 20:00:04 +0700 Subject: [PATCH 020/126] Use type hints instead of doc blocks --- psalm.xml | 5 ++ src/Api/Client.php | 42 ++++++------ src/Api/InternalClient.php | 4 +- src/Api/Operator.php | 9 +-- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/DnsTemplate.php | 2 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/ProtectedDirectory.php | 2 +- src/Api/Operator/SecretKey.php | 2 +- src/Api/Operator/Server.php | 57 +++++----------- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 27 ++++---- src/Api/Struct.php | 24 +++++-- src/Api/Struct/Certificate/Info.php | 14 ++-- src/Api/Struct/Customer/GeneralInfo.php | 68 ++++++------------- src/Api/Struct/Customer/Info.php | 14 ++-- src/Api/Struct/Database/Info.php | 32 ++++----- src/Api/Struct/Database/UserInfo.php | 18 +++-- src/Api/Struct/DatabaseServer/Info.php | 22 +++--- src/Api/Struct/Dns/Info.php | 36 ++++------ src/Api/Struct/EventLog/DetailedEvent.php | 36 ++++------ src/Api/Struct/EventLog/Event.php | 22 +++--- src/Api/Struct/Ip/Info.php | 22 +++--- src/Api/Struct/Locale/Info.php | 18 +++-- src/Api/Struct/Mail/GeneralInfo.php | 18 +++-- src/Api/Struct/Mail/Info.php | 14 ++-- src/Api/Struct/PhpHandler/Info.php | 44 ++++-------- .../Struct/ProtectedDirectory/DataInfo.php | 10 ++- src/Api/Struct/ProtectedDirectory/Info.php | 6 +- .../Struct/ProtectedDirectory/UserInfo.php | 10 +-- src/Api/Struct/Reseller/GeneralInfo.php | 22 +++--- src/Api/Struct/Reseller/Info.php | 14 ++-- src/Api/Struct/SecretKey/Info.php | 22 +++--- src/Api/Struct/Server/Admin.php | 18 +++-- src/Api/Struct/Server/GeneralInfo.php | 18 +++-- src/Api/Struct/Server/Preferences.php | 18 +++-- src/Api/Struct/Server/SessionPreferences.php | 10 +-- src/Api/Struct/Server/Statistics.php | 7 +- .../Struct/Server/Statistics/DiskSpace.php | 18 +++-- .../Struct/Server/Statistics/LoadAverage.php | 18 +++-- src/Api/Struct/Server/Statistics/Memory.php | 32 ++++----- src/Api/Struct/Server/Statistics/Objects.php | 52 +++++--------- src/Api/Struct/Server/Statistics/Other.php | 18 +++-- src/Api/Struct/Server/Statistics/Swap.php | 18 +++-- src/Api/Struct/Server/Statistics/Version.php | 32 ++++----- src/Api/Struct/Server/UpdatesInfo.php | 14 ++-- src/Api/Struct/ServicePlan/Info.php | 22 +++--- src/Api/Struct/Session/Info.php | 32 ++++----- src/Api/Struct/Site/GeneralInfo.php | 52 +++++--------- src/Api/Struct/Site/HostingInfo.php | 14 ++-- src/Api/Struct/Site/Info.php | 14 ++-- src/Api/Struct/SiteAlias/GeneralInfo.php | 18 +++-- src/Api/Struct/SiteAlias/Info.php | 14 ++-- src/Api/Struct/Subdomain/Info.php | 22 +++--- src/Api/Struct/Ui/CustomButton.php | 40 ++++------- src/Api/Struct/Webspace/DiskUsage.php | 53 +++++---------- src/Api/Struct/Webspace/GeneralInfo.php | 58 ++++++---------- .../Struct/Webspace/HostingPropertyInfo.php | 18 +++-- src/Api/Struct/Webspace/Info.php | 18 +++-- src/Api/Struct/Webspace/Limit.php | 14 ++-- src/Api/Struct/Webspace/LimitDescriptor.php | 10 +-- src/Api/Struct/Webspace/LimitInfo.php | 18 +++-- src/Api/Struct/Webspace/Limits.php | 14 ++-- .../Struct/Webspace/PermissionDescriptor.php | 10 +-- src/Api/Struct/Webspace/PermissionInfo.php | 18 +++-- src/Api/Struct/Webspace/PhpSettings.php | 10 +-- .../Webspace/PhysicalHostingDescriptor.php | 10 +-- 67 files changed, 579 insertions(+), 815 deletions(-) diff --git a/psalm.xml b/psalm.xml index 7c0333df..ab2b5f01 100644 --- a/psalm.xml +++ b/psalm.xml @@ -12,4 +12,9 @@ + + + + + diff --git a/src/Api/Client.php b/src/Api/Client.php index 85094041..4b7fa38e 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 = ""; @@ -295,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); @@ -315,7 +315,7 @@ protected function _verifyResponse($xml) * @param string $request * @param SimpleXMLElement $xml * - * @return string + * @return false|string */ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) { 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 1179d1e7..2e617b8a 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)); diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 482d1d81..ba70c38f 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 diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 4b79df77..bbf21b44 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 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/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index af643b0a..cf43903a 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 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/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..b8366646 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'); @@ -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 345d35af..43f8ab20 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -3,54 +3,28 @@ namespace PleskX\Api\Struct\Customer; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @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; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var string */ - public $address; - - /** @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 99c65154..f13913f3 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -3,42 +3,24 @@ namespace PleskX\Api\Struct\Site; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @var string */ - public $creationDate; - - /** @var string */ - public $name; - - /** @var string */ - public $asciiName; - - /** @var string */ - public $guid; - - /** @var string */ - public $status; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $realSize; - - /** @var array */ - public $ipAddresses = []; - - /** @var string */ - public $description; - - /** @var string */ - public $webspaceGuid; - - /** @var int */ - public $webspaceId; - - public function __construct($apiResponse) +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(XmlResponse $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['cr_date' => 'creationDate'], 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 fab75043..33d39802 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -3,45 +3,27 @@ namespace PleskX\Api\Struct\Webspace; -class GeneralInfo extends \PleskX\Api\Struct -{ - /** @var int */ - public $id; - - /** @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 = []; From 21ecea04d96484e3c754f2e2773fabd2deab33a0 Mon Sep 17 00:00:00 2001 From: viacheslav diomidov Date: Tue, 5 Oct 2021 14:11:33 +0300 Subject: [PATCH 021/126] BUGFIX EXTREST-137 simpleXml fix for & in values. --- src/Api/Client.php | 9 +++++++-- src/Api/Operator.php | 2 +- src/Api/Operator/Certificate.php | 2 +- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Database.php | 4 ++-- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/Dns.php | 4 ++-- src/Api/Operator/DnsTemplate.php | 4 ++-- src/Api/Operator/Mail.php | 4 ++-- src/Api/Operator/ProtectedDirectory.php | 8 ++++---- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/Site.php | 6 +++--- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Operator/Subdomain.php | 6 +++--- src/Api/Operator/Ui.php | 2 +- src/Api/Operator/Webspace.php | 4 ++-- tests/Utility/PasswordProvider.php | 2 +- 17 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index 4b7fa38e..4132eaeb 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -321,10 +321,15 @@ 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(); @@ -346,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/Operator.php b/src/Api/Operator.php index 2e617b8a..60b5b541 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -78,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); 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 ba70c38f..8b830460 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -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 bbf21b44..b9b0af06 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -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/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 cf43903a..80fc3819 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -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/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/Webspace.php b/src/Api/Operator/Webspace.php index b8366646..16f77651 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -82,8 +82,8 @@ public function create(array $properties, array $hostingProperties = null, strin $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'])) { 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#'; } From bdaad89f315c86f01c19ddbdf126de855f5cfb34 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 7 Oct 2021 00:04:33 +0700 Subject: [PATCH 022/126] Fix issues reported by psalm --- psalm.xml | 2 +- src/Api/Client.php | 168 +++++------------- src/Api/Operator.php | 5 +- src/Api/Operator/Database.php | 10 +- src/Api/Operator/DatabaseServer.php | 6 +- src/Api/Operator/Dns.php | 18 +- src/Api/Operator/DnsTemplate.php | 8 +- src/Api/Operator/Mail.php | 18 +- src/Api/Operator/PhpHandler.php | 12 +- src/Api/Operator/ProtectedDirectory.php | 28 ++- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/ServicePlan.php | 4 +- src/Api/Operator/Site.php | 4 +- src/Api/Operator/SiteAlias.php | 6 +- src/Api/Operator/Subdomain.php | 4 +- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Certificate/Info.php | 3 +- src/Api/Struct/Customer/GeneralInfo.php | 3 +- src/Api/Struct/Customer/Info.php | 3 +- src/Api/Struct/Database/Info.php | 3 +- src/Api/Struct/Database/UserInfo.php | 3 +- src/Api/Struct/DatabaseServer/Info.php | 3 +- src/Api/Struct/Dns/Info.php | 3 +- src/Api/Struct/EventLog/DetailedEvent.php | 3 +- src/Api/Struct/EventLog/Event.php | 3 +- src/Api/Struct/Ip/Info.php | 3 +- src/Api/Struct/Locale/Info.php | 3 +- src/Api/Struct/Mail/GeneralInfo.php | 3 +- src/Api/Struct/Mail/Info.php | 3 +- src/Api/Struct/PhpHandler/Info.php | 2 +- .../Struct/ProtectedDirectory/DataInfo.php | 3 +- src/Api/Struct/ProtectedDirectory/Info.php | 3 +- .../Struct/ProtectedDirectory/UserInfo.php | 3 +- src/Api/Struct/Reseller/GeneralInfo.php | 3 +- src/Api/Struct/Reseller/Info.php | 3 +- src/Api/Struct/SecretKey/Info.php | 3 +- src/Api/Struct/Server/Admin.php | 3 +- src/Api/Struct/Server/GeneralInfo.php | 3 +- src/Api/Struct/Server/Preferences.php | 3 +- src/Api/Struct/Server/SessionPreferences.php | 3 +- src/Api/Struct/Server/Statistics.php | 3 +- .../Struct/Server/Statistics/DiskSpace.php | 3 +- .../Struct/Server/Statistics/LoadAverage.php | 3 +- src/Api/Struct/Server/Statistics/Memory.php | 3 +- src/Api/Struct/Server/Statistics/Objects.php | 3 +- src/Api/Struct/Server/Statistics/Other.php | 3 +- src/Api/Struct/Server/Statistics/Swap.php | 3 +- src/Api/Struct/Server/Statistics/Version.php | 3 +- src/Api/Struct/Server/UpdatesInfo.php | 3 +- src/Api/Struct/ServicePlan/Info.php | 3 +- src/Api/Struct/Session/Info.php | 3 +- src/Api/Struct/Site/GeneralInfo.php | 3 +- src/Api/Struct/Site/HostingInfo.php | 3 +- src/Api/Struct/Site/Info.php | 3 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 3 +- src/Api/Struct/SiteAlias/Info.php | 3 +- src/Api/Struct/Subdomain/Info.php | 3 +- src/Api/Struct/Ui/CustomButton.php | 3 +- src/Api/Struct/Webspace/DiskUsage.php | 3 +- src/Api/Struct/Webspace/GeneralInfo.php | 3 +- .../Struct/Webspace/HostingPropertyInfo.php | 3 +- src/Api/Struct/Webspace/Info.php | 3 +- src/Api/Struct/Webspace/Limit.php | 3 +- src/Api/Struct/Webspace/LimitDescriptor.php | 3 +- src/Api/Struct/Webspace/LimitInfo.php | 3 +- src/Api/Struct/Webspace/Limits.php | 3 +- .../Struct/Webspace/PermissionDescriptor.php | 3 +- src/Api/Struct/Webspace/PermissionInfo.php | 3 +- src/Api/Struct/Webspace/PhpSettings.php | 3 +- .../Webspace/PhysicalHostingDescriptor.php | 3 +- tests/PhpHandlerTest.php | 3 +- 71 files changed, 165 insertions(+), 296 deletions(-) diff --git a/psalm.xml b/psalm.xml index ab2b5f01..43b6fdac 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,6 @@ call($requestXml->children()[0]->asXml(), $this->_login); } else { - $xml = $this->_performHttpRequest($request); + $xml = $this->_performHttpRequest((string) $request); } $this->_verifyResponseCallback @@ -212,22 +212,19 @@ private function _performHttpRequest($request) curl_close($curl); - $xml = new XmlResponse($result); - - return $xml; + return new XmlResponse((string) $result); } /** * Perform multiple API requests using single HTTP request. * - * @param $requests + * @param array $requests * @param int $mode * - * @throws Client\Exception - * * @return array + * @throws Client\Exception */ - public function multiRequest($requests, $mode = self::RESPONSE_SHORT) + public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): array { $requestXml = $this->getPacket(); @@ -237,23 +234,32 @@ public function multiRequest($requests, $mode = self::RESPONSE_SHORT) } else { if (is_array($request)) { $request = $this->_arrayToXml($request, $requestXml)->asXML(); + if (!$request) { + throw new Client\Exception('Failed to create an XML string for request'); + } } elseif (preg_match('/^[a-z]/', $request)) { $this->_expandRequestShortSyntax($request, $requestXml); } } - $responses[] = $this->request($request); } if ('sdk' == $this->_protocol) { throw new Client\Exception('Multi requests are not supported via SDK.'); } else { - $responseXml = $this->_performHttpRequest($requestXml->asXML()); + $xmlString = $requestXml->asXML(); + if (!$xmlString) { + throw new Client\Exception('Failed to create an XML string for request'); + } + $responseXml = $this->_performHttpRequest($xmlString); } $responses = []; foreach ($responseXml->children() as $childNode) { $xml = $this->getPacket(); $dom = dom_import_simplexml($xml)->ownerDocument; + if (!$dom) { + continue; + } $childDomNode = dom_import_simplexml($childNode); $childDomNode = $dom->importNode($childDomNode, true); @@ -371,230 +377,150 @@ protected function _isAssocArray(array $array) /** * @param string $name * - * @return \PleskX\Api\Operator + * @return mixed */ - protected function _getOperator($name) + protected function _getOperator(string $name) { if (!isset($this->_operatorsCache[$name])) { $className = '\\PleskX\\Api\\Operator\\'.$name; + /** @psalm-suppress InvalidStringClass */ $this->_operatorsCache[$name] = new $className($this); } return $this->_operatorsCache[$name]; } - /** - * @return Operator\Server - */ - public function server() + public function server(): Operator\Server { return $this->_getOperator('Server'); } - /** - * @return Operator\Customer - */ - public function customer() + public function customer(): Operator\Customer { return $this->_getOperator('Customer'); } - /** - * @return Operator\Webspace - */ - public function webspace() + public function webspace(): Operator\Webspace { return $this->_getOperator('Webspace'); } - /** - * @return Operator\Subdomain - */ - public function subdomain() + public function subdomain(): Operator\Subdomain { return $this->_getOperator('Subdomain'); } - /** - * @return Operator\Dns - */ - public function dns() + public function dns(): Operator\Dns { return $this->_getOperator('Dns'); } - /** - * @return Operator\DnsTemplate - */ - public function dnsTemplate() + public function dnsTemplate(): Operator\DnsTemplate { return $this->_getOperator('DnsTemplate'); } - /** - * @return Operator\DatabaseServer - */ - public function databaseServer() + public function databaseServer(): Operator\DatabaseServer { return $this->_getOperator('DatabaseServer'); } - /** - * @return Operator\Mail - */ - public function mail() + public function mail(): Operator\Mail { return $this->_getOperator('Mail'); } - /** - * @return Operator\Certificate - */ - public function certificate() + public function certificate(): Operator\Certificate { return $this->_getOperator('Certificate'); } - /** - * @return Operator\SiteAlias - */ - public function siteAlias() + public function siteAlias(): Operator\SiteAlias { return $this->_getOperator('SiteAlias'); } - /** - * @return Operator\Ip - */ - public function ip() + public function ip(): Operator\Ip { return $this->_getOperator('Ip'); } - /** - * @return Operator\EventLog - */ - public function eventLog() + public function eventLog(): Operator\EventLog { return $this->_getOperator('EventLog'); } - /** - * @return Operator\SecretKey - */ - public function secretKey() + public function secretKey(): Operator\SecretKey { return $this->_getOperator('SecretKey'); } - /** - * @return Operator\Ui - */ - public function ui() + public function ui(): Operator\Ui { return $this->_getOperator('Ui'); } - /** - * @return Operator\ServicePlan - */ - public function servicePlan() + public function servicePlan(): Operator\ServicePlan { return $this->_getOperator('ServicePlan'); } - /** - * @return Operator\VirtualDirectory - */ - public function virtualDirectory() + public function virtualDirectory(): Operator\VirtualDirectory { return $this->_getOperator('VirtualDirectory'); } - /** - * @return Operator\Database - */ - public function database() + public function database(): Operator\Database { return $this->_getOperator('Database'); } - /** - * @return Operator\Session - */ - public function session() + public function session(): Operator\Session { return $this->_getOperator('Session'); } - /** - * @return Operator\Locale - */ - public function locale() + public function locale(): Operator\Locale { return $this->_getOperator('Locale'); } - /** - * @return Operator\LogRotation - */ - public function logRotation() + public function logRotation(): Operator\LogRotation { return $this->_getOperator('LogRotation'); } - /** - * @return Operator\ProtectedDirectory - */ - public function protectedDirectory() + public function protectedDirectory(): Operator\ProtectedDirectory { return $this->_getOperator('ProtectedDirectory'); } - /** - * @return Operator\Reseller - */ - public function reseller() + public function reseller(): Operator\Reseller { return $this->_getOperator('Reseller'); } - /** - * @return Operator\ResellerPlan - */ - public function resellerPlan() + public function resellerPlan(): Operator\ResellerPlan { return $this->_getOperator('ResellerPlan'); } - /** - * @return Operator\Aps - */ - public function aps() + public function aps(): Operator\Aps { return $this->_getOperator('Aps'); } - /** - * @return Operator\ServicePlanAddon - */ - public function servicePlanAddon() + public function servicePlanAddon(): Operator\ServicePlanAddon { return $this->_getOperator('ServicePlanAddon'); } - /** - * @return Operator\Site - */ - public function site() + public function site(): Operator\Site { return $this->_getOperator('Site'); } - /** - * @return Operator\PhpHandler - */ - public function phpHandler() + public function phpHandler(): Operator\PhpHandler { return $this->_getOperator('PhpHandler'); } diff --git a/src/Api/Operator.php b/src/Api/Operator.php index 60b5b541..c577e366 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -8,7 +8,7 @@ class Operator protected string $_wrapperTag = ''; protected Client $_client; - public function __construct($client) + public function __construct(Client $client) { $this->_client = $client; @@ -78,7 +78,7 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->{$field} = $value; + $filterTag->{$field} = (string) $value; } $getTag->addChild('dataset')->addChild($infoTag); @@ -93,6 +93,7 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul if (!isset($xmlResult->data) || !isset($xmlResult->data->$infoTag)) { continue; } + /** @psalm-suppress InvalidStringClass */ $item = new $structClass($xmlResult->data->$infoTag); if (isset($xmlResult->id) && property_exists($item, 'id')) { $item->id = (int) $xmlResult->id; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 8e5696ae..048841b8 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -128,19 +128,15 @@ public function getAllUsers($field, $value) * * @return \PleskX\Api\XmlResponse */ - private function _get($command, $field, $value) + private function _get(string $command, string $field, $value) { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild($command); $filterTag = $getTag->addChild('filter'); - if (!is_null($field)) { - $filterTag->{$field} = $value; - } - - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $filterTag->{$field} = (string) $value; - return $response; + return $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); } /** diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 8b830460..18cfbfa1 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -25,7 +25,7 @@ public function getSupportedTypes() * * @return Struct\Info */ - public function get($field, $value) + public function get(string $field, $value) { $items = $this->_get($field, $value); @@ -44,7 +44,7 @@ public function getAll() * @param string|null $field * @param int|string|null $value * - * @return Struct\Info|Struct\Info[] + * @return Struct\Info[] */ private function _get($field = null, $value = null) { @@ -53,7 +53,7 @@ private function _get($field = null, $value = null) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->{$field} = $value; + $filterTag->{$field} = (string) $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 30920a71..c57ffef4 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -29,9 +29,9 @@ public function create($properties) * * @param array $records * - * @return \PleskX\Api\XmlResponse[] + * @return \SimpleXMLElement[] */ - public function bulkCreate(array $records) + public function bulkCreate(array $records): array { $packet = $this->_client->getPacket(); @@ -58,7 +58,7 @@ public function bulkCreate(array $records) * * @return Struct\Info */ - public function get($field, $value) + public function get(string $field, $value) { $items = $this->getAll($field, $value); @@ -71,15 +71,13 @@ public function get($field, $value) * * @return Struct\Info[] */ - public function getAll($field, $value) + public function getAll(string $field, $value): array { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_rec'); $filterTag = $getTag->addChild('filter'); - if (!is_null($field)) { - $filterTag->addChild($field, $value); - } + $filterTag->addChild($field, (string) $value); $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; @@ -98,7 +96,7 @@ public function getAll($field, $value) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->_delete($field, $value, 'del_rec'); } @@ -108,9 +106,9 @@ public function delete($field, $value) * * @param array $recordIds * - * @return \PleskX\Api\XmlResponse[] + * @return \SimpleXMLElement[] */ - public function bulkDelete(array $recordIds) + public function bulkDelete(array $recordIds): array { $packet = $this->_client->getPacket(); diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index b9b0af06..2e76ab9c 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -46,14 +46,14 @@ public function get($field, $value) * * @return Struct\Info[] */ - public function getAll($field = null, $value = null) + public function getAll($field = null, $value = null): array { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_rec'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->{$field} = $value; + $filterTag->{$field} = (string) $value; } $getTag->addChild('template'); @@ -74,11 +74,11 @@ public function getAll($field = null, $value = null) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { $packet = $this->_client->getPacket(); $delTag = $packet->addChild($this->_wrapperTag)->addChild('del_rec'); - $delTag->addChild('filter')->addChild($field, $value); + $delTag->addChild('filter')->addChild($field, (string) $value); $delTag->addChild('template'); $response = $this->_client->request($packet); diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 0fa01380..da5a630d 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -3,9 +3,11 @@ namespace PleskX\Api\Operator; +use PleskX\Api\Client; +use PleskX\Api\Operator; use PleskX\Api\Struct\Mail as Struct; -class Mail extends \PleskX\Api\Operator +class Mail extends Operator { /** * @param string $name @@ -21,7 +23,7 @@ public function create($name, $siteId, $mailbox = false, $password = '') $info = $packet->addChild($this->_wrapperTag)->addChild('create'); $filter = $info->addChild('filter'); - $filter->addChild('site-id', $siteId); + $filter->addChild('site-id', (string) $siteId); $mailname = $filter->addChild('mailname'); $mailname->addChild('name', $name); if ($mailbox) { @@ -43,12 +45,14 @@ public function create($name, $siteId, $mailbox = false, $password = '') * * @return bool */ - public function delete($field, $value, $siteId) + public function delete(string $field, $value, $siteId): bool { $packet = $this->_client->getPacket(); $filter = $packet->addChild($this->_wrapperTag)->addChild('remove')->addChild('filter'); - $filter->addChild('site-id', $siteId); - $filter->{$field} = $value; + + $filter->addChild('site-id', (string) $siteId); + $filter->{$field} = (string) $value; + $response = $this->_client->request($packet); return 'ok' === (string) $response->status; @@ -79,12 +83,12 @@ public function getAll($siteId, $name = null) $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_info'); $filterTag = $getTag->addChild('filter'); - $filterTag->addChild('site-id', $siteId); + $filterTag->addChild('site-id', (string) $siteId); if (!is_null($name)) { $filterTag->addChild('name', $name); } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->_client->request($packet, Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { if (!isset($xmlResult->mailname)) { diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 66f1ec1d..5adb1e8b 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -10,19 +10,19 @@ class PhpHandler extends Operator { /** - * @param string $field - * @param int|string $value + * @param string|null $field + * @param int|string|null $value * * @return Info */ - public function get($field, $value) + public function get($field = null, $value = null): Info { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->addChild($field, (string)$value); } $response = $this->_client->request($packet, Client::RESPONSE_FULL); @@ -37,14 +37,14 @@ public function get($field, $value) * * @return Info[] */ - public function getAll($field = null, $value = null) + public function getAll($field = null, $value = null): array { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->addChild($field, (string) $value); } $response = $this->_client->request($packet, Client::RESPONSE_FULL); diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 80fc3819..29756d3a 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -3,9 +3,11 @@ namespace PleskX\Api\Operator; +use PleskX\Api\Client; +use PleskX\Api\Operator; use PleskX\Api\Struct\ProtectedDirectory as Struct; -class ProtectedDirectory extends \PleskX\Api\Operator +class ProtectedDirectory extends Operator { protected string $_wrapperTag = 'protected-dir'; @@ -21,7 +23,7 @@ public function add($name, $siteId, $header = '') $packet = $this->_client->getPacket(); $info = $packet->addChild($this->_wrapperTag)->addChild('add'); - $info->addChild('site-id', $siteId); + $info->addChild('site-id', (string) $siteId); $info->addChild('name', $name); $info->addChild('header', $header); @@ -45,7 +47,7 @@ public function delete($field, $value) * * @return Struct\DataInfo|false */ - public function get($field, $value) + public function get(string $field, $value) { $items = $this->getAll($field, $value); @@ -58,7 +60,7 @@ public function get($field, $value) * * @return Struct\DataInfo[] */ - public function getAll($field, $value) + public function getAll(string $field, $value): array { $response = $this->_get('get', $field, $value); $items = []; @@ -81,7 +83,7 @@ public function addUser($protectedDirectory, $login, $password) $packet = $this->_client->getPacket(); $info = $packet->addChild($this->_wrapperTag)->addChild('add-user'); - $info->{'pd-id'} = $protectedDirectory->id; + $info->{'pd-id'} = (string) $protectedDirectory->id; $info->login = $login; $info->password = $password; @@ -100,24 +102,20 @@ public function deleteUser($field, $value) } /** - * @param $command - * @param $field - * @param $value + * @param string $command + * @param string $field + * @param int|string $value * * @return \PleskX\Api\XmlResponse */ - private function _get($command, $field, $value) + private function _get(string $command, string $field, $value) { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild($command); $filterTag = $getTag->addChild('filter'); - if (!is_null($field)) { - $filterTag->{$field} = $value; - } - - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $filterTag->{$field} = (string) $value; - return $response; + return $this->_client->request($packet, Client::RESPONSE_FULL); } } diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index bcf76d32..f29391ff 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -63,7 +63,7 @@ public function getAll($field = null, $value = null) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->addChild($field, (string) $value); } $datasetTag = $getTag->addChild('dataset'); diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 41fa075e..d4c14899 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -55,7 +55,7 @@ public function getAll() * @param string|null $field * @param int|string|null $value * - * @return Struct\Info|Struct\Info[] + * @return Struct\Info[] */ private function _get($field = null, $value = null) { @@ -64,7 +64,7 @@ private function _get($field = null, $value = null) $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->addChild($field, (string) $value); } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index f92eae62..4da17822 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->{$name} = $value; + $infoGeneral->{$name} = (string) $value; } // set hosting properties @@ -74,7 +74,7 @@ public function get($field, $value) */ public function getHosting($field, $value) { - $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function ($node) { + $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function (\SimpleXMLElement $node) { return isset($node->vrt_hst); }); diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 5135e1cf..c013c17d 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -22,7 +22,7 @@ public function create(array $properties, array $preferences = []) $prefs = $info->addChild('pref'); foreach ($preferences as $key => $value) { - $prefs->addChild($key, is_bool($value) ? ($value ? 1 : 0) : $value); + $prefs->addChild($key, is_bool($value) ? ($value ? "1" : "0") : $value); } } @@ -64,14 +64,14 @@ public function get($field, $value) * * @return Struct\GeneralInfo[] */ - public function getAll($field = null, $value = null) + public function getAll($field = null, $value = null): array { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->{$field} = $value; + $filterTag->{$field} = (string) $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 de1eb3a7..b748dcad 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -64,14 +64,14 @@ public function get($field, $value) * * @return Struct\Info[] */ - public function getAll($field = null, $value = null) + public function getAll($field = null, $value = null): array { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, $value); + $filterTag->addChild($field, (string) $value); } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 16f77651..2aab504b 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -40,7 +40,7 @@ public function getPhpSettings(string $field, $value): Struct\PhpSettings $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); - $getTag->addChild('filter')->addChild($field, $value); + $getTag->addChild('filter')->addChild($field, (string) $value); $getTag->addChild('dataset')->addChild('php-settings'); $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 2185c110..467defac 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Certificate; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public string $request; public string $privateKey; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['csr' => 'request'], diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index 43f8ab20..56b12bf1 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Customer; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -24,7 +23,7 @@ class GeneralInfo extends Struct public string $description; public string $externalId; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['cname' => 'company'], diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 926b5519..f9b4c514 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Customer; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public int $id; public string $guid; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 9f705656..d706984b 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Database; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -15,7 +14,7 @@ class Info extends Struct public int $dbServerId; public int $defaultUserId; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index cf40013a..230f4f34 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Database; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class UserInfo extends Struct { @@ -12,7 +11,7 @@ class UserInfo extends Struct public string $login; public int $dbId; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 3f2dbd5a..7db81f56 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\DatabaseServer; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -13,7 +12,7 @@ class Info extends Struct public int $port; public string $type; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 161cbee9..c3a2e1e4 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Dns; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -16,7 +15,7 @@ class Info extends Struct public string $value; public string $opt; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index b1cb7c08..1c35c713 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\EventLog; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class DetailedEvent extends Struct { @@ -16,7 +15,7 @@ class DetailedEvent extends Struct public string $user; public string $host; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index cc3be1cf..01e965d9 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\EventLog; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Event extends Struct { @@ -13,7 +12,7 @@ class Event extends Struct public string $class; public string $id; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'type', diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index 17cffdd3..41180166 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Ip; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -13,7 +12,7 @@ class Info extends Struct public string $type; public string $interface; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'ip_address', diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 4fbe4478..2a7b9b6c 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Locale; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -12,7 +11,7 @@ class Info extends Struct public string $language; public string $country; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index dfa1615f..a29c4f8b 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Mail; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -12,7 +11,7 @@ class GeneralInfo extends Struct public string $name; public string $description; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 63cc84e0..13cb182d 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Mail; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public int $id; public string $name; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index d95c3a92..e4502314 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -19,7 +19,7 @@ class Info extends Struct public string $custom; public string $handlerStatus; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 4a1216cb..673928f6 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\ProtectedDirectory; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class DataInfo extends Struct { public string $name; public string $header; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 90651336..19b5952f 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\ProtectedDirectory; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public int $id; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index a6d4b74a..0d0cc7eb 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\ProtectedDirectory; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class UserInfo extends Struct { public int $id; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index c946356d..39757165 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Reseller; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -13,7 +12,7 @@ class GeneralInfo extends Struct public string $login; public array $permissions; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $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 1ef61d2b..f257b3e3 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Reseller; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public int $id; public string $guid; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 2b2eec03..bbebd82e 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\SecretKey; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -13,7 +12,7 @@ class Info extends Struct public string $description; public string $login; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'key', diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 69bff6ea..4f08c399 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Admin extends Struct { @@ -12,7 +11,7 @@ class Admin extends Struct public string $name; public string $email; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['admin_cname' => 'companyName'], diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 9c1f63d2..2b28ab2d 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -12,7 +11,7 @@ class GeneralInfo extends Struct public string $serverGuid; public string $mode; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'server_name', diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index e6529bf3..0f533c85 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Preferences extends Struct { @@ -12,7 +11,7 @@ class Preferences extends Struct public int $trafficAccounting; public int $restartApacheInterval; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'stat_ttl', diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index 69a5c2aa..2feed452 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\Server; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class SessionPreferences extends Struct { public int $loginTimeout; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'login_timeout', diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 0894801e..aed4dd1f 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Statistics extends Struct { @@ -29,7 +28,7 @@ class Statistics extends Struct /** @var Statistics\DiskSpace[] */ public $diskSpace; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $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 5fb6dca8..95ff3f1f 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class DiskSpace extends Struct { @@ -12,7 +11,7 @@ class DiskSpace extends Struct public int $used; public int $free; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'total', diff --git a/src/Api/Struct/Server/Statistics/LoadAverage.php b/src/Api/Struct/Server/Statistics/LoadAverage.php index 69aefc22..005a0f32 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class LoadAverage extends Struct { @@ -12,7 +11,7 @@ class LoadAverage extends Struct public float $load5min; public float $load15min; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $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 44b12a38..a42b66c9 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Memory extends Struct { @@ -15,7 +14,7 @@ class Memory extends Struct public int $buffer; public int $cached; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'total', diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index 00d119c5..4c128960 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Objects extends Struct { @@ -20,7 +19,7 @@ class Objects extends Struct public int $problemClients; public int $problemDomains; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'clients', diff --git a/src/Api/Struct/Server/Statistics/Other.php b/src/Api/Struct/Server/Statistics/Other.php index e102fb5e..d65c4316 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Other extends Struct { @@ -12,7 +11,7 @@ class Other extends Struct public int $uptime; public bool $insideVz; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'cpu', diff --git a/src/Api/Struct/Server/Statistics/Swap.php b/src/Api/Struct/Server/Statistics/Swap.php index 23154ee4..b61a4ad9 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Swap extends Struct { @@ -12,7 +11,7 @@ class Swap extends Struct public int $used; public int $free; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'total', diff --git a/src/Api/Struct/Server/Statistics/Version.php b/src/Api/Struct/Server/Statistics/Version.php index 45fc541e..b3684ab3 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Server\Statistics; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Version extends Struct { @@ -15,7 +14,7 @@ class Version extends Struct public string $osVersion; public string $osRelease; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['plesk_name' => 'internalName'], diff --git a/src/Api/Struct/Server/UpdatesInfo.php b/src/Api/Struct/Server/UpdatesInfo.php index 34c7501d..3a75d7b5 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Server; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class UpdatesInfo extends Struct { public string $lastInstalledUpdate; public bool $installUpdatesAutomatically; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'last_installed_update', diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 794c82af..8d1a3c12 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\ServicePlan; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -13,7 +12,7 @@ class Info extends Struct public string $guid; public string $externalId; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index 70d2e866..e2060347 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Session; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -15,7 +14,7 @@ class Info extends Struct public string $loginTime; public string $idle; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index f13913f3..1bc0c9a5 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Site; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -20,7 +19,7 @@ class GeneralInfo extends Struct public string $webspaceGuid; public int $webspaceId; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['cr_date' => 'creationDate'], diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index 2cb08f17..34a307f3 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Site; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class HostingInfo extends Struct { public array $properties = []; public string $ipAddress; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $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 5a12761e..99b57fe8 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Site; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public int $id; public string $guid; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index 73c2c8fe..0b77651b 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\SiteAlias; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -12,7 +11,7 @@ class GeneralInfo extends Struct public string $asciiName; public string $status; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 0950bcc9..a452ba96 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\SiteAlias; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { public string $status; public int $id; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index a766fc73..7c760433 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Subdomain; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -13,7 +12,7 @@ class Info extends Struct public string $name; public array $properties; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->properties = []; $this->_initScalarProperties($apiResponse, [ diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index 8b6622df..ccac0b26 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Ui; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class CustomButton extends Struct { @@ -17,7 +16,7 @@ class CustomButton extends Struct public string $url; public string $text; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $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 377700f5..6369717c 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class DiskUsage extends Struct { @@ -20,7 +19,7 @@ class DiskUsage extends Struct public int $configs; public int $chroot; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'httpdocs', diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 33d39802..e77918b6 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class GeneralInfo extends Struct { @@ -23,7 +22,7 @@ class GeneralInfo extends Struct /** @var string */ public string $adminDescription; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ ['cr_date' => 'creationDate'], diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index c5f2f158..f761d36b 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class HostingPropertyInfo extends Struct { @@ -12,7 +11,7 @@ class HostingPropertyInfo extends Struct public string $type; public string $label; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index 8fac2be0..cb6e4c2c 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { @@ -12,7 +11,7 @@ class Info extends Struct public string $guid; public string $name; - public function __construct(XmlResponse $apiResponse, string $name = '') + public function __construct(\SimpleXMLElement $apiResponse, string $name = '') { $this->_initScalarProperties($apiResponse, [ 'id', diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 95d668d5..6d7b0a40 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Limit extends Struct { public string $name; public string $value; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 6ceb0a74..0b4f7b7f 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class LimitDescriptor extends Struct { public array $limits; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->limits = []; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index c3f20ee5..e0ff03ae 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class LimitInfo extends Struct { @@ -12,7 +11,7 @@ class LimitInfo extends Struct public string $type; public string $label; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index bdb970d6..7a317c79 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -4,14 +4,13 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Limits extends Struct { public string $overuse; public array $limits; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, ['overuse']); $this->limits = []; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 3a56882e..1f09931f 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class PermissionDescriptor extends Struct { public array $permissions; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->permissions = []; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 8de0c84a..7cdfc4a0 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class PermissionInfo extends Struct { @@ -12,7 +11,7 @@ class PermissionInfo extends Struct public string $type; public string $label; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 37dea7d5..8067571e 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class PhpSettings extends Struct { public array $properties; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->properties = []; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index f49e615b..987b10ee 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -4,13 +4,12 @@ namespace PleskX\Api\Struct\Webspace; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class PhysicalHostingDescriptor extends Struct { public array $properties; - public function __construct(XmlResponse $apiResponse) + public function __construct(\SimpleXMLElement $apiResponse) { $this->properties = []; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index e622cfeb..47b0b67e 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -7,9 +7,8 @@ class PhpHandlerTest extends TestCase { public function testGet() { - $handler = static::$_client->phpHandler()->get(null, null); + $handler = static::$_client->phpHandler()->get(); - $this->assertIsObject($handler); $this->assertObjectHasAttribute('type', $handler); } From be8c4ab5aeb6737daf6e78d08fb9e7a17949f4b7 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 7 Oct 2021 11:13:58 +0700 Subject: [PATCH 023/126] Fix StyleCI issues --- src/Api/Client.php | 3 ++- src/Api/Operator/PhpHandler.php | 2 +- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Struct/PhpHandler/Info.php | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index a270b2f7..c435c11d 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -221,8 +221,9 @@ private function _performHttpRequest($request) * @param array $requests * @param int $mode * - * @return array * @throws Client\Exception + * + * @return array */ public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): array { diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 5adb1e8b..ad7f838d 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -22,7 +22,7 @@ public function get($field = null, $value = null): Info $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { - $filterTag->addChild($field, (string)$value); + $filterTag->addChild($field, (string) $value); } $response = $this->_client->request($packet, Client::RESPONSE_FULL); diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index c013c17d..4c9e3900 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -22,7 +22,7 @@ public function create(array $properties, array $preferences = []) $prefs = $info->addChild('pref'); foreach ($preferences as $key => $value) { - $prefs->addChild($key, is_bool($value) ? ($value ? "1" : "0") : $value); + $prefs->addChild($key, is_bool($value) ? ($value ? '1' : '0') : $value); } } diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index e4502314..a98235af 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -4,7 +4,6 @@ namespace PleskX\Api\Struct\PhpHandler; use PleskX\Api\Struct; -use PleskX\Api\XmlResponse; class Info extends Struct { From 717cfd074daec70b8e4f04de555e82dcf033738e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 7 Oct 2021 11:16:30 +0700 Subject: [PATCH 024/126] Make psalm as an essential part of testing phase --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 29246498..a91fecd0 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,10 @@ "process-timeout": 0 }, "scripts": { - "test": "phpunit", + "test": [ + "psalm", + "phpunit" + ], "test:watch": "phpunit-watcher watch", "lint": "psalm" }, From fe2cfd7040c208fa83fa21776d5f4d32606f39ee Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 7 Oct 2021 12:08:48 +0700 Subject: [PATCH 025/126] Keep the ability to provide additional options to PHPUnit --- composer.json | 5 +---- docker-compose.yml | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index a91fecd0..29246498 100644 --- a/composer.json +++ b/composer.json @@ -28,10 +28,7 @@ "process-timeout": 0 }, "scripts": { - "test": [ - "psalm", - "phpunit" - ], + "test": "phpunit", "test:watch": "phpunit-watcher watch", "lint": "psalm" }, diff --git a/docker-compose.yml b/docker-compose.yml index 0a2e35bb..a0332132 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,12 @@ services: environment: REMOTE_URL: https://plesk:8443 REMOTE_PASSWORD: changeme1Q** - command: bash -c "cd /opt/api-php-lib && composer install && ./wait-for-plesk.sh && composer test -- --testdox" + command: > + bash -c "cd /opt/api-php-lib + && composer install + && ./wait-for-plesk.sh + && composer lint + && composer test -- --testdox" depends_on: - plesk links: From 9d45052bc93b554cb6abefa8a3522c08b062da3d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 13 Oct 2021 22:15:19 +0700 Subject: [PATCH 026/126] Use Plesk Docker container defaults to simplify tests execution --- tests/TestCase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 259537ab..58670fa6 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -15,9 +15,9 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase public static function setUpBeforeClass(): void { - $login = getenv('REMOTE_LOGIN'); - $password = getenv('REMOTE_PASSWORD'); - $host = getenv('REMOTE_HOST'); + $login = getenv('REMOTE_LOGIN') ?: 'admin'; + $password = getenv('REMOTE_PASSWORD') ?: 'changeme1Q**'; + $host = getenv('REMOTE_HOST') ?: 'localhost'; $port = 8443; $scheme = 'https'; From 772b810773503cfc7aed4db1c13fd2f10e700ce2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 13 Oct 2021 23:09:36 +0700 Subject: [PATCH 027/126] Add an ability to enable/disable customers --- src/Api/Operator/Customer.php | 44 +++++++++++++++++++++++++ src/Api/Struct/Customer/GeneralInfo.php | 3 ++ tests/CustomerTest.php | 21 ++++++++++++ 3 files changed, 68 insertions(+) diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index d974c559..93ac13a2 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -57,4 +57,48 @@ public function getAll() { return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } + + /** + * @param string $field + * @param int|string $value + * + * @return bool + */ + public function enable(string $field, $value): bool + { + return $this->setProperty($field, $value, 'status', 0); + } + + /** + * @param string $field + * @param int|string $value + * + * @return bool + */ + public function disable(string $field, $value): bool + { + return $this->setProperty($field, $value, 'status', 1); + } + + /** + * @param string $field + * @param int|string $value + * @param string $property + * @param int|string $propertyValue + * + * @return bool + */ + public function setProperty(string $field, $value, string $property, $propertyValue): bool + { + $packet = $this->_client->getPacket(); + $setTag = $packet->addChild($this->_wrapperTag)->addChild('set'); + $setTag->addChild('filter')->addChild($field, (string) $value); + $genInfoTag = $setTag->addChild('values')->addChild('gen_info'); + $genInfoTag->addChild($property, (string) $propertyValue); + + $response = $this->_client->request($packet); + + return 'ok' === (string) $response->status; + } + } diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index 56b12bf1..9da9c6c2 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -22,6 +22,7 @@ class GeneralInfo extends Struct public string $country; public string $description; public string $externalId; + public bool $enabled; public function __construct(\SimpleXMLElement $apiResponse) { @@ -41,5 +42,7 @@ public function __construct(\SimpleXMLElement $apiResponse) 'external-id', 'description', ]); + + $this->enabled = '0' === (string) $apiResponse->status; } } diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 895162cc..2607655f 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -84,4 +84,25 @@ public function testGetAll() static::$_client->customer()->delete('login', 'customer-a'); static::$_client->customer()->delete('login', 'customer-b'); } + + public function testEnable() + { + $customer = static::$_client->customer()->create($this->_customerProperties); + static::$_client->customer()->disable('id', $customer->id); + static::$_client->customer()->enable('id', $customer->id); + $customerInfo = static::$_client->customer()->get('id', $customer->id); + $this->assertTrue($customerInfo->enabled); + + static::$_client->customer()->delete('id', $customer->id); + } + + public function testDisable() + { + $customer = static::$_client->customer()->create($this->_customerProperties); + static::$_client->customer()->disable('id', $customer->id); + $customerInfo = static::$_client->customer()->get('id', $customer->id); + $this->assertFalse($customerInfo->enabled); + + static::$_client->customer()->delete('id', $customer->id); + } } From f0b3481cc8269e80c6cd63bc6726837e9c5de876 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 13 Oct 2021 23:11:00 +0700 Subject: [PATCH 028/126] Fix StyleCI issue --- src/Api/Operator/Customer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 93ac13a2..a68500fa 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -100,5 +100,4 @@ public function setProperty(string $field, $value, string $property, $propertyVa return 'ok' === (string) $response->status; } - } From 8d459555c5dde889cc9361db4a9645bfd13dd422 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 17 Oct 2021 19:51:34 +0700 Subject: [PATCH 029/126] Add an ability to update customer's properties --- src/Api/Operator/Customer.php | 13 +++++++------ tests/CustomerTest.php | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index a68500fa..05bea9d9 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -66,7 +66,7 @@ public function getAll() */ public function enable(string $field, $value): bool { - return $this->setProperty($field, $value, 'status', 0); + return $this->setProperties($field, $value, ['status' => 0]); } /** @@ -77,24 +77,25 @@ public function enable(string $field, $value): bool */ public function disable(string $field, $value): bool { - return $this->setProperty($field, $value, 'status', 1); + return $this->setProperties($field, $value, ['status' => 1]); } /** * @param string $field * @param int|string $value - * @param string $property - * @param int|string $propertyValue + * @param array $properties * * @return bool */ - public function setProperty(string $field, $value, string $property, $propertyValue): bool + public function setProperties(string $field, $value, array $properties): bool { $packet = $this->_client->getPacket(); $setTag = $packet->addChild($this->_wrapperTag)->addChild('set'); $setTag->addChild('filter')->addChild($field, (string) $value); $genInfoTag = $setTag->addChild('values')->addChild('gen_info'); - $genInfoTag->addChild($property, (string) $propertyValue); + foreach ($properties as $property => $propertyValue) { + $genInfoTag->addChild($property, (string) $propertyValue); + } $response = $this->_client->request($packet); diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 2607655f..cb69f5e5 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -105,4 +105,18 @@ public function testDisable() static::$_client->customer()->delete('id', $customer->id); } + + public function testSetProperties() + { + $customer = static::$_client->customer()->create($this->_customerProperties); + static::$_client->customer()->setProperties('id', $customer->id, [ + 'pname' => 'Mike Black', + 'email' => 'mike@black.com', + ]); + $customerInfo = static::$_client->customer()->get('id', $customer->id); + $this->assertEquals('Mike Black', $customerInfo->personalName); + $this->assertEquals('mike@black.com', $customerInfo->email); + + static::$_client->customer()->delete('id', $customer->id); + } } From 115511abf3df8b218b0c3409d11963af0a7ad081 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 17 Oct 2021 20:43:40 +0700 Subject: [PATCH 030/126] Add an ability to enable/disable webspace and set other properties --- src/Api/Operator/Webspace.php | 44 +++++++++++++++++++++++++ src/Api/Struct/Webspace/GeneralInfo.php | 5 +-- tests/WebspaceTest.php | 35 ++++++++++++++++++++ 3 files changed, 82 insertions(+), 2 deletions(-) diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 2aab504b..82267bf8 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -144,4 +144,48 @@ public function getDiskUsage(string $field, $value): Struct\DiskUsage return reset($items); } + + /** + * @param string $field + * @param int|string $value + * + * @return bool + */ + public function enable(string $field, $value): bool + { + return $this->setProperties($field, $value, ['status' => 0]); + } + + /** + * @param string $field + * @param int|string $value + * + * @return bool + */ + public function disable(string $field, $value): bool + { + return $this->setProperties($field, $value, ['status' => 1]); + } + + /** + * @param string $field + * @param int|string $value + * @param array $properties + * + * @return bool + */ + public function setProperties(string $field, $value, array $properties): bool + { + $packet = $this->_client->getPacket(); + $setTag = $packet->addChild($this->_wrapperTag)->addChild('set'); + $setTag->addChild('filter')->addChild($field, (string) $value); + $genInfoTag = $setTag->addChild('values')->addChild('gen_setup'); + foreach ($properties as $property => $propertyValue) { + $genInfoTag->addChild($property, (string) $propertyValue); + } + + $response = $this->_client->request($packet); + + return 'ok' === (string) $response->status; + } } diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index e77918b6..53ab423a 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -18,9 +18,8 @@ class GeneralInfo extends Struct public string $guid; public string $vendorGuid; public string $description; - - /** @var string */ public string $adminDescription; + public bool $enabled; public function __construct(\SimpleXMLElement $apiResponse) { @@ -40,5 +39,7 @@ public function __construct(\SimpleXMLElement $apiResponse) foreach ($apiResponse->dns_ip_address as $ip) { $this->ipAddresses[] = (string) $ip; } + + $this->enabled = '0' === (string) $apiResponse->status; } } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 0288c525..af04b3e4 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -187,4 +187,39 @@ public function testGet() static::$_client->webspace()->delete('id', $webspace->id); } + + public function testEnable() + { + $webspace = static::_createWebspace(); + + static::$_client->webspace()->disable('id', $webspace->id); + static::$_client->webspace()->enable('id', $webspace->id); + $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + $this->assertTrue($webspaceInfo->enabled); + + static::$_client->webspace()->delete('id', $webspace->id); + } + + public function testDisable() + { + $webspace = static::_createWebspace(); + + static::$_client->webspace()->disable('id', $webspace->id); + $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + $this->assertFalse($webspaceInfo->enabled); + + static::$_client->webspace()->delete('id', $webspace->id); + } + + public function testSetProperties() + { + $webspace = static::_createWebspace(); + static::$_client->webspace()->setProperties('id', $webspace->id, [ + 'description' => 'Test Description', + ]); + $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + $this->assertEquals('Test Description', $webspaceInfo->description); + + static::$_client->webspace()->delete('id', $webspace->id); + } } From f0e4ac36a38f1e31526cff8671e229cea8cbfc43 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 24 Oct 2021 13:21:57 +0700 Subject: [PATCH 031/126] Introduce PHPCS for style checks (future replacement of StyleCI) --- composer.json | 3 ++- composer.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++-- phpcs.xml.dist | 27 +++++++++++++++++++++++ 3 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 phpcs.xml.dist diff --git a/composer.json b/composer.json index 29246498..6bc965b5 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "require-dev": { "phpunit/phpunit": "^9", "spatie/phpunit-watcher": "^1.22", - "vimeo/psalm": "^4.10" + "vimeo/psalm": "^4.10", + "squizlabs/php_codesniffer": "^3.6" }, "config": { "process-timeout": 0 diff --git a/composer.lock b/composer.lock index 8e37f4e7..b6695290 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "29ddab81b559997ef3ca40b6a2c85d56", + "content-hash": "d10c51a90b73fb910cfb5516625446f8", "packages": [], "packages-dev": [ { @@ -3185,6 +3185,62 @@ }, "time": "2021-02-26T08:00:42+00:00" }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e", + "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-10-11T04:00:11+00:00" + }, { "name": "symfony/console", "version": "v5.3.7", @@ -4531,5 +4587,5 @@ "ext-simplexml": "*" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 00000000..b6263f5b --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,27 @@ + + + src + tests + + + + + + + + + + + + + + + + + + + + + + + From 2c111ff13dd7d7e540cba57e9cadd45899104332 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 24 Oct 2021 14:33:19 +0700 Subject: [PATCH 032/126] Fix code style violations found by phpcs --- src/Api/{Struct.php => AbstractStruct.php} | 8 +- src/Api/Client.php | 176 +++++++++--------- src/Api/InternalClient.php | 2 +- src/Api/Operator.php | 26 +-- src/Api/Operator/Certificate.php | 6 +- src/Api/Operator/Customer.php | 18 +- src/Api/Operator/Database.php | 30 +-- src/Api/Operator/DatabaseServer.php | 14 +- src/Api/Operator/Dns.php | 26 +-- src/Api/Operator/DnsTemplate.php | 20 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/Ip.php | 6 +- src/Api/Operator/Locale.php | 6 +- src/Api/Operator/Mail.php | 18 +- src/Api/Operator/PhpHandler.php | 12 +- src/Api/Operator/ProtectedDirectory.php | 28 +-- src/Api/Operator/Reseller.php | 14 +- src/Api/Operator/SecretKey.php | 22 +-- src/Api/Operator/Server.php | 44 ++--- src/Api/Operator/ServicePlan.php | 14 +- src/Api/Operator/Session.php | 4 +- src/Api/Operator/Site.php | 26 ++- src/Api/Operator/SiteAlias.php | 14 +- src/Api/Operator/Subdomain.php | 14 +- src/Api/Operator/Ui.php | 8 +- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 28 +-- src/Api/Struct/Certificate/Info.php | 6 +- src/Api/Struct/Customer/GeneralInfo.php | 6 +- src/Api/Struct/Customer/Info.php | 6 +- src/Api/Struct/Database/Info.php | 6 +- src/Api/Struct/Database/UserInfo.php | 6 +- src/Api/Struct/DatabaseServer/Info.php | 6 +- src/Api/Struct/Dns/Info.php | 6 +- src/Api/Struct/EventLog/DetailedEvent.php | 6 +- src/Api/Struct/EventLog/Event.php | 6 +- src/Api/Struct/Ip/Info.php | 6 +- src/Api/Struct/Locale/Info.php | 6 +- src/Api/Struct/Mail/GeneralInfo.php | 6 +- src/Api/Struct/Mail/Info.php | 6 +- src/Api/Struct/PhpHandler/Info.php | 6 +- .../Struct/ProtectedDirectory/DataInfo.php | 6 +- src/Api/Struct/ProtectedDirectory/Info.php | 6 +- .../Struct/ProtectedDirectory/UserInfo.php | 6 +- src/Api/Struct/Reseller/GeneralInfo.php | 6 +- src/Api/Struct/Reseller/Info.php | 6 +- src/Api/Struct/SecretKey/Info.php | 6 +- src/Api/Struct/Server/Admin.php | 6 +- src/Api/Struct/Server/GeneralInfo.php | 6 +- src/Api/Struct/Server/Preferences.php | 6 +- src/Api/Struct/Server/SessionPreferences.php | 6 +- src/Api/Struct/Server/Statistics.php | 4 +- .../Struct/Server/Statistics/DiskSpace.php | 6 +- .../Struct/Server/Statistics/LoadAverage.php | 4 +- src/Api/Struct/Server/Statistics/Memory.php | 6 +- src/Api/Struct/Server/Statistics/Objects.php | 6 +- src/Api/Struct/Server/Statistics/Other.php | 6 +- src/Api/Struct/Server/Statistics/Swap.php | 6 +- src/Api/Struct/Server/Statistics/Version.php | 6 +- src/Api/Struct/Server/UpdatesInfo.php | 6 +- src/Api/Struct/ServicePlan/Info.php | 6 +- src/Api/Struct/Session/Info.php | 6 +- src/Api/Struct/Site/GeneralInfo.php | 6 +- src/Api/Struct/Site/HostingInfo.php | 6 +- src/Api/Struct/Site/Info.php | 6 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 6 +- src/Api/Struct/SiteAlias/Info.php | 6 +- src/Api/Struct/Subdomain/Info.php | 6 +- src/Api/Struct/Ui/CustomButton.php | 8 +- src/Api/Struct/Webspace/DiskUsage.php | 6 +- src/Api/Struct/Webspace/GeneralInfo.php | 6 +- .../Struct/Webspace/HostingPropertyInfo.php | 6 +- src/Api/Struct/Webspace/Info.php | 6 +- src/Api/Struct/Webspace/Limit.php | 6 +- src/Api/Struct/Webspace/LimitDescriptor.php | 4 +- src/Api/Struct/Webspace/LimitInfo.php | 6 +- src/Api/Struct/Webspace/Limits.php | 6 +- .../Struct/Webspace/PermissionDescriptor.php | 4 +- src/Api/Struct/Webspace/PermissionInfo.php | 6 +- src/Api/Struct/Webspace/PhpSettings.php | 4 +- .../Webspace/PhysicalHostingDescriptor.php | 4 +- src/Api/XmlResponse.php | 2 +- tests/{TestCase.php => AbstractTestCase.php} | 36 ++-- ...ientTest.php => ApiClientAbstractTest.php} | 52 +++--- ...teTest.php => CertificateAbstractTest.php} | 4 +- ...tomerTest.php => CustomerAbstractTest.php} | 58 +++--- ...abaseTest.php => DatabaseAbstractTest.php} | 94 +++++----- ...est.php => DatabaseServerAbstractTest.php} | 8 +- tests/{DnsTest.php => DnsAbstractTest.php} | 34 ++-- ...teTest.php => DnsTemplateAbstractTest.php} | 37 ++-- ...ntLogTest.php => EventLogAbstractTest.php} | 8 +- tests/{IpTest.php => IpAbstractTest.php} | 4 +- ...{LocaleTest.php => LocaleAbstractTest.php} | 6 +- tests/{MailTest.php => MailAbstractTest.php} | 33 ++-- ...lerTest.php => PhpHandlerAbstractTest.php} | 8 +- tests/ProtectedDirectoryAbstractTest.php | 92 +++++++++ tests/ProtectedDirectoryTest.php | 84 --------- ...ellerTest.php => ResellerAbstractTest.php} | 32 ++-- tests/SecretKeyAbstractTest.php | 102 ++++++++++ tests/SecretKeyTest.php | 96 ---------- ...{ServerTest.php => ServerAbstractTest.php} | 33 ++-- ...anTest.php => ServicePlanAbstractTest.php} | 28 +-- ...essionTest.php => SessionAbstractTest.php} | 14 +- tests/{SiteTest.php => SiteAbstractTest.php} | 50 ++--- tests/SiteAliasAbstractTest.php | 71 +++++++ tests/SiteAliasTest.php | 71 ------- ...mainTest.php => SubdomainAbstractTest.php} | 42 ++--- tests/{UiTest.php => UiAbstractTest.php} | 20 +- tests/Utility/KeyLimitChecker.php | 6 +- tests/Utility/PasswordProvider.php | 2 +- ...spaceTest.php => WebspaceAbstractTest.php} | 80 ++++---- 111 files changed, 1070 insertions(+), 1039 deletions(-) rename src/Api/{Struct.php => AbstractStruct.php} (90%) rename tests/{TestCase.php => AbstractTestCase.php} (62%) rename tests/{ApiClientTest.php => ApiClientAbstractTest.php} (74%) rename tests/{CertificateTest.php => CertificateAbstractTest.php} (85%) rename tests/{CustomerTest.php => CustomerAbstractTest.php} (56%) rename tests/{DatabaseTest.php => DatabaseAbstractTest.php} (65%) rename tests/{DatabaseServerTest.php => DatabaseServerAbstractTest.php} (69%) rename tests/{DnsTest.php => DnsAbstractTest.php} (79%) rename tests/{DnsTemplateTest.php => DnsTemplateAbstractTest.php} (60%) rename tests/{EventLogTest.php => EventLogAbstractTest.php} (69%) rename tests/{IpTest.php => IpAbstractTest.php} (77%) rename tests/{LocaleTest.php => LocaleAbstractTest.php} (69%) rename tests/{MailTest.php => MailAbstractTest.php} (55%) rename tests/{PhpHandlerTest.php => PhpHandlerAbstractTest.php} (72%) create mode 100644 tests/ProtectedDirectoryAbstractTest.php delete mode 100644 tests/ProtectedDirectoryTest.php rename tests/{ResellerTest.php => ResellerAbstractTest.php} (61%) create mode 100644 tests/SecretKeyAbstractTest.php delete mode 100644 tests/SecretKeyTest.php rename tests/{ServerTest.php => ServerAbstractTest.php} (75%) rename tests/{ServicePlanTest.php => ServicePlanAbstractTest.php} (64%) rename tests/{SessionTest.php => SessionAbstractTest.php} (58%) rename tests/{SiteTest.php => SiteAbstractTest.php} (59%) create mode 100644 tests/SiteAliasAbstractTest.php delete mode 100644 tests/SiteAliasTest.php rename tests/{SubdomainTest.php => SubdomainAbstractTest.php} (51%) rename tests/{UiTest.php => UiAbstractTest.php} (59%) rename tests/{WebspaceTest.php => WebspaceAbstractTest.php} (66%) diff --git a/src/Api/Struct.php b/src/Api/AbstractStruct.php similarity index 90% rename from src/Api/Struct.php rename to src/Api/AbstractStruct.php index eb2a8ef4..ea7a3917 100644 --- a/src/Api/Struct.php +++ b/src/Api/AbstractStruct.php @@ -3,7 +3,7 @@ namespace PleskX\Api; -abstract class Struct +abstract class AbstractStruct { /** * @param string $property @@ -13,7 +13,7 @@ abstract class Struct */ public function __set(string $property, $value) { - throw new \Exception("Try to set an undeclared property '$property'."); + throw new \Exception("Try to set an undeclared property '$property' to a value: $value."); } /** @@ -24,7 +24,7 @@ public function __set(string $property, $value) * * @throws \Exception */ - protected function _initScalarProperties($apiResponse, array $properties): void + protected function initScalarProperties($apiResponse, array $properties): void { foreach ($properties as $property) { if (is_array($property)) { @@ -68,7 +68,7 @@ protected function _initScalarProperties($apiResponse, array $properties): void */ private function underToCamel(string $under): string { - $under = '_'.str_replace('_', ' ', strtolower($under)); + $under = '_' . str_replace('_', ' ', strtolower($under)); return ltrim(str_replace(' ', '', ucwords($under)), '_'); } diff --git a/src/Api/Client.php b/src/Api/Client.php index c435c11d..48564e8b 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -10,24 +10,24 @@ */ class Client { - const RESPONSE_SHORT = 1; - const RESPONSE_FULL = 2; + public const RESPONSE_SHORT = 1; + public const RESPONSE_FULL = 2; - protected string $_host; - protected int $_port; - protected string $_protocol; - protected string $_login = ''; - protected string $_password = ''; - protected string $_proxy = ''; - protected string $_secretKey = ''; - protected string $_version = ''; + private string $host; + private int $port; + private string $protocol; + protected string $login = ''; + private string $password = ''; + private string $proxy = ''; + private string $secretKey = ''; + private string $version = ''; - protected array $_operatorsCache = []; + protected array $operatorsCache = []; /** * @var callable|null */ - protected $_verifyResponseCallback; + protected $verifyResponseCallback; /** * Create client. @@ -38,9 +38,9 @@ class Client */ public function __construct(string $host, int $port = 8443, string $protocol = 'https') { - $this->_host = $host; - $this->_port = $port; - $this->_protocol = $protocol; + $this->host = $host; + $this->port = $port; + $this->protocol = $protocol; } /** @@ -51,8 +51,8 @@ public function __construct(string $host, int $port = 8443, string $protocol = ' */ public function setCredentials(string $login, string $password): void { - $this->_login = $login; - $this->_password = $password; + $this->login = $login; + $this->password = $password; } /** @@ -62,7 +62,7 @@ public function setCredentials(string $login, string $password): void */ public function setSecretKey(string $secretKey): void { - $this->_secretKey = $secretKey; + $this->secretKey = $secretKey; } /** @@ -72,7 +72,7 @@ public function setSecretKey(string $secretKey): void */ public function setProxy(string $proxy): void { - $this->_proxy = $proxy; + $this->proxy = $proxy; } /** @@ -82,17 +82,18 @@ public function setProxy(string $proxy): void */ public function setVersion(string $version): void { - $this->_version = $version; + $this->version = $version; } /** - * Set custom function to verify response of API call according your own needs. Default verifying will be used if it is not specified. + * Set custom function to verify response of API call according your own needs. + * Default verifying will be used if it is not specified. * * @param callable|null $function */ public function setVerifyResponse(callable $function = null): void { - $this->_verifyResponseCallback = $function; + $this->verifyResponseCallback = $function; } /** @@ -102,7 +103,7 @@ public function setVerifyResponse(callable $function = null): void */ public function getHost(): string { - return $this->_host; + return $this->host; } /** @@ -112,7 +113,7 @@ public function getHost(): string */ public function getPort(): int { - return $this->_port; + return $this->port; } /** @@ -122,7 +123,7 @@ public function getPort(): int */ public function getProtocol(): string { - return $this->_protocol; + return $this->protocol; } /** @@ -134,9 +135,9 @@ public function getProtocol(): string */ public function getPacket($version = null): SimpleXMLElement { - $protocolVersion = !is_null($version) ? $version : $this->_version; + $protocolVersion = !is_null($version) ? $version : $this->version; $content = ""; - $content .= ''; + $content .= ''; return new SimpleXMLElement($content); } @@ -157,24 +158,24 @@ public function request($request, $mode = self::RESPONSE_SHORT) $xml = $this->getPacket(); if (is_array($request)) { - $request = $this->_arrayToXml($request, $xml)->asXML(); + $request = $this->arrayToXml($request, $xml)->asXML(); } elseif (preg_match('/^[a-z]/', $request)) { - $request = $this->_expandRequestShortSyntax($request, $xml); + $request = $this->expandRequestShortSyntax($request, $xml); } } - if ('sdk' == $this->_protocol) { - $version = ('' == $this->_version) ? null : $this->_version; + 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); + $xml = \pm_ApiRpc::getService($version)->call($requestXml->children()[0]->asXml(), $this->login); } else { - $xml = $this->_performHttpRequest((string) $request); + $xml = $this->performHttpRequest((string) $request); } - $this->_verifyResponseCallback - ? call_user_func($this->_verifyResponseCallback, $xml) - : $this->_verifyResponse($xml); + $this->verifyResponseCallback + ? call_user_func($this->verifyResponseCallback, $xml) + : $this->verifyResponse($xml); return (self::RESPONSE_FULL == $mode) ? $xml : $xml->xpath('//result')[0]; } @@ -188,20 +189,20 @@ public function request($request, $mode = self::RESPONSE_SHORT) * * @return XmlResponse */ - private function _performHttpRequest($request) + private function performHttpRequest($request) { $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, "$this->_protocol://$this->_host:$this->_port/enterprise/control/agent.php"); + curl_setopt($curl, CURLOPT_URL, "$this->protocol://$this->host:$this->port/enterprise/control/agent.php"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($curl, CURLOPT_HTTPHEADER, $this->_getHeaders()); + curl_setopt($curl, CURLOPT_HTTPHEADER, $this->getHeaders()); curl_setopt($curl, CURLOPT_POSTFIELDS, $request); - if ('' !== $this->_proxy) { - curl_setopt($curl, CURLOPT_PROXY, $this->_proxy); + if ('' !== $this->proxy) { + curl_setopt($curl, CURLOPT_PROXY, $this->proxy); } $result = curl_exec($curl); @@ -234,24 +235,24 @@ public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): arr throw new Client\Exception('SimpleXML type of request is not supported for multi requests.'); } else { if (is_array($request)) { - $request = $this->_arrayToXml($request, $requestXml)->asXML(); + $request = $this->arrayToXml($request, $requestXml)->asXML(); if (!$request) { throw new Client\Exception('Failed to create an XML string for request'); } } elseif (preg_match('/^[a-z]/', $request)) { - $this->_expandRequestShortSyntax($request, $requestXml); + $this->expandRequestShortSyntax($request, $requestXml); } } } - if ('sdk' == $this->_protocol) { + if ('sdk' == $this->protocol) { throw new Client\Exception('Multi requests are not supported via SDK.'); } else { $xmlString = $requestXml->asXML(); if (!$xmlString) { throw new Client\Exception('Failed to create an XML string for request'); } - $responseXml = $this->_performHttpRequest($xmlString); + $responseXml = $this->performHttpRequest($xmlString); } $responses = []; @@ -278,18 +279,18 @@ public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): arr * * @return array */ - protected function _getHeaders() + private function getHeaders() { $headers = [ 'Content-Type: text/xml', 'HTTP_PRETTY_PRINT: TRUE', ]; - if ($this->_secretKey) { - $headers[] = "KEY: $this->_secretKey"; + if ($this->secretKey) { + $headers[] = "KEY: $this->secretKey"; } else { - $headers[] = "HTTP_AUTH_LOGIN: $this->_login"; - $headers[] = "HTTP_AUTH_PASSWD: $this->_password"; + $headers[] = "HTTP_AUTH_LOGIN: $this->login"; + $headers[] = "HTTP_AUTH_PASSWD: $this->password"; } return $headers; @@ -302,7 +303,7 @@ protected function _getHeaders() * * @throws Exception */ - protected function _verifyResponse($xml): void + private 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); @@ -324,13 +325,14 @@ protected function _verifyResponse($xml): void * * @return false|string */ - protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) + private function expandRequestShortSyntax($request, SimpleXMLElement $xml) { $parts = explode('.', $request); $node = $xml; $lastParts = end($parts); foreach ($parts as $part) { + // phpcs:ignore @list($name, $value) = explode('=', $part); if ($part !== $lastParts) { $node = $node->addChild($name); @@ -351,12 +353,12 @@ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) * * @return SimpleXMLElement */ - protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = null) + private function arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = null) { foreach ($array as $key => $value) { $el = is_int($key) && $parentEl ? $parentEl : $key; if (is_array($value)) { - $this->_arrayToXml($value, $this->_isAssocArray($value) ? $xml->addChild($el) : $xml, $el); + $this->arrayToXml($value, $this->isAssocArray($value) ? $xml->addChild($el) : $xml, $el); } else { $xml->{$el} = (string) $value; } @@ -370,7 +372,7 @@ protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = * * @return bool */ - protected function _isAssocArray(array $array) + private function isAssocArray(array $array) { return $array && array_keys($array) !== range(0, count($array) - 1); } @@ -380,149 +382,149 @@ protected function _isAssocArray(array $array) * * @return mixed */ - protected function _getOperator(string $name) + private function getOperator(string $name) { - if (!isset($this->_operatorsCache[$name])) { - $className = '\\PleskX\\Api\\Operator\\'.$name; + if (!isset($this->operatorsCache[$name])) { + $className = '\\PleskX\\Api\\Operator\\' . $name; /** @psalm-suppress InvalidStringClass */ - $this->_operatorsCache[$name] = new $className($this); + $this->operatorsCache[$name] = new $className($this); } - return $this->_operatorsCache[$name]; + return $this->operatorsCache[$name]; } public function server(): Operator\Server { - return $this->_getOperator('Server'); + return $this->getOperator('Server'); } public function customer(): Operator\Customer { - return $this->_getOperator('Customer'); + return $this->getOperator('Customer'); } public function webspace(): Operator\Webspace { - return $this->_getOperator('Webspace'); + return $this->getOperator('Webspace'); } public function subdomain(): Operator\Subdomain { - return $this->_getOperator('Subdomain'); + return $this->getOperator('Subdomain'); } public function dns(): Operator\Dns { - return $this->_getOperator('Dns'); + return $this->getOperator('Dns'); } public function dnsTemplate(): Operator\DnsTemplate { - return $this->_getOperator('DnsTemplate'); + return $this->getOperator('DnsTemplate'); } public function databaseServer(): Operator\DatabaseServer { - return $this->_getOperator('DatabaseServer'); + return $this->getOperator('DatabaseServer'); } public function mail(): Operator\Mail { - return $this->_getOperator('Mail'); + return $this->getOperator('Mail'); } public function certificate(): Operator\Certificate { - return $this->_getOperator('Certificate'); + return $this->getOperator('Certificate'); } public function siteAlias(): Operator\SiteAlias { - return $this->_getOperator('SiteAlias'); + return $this->getOperator('SiteAlias'); } public function ip(): Operator\Ip { - return $this->_getOperator('Ip'); + return $this->getOperator('Ip'); } public function eventLog(): Operator\EventLog { - return $this->_getOperator('EventLog'); + return $this->getOperator('EventLog'); } public function secretKey(): Operator\SecretKey { - return $this->_getOperator('SecretKey'); + return $this->getOperator('SecretKey'); } public function ui(): Operator\Ui { - return $this->_getOperator('Ui'); + return $this->getOperator('Ui'); } public function servicePlan(): Operator\ServicePlan { - return $this->_getOperator('ServicePlan'); + return $this->getOperator('ServicePlan'); } public function virtualDirectory(): Operator\VirtualDirectory { - return $this->_getOperator('VirtualDirectory'); + return $this->getOperator('VirtualDirectory'); } public function database(): Operator\Database { - return $this->_getOperator('Database'); + return $this->getOperator('Database'); } public function session(): Operator\Session { - return $this->_getOperator('Session'); + return $this->getOperator('Session'); } public function locale(): Operator\Locale { - return $this->_getOperator('Locale'); + return $this->getOperator('Locale'); } public function logRotation(): Operator\LogRotation { - return $this->_getOperator('LogRotation'); + return $this->getOperator('LogRotation'); } public function protectedDirectory(): Operator\ProtectedDirectory { - return $this->_getOperator('ProtectedDirectory'); + return $this->getOperator('ProtectedDirectory'); } public function reseller(): Operator\Reseller { - return $this->_getOperator('Reseller'); + return $this->getOperator('Reseller'); } public function resellerPlan(): Operator\ResellerPlan { - return $this->_getOperator('ResellerPlan'); + return $this->getOperator('ResellerPlan'); } public function aps(): Operator\Aps { - return $this->_getOperator('Aps'); + return $this->getOperator('Aps'); } public function servicePlanAddon(): Operator\ServicePlanAddon { - return $this->_getOperator('ServicePlanAddon'); + return $this->getOperator('ServicePlanAddon'); } public function site(): Operator\Site { - return $this->_getOperator('Site'); + return $this->getOperator('Site'); } public function phpHandler(): Operator\PhpHandler { - return $this->_getOperator('PhpHandler'); + return $this->getOperator('PhpHandler'); } } diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index e399c965..99044b1b 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -20,6 +20,6 @@ public function __construct() */ public function setLogin(string $login): void { - $this->_login = $login; + $this->login = $login; } } diff --git a/src/Api/Operator.php b/src/Api/Operator.php index c577e366..b22768b4 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -5,17 +5,17 @@ class Operator { - protected string $_wrapperTag = ''; - protected Client $_client; + protected string $wrapperTag = ''; + protected Client $client; public function __construct(Client $client) { - $this->_client = $client; + $this->client = $client; - if ('' === $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)); + $this->wrapperTag = end($classNameParts); + $this->wrapperTag = strtolower(preg_replace('/([a-z])([A-Z])/', '\1-\2', $this->wrapperTag)); } } @@ -29,7 +29,7 @@ public function __construct(Client $client) */ public function request($request, $mode = Client::RESPONSE_SHORT) { - $wrapperTag = $this->_wrapperTag; + $wrapperTag = $this->wrapperTag; if (is_array($request)) { $request = [$wrapperTag => $request]; @@ -39,7 +39,7 @@ public function request($request, $mode = Client::RESPONSE_SHORT) $request = "<$wrapperTag>$request"; } - return $this->_client->request($request, $mode); + return $this->client->request($request, $mode); } /** @@ -49,7 +49,7 @@ public function request($request, $mode = Client::RESPONSE_SHORT) * * @return bool */ - protected function _delete($field, $value, $deleteMethodName = 'del') + protected function deleteBy(string $field, $value, string $deleteMethodName = 'del'): bool { $response = $this->request([ $deleteMethodName => [ @@ -71,10 +71,10 @@ protected function _delete($field, $value, $deleteMethodName = 'del') * * @return mixed */ - protected function _getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null) + protected function getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { @@ -83,7 +83,7 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul $getTag->addChild('dataset')->addChild($infoTag); - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 9113e148..cb7dacb3 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -14,14 +14,14 @@ class Certificate extends \PleskX\Api\Operator */ public function generate($properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('generate')->addChild('info'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('generate')->addChild('info'); foreach ($properties as $name => $value) { $info->{$name} = $value; } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response); } diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 05bea9d9..be58f919 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -14,14 +14,14 @@ class Customer extends \PleskX\Api\Operator */ public function create($properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add')->addChild('gen_info'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add')->addChild('gen_info'); foreach ($properties as $name => $value) { $info->{$name} = $value; } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response); } @@ -34,7 +34,7 @@ public function create($properties) */ public function delete($field, $value) { - return $this->_delete($field, $value); + return $this->deleteBy($field, $value); } /** @@ -45,7 +45,7 @@ public function delete($field, $value) */ public function get($field, $value) { - $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + $items = $this->getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); return reset($items); } @@ -55,7 +55,7 @@ public function get($field, $value) */ public function getAll() { - return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); + return $this->getItems(Struct\GeneralInfo::class, 'gen_info'); } /** @@ -89,15 +89,15 @@ public function disable(string $field, $value): bool */ public function setProperties(string $field, $value, array $properties): bool { - $packet = $this->_client->getPacket(); - $setTag = $packet->addChild($this->_wrapperTag)->addChild('set'); + $packet = $this->client->getPacket(); + $setTag = $packet->addChild($this->wrapperTag)->addChild('set'); $setTag->addChild('filter')->addChild($field, (string) $value); $genInfoTag = $setTag->addChild('values')->addChild('gen_info'); foreach ($properties as $property => $propertyValue) { $genInfoTag->addChild($property, (string) $propertyValue); } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return 'ok' === (string) $response->status; } diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 048841b8..dd5ddc6e 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -14,7 +14,7 @@ class Database extends \PleskX\Api\Operator */ public function create($properties) { - return new Struct\Info($this->_process('add-db', $properties)); + return new Struct\Info($this->process('add-db', $properties)); } /** @@ -24,7 +24,7 @@ public function create($properties) */ public function createUser($properties) { - return new Struct\UserInfo($this->_process('add-db-user', $properties)); + return new Struct\UserInfo($this->process('add-db-user', $properties)); } /** @@ -33,10 +33,10 @@ public function createUser($properties) * * @return \PleskX\Api\XmlResponse */ - private function _process($command, array $properties) + private function process($command, array $properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild($command); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild($command); foreach ($properties as $name => $value) { if (false !== strpos($value, '&')) { @@ -46,7 +46,7 @@ private function _process($command, array $properties) $info->{$name} = $value; } - return $this->_client->request($packet); + return $this->client->request($packet); } /** @@ -56,7 +56,7 @@ private function _process($command, array $properties) */ public function updateUser(array $properties) { - $response = $this->_process('set-db-user', $properties); + $response = $this->process('set-db-user', $properties); return 'ok' === (string) $response->status; } @@ -95,7 +95,7 @@ public function getUser($field, $value) */ public function getAll($field, $value) { - $response = $this->_get('get-db', $field, $value); + $response = $this->getBy('get-db', $field, $value); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $items[] = new Struct\Info($xmlResult); @@ -112,7 +112,7 @@ public function getAll($field, $value) */ public function getAllUsers($field, $value) { - $response = $this->_get('get-db-users', $field, $value); + $response = $this->getBy('get-db-users', $field, $value); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $items[] = new Struct\UserInfo($xmlResult); @@ -128,15 +128,15 @@ public function getAllUsers($field, $value) * * @return \PleskX\Api\XmlResponse */ - private function _get(string $command, string $field, $value) + private function getBy(string $command, string $field, $value) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild($command); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild($command); $filterTag = $getTag->addChild('filter'); $filterTag->{$field} = (string) $value; - return $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + return $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); } /** @@ -147,7 +147,7 @@ private function _get(string $command, string $field, $value) */ public function delete($field, $value) { - return $this->_delete($field, $value, 'del-db'); + return $this->deleteBy($field, $value, 'del-db'); } /** @@ -158,6 +158,6 @@ public function delete($field, $value) */ public function deleteUser($field, $value) { - return $this->_delete($field, $value, 'del-db-user'); + return $this->deleteBy($field, $value, 'del-db-user'); } } diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 18cfbfa1..09c7f6ce 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -7,7 +7,7 @@ class DatabaseServer extends \PleskX\Api\Operator { - protected string $_wrapperTag = 'db_server'; + protected string $wrapperTag = 'db_server'; /** * @return array @@ -27,7 +27,7 @@ public function getSupportedTypes() */ public function get(string $field, $value) { - $items = $this->_get($field, $value); + $items = $this->getBy($field, $value); return reset($items); } @@ -37,7 +37,7 @@ public function get(string $field, $value) */ public function getAll() { - return $this->_get(); + return $this->getBy(); } /** @@ -46,17 +46,17 @@ public function getAll() * * @return Struct\Info[] */ - private function _get($field = null, $value = null) + private function getBy($field = null, $value = null) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { $filterTag->{$field} = (string) $value; } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index c57ffef4..6a193dc6 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -14,14 +14,14 @@ class Dns extends \PleskX\Api\Operator */ public function create($properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add_rec'); foreach ($properties as $name => $value) { $info->{$name} = $value; } - return new Struct\Info($this->_client->request($packet)); + return new Struct\Info($this->client->request($packet)); } /** @@ -33,17 +33,17 @@ public function create($properties) */ public function bulkCreate(array $records): array { - $packet = $this->_client->getPacket(); + $packet = $this->client->getPacket(); foreach ($records as $properties) { - $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); + $info = $packet->addChild($this->wrapperTag)->addChild('add_rec'); foreach ($properties as $name => $value) { $info->{$name} = $value; } } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $items[] = $xmlResult; @@ -73,13 +73,13 @@ public function get(string $field, $value) */ public function getAll(string $field, $value): array { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_rec'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get_rec'); $filterTag = $getTag->addChild('filter'); $filterTag->addChild($field, (string) $value); - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\Info($xmlResult->data); @@ -98,7 +98,7 @@ public function getAll(string $field, $value): array */ public function delete(string $field, $value): bool { - return $this->_delete($field, $value, 'del_rec'); + return $this->deleteBy($field, $value, 'del_rec'); } /** @@ -110,14 +110,14 @@ public function delete(string $field, $value): bool */ public function bulkDelete(array $recordIds): array { - $packet = $this->_client->getPacket(); + $packet = $this->client->getPacket(); foreach ($recordIds as $recordId) { - $packet->addChild($this->_wrapperTag)->addChild('del_rec') + $packet->addChild($this->wrapperTag)->addChild('del_rec') ->addChild('filter')->addChild('id', $recordId); } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $items[] = $xmlResult; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 2e76ab9c..a20f4e57 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -7,7 +7,7 @@ class DnsTemplate extends \PleskX\Api\Operator { - protected string $_wrapperTag = 'dns'; + protected string $wrapperTag = 'dns'; /** * @param array $properties @@ -16,15 +16,15 @@ class DnsTemplate extends \PleskX\Api\Operator */ public function create(array $properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add_rec'); unset($properties['site-id'], $properties['site-alias-id']); foreach ($properties as $name => $value) { $info->{$name} = $value; } - return new Struct\Info($this->_client->request($packet)); + return new Struct\Info($this->client->request($packet)); } /** @@ -48,8 +48,8 @@ public function get($field, $value) */ public function getAll($field = null, $value = null): array { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_rec'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get_rec'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { @@ -57,7 +57,7 @@ public function getAll($field = null, $value = null): array } $getTag->addChild('template'); - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\Info($xmlResult->data); @@ -76,12 +76,12 @@ public function getAll($field = null, $value = null): array */ public function delete(string $field, $value): bool { - $packet = $this->_client->getPacket(); - $delTag = $packet->addChild($this->_wrapperTag)->addChild('del_rec'); + $packet = $this->client->getPacket(); + $delTag = $packet->addChild($this->wrapperTag)->addChild('del_rec'); $delTag->addChild('filter')->addChild($field, (string) $value); $delTag->addChild('template'); - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return 'ok' === (string) $response->status; } diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index ae319bab..823a97fe 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -7,7 +7,7 @@ class EventLog extends \PleskX\Api\Operator { - protected string $_wrapperTag = 'event_log'; + protected string $wrapperTag = 'event_log'; /** * @return Struct\Event[] diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 4bc87f77..9e500a54 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -13,9 +13,9 @@ class Ip extends \PleskX\Api\Operator public function get() { $ips = []; - $packet = $this->_client->getPacket(); - $packet->addChild($this->_wrapperTag)->addChild('get'); - $response = $this->_client->request($packet); + $packet = $this->client->getPacket(); + $packet->addChild($this->wrapperTag)->addChild('get'); + $response = $this->client->request($packet); foreach ($response->addresses->ip_info as $ipInfo) { $ips[] = new Struct\Info($ipInfo); diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 89991052..efe45e1e 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -15,14 +15,14 @@ class Locale extends \PleskX\Api\Operator public function get($id = null) { $locales = []; - $packet = $this->_client->getPacket(); - $filter = $packet->addChild($this->_wrapperTag)->addChild('get')->addChild('filter'); + $packet = $this->client->getPacket(); + $filter = $packet->addChild($this->wrapperTag)->addChild('get')->addChild('filter'); if (!is_null($id)) { $filter->addChild('id', $id); } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); foreach ($response->locale->get->result as $localeInfo) { $locales[(string) $localeInfo->info->id] = new Struct\Info($localeInfo->info); diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index da5a630d..5986a8b8 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -19,8 +19,8 @@ class Mail extends Operator */ public function create($name, $siteId, $mailbox = false, $password = '') { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('create'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('create'); $filter = $info->addChild('filter'); $filter->addChild('site-id', (string) $siteId); @@ -33,7 +33,7 @@ public function create($name, $siteId, $mailbox = false, $password = '') $mailname->addChild('password')->value = $password; } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response->mailname); } @@ -47,13 +47,13 @@ public function create($name, $siteId, $mailbox = false, $password = '') */ public function delete(string $field, $value, $siteId): bool { - $packet = $this->_client->getPacket(); - $filter = $packet->addChild($this->_wrapperTag)->addChild('remove')->addChild('filter'); + $packet = $this->client->getPacket(); + $filter = $packet->addChild($this->wrapperTag)->addChild('remove')->addChild('filter'); $filter->addChild('site-id', (string) $siteId); $filter->{$field} = (string) $value; - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return 'ok' === (string) $response->status; } @@ -79,8 +79,8 @@ public function get($name, $siteId) */ public function getAll($siteId, $name = null) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_info'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get_info'); $filterTag = $getTag->addChild('filter'); $filterTag->addChild('site-id', (string) $siteId); @@ -88,7 +88,7 @@ public function getAll($siteId, $name = null) $filterTag->addChild('name', $name); } - $response = $this->_client->request($packet, Client::RESPONSE_FULL); + $response = $this->client->request($packet, Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { if (!isset($xmlResult->mailname)) { diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index ad7f838d..1f54a689 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -17,15 +17,15 @@ class PhpHandler extends Operator */ public function get($field = null, $value = null): Info { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { $filterTag->addChild($field, (string) $value); } - $response = $this->_client->request($packet, Client::RESPONSE_FULL); + $response = $this->client->request($packet, Client::RESPONSE_FULL); $xmlResult = $response->xpath('//result')[0]; return new Info($xmlResult); @@ -39,15 +39,15 @@ public function get($field = null, $value = null): Info */ public function getAll($field = null, $value = null): array { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { $filterTag->addChild($field, (string) $value); } - $response = $this->_client->request($packet, Client::RESPONSE_FULL); + $response = $this->client->request($packet, Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Info($xmlResult); diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 29756d3a..529b7e3e 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -9,7 +9,7 @@ class ProtectedDirectory extends Operator { - protected string $_wrapperTag = 'protected-dir'; + protected string $wrapperTag = 'protected-dir'; /** * @param string $name @@ -20,14 +20,14 @@ class ProtectedDirectory extends Operator */ public function add($name, $siteId, $header = '') { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add'); $info->addChild('site-id', (string) $siteId); $info->addChild('name', $name); $info->addChild('header', $header); - return new Struct\Info($this->_client->request($packet)); + return new Struct\Info($this->client->request($packet)); } /** @@ -38,7 +38,7 @@ public function add($name, $siteId, $header = '') */ public function delete($field, $value) { - return $this->_delete($field, $value, 'delete'); + return $this->deleteBy($field, $value, 'delete'); } /** @@ -62,7 +62,7 @@ public function get(string $field, $value) */ public function getAll(string $field, $value): array { - $response = $this->_get('get', $field, $value); + $response = $this->getBy('get', $field, $value); $items = []; foreach ($response->xpath('//result/data') as $xmlResult) { $items[] = new Struct\DataInfo($xmlResult); @@ -80,14 +80,14 @@ public function getAll(string $field, $value): array */ public function addUser($protectedDirectory, $login, $password) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add-user'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add-user'); $info->{'pd-id'} = (string) $protectedDirectory->id; $info->login = $login; $info->password = $password; - return new Struct\UserInfo($this->_client->request($packet)); + return new Struct\UserInfo($this->client->request($packet)); } /** @@ -98,7 +98,7 @@ public function addUser($protectedDirectory, $login, $password) */ public function deleteUser($field, $value) { - return $this->_delete($field, $value, 'delete-user'); + return $this->deleteBy($field, $value, 'delete-user'); } /** @@ -108,14 +108,14 @@ public function deleteUser($field, $value) * * @return \PleskX\Api\XmlResponse */ - private function _get(string $command, string $field, $value) + private function getBy(string $command, string $field, $value) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild($command); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild($command); $filterTag = $getTag->addChild('filter'); $filterTag->{$field} = (string) $value; - return $this->_client->request($packet, Client::RESPONSE_FULL); + return $this->client->request($packet, Client::RESPONSE_FULL); } } diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index f29391ff..729721ee 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -14,14 +14,14 @@ class Reseller extends \PleskX\Api\Operator */ public function create($properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add')->addChild('gen-info'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add')->addChild('gen-info'); foreach ($properties as $name => $value) { $info->{$name} = $value; } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response); } @@ -34,7 +34,7 @@ public function create($properties) */ public function delete($field, $value) { - return $this->_delete($field, $value); + return $this->deleteBy($field, $value); } /** @@ -58,8 +58,8 @@ public function get($field, $value) */ public function getAll($field = null, $value = null) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { @@ -70,7 +70,7 @@ public function getAll($field = null, $value = null) $datasetTag->addChild('gen-info'); $datasetTag->addChild('permissions'); - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index a5f0ee2c..bd41db07 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -7,7 +7,7 @@ class SecretKey extends \PleskX\Api\Operator { - protected string $_wrapperTag = 'secret_key'; + protected string $wrapperTag = 'secret_key'; /** * @param string $ipAddress @@ -17,8 +17,8 @@ class SecretKey extends \PleskX\Api\Operator */ public function create($ipAddress = '', $description = '') { - $packet = $this->_client->getPacket(); - $createTag = $packet->addChild($this->_wrapperTag)->addChild('create'); + $packet = $this->client->getPacket(); + $createTag = $packet->addChild($this->wrapperTag)->addChild('create'); if ('' !== $ipAddress) { $createTag->addChild('ip_address', $ipAddress); @@ -28,7 +28,7 @@ public function create($ipAddress = '', $description = '') $createTag->addChild('description', $description); } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return (string) $response->key; } @@ -40,7 +40,7 @@ public function create($ipAddress = '', $description = '') */ public function delete($keyId) { - return $this->_delete('key', $keyId, 'delete'); + return $this->deleteBy('key', $keyId, 'delete'); } /** @@ -50,7 +50,7 @@ public function delete($keyId) */ public function get($keyId) { - $items = $this->_get($keyId); + $items = $this->getBy($keyId); return reset($items); } @@ -60,7 +60,7 @@ public function get($keyId) */ public function getAll() { - return $this->_get(); + return $this->getBy(); } /** @@ -68,17 +68,17 @@ public function getAll() * * @return Struct\Info[] */ - public function _get($keyId = null) + public function getBy($keyId = null) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_info'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get_info'); $filterTag = $getTag->addChild('filter'); if (!is_null($keyId)) { $filterTag->addChild('key', $keyId); } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result/key_info') as $keyInfo) { diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 38342b7a..a5d79968 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -10,32 +10,32 @@ class Server extends \PleskX\Api\Operator { public function getProtos(): array { - $packet = $this->_client->getPacket(); - $packet->addChild($this->_wrapperTag)->addChild('get_protos'); - $response = $this->_client->request($packet); + $packet = $this->client->getPacket(); + $packet->addChild($this->wrapperTag)->addChild('get_protos'); + $response = $this->client->request($packet); return (array) $response->protos->proto; } public function getGeneralInfo(): Struct\GeneralInfo { - return new Struct\GeneralInfo($this->_getInfo('gen_info')); + return new Struct\GeneralInfo($this->getInfo('gen_info')); } public function getPreferences(): Struct\Preferences { - return new Struct\Preferences($this->_getInfo('prefs')); + return new Struct\Preferences($this->getInfo('prefs')); } public function getAdmin(): Struct\Admin { - return new Struct\Admin($this->_getInfo('admin')); + return new Struct\Admin($this->getInfo('admin')); } public function getKeyInfo(): array { $keyInfo = []; - $keyInfoXml = $this->_getInfo('key'); + $keyInfoXml = $this->getInfo('key'); foreach ($keyInfoXml->property as $property) { $keyInfo[(string) $property->name] = (string) $property->value; @@ -47,7 +47,7 @@ public function getKeyInfo(): array public function getComponents(): array { $components = []; - $componentsXml = $this->_getInfo('components'); + $componentsXml = $this->getInfo('components'); foreach ($componentsXml->component as $component) { $components[(string) $component->name] = (string) $component->version; @@ -59,7 +59,7 @@ public function getComponents(): array public function getServiceStates(): array { $states = []; - $statesXml = $this->_getInfo('services_state'); + $statesXml = $this->getInfo('services_state'); foreach ($statesXml->srv as $service) { $states[(string) $service->id] = [ @@ -74,13 +74,13 @@ public function getServiceStates(): array public function getSessionPreferences(): Struct\SessionPreferences { - return new Struct\SessionPreferences($this->_getInfo('session_setup')); + return new Struct\SessionPreferences($this->getInfo('session_setup')); } public function getShells(): array { $shells = []; - $shellsXml = $this->_getInfo('shells'); + $shellsXml = $this->getInfo('shells'); foreach ($shellsXml->shell as $shell) { $shells[(string) $shell->name] = (string) $shell->path; @@ -91,20 +91,20 @@ public function getShells(): array public function getNetworkInterfaces(): array { - $interfacesXml = $this->_getInfo('interfaces'); + $interfacesXml = $this->getInfo('interfaces'); return (array) $interfacesXml->interface; } public function getStatistics(): Struct\Statistics { - return new Struct\Statistics($this->_getInfo('stat')); + return new Struct\Statistics($this->getInfo('stat')); } public function getSiteIsolationConfig(): array { $config = []; - $configXml = $this->_getInfo('site-isolation-config'); + $configXml = $this->getInfo('site-isolation-config'); foreach ($configXml->property as $property) { $config[(string) $property->name] = (string) $property->value; @@ -115,7 +115,7 @@ public function getSiteIsolationConfig(): array public function getUpdatesInfo(): Struct\UpdatesInfo { - return new Struct\UpdatesInfo($this->_getInfo('updates')); + return new Struct\UpdatesInfo($this->getInfo('updates')); } /** @@ -126,22 +126,22 @@ public function getUpdatesInfo(): Struct\UpdatesInfo */ public function createSession(string $login, string $clientIp): string { - $packet = $this->_client->getPacket(); - $sessionNode = $packet->addChild($this->_wrapperTag)->addChild('create_session'); + $packet = $this->client->getPacket(); + $sessionNode = $packet->addChild($this->wrapperTag)->addChild('create_session'); $sessionNode->addChild('login', $login); $dataNode = $sessionNode->addChild('data'); $dataNode->addChild('user_ip', base64_encode($clientIp)); $dataNode->addChild('source_server'); - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return (string) $response->id; } - private function _getInfo(string $operation): XmlResponse + private function getInfo(string $operation): XmlResponse { - $packet = $this->_client->getPacket(); - $packet->addChild($this->_wrapperTag)->addChild('get')->addChild($operation); - $response = $this->_client->request($packet); + $packet = $this->client->getPacket(); + $packet->addChild($this->wrapperTag)->addChild('get')->addChild($operation); + $response = $this->client->request($packet); return $response->$operation; } diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index d4c14899..3e38a3f7 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -27,7 +27,7 @@ public function create($properties) */ public function delete($field, $value) { - return $this->_delete($field, $value); + return $this->deleteBy($field, $value); } /** @@ -38,7 +38,7 @@ public function delete($field, $value) */ public function get($field, $value) { - $items = $this->_get($field, $value); + $items = $this->getBy($field, $value); return reset($items); } @@ -48,7 +48,7 @@ public function get($field, $value) */ public function getAll() { - return $this->_get(); + return $this->getBy(); } /** @@ -57,17 +57,17 @@ public function getAll() * * @return Struct\Info[] */ - private function _get($field = null, $value = null) + private function getBy($field = null, $value = null) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { $filterTag->addChild($field, (string) $value); } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index 71d1cc36..cea02004 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -15,7 +15,7 @@ class Session extends \PleskX\Api\Operator */ public function create($username, $userIp) { - $packet = $this->_client->getPacket(); + $packet = $this->client->getPacket(); $creator = $packet->addChild('server')->addChild('create_session'); $creator->addChild('login', $username); @@ -24,7 +24,7 @@ public function create($username, $userIp) $loginData->addChild('user_ip', base64_encode($userIp)); $loginData->addChild('source_server', ''); - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return (string) $response->id; } diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 4da17822..67e0a875 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -7,7 +7,7 @@ class Site extends \PleskX\Api\Operator { - const PROPERTIES_HOSTING = 'hosting'; + public const PROPERTIES_HOSTING = 'hosting'; /** * @param array $properties @@ -16,8 +16,8 @@ class Site extends \PleskX\Api\Operator */ public function create(array $properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add'); $infoGeneral = $info->addChild('gen_setup'); foreach ($properties as $name => $value) { @@ -37,7 +37,7 @@ public function create(array $properties) } } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response); } @@ -50,7 +50,7 @@ public function create(array $properties) */ public function delete($field, $value) { - return $this->_delete($field, $value); + return $this->deleteBy($field, $value); } /** @@ -61,7 +61,7 @@ public function delete($field, $value) */ public function get($field, $value) { - $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + $items = $this->getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); return reset($items); } @@ -74,9 +74,15 @@ public function get($field, $value) */ public function getHosting($field, $value) { - $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function (\SimpleXMLElement $node) { - return isset($node->vrt_hst); - }); + $items = $this->getItems( + Struct\HostingInfo::class, + 'hosting', + $field, + $value, + function (\SimpleXMLElement $node) { + return isset($node->vrt_hst); + } + ); return empty($items) ? null : reset($items); } @@ -86,6 +92,6 @@ public function getHosting($field, $value) */ public function getAll() { - return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); + return $this->getItems(Struct\GeneralInfo::class, 'gen_info'); } } diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 4c9e3900..34539b6d 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -15,8 +15,8 @@ class SiteAlias extends \PleskX\Api\Operator */ public function create(array $properties, array $preferences = []) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('create'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('create'); if (count($preferences) > 0) { $prefs = $info->addChild('pref'); @@ -29,7 +29,7 @@ public function create(array $properties, array $preferences = []) $info->addChild('site-id', $properties['site-id']); $info->addChild('name', $properties['name']); - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response); } @@ -42,7 +42,7 @@ public function create(array $properties, array $preferences = []) */ public function delete($field, $value) { - return $this->_delete($field, $value, 'delete'); + return $this->deleteBy($field, $value, 'delete'); } /** @@ -66,15 +66,15 @@ public function get($field, $value) */ public function getAll($field = null, $value = null): array { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { $filterTag->{$field} = (string) $value; } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\GeneralInfo($xmlResult->info); diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index b748dcad..db88138e 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -14,8 +14,8 @@ class Subdomain extends \PleskX\Api\Operator */ public function create($properties) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add'); foreach ($properties as $name => $value) { if (is_array($value)) { @@ -29,7 +29,7 @@ public function create($properties) $info->{$name} = $value; } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response); } @@ -42,7 +42,7 @@ public function create($properties) */ public function delete($field, $value) { - return $this->_delete($field, $value); + return $this->deleteBy($field, $value); } /** @@ -66,15 +66,15 @@ public function get($field, $value) */ public function getAll($field = null, $value = null): array { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $filterTag = $getTag->addChild('filter'); if (!is_null($field)) { $filterTag->addChild($field, (string) $value); } - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; foreach ($response->xpath('//result') as $xmlResult) { diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 187fcd24..b14f84c9 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -25,8 +25,8 @@ public function getNavigation() */ public function createCustomButton($owner, $properties) { - $packet = $this->_client->getPacket(); - $buttonNode = $packet->addChild($this->_wrapperTag)->addChild('create-custombutton'); + $packet = $this->client->getPacket(); + $buttonNode = $packet->addChild($this->wrapperTag)->addChild('create-custombutton'); $buttonNode->addChild('owner')->addChild($owner); $propertiesNode = $buttonNode->addChild('properties'); @@ -34,7 +34,7 @@ public function createCustomButton($owner, $properties) $propertiesNode->{$name} = $value; } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return (int) $response->id; } @@ -58,6 +58,6 @@ public function getCustomButton($id) */ public function deleteCustomButton($id) { - return $this->_delete('custombutton-id', $id, 'delete-custombutton'); + return $this->deleteBy('custombutton-id', $id, 'delete-custombutton'); } } diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 0b86149b..504876a0 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -5,5 +5,5 @@ class VirtualDirectory extends \PleskX\Api\Operator { - protected string $_wrapperTag = 'virtdir'; + protected string $wrapperTag = 'virtdir'; } diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 82267bf8..360ade89 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -37,13 +37,13 @@ public function getPhysicalHostingDescriptor(): Struct\PhysicalHostingDescriptor */ public function getPhpSettings(string $field, $value): Struct\PhpSettings { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); $getTag->addChild('filter')->addChild($field, (string) $value); $getTag->addChild('dataset')->addChild('php-settings'); - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); return new Struct\PhpSettings($response); } @@ -56,7 +56,7 @@ public function getPhpSettings(string $field, $value): Struct\PhpSettings */ public function getLimits(string $field, $value): Struct\Limits { - $items = $this->_getItems(Struct\Limits::class, 'limits', $field, $value); + $items = $this->getItems(Struct\Limits::class, 'limits', $field, $value); return reset($items); } @@ -70,8 +70,8 @@ public function getLimits(string $field, $value): Struct\Limits */ public function create(array $properties, array $hostingProperties = null, string $planName = ''): Struct\Info { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + $packet = $this->client->getPacket(); + $info = $packet->addChild($this->wrapperTag)->addChild('add'); $infoGeneral = $info->addChild('gen_setup'); foreach ($properties as $name => $value) { @@ -95,7 +95,7 @@ public function create(array $properties, array $hostingProperties = null, strin $info->addChild('plan-name', $planName); } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return new Struct\Info($response, $properties['name'] ?? ''); } @@ -108,7 +108,7 @@ public function create(array $properties, array $hostingProperties = null, strin */ public function delete(string $field, $value): bool { - return $this->_delete($field, $value); + return $this->deleteBy($field, $value); } /** @@ -119,7 +119,7 @@ public function delete(string $field, $value): bool */ public function get(string $field, $value): Struct\GeneralInfo { - $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + $items = $this->getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); return reset($items); } @@ -129,7 +129,7 @@ public function get(string $field, $value): Struct\GeneralInfo */ public function getAll(): array { - return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); + return $this->getItems(Struct\GeneralInfo::class, 'gen_info'); } /** @@ -140,7 +140,7 @@ public function getAll(): array */ public function getDiskUsage(string $field, $value): Struct\DiskUsage { - $items = $this->_getItems(Struct\DiskUsage::class, 'disk_usage', $field, $value); + $items = $this->getItems(Struct\DiskUsage::class, 'disk_usage', $field, $value); return reset($items); } @@ -176,15 +176,15 @@ public function disable(string $field, $value): bool */ public function setProperties(string $field, $value, array $properties): bool { - $packet = $this->_client->getPacket(); - $setTag = $packet->addChild($this->_wrapperTag)->addChild('set'); + $packet = $this->client->getPacket(); + $setTag = $packet->addChild($this->wrapperTag)->addChild('set'); $setTag->addChild('filter')->addChild($field, (string) $value); $genInfoTag = $setTag->addChild('values')->addChild('gen_setup'); foreach ($properties as $property => $propertyValue) { $genInfoTag->addChild($property, (string) $propertyValue); } - $response = $this->_client->request($packet); + $response = $this->client->request($packet); return 'ok' === (string) $response->status; } diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 467defac..b12b146a 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Certificate; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $request; public string $privateKey; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ ['csr' => 'request'], ['pvt' => 'privateKey'], ]); diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index 9da9c6c2..32b7bf7b 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Customer; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public int $id; public string $company; @@ -26,7 +26,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ ['cname' => 'company'], ['pname' => 'personalName'], 'login', diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index f9b4c514..1a220589 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Customer; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $guid; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'guid', ]); diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index d706984b..4eb9a93e 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Database; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $name; @@ -16,7 +16,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'name', 'type', diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index 230f4f34..6419021b 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Database; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class UserInfo extends Struct +class UserInfo extends AbstractStruct { public int $id; public string $login; @@ -13,7 +13,7 @@ class UserInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'login', 'db-id', diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 7db81f56..3793281a 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\DatabaseServer; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $host; @@ -14,7 +14,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'host', 'port', diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index c3a2e1e4..5558d61f 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Dns; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public int $siteId; @@ -17,7 +17,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'site-id', 'site-alias-id', diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 1c35c713..621412ce 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\EventLog; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class DetailedEvent extends Struct +class DetailedEvent extends AbstractStruct { public int $id; public string $type; @@ -17,7 +17,7 @@ class DetailedEvent extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'type', 'time', diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 01e965d9..e179a324 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\EventLog; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Event extends Struct +class Event extends AbstractStruct { public string $type; public int $time; @@ -14,7 +14,7 @@ class Event extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'type', 'time', 'class', diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index 41180166..7c7ea68e 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Ip; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $ipAddress; public string $netmask; @@ -14,7 +14,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'ip_address', 'netmask', 'type', diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 2a7b9b6c..f0323ac9 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Locale; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $id; public string $language; @@ -13,7 +13,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', ['lang' => 'language'], 'country', diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index a29c4f8b..878e0b0a 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Mail; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public int $id; public string $name; @@ -13,7 +13,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'name', 'description', diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 13cb182d..58b22593 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Mail; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $name; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'name', ]); diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index a98235af..fc0ba8f7 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\PhpHandler; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $id; public string $displayName; @@ -20,7 +20,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'display-name', 'full-version', diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 673928f6..ec325630 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\ProtectedDirectory; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class DataInfo extends Struct +class DataInfo extends AbstractStruct { public string $name; public string $header; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'name', 'header', ]); diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 19b5952f..ddf2f9d1 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\ProtectedDirectory; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', ]); } diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 0d0cc7eb..1f6a5106 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\ProtectedDirectory; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class UserInfo extends Struct +class UserInfo extends AbstractStruct { public int $id; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', ]); } diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 39757165..804dd372 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Reseller; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public int $id; public string $personalName; @@ -14,7 +14,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse->{'gen-info'}, [ + $this->initScalarProperties($apiResponse->{'gen-info'}, [ ['pname' => 'personalName'], 'login', ]); diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index f257b3e3..f196294d 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Reseller; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $guid; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'guid', ]); diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index bbebd82e..32686499 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\SecretKey; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $key; public string $ipAddress; @@ -14,7 +14,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'key', 'ip_address', 'description', diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 4f08c399..7066ce53 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Admin extends Struct +class Admin extends AbstractStruct { public string $companyName; public string $name; @@ -13,7 +13,7 @@ class Admin extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ ['admin_cname' => 'companyName'], ['admin_pname' => 'name'], ['admin_email' => 'email'], diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 2b28ab2d..73c7a724 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public string $serverName; public string $serverGuid; @@ -13,7 +13,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'server_name', 'server_guid', 'mode', diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index 0f533c85..de2b362f 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Preferences extends Struct +class Preferences extends AbstractStruct { public int $statTtl; public int $trafficAccounting; @@ -13,7 +13,7 @@ class Preferences extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'stat_ttl', 'traffic_accounting', 'restart_apache_interval', diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index 2feed452..bf363bde 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -3,15 +3,15 @@ namespace PleskX\Api\Struct\Server; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class SessionPreferences extends Struct +class SessionPreferences extends AbstractStruct { public int $loginTimeout; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'login_timeout', ]); } diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index aed4dd1f..65a5ee88 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Statistics extends Struct +class Statistics extends AbstractStruct { /** @var Statistics\Objects */ public $objects; diff --git a/src/Api/Struct/Server/Statistics/DiskSpace.php b/src/Api/Struct/Server/Statistics/DiskSpace.php index 95ff3f1f..35528474 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class DiskSpace extends Struct +class DiskSpace extends AbstractStruct { public int $total; public int $used; @@ -13,7 +13,7 @@ class DiskSpace extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'total', 'used', 'free', diff --git a/src/Api/Struct/Server/Statistics/LoadAverage.php b/src/Api/Struct/Server/Statistics/LoadAverage.php index 005a0f32..8c733233 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class LoadAverage extends Struct +class LoadAverage extends AbstractStruct { public float $load1min; public float $load5min; diff --git a/src/Api/Struct/Server/Statistics/Memory.php b/src/Api/Struct/Server/Statistics/Memory.php index a42b66c9..48afaf58 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Memory extends Struct +class Memory extends AbstractStruct { public int $total; public int $used; @@ -16,7 +16,7 @@ class Memory extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'total', 'used', 'free', diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index 4c128960..a6877666 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Objects extends Struct +class Objects extends AbstractStruct { public int $clients; public int $domains; @@ -21,7 +21,7 @@ class Objects extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'clients', 'domains', 'databases', diff --git a/src/Api/Struct/Server/Statistics/Other.php b/src/Api/Struct/Server/Statistics/Other.php index d65c4316..3230a7f1 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Other extends Struct +class Other extends AbstractStruct { public string $cpu; public int $uptime; @@ -13,7 +13,7 @@ class Other extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'cpu', 'uptime', ['inside_vz' => 'insideVz'], diff --git a/src/Api/Struct/Server/Statistics/Swap.php b/src/Api/Struct/Server/Statistics/Swap.php index b61a4ad9..ee1acdf9 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Swap extends Struct +class Swap extends AbstractStruct { public int $total; public int $used; @@ -13,7 +13,7 @@ class Swap extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'total', 'used', 'free', diff --git a/src/Api/Struct/Server/Statistics/Version.php b/src/Api/Struct/Server/Statistics/Version.php index b3684ab3..d3f84f5b 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Server\Statistics; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Version extends Struct +class Version extends AbstractStruct { public string $internalName; public string $version; @@ -16,7 +16,7 @@ class Version extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ ['plesk_name' => 'internalName'], ['plesk_version' => 'version'], ['plesk_build' => 'build'], diff --git a/src/Api/Struct/Server/UpdatesInfo.php b/src/Api/Struct/Server/UpdatesInfo.php index 3a75d7b5..57eea6c8 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Server; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class UpdatesInfo extends Struct +class UpdatesInfo extends AbstractStruct { public string $lastInstalledUpdate; public bool $installUpdatesAutomatically; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'last_installed_update', 'install_updates_automatically', ]); diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 8d1a3c12..8b3fbf9d 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\ServicePlan; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $name; @@ -14,7 +14,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'name', 'guid', diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index e2060347..2ab3f401 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Session; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $id; public string $type; @@ -16,7 +16,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'type', 'ip-address', diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 1bc0c9a5..28e72f77 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Site; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public int $id; public string $creationDate; @@ -21,7 +21,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ ['cr_date' => 'creationDate'], 'name', 'ascii-name', diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index 34a307f3..cab0fe0e 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Site; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class HostingInfo extends Struct +class HostingInfo extends AbstractStruct { public array $properties = []; public string $ipAddress; @@ -15,7 +15,7 @@ public function __construct(\SimpleXMLElement $apiResponse) foreach ($apiResponse->vrt_hst->property as $property) { $this->properties[(string) $property->name] = (string) $property->value; } - $this->_initScalarProperties($apiResponse->vrt_hst, [ + $this->initScalarProperties($apiResponse->vrt_hst, [ 'ip_address', ]); } diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index 99b57fe8..0c2b6376 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Site; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $guid; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'guid', ]); diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index 0b77651b..b2581c6c 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\SiteAlias; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public string $name; public string $asciiName; @@ -13,7 +13,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'name', 'ascii-name', 'status', diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index a452ba96..646e155b 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\SiteAlias; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public string $status; public int $id; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'status', ]); diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 7c760433..43e0595a 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Subdomain; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $parent; @@ -15,7 +15,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse) { $this->properties = []; - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'parent', 'name', diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index ccac0b26..2a5edf3f 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Ui; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class CustomButton extends Struct +class CustomButton extends AbstractStruct { public int $id; public int $sortKey; @@ -18,8 +18,8 @@ class CustomButton extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, ['id']); - $this->_initScalarProperties($apiResponse->properties, [ + $this->initScalarProperties($apiResponse, ['id']); + $this->initScalarProperties($apiResponse->properties, [ 'sort_key', 'public', 'internal', diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 6369717c..23b2d489 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class DiskUsage extends Struct +class DiskUsage extends AbstractStruct { public int $httpdocs; public int $httpsdocs; @@ -21,7 +21,7 @@ class DiskUsage extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'httpdocs', 'httpsdocs', 'subdomains', diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 53ab423a..5a702758 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class GeneralInfo extends Struct +class GeneralInfo extends AbstractStruct { public int $id; public string $creationDate; @@ -23,7 +23,7 @@ class GeneralInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ ['cr_date' => 'creationDate'], 'name', 'ascii-name', diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index f761d36b..3e1d3082 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class HostingPropertyInfo extends Struct +class HostingPropertyInfo extends AbstractStruct { public string $name; public string $type; @@ -13,7 +13,7 @@ class HostingPropertyInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'name', 'type', 'label', diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index cb6e4c2c..4e928c5b 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Info extends Struct +class Info extends AbstractStruct { public int $id; public string $guid; @@ -13,7 +13,7 @@ class Info extends Struct public function __construct(\SimpleXMLElement $apiResponse, string $name = '') { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'id', 'guid', ]); diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 6d7b0a40..655ea850 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Limit extends Struct +class Limit extends AbstractStruct { public string $name; public string $value; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'name', 'value', ]); diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 0b4f7b7f..9526cbff 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class LimitDescriptor extends Struct +class LimitDescriptor extends AbstractStruct { public array $limits; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index e0ff03ae..162c2fc2 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class LimitInfo extends Struct +class LimitInfo extends AbstractStruct { public string $name; public string $type; @@ -13,7 +13,7 @@ class LimitInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'name', 'type', 'label', diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index 7a317c79..a8866f2f 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -3,16 +3,16 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class Limits extends Struct +class Limits extends AbstractStruct { public string $overuse; public array $limits; public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, ['overuse']); + $this->initScalarProperties($apiResponse, ['overuse']); $this->limits = []; foreach ($apiResponse->limit as $limit) { diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 1f09931f..fea5f1e8 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class PermissionDescriptor extends Struct +class PermissionDescriptor extends AbstractStruct { public array $permissions; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 7cdfc4a0..42e5dfbf 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class PermissionInfo extends Struct +class PermissionInfo extends AbstractStruct { public string $name; public string $type; @@ -13,7 +13,7 @@ class PermissionInfo extends Struct public function __construct(\SimpleXMLElement $apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->initScalarProperties($apiResponse, [ 'name', 'type', 'label', diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 8067571e..05a72810 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class PhpSettings extends Struct +class PhpSettings extends AbstractStruct { public array $properties; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 987b10ee..2331e48d 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -3,9 +3,9 @@ namespace PleskX\Api\Struct\Webspace; -use PleskX\Api\Struct; +use PleskX\Api\AbstractStruct; -class PhysicalHostingDescriptor extends Struct +class PhysicalHostingDescriptor extends AbstractStruct { public array $properties; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 687b6d8a..073116a4 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -17,6 +17,6 @@ class XmlResponse extends \SimpleXMLElement */ public function getValue($node) { - return (string) $this->xpath('//'.$node)[0]; + return (string) $this->xpath('//' . $node)[0]; } } diff --git a/tests/TestCase.php b/tests/AbstractTestCase.php similarity index 62% rename from tests/TestCase.php rename to tests/AbstractTestCase.php index 58670fa6..435ca224 100644 --- a/tests/TestCase.php +++ b/tests/AbstractTestCase.php @@ -5,10 +5,10 @@ use PleskXTest\Utility\PasswordProvider; -abstract class TestCase extends \PHPUnit\Framework\TestCase +abstract class AbstractTestCase extends \PHPUnit\Framework\TestCase { /** @var \PleskX\Api\Client */ - protected static $_client; + protected static $client; private static $webspaces = []; private static $servicePlans = []; @@ -21,16 +21,18 @@ public static function setUpBeforeClass(): void $port = 8443; $scheme = 'https'; - if ($url = getenv('REMOTE_URL')) { + $url = getenv('REMOTE_URL'); + if ($url) { $parsedUrl = parse_url(http://github.com/$url); list($host, $port, $scheme) = [$parsedUrl['host'], $parsedUrl['port'], $parsedUrl['scheme']]; } - static::$_client = new \PleskX\Api\Client($host, $port, $scheme); - static::$_client->setCredentials($login, $password); + static::$client = new \PleskX\Api\Client($host, $port, $scheme); + static::$client->setCredentials($login, $password); - if ($proxy = getenv('REMOTE_PROXY')) { - static::$_client->setProxy($proxy); + $proxy = getenv('REMOTE_PROXY'); + if ($proxy) { + static::$client->setProxy($proxy); } } @@ -38,14 +40,16 @@ public static function tearDownAfterClass(): void { foreach (self::$webspaces as $webspace) { try { - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); + // phpcs:ignore } catch (\Exception $e) { } } foreach (self::$servicePlans as $servicePlan) { try { - static::$_client->servicePlan()->delete('id', $servicePlan->id); + static::$client->servicePlan()->delete('id', $servicePlan->id); + // phpcs:ignore } catch (\Exception $e) { } } @@ -54,9 +58,9 @@ public static function tearDownAfterClass(): void /** * @return string */ - protected static function _getIpAddress() + protected static function getIpAddress() { - $ips = static::$_client->ip()->get(); + $ips = static::$client->ip()->get(); $ipInfo = reset($ips); return $ipInfo->ipAddress; @@ -65,13 +69,13 @@ protected static function _getIpAddress() /** * @return \PleskX\Api\Struct\Webspace\Info */ - protected static function _createWebspace() + protected static function createWebspace() { $id = uniqid(); - $webspace = static::$_client->webspace()->create( + $webspace = static::$client->webspace()->create( [ 'name' => "test{$id}.test", - 'ip_address' => static::_getIpAddress(), + 'ip_address' => static::getIpAddress(), ], [ 'ftp_login' => "u{$id}", @@ -83,10 +87,10 @@ protected static function _createWebspace() return $webspace; } - protected static function _createServicePlan() + protected static function createServicePlan() { $id = uniqid(); - $servicePlan = static::$_client->servicePlan()->create(['name' => "test{$id}plan"]); + $servicePlan = static::$client->servicePlan()->create(['name' => "test{$id}plan"]); self::$servicePlans[] = $servicePlan; diff --git a/tests/ApiClientTest.php b/tests/ApiClientAbstractTest.php similarity index 74% rename from tests/ApiClientTest.php rename to tests/ApiClientAbstractTest.php index 41547416..e1943349 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientAbstractTest.php @@ -5,16 +5,16 @@ use PleskX\Api\Client\Exception; -class ApiClientTest extends TestCase +class ApiClientAbstractTest extends AbstractTestCase { public function testWrongProtocol() { $this->expectException(\PleskX\Api\Exception::class); $this->expectExceptionCode(1005); - $packet = static::$_client->getPacket('100.0.0'); + $packet = static::$client->getPacket('100.0.0'); $packet->addChild('server')->addChild('get_protos'); - static::$_client->request($packet); + static::$client->request($packet); } public function testUnknownOperator() @@ -22,9 +22,9 @@ public function testUnknownOperator() $this->expectException(\PleskX\Api\Exception::class); $this->expectExceptionCode(1014); - $packet = static::$_client->getPacket(); + $packet = static::$client->getPacket(); $packet->addChild('unknown'); - static::$_client->request($packet); + static::$client->request($packet); } public function testInvalidXmlRequest() @@ -32,7 +32,7 @@ public function testInvalidXmlRequest() $this->expectException(\PleskX\Api\Exception::class); $this->expectExceptionCode(1014); - static::$_client->request(''); + static::$client->request(''); } public function testInvalidCredentials() @@ -40,12 +40,12 @@ public function testInvalidCredentials() $this->expectException(\PleskX\Api\Exception::class); $this->expectExceptionCode(1001); - $host = static::$_client->getHost(); - $port = static::$_client->getPort(); - $protocol = static::$_client->getProtocol(); + $host = static::$client->getHost(); + $port = static::$client->getPort(); + $protocol = static::$client->getProtocol(); $client = new \PleskX\Api\Client($host, $port, $protocol); $client->setCredentials('bad-login', 'bad-password'); - $packet = static::$_client->getPacket(); + $packet = static::$client->getPacket(); $packet->addChild('server')->addChild('get_protos'); $client->request($packet); } @@ -55,48 +55,48 @@ public function testInvalidSecretKey() $this->expectException(\PleskX\Api\Exception::class); $this->expectExceptionCode(11003); - $host = static::$_client->getHost(); - $port = static::$_client->getPort(); - $protocol = static::$_client->getProtocol(); + $host = static::$client->getHost(); + $port = static::$client->getPort(); + $protocol = static::$client->getProtocol(); $client = new \PleskX\Api\Client($host, $port, $protocol); $client->setSecretKey('bad-key'); - $packet = static::$_client->getPacket(); + $packet = static::$client->getPacket(); $packet->addChild('server')->addChild('get_protos'); $client->request($packet); } public function testLatestMajorProtocol() { - $packet = static::$_client->getPacket('1.6'); + $packet = static::$client->getPacket('1.6'); $packet->addChild('server')->addChild('get_protos'); - $result = static::$_client->request($packet); + $result = static::$client->request($packet); $this->assertEquals('ok', $result->status); } public function testLatestMinorProtocol() { - $packet = static::$_client->getPacket('1.6.5'); + $packet = static::$client->getPacket('1.6.5'); $packet->addChild('server')->addChild('get_protos'); - $result = static::$_client->request($packet); + $result = static::$client->request($packet); $this->assertEquals('ok', $result->status); } public function testRequestShortSyntax() { - $response = static::$_client->request('server.get.gen_info'); + $response = static::$client->request('server.get.gen_info'); $this->assertGreaterThan(0, strlen($response->gen_info->server_name)); } public function testOperatorPlainRequest() { - $response = static::$_client->server()->request('get.gen_info'); + $response = static::$client->server()->request('get.gen_info'); $this->assertGreaterThan(0, strlen($response->gen_info->server_name)); $this->assertEquals(36, strlen($response->getValue('server_guid'))); } public function testRequestArraySyntax() { - $response = static::$_client->request([ + $response = static::$client->request([ 'server' => [ 'get' => [ 'gen_info' => '', @@ -108,13 +108,13 @@ public function testRequestArraySyntax() public function testOperatorArraySyntax() { - $response = static::$_client->server()->request(['get' => ['gen_info' => '']]); + $response = static::$client->server()->request(['get' => ['gen_info' => '']]); $this->assertGreaterThan(0, strlen($response->gen_info->server_name)); } public function testMultiRequest() { - $responses = static::$_client->multiRequest([ + $responses = static::$client->multiRequest([ 'server.get_protos', 'server.get.gen_info', ]); @@ -156,18 +156,18 @@ public function testGetProtocol() public function testSetVerifyResponse() { - static::$_client->setVerifyResponse(function ($xml) { + static::$client->setVerifyResponse(function ($xml) { if ($xml->xpath('//proto')) { throw new Exception('proto'); } }); try { - static::$_client->server()->getProtos(); + static::$client->server()->getProtos(); } catch (Exception $e) { $this->assertEquals('proto', $e->getMessage()); } finally { - static::$_client->setVerifyResponse(); + static::$client->setVerifyResponse(); } } } diff --git a/tests/CertificateTest.php b/tests/CertificateAbstractTest.php similarity index 85% rename from tests/CertificateTest.php rename to tests/CertificateAbstractTest.php index cd6cda3b..b83c0979 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateAbstractTest.php @@ -3,11 +3,11 @@ namespace PleskXTest; -class CertificateTest extends TestCase +class CertificateAbstractTest extends AbstractTestCase { public function testGenerate() { - $certificate = static::$_client->certificate()->generate([ + $certificate = static::$client->certificate()->generate([ 'bits' => 2048, 'country' => 'RU', 'state' => 'NSO', diff --git a/tests/CustomerTest.php b/tests/CustomerAbstractTest.php similarity index 56% rename from tests/CustomerTest.php rename to tests/CustomerAbstractTest.php index cb69f5e5..428e44cc 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerAbstractTest.php @@ -6,13 +6,13 @@ use PleskXTest\Utility\KeyLimitChecker; use PleskXTest\Utility\PasswordProvider; -class CustomerTest extends TestCase +class CustomerAbstractTest extends AbstractTestCase { - private $_customerProperties; + private array $customerProperties; public function setUp(): void { - $this->_customerProperties = [ + $this->customerProperties = [ 'cname' => 'Plesk', 'pname' => 'John Smith', 'login' => 'john-unit-test', @@ -25,24 +25,24 @@ public function setUp(): void public function testCreate() { - $customer = static::$_client->customer()->create($this->_customerProperties); + $customer = static::$client->customer()->create($this->customerProperties); $this->assertIsInt($customer->id); $this->assertGreaterThan(0, $customer->id); - static::$_client->customer()->delete('id', $customer->id); + static::$client->customer()->delete('id', $customer->id); } public function testDelete() { - $customer = static::$_client->customer()->create($this->_customerProperties); - $result = static::$_client->customer()->delete('id', $customer->id); + $customer = static::$client->customer()->create($this->customerProperties); + $result = static::$client->customer()->delete('id', $customer->id); $this->assertTrue($result); } public function testGet() { - $customer = static::$_client->customer()->create($this->_customerProperties); - $customerInfo = static::$_client->customer()->get('id', $customer->id); + $customer = static::$client->customer()->create($this->customerProperties); + $customerInfo = static::$client->customer()->get('id', $customer->id); $this->assertEquals('Plesk', $customerInfo->company); $this->assertEquals('John Smith', $customerInfo->personalName); $this->assertEquals('john-unit-test', $customerInfo->login); @@ -51,29 +51,29 @@ public function testGet() $this->assertEquals('link:12345', $customerInfo->externalId); $this->assertEquals($customer->id, $customerInfo->id); - static::$_client->customer()->delete('id', $customer->id); + static::$client->customer()->delete('id', $customer->id); } public function testGetAll() { - $keyInfo = static::$_client->server()->getKeyInfo(); + $keyInfo = static::$client->server()->getKeyInfo(); if (!KeyLimitChecker::checkByType($keyInfo, KeyLimitChecker::LIMIT_CLIENTS, 2)) { $this->markTestSkipped('License does not allow to create more than 1 customer.'); } - static::$_client->customer()->create([ + static::$client->customer()->create([ 'pname' => 'John Smith', 'login' => 'customer-a', 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); - static::$_client->customer()->create([ + static::$client->customer()->create([ 'pname' => 'Mike Black', 'login' => 'customer-b', 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); - $customersInfo = static::$_client->customer()->getAll(); + $customersInfo = static::$client->customer()->getAll(); $this->assertIsArray($customersInfo); $customersCheck = array_filter($customersInfo, function ($value) { @@ -81,42 +81,42 @@ public function testGetAll() }); $this->assertCount(2, $customersCheck); - static::$_client->customer()->delete('login', 'customer-a'); - static::$_client->customer()->delete('login', 'customer-b'); + static::$client->customer()->delete('login', 'customer-a'); + static::$client->customer()->delete('login', 'customer-b'); } public function testEnable() { - $customer = static::$_client->customer()->create($this->_customerProperties); - static::$_client->customer()->disable('id', $customer->id); - static::$_client->customer()->enable('id', $customer->id); - $customerInfo = static::$_client->customer()->get('id', $customer->id); + $customer = static::$client->customer()->create($this->customerProperties); + static::$client->customer()->disable('id', $customer->id); + static::$client->customer()->enable('id', $customer->id); + $customerInfo = static::$client->customer()->get('id', $customer->id); $this->assertTrue($customerInfo->enabled); - static::$_client->customer()->delete('id', $customer->id); + static::$client->customer()->delete('id', $customer->id); } public function testDisable() { - $customer = static::$_client->customer()->create($this->_customerProperties); - static::$_client->customer()->disable('id', $customer->id); - $customerInfo = static::$_client->customer()->get('id', $customer->id); + $customer = static::$client->customer()->create($this->customerProperties); + static::$client->customer()->disable('id', $customer->id); + $customerInfo = static::$client->customer()->get('id', $customer->id); $this->assertFalse($customerInfo->enabled); - static::$_client->customer()->delete('id', $customer->id); + static::$client->customer()->delete('id', $customer->id); } public function testSetProperties() { - $customer = static::$_client->customer()->create($this->_customerProperties); - static::$_client->customer()->setProperties('id', $customer->id, [ + $customer = static::$client->customer()->create($this->customerProperties); + static::$client->customer()->setProperties('id', $customer->id, [ 'pname' => 'Mike Black', 'email' => 'mike@black.com', ]); - $customerInfo = static::$_client->customer()->get('id', $customer->id); + $customerInfo = static::$client->customer()->get('id', $customer->id); $this->assertEquals('Mike Black', $customerInfo->personalName); $this->assertEquals('mike@black.com', $customerInfo->email); - static::$_client->customer()->delete('id', $customer->id); + static::$client->customer()->delete('id', $customer->id); } } diff --git a/tests/DatabaseTest.php b/tests/DatabaseAbstractTest.php similarity index 65% rename from tests/DatabaseTest.php rename to tests/DatabaseAbstractTest.php index ddbdf5aa..c02632b7 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseAbstractTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\PasswordProvider; -class DatabaseTest extends TestCase +class DatabaseAbstractTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; @@ -13,198 +13,198 @@ class DatabaseTest extends TestCase public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - static::$webspace = static::_createWebspace(); + static::$webspace = static::createWebspace(); } public function testCreate() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - static::$_client->database()->delete('id', $database->id); + static::$client->database()->delete('id', $database->id); } public function testCreateUser() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $user = $this->_createUser([ + $user = $this->createUser([ 'db-id' => $database->id, 'login' => 'test_user1', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - static::$_client->database()->deleteUser('id', $user->id); - static::$_client->database()->delete('id', $database->id); + static::$client->database()->deleteUser('id', $user->id); + static::$client->database()->delete('id', $database->id); } public function testUpdateUser() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $user = $this->_createUser([ + $user = $this->createUser([ 'db-id' => $database->id, 'login' => 'test_user1', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - $updatedUser = static::$_client->database()->updateUser([ + $updatedUser = static::$client->database()->updateUser([ 'id' => $user->id, 'login' => 'test_user2', 'password' => PasswordProvider::STRONG_PASSWORD, ]); $this->assertEquals(true, $updatedUser); - static::$_client->database()->deleteUser('id', $user->id); - static::$_client->database()->delete('id', $database->id); + static::$client->database()->deleteUser('id', $user->id); + static::$client->database()->delete('id', $database->id); } public function testGetById() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $db = static::$_client->database()->get('id', $database->id); + $db = static::$client->database()->get('id', $database->id); $this->assertEquals('test1', $db->name); $this->assertEquals('mysql', $db->type); $this->assertEquals(static::$webspace->id, $db->webspaceId); $this->assertEquals(1, $db->dbServerId); - static::$_client->database()->delete('id', $database->id); + static::$client->database()->delete('id', $database->id); } public function testGetAllByWebspaceId() { - $db1 = $this->_createDatabase([ + $db1 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $db2 = $this->_createDatabase([ + $db2 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test2', 'type' => 'mysql', 'db-server-id' => 1, ]); - $databases = static::$_client->database()->getAll('webspace-id', static::$webspace->id); + $databases = static::$client->database()->getAll('webspace-id', static::$webspace->id); $this->assertEquals('test1', $databases[0]->name); $this->assertEquals('test2', $databases[1]->name); $this->assertEquals(static::$webspace->id, $databases[0]->webspaceId); $this->assertEquals(1, $databases[1]->dbServerId); - static::$_client->database()->delete('id', $db1->id); - static::$_client->database()->delete('id', $db2->id); + static::$client->database()->delete('id', $db1->id); + static::$client->database()->delete('id', $db2->id); } public function testGetUserById() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $user = $this->_createUser([ + $user = $this->createUser([ 'db-id' => $database->id, 'login' => 'test_user1', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - $dbUser = static::$_client->database()->getUser('id', $user->id); + $dbUser = static::$client->database()->getUser('id', $user->id); $this->assertEquals('test_user1', $dbUser->login); $this->assertEquals($database->id, $dbUser->dbId); - static::$_client->database()->deleteUser('id', $user->id); - static::$_client->database()->delete('id', $database->id); + static::$client->database()->deleteUser('id', $user->id); + static::$client->database()->delete('id', $database->id); } public function testGetAllUsersByDbId() { - $db1 = $this->_createDatabase([ + $db1 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $db2 = $this->_createDatabase([ + $db2 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test2', 'type' => 'mysql', 'db-server-id' => 1, ]); - $user1 = $this->_createUser([ + $user1 = $this->createUser([ 'db-id' => $db1->id, 'login' => 'test_user1', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - $user2 = $this->_createUser([ + $user2 = $this->createUser([ 'db-id' => $db1->id, 'login' => 'test_user2', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - $user3 = $this->_createUser([ + $user3 = $this->createUser([ 'db-id' => $db2->id, 'login' => 'test_user3', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - $dbUsers = static::$_client->database()->getAllUsers('db-id', $db1->id); + $dbUsers = static::$client->database()->getAllUsers('db-id', $db1->id); $this->assertEquals(2, count($dbUsers)); $this->assertEquals('test_user1', $dbUsers[0]->login); $this->assertEquals('test_user2', $dbUsers[1]->login); - static::$_client->database()->deleteUser('id', $user1->id); - static::$_client->database()->deleteUser('id', $user2->id); - static::$_client->database()->deleteUser('id', $user3->id); - static::$_client->database()->delete('id', $db1->id); - static::$_client->database()->delete('id', $db2->id); + static::$client->database()->deleteUser('id', $user1->id); + static::$client->database()->deleteUser('id', $user2->id); + static::$client->database()->deleteUser('id', $user3->id); + static::$client->database()->delete('id', $db1->id); + static::$client->database()->delete('id', $db2->id); } public function testDelete() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $result = static::$_client->database()->delete('id', $database->id); + $result = static::$client->database()->delete('id', $database->id); $this->assertTrue($result); } public function testDeleteUser() { - $database = $this->_createDatabase([ + $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1, ]); - $user = $this->_createUser([ + $user = $this->createUser([ 'db-id' => $database->id, 'login' => 'test_user1', 'password' => PasswordProvider::STRONG_PASSWORD, ]); - $result = static::$_client->database()->deleteUser('id', $user->id); + $result = static::$client->database()->deleteUser('id', $user->id); $this->assertTrue($result); - static::$_client->database()->delete('id', $database->id); + static::$client->database()->delete('id', $database->id); } /** @@ -212,9 +212,9 @@ public function testDeleteUser() * * @return \PleskX\Api\Struct\Database\Info */ - private function _createDatabase(array $params) + private function createDatabase(array $params) { - $database = static::$_client->database()->create($params); + $database = static::$client->database()->create($params); $this->assertIsInt($database->id); $this->assertGreaterThan(0, $database->id); @@ -226,9 +226,9 @@ private function _createDatabase(array $params) * * @return \PleskX\Api\Struct\Database\UserInfo */ - private function _createUser(array $params) + private function createUser(array $params) { - $user = static::$_client->database()->createUser($params); + $user = static::$client->database()->createUser($params); $this->assertIsInt($user->id); $this->assertGreaterThan(0, $user->id); diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerAbstractTest.php similarity index 69% rename from tests/DatabaseServerTest.php rename to tests/DatabaseServerAbstractTest.php index ab716a46..a6288188 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerAbstractTest.php @@ -3,25 +3,25 @@ namespace PleskXTest; -class DatabaseServerTest extends TestCase +class DatabaseServerAbstractTest extends AbstractTestCase { public function testGetSupportedTypes() { - $types = static::$_client->databaseServer()->getSupportedTypes(); + $types = static::$client->databaseServer()->getSupportedTypes(); $this->assertGreaterThan(0, count($types)); $this->assertContains('mysql', $types); } public function testGet() { - $dbServer = static::$_client->databaseServer()->get('id', 1); + $dbServer = static::$client->databaseServer()->get('id', 1); $this->assertEquals('localhost', $dbServer->host); $this->assertGreaterThan(0, $dbServer->port); } public function testGetAll() { - $dbServers = static::$_client->databaseServer()->getAll(); + $dbServers = static::$client->databaseServer()->getAll(); $this->assertIsArray($dbServers); $this->assertGreaterThan(0, count($dbServers)); $this->assertEquals('localhost', $dbServers[0]->host); diff --git a/tests/DnsTest.php b/tests/DnsAbstractTest.php similarity index 79% rename from tests/DnsTest.php rename to tests/DnsAbstractTest.php index 69867418..ec63f766 100644 --- a/tests/DnsTest.php +++ b/tests/DnsAbstractTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class DnsTest extends TestCase +class DnsAbstractTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; @@ -14,11 +14,11 @@ public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - $serviceStates = static::$_client->server()->getServiceStates(); + $serviceStates = static::$client->server()->getServiceStates(); static::$isDnsSupported = isset($serviceStates['dns']) && ('running' == $serviceStates['dns']['state']); if (static::$isDnsSupported) { - static::$webspace = static::_createWebspace(); + static::$webspace = static::createWebspace(); } } @@ -33,7 +33,7 @@ protected function setUp(): void public function testCreate() { - $dns = static::$_client->dns()->create([ + $dns = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'TXT', 'host' => 'host', @@ -41,7 +41,7 @@ public function testCreate() ]); $this->assertIsInt($dns->id); $this->assertGreaterThan(0, $dns->id); - static::$_client->dns()->delete('id', $dns->id); + static::$client->dns()->delete('id', $dns->id); } /** @@ -49,7 +49,7 @@ public function testCreate() */ public function testBulkCreate() { - $response = static::$_client->dns()->bulkCreate([ + $response = static::$client->dns()->bulkCreate([ [ 'site-id' => static::$webspace->id, 'type' => 'TXT', @@ -92,7 +92,7 @@ public function testBulkDelete(array $createdRecords) return (int) $record->id; }, $createdRecords); - $response = static::$_client->dns()->bulkDelete($createdRecordIds); + $response = static::$client->dns()->bulkDelete($createdRecordIds); $this->assertCount(3, $response); @@ -104,36 +104,36 @@ public function testBulkDelete(array $createdRecords) public function testGetById() { - $dns = static::$_client->dns()->create([ + $dns = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'TXT', 'host' => '', 'value' => 'value', ]); - $dnsInfo = static::$_client->dns()->get('id', $dns->id); + $dnsInfo = static::$client->dns()->get('id', $dns->id); $this->assertEquals('TXT', $dnsInfo->type); $this->assertEquals(static::$webspace->id, $dnsInfo->siteId); $this->assertEquals('value', $dnsInfo->value); - static::$_client->dns()->delete('id', $dns->id); + static::$client->dns()->delete('id', $dns->id); } public function testGetAllByWebspaceId() { - $dns = static::$_client->dns()->create([ + $dns = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'DS', 'host' => '', 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292118', ]); - $dns2 = static::$_client->dns()->create([ + $dns2 = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'DS', 'host' => '', 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292119', ]); - $dnsInfo = static::$_client->dns()->getAll('site-id', static::$webspace->id); + $dnsInfo = static::$client->dns()->getAll('site-id', static::$webspace->id); $dsRecords = []; foreach ($dnsInfo as $dnsRec) { if ('DS' == $dnsRec->type) { @@ -145,19 +145,19 @@ public function testGetAllByWebspaceId() $this->assertEquals(static::$webspace->id, $dsRecord->siteId); } - static::$_client->dns()->delete('id', $dns->id); - static::$_client->dns()->delete('id', $dns2->id); + static::$client->dns()->delete('id', $dns->id); + static::$client->dns()->delete('id', $dns2->id); } public function testDelete() { - $dns = static::$_client->dns()->create([ + $dns = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'TXT', 'host' => 'host', 'value' => 'value', ]); - $result = static::$_client->dns()->delete('id', $dns->id); + $result = static::$client->dns()->delete('id', $dns->id); $this->assertTrue($result); } } diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateAbstractTest.php similarity index 60% rename from tests/DnsTemplateTest.php rename to tests/DnsTemplateAbstractTest.php index e53202c0..e7536bc6 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateAbstractTest.php @@ -3,33 +3,30 @@ namespace PleskXTest; -class DnsTemplateTest extends TestCase +class DnsTemplateAbstractTest extends AbstractTestCase { - /** - * @var bool - */ - private static $_isDnsSupported; + private static bool $isDnsSupported; public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - $serviceStates = static::$_client->server()->getServiceStates(); - static::$_isDnsSupported = $serviceStates['dns'] && ('running' == $serviceStates['dns']['state']); + $serviceStates = static::$client->server()->getServiceStates(); + static::$isDnsSupported = $serviceStates['dns'] && ('running' == $serviceStates['dns']['state']); } protected function setUp(): void { parent::setUp(); - if (!static::$_isDnsSupported) { + if (!static::$isDnsSupported) { $this->markTestSkipped('DNS system is not supported.'); } } public function testCreate() { - $dns = static::$_client->dnsTemplate()->create([ + $dns = static::$client->dnsTemplate()->create([ 'type' => 'TXT', 'host' => 'test.create', 'value' => 'value', @@ -38,37 +35,37 @@ public function testCreate() $this->assertGreaterThan(0, $dns->id); $this->assertEquals(0, $dns->siteId); $this->assertEquals(0, $dns->siteAliasId); - static::$_client->dnsTemplate()->delete('id', $dns->id); + static::$client->dnsTemplate()->delete('id', $dns->id); } public function testGetById() { - $dns = static::$_client->dnsTemplate()->create([ + $dns = static::$client->dnsTemplate()->create([ 'type' => 'TXT', 'host' => 'test.get.by.id', 'value' => 'value', ]); - $dnsInfo = static::$_client->dnsTemplate()->get('id', $dns->id); + $dnsInfo = static::$client->dnsTemplate()->get('id', $dns->id); $this->assertEquals('TXT', $dnsInfo->type); $this->assertEquals('value', $dnsInfo->value); - static::$_client->dnsTemplate()->delete('id', $dns->id); + static::$client->dnsTemplate()->delete('id', $dns->id); } public function testGetAll() { - $dns = static::$_client->dnsTemplate()->create([ + $dns = static::$client->dnsTemplate()->create([ 'type' => 'TXT', 'host' => 'test.get.all', 'value' => 'value', ]); - $dns2 = static::$_client->dnsTemplate()->create([ + $dns2 = static::$client->dnsTemplate()->create([ 'type' => 'TXT', 'host' => 'test.get.all', 'value' => 'value2', ]); - $dnsInfo = static::$_client->dnsTemplate()->getAll(); + $dnsInfo = static::$client->dnsTemplate()->getAll(); $dsRecords = []; foreach ($dnsInfo as $dnsRec) { if ('TXT' === $dnsRec->type && 0 === strpos($dnsRec->host, 'test.get.all')) { @@ -77,18 +74,18 @@ public function testGetAll() } $this->assertCount(2, $dsRecords); - static::$_client->dnsTemplate()->delete('id', $dns->id); - static::$_client->dnsTemplate()->delete('id', $dns2->id); + static::$client->dnsTemplate()->delete('id', $dns->id); + static::$client->dnsTemplate()->delete('id', $dns2->id); } public function testDelete() { - $dns = static::$_client->dnsTemplate()->create([ + $dns = static::$client->dnsTemplate()->create([ 'type' => 'TXT', 'host' => 'test.delete', 'value' => 'value', ]); - $result = static::$_client->dnsTemplate()->delete('id', $dns->id); + $result = static::$client->dnsTemplate()->delete('id', $dns->id); $this->assertTrue($result); } } diff --git a/tests/EventLogTest.php b/tests/EventLogAbstractTest.php similarity index 69% rename from tests/EventLogTest.php rename to tests/EventLogAbstractTest.php index c402fbc9..283dd25a 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogAbstractTest.php @@ -3,11 +3,11 @@ namespace PleskXTest; -class EventLogTest extends TestCase +class EventLogAbstractTest extends AbstractTestCase { public function testGet() { - $events = static::$_client->eventLog()->get(); + $events = static::$client->eventLog()->get(); $this->assertGreaterThan(0, $events); $event = reset($events); @@ -16,7 +16,7 @@ public function testGet() public function testGetDetailedLog() { - $events = static::$_client->eventLog()->getDetailedLog(); + $events = static::$client->eventLog()->getDetailedLog(); $this->assertGreaterThan(0, $events); $event = reset($events); @@ -25,7 +25,7 @@ public function testGetDetailedLog() public function testGetLastId() { - $lastId = static::$_client->eventLog()->getLastId(); + $lastId = static::$client->eventLog()->getLastId(); $this->assertGreaterThan(0, $lastId); } } diff --git a/tests/IpTest.php b/tests/IpAbstractTest.php similarity index 77% rename from tests/IpTest.php rename to tests/IpAbstractTest.php index 1e4625a2..c6147fc1 100644 --- a/tests/IpTest.php +++ b/tests/IpAbstractTest.php @@ -3,11 +3,11 @@ namespace PleskXTest; -class IpTest extends TestCase +class IpAbstractTest extends AbstractTestCase { public function testGet() { - $ips = static::$_client->ip()->get(); + $ips = static::$client->ip()->get(); $this->assertGreaterThan(0, count($ips)); $ip = reset($ips); diff --git a/tests/LocaleTest.php b/tests/LocaleAbstractTest.php similarity index 69% rename from tests/LocaleTest.php rename to tests/LocaleAbstractTest.php index 003cb019..be3bc07b 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleAbstractTest.php @@ -3,11 +3,11 @@ namespace PleskXTest; -class LocaleTest extends TestCase +class LocaleAbstractTest extends AbstractTestCase { public function testGet() { - $locales = static::$_client->locale()->get(); + $locales = static::$client->locale()->get(); $this->assertGreaterThan(0, count($locales)); $locale = $locales['en-US']; @@ -16,7 +16,7 @@ public function testGet() public function testGetById() { - $locale = static::$_client->locale()->get('en-US'); + $locale = static::$client->locale()->get('en-US'); $this->assertEquals('en-US', $locale->id); } } diff --git a/tests/MailTest.php b/tests/MailAbstractTest.php similarity index 55% rename from tests/MailTest.php rename to tests/MailAbstractTest.php index 948c26c5..f6370160 100644 --- a/tests/MailTest.php +++ b/tests/MailAbstractTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\PasswordProvider; -class MailTest extends TestCase +class MailAbstractTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; @@ -19,11 +19,11 @@ public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - $serviceStates = static::$_client->server()->getServiceStates(); + $serviceStates = static::$client->server()->getServiceStates(); static::$isMailSupported = isset($serviceStates['smtp']) && ('running' == $serviceStates['smtp']['state']); if (static::$isMailSupported) { - static::$webspace = static::_createWebspace(); + static::$webspace = static::createWebspace(); } } @@ -38,48 +38,53 @@ protected function setUp(): void public function testCreate() { - $mailname = static::$_client->mail()->create('test', static::$webspace->id, true, PasswordProvider::STRONG_PASSWORD); + $mailname = static::$client->mail()->create( + 'test', + static::$webspace->id, + true, + PasswordProvider::STRONG_PASSWORD + ); $this->assertIsInt($mailname->id); $this->assertGreaterThan(0, $mailname->id); $this->assertEquals('test', $mailname->name); - static::$_client->mail()->delete('name', $mailname->name, static::$webspace->id); + static::$client->mail()->delete('name', $mailname->name, static::$webspace->id); } public function testDelete() { - $mailname = static::$_client->mail()->create('test', static::$webspace->id); + $mailname = static::$client->mail()->create('test', static::$webspace->id); - $result = static::$_client->mail()->delete('name', $mailname->name, static::$webspace->id); + $result = static::$client->mail()->delete('name', $mailname->name, static::$webspace->id); $this->assertTrue($result); } public function testGet() { - $mailname = static::$_client->mail()->create('test', static::$webspace->id); + $mailname = static::$client->mail()->create('test', static::$webspace->id); - $mailnameInfo = static::$_client->mail()->get('test', static::$webspace->id); + $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); + static::$client->mail()->delete('name', $mailname->name, static::$webspace->id); } public function testGetAll() { - $mailname = static::$_client->mail()->create('test', static::$webspace->id); + $mailname = static::$client->mail()->create('test', static::$webspace->id); - $mailnamesInfo = static::$_client->mail()->getAll(static::$webspace->id); + $mailnamesInfo = static::$client->mail()->getAll(static::$webspace->id); $this->assertCount(1, $mailnamesInfo); $this->assertEquals('test', $mailnamesInfo[0]->name); - static::$_client->mail()->delete('name', $mailname->name, static::$webspace->id); + static::$client->mail()->delete('name', $mailname->name, static::$webspace->id); } public function testGetAllWithoutMailnames() { - $mailnamesInfo = static::$_client->mail()->getAll(static::$webspace->id); + $mailnamesInfo = static::$client->mail()->getAll(static::$webspace->id); $this->assertCount(0, $mailnamesInfo); } } diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerAbstractTest.php similarity index 72% rename from tests/PhpHandlerTest.php rename to tests/PhpHandlerAbstractTest.php index 47b0b67e..f950e057 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerAbstractTest.php @@ -3,18 +3,18 @@ namespace PleskXTest; -class PhpHandlerTest extends TestCase +class PhpHandlerAbstractTest extends AbstractTestCase { public function testGet() { - $handler = static::$_client->phpHandler()->get(); + $handler = static::$client->phpHandler()->get(); $this->assertObjectHasAttribute('type', $handler); } public function testGetAll() { - $handlers = static::$_client->phpHandler()->getAll(); + $handlers = static::$client->phpHandler()->getAll(); $this->assertIsArray($handlers); $this->assertNotEmpty($handlers); @@ -30,6 +30,6 @@ public function testGetUnknownHandlerThrowsException() $this->expectException(\PleskX\Api\Exception::class); $this->expectExceptionMessage('Php handler does not exists'); - static::$_client->phpHandler()->get('id', 'this-handler-does-not-exist'); + static::$client->phpHandler()->get('id', 'this-handler-does-not-exist'); } } diff --git a/tests/ProtectedDirectoryAbstractTest.php b/tests/ProtectedDirectoryAbstractTest.php new file mode 100644 index 00000000..0b94f85d --- /dev/null +++ b/tests/ProtectedDirectoryAbstractTest.php @@ -0,0 +1,92 @@ +protectedDirectory()->add('/', static::$webspace->id); + + $this->assertIsObject($protectedDirectory); + $this->assertGreaterThan(0, $protectedDirectory->id); + + static::$client->protectedDirectory()->delete('id', $protectedDirectory->id); + } + + public function testAddInvalidDirectory() + { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1019); + + static::$client->protectedDirectory()->add('', static::$webspace->id); + } + + public function testDelete() + { + $protectedDirectory = static::$client->protectedDirectory()->add('/', static::$webspace->id); + + $result = static::$client->protectedDirectory()->delete('id', $protectedDirectory->id); + $this->assertTrue($result); + } + + public function testGetById() + { + $protectedDirectory = static::$client->protectedDirectory()->add('test', static::$webspace->id); + + $foundDirectory = static::$client->protectedDirectory()->get('id', $protectedDirectory->id); + $this->assertEquals('test', $foundDirectory->name); + + static::$client->protectedDirectory()->delete('id', $protectedDirectory->id); + } + + public function testGetUnknownDirectory() + { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1013); + + $nonExistentDirectoryId = 99999999; + static::$client->protectedDirectory()->get('id', $nonExistentDirectoryId); + } + + public function testAddUser() + { + $protectedDirectory = static::$client->protectedDirectory()->add('/', static::$webspace->id); + + $user = static::$client->protectedDirectory()->addUser( + $protectedDirectory, + 'john', + PasswordProvider::STRONG_PASSWORD + ); + $this->assertGreaterThan(0, $user->id); + + static::$client->protectedDirectory()->delete('id', $protectedDirectory->id); + } + + public function testDeleteUser() + { + $protectedDirectory = static::$client->protectedDirectory()->add('/', static::$webspace->id); + + $user = static::$client->protectedDirectory()->addUser( + $protectedDirectory, + 'john', + PasswordProvider::STRONG_PASSWORD + ); + $result = static::$client->protectedDirectory()->deleteUser('id', $user->id); + $this->assertTrue($result); + + static::$client->protectedDirectory()->delete('id', $protectedDirectory->id); + } +} diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php deleted file mode 100644 index aa368fcf..00000000 --- a/tests/ProtectedDirectoryTest.php +++ /dev/null @@ -1,84 +0,0 @@ -protectedDirectory()->add('/', static::$webspace->id); - - $this->assertIsObject($protectedDirectory); - $this->assertGreaterThan(0, $protectedDirectory->id); - - static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); - } - - public function testAddInvalidDirectory() - { - $this->expectException(\PleskX\Api\Exception::class); - $this->expectExceptionCode(1019); - - static::$_client->protectedDirectory()->add('', static::$webspace->id); - } - - public function testDelete() - { - $protectedDirectory = static::$_client->protectedDirectory()->add('/', static::$webspace->id); - - $result = static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); - $this->assertTrue($result); - } - - public function testGetById() - { - $protectedDirectory = static::$_client->protectedDirectory()->add('test', static::$webspace->id); - - $foundDirectory = static::$_client->protectedDirectory()->get('id', $protectedDirectory->id); - $this->assertEquals('test', $foundDirectory->name); - - static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); - } - - public function testGetUnknownDirectory() - { - $this->expectException(\PleskX\Api\Exception::class); - $this->expectExceptionCode(1013); - - $nonExistentDirectoryId = 99999999; - static::$_client->protectedDirectory()->get('id', $nonExistentDirectoryId); - } - - public function testAddUser() - { - $protectedDirectory = static::$_client->protectedDirectory()->add('/', static::$webspace->id); - - $user = static::$_client->protectedDirectory()->addUser($protectedDirectory, 'john', PasswordProvider::STRONG_PASSWORD); - $this->assertGreaterThan(0, $user->id); - - static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); - } - - public function testDeleteUser() - { - $protectedDirectory = static::$_client->protectedDirectory()->add('/', static::$webspace->id); - - $user = static::$_client->protectedDirectory()->addUser($protectedDirectory, 'john', PasswordProvider::STRONG_PASSWORD); - $result = static::$_client->protectedDirectory()->deleteUser('id', $user->id); - $this->assertTrue($result); - - static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); - } -} diff --git a/tests/ResellerTest.php b/tests/ResellerAbstractTest.php similarity index 61% rename from tests/ResellerTest.php rename to tests/ResellerAbstractTest.php index 3d1c0831..db404fef 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerAbstractTest.php @@ -6,13 +6,13 @@ use PleskXTest\Utility\KeyLimitChecker; use PleskXTest\Utility\PasswordProvider; -class ResellerTest extends TestCase +class ResellerAbstractTest extends AbstractTestCase { - private $_resellerProperties; + private array $resellerProperties; public function setUp(): void { - $this->_resellerProperties = [ + $this->resellerProperties = [ 'pname' => 'John Reseller', 'login' => 'reseller-unit-test', 'passwd' => PasswordProvider::STRONG_PASSWORD, @@ -21,57 +21,57 @@ public function setUp(): void public function testCreate() { - $reseller = static::$_client->reseller()->create($this->_resellerProperties); + $reseller = static::$client->reseller()->create($this->resellerProperties); $this->assertIsInt($reseller->id); $this->assertGreaterThan(0, $reseller->id); - static::$_client->reseller()->delete('id', $reseller->id); + static::$client->reseller()->delete('id', $reseller->id); } public function testDelete() { - $reseller = static::$_client->reseller()->create($this->_resellerProperties); - $result = static::$_client->reseller()->delete('id', $reseller->id); + $reseller = static::$client->reseller()->create($this->resellerProperties); + $result = static::$client->reseller()->delete('id', $reseller->id); $this->assertTrue($result); } public function testGet() { - $reseller = static::$_client->reseller()->create($this->_resellerProperties); - $resellerInfo = static::$_client->reseller()->get('id', $reseller->id); + $reseller = static::$client->reseller()->create($this->resellerProperties); + $resellerInfo = static::$client->reseller()->get('id', $reseller->id); $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); + static::$client->reseller()->delete('id', $reseller->id); } public function testGetAll() { - $keyInfo = static::$_client->server()->getKeyInfo(); + $keyInfo = static::$client->server()->getKeyInfo(); if (!KeyLimitChecker::checkByType($keyInfo, KeyLimitChecker::LIMIT_RESELLERS, 2)) { $this->markTestSkipped('License does not allow to create more than 1 reseller.'); } - static::$_client->reseller()->create([ + static::$client->reseller()->create([ 'pname' => 'John Reseller', 'login' => 'reseller-a', 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); - static::$_client->reseller()->create([ + static::$client->reseller()->create([ 'pname' => 'Mike Reseller', 'login' => 'reseller-b', 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); - $resellersInfo = static::$_client->reseller()->getAll(); + $resellersInfo = static::$client->reseller()->getAll(); $this->assertCount(2, $resellersInfo); $this->assertEquals('John Reseller', $resellersInfo[0]->personalName); $this->assertEquals('reseller-a', $resellersInfo[0]->login); - static::$_client->reseller()->delete('login', 'reseller-a'); - static::$_client->reseller()->delete('login', 'reseller-b'); + static::$client->reseller()->delete('login', 'reseller-a'); + static::$client->reseller()->delete('login', 'reseller-b'); } } diff --git a/tests/SecretKeyAbstractTest.php b/tests/SecretKeyAbstractTest.php new file mode 100644 index 00000000..e2704280 --- /dev/null +++ b/tests/SecretKeyAbstractTest.php @@ -0,0 +1,102 @@ +secretKey()->create('192.168.0.1'); + $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 testCreateAutoIp() + { + $keyId = static::$client->secretKey()->create(); + $this->assertNotEmpty($keyId); + 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'); + $keyInfo = static::$client->secretKey()->get($keyId); + + $this->assertEquals('test key', $keyInfo->description); + + static::$client->secretKey()->delete($keyId); + } + + public function testGet() + { + $keyId = static::$client->secretKey()->create('192.168.0.1'); + $keyInfo = static::$client->secretKey()->get($keyId); + + $this->assertNotEmpty($keyInfo->key); + $this->assertEquals('192.168.0.1', $keyInfo->ipAddress); + $this->assertEquals('admin', $keyInfo->login); + + static::$client->secretKey()->delete($keyId); + } + + public function testGetAll() + { + $keyIds = []; + $keyIds[] = static::$client->secretKey()->create('192.168.0.1'); + $keyIds[] = static::$client->secretKey()->create('192.168.0.2'); + + $keys = static::$client->secretKey()->getAll(); + $this->assertGreaterThanOrEqual(2, count($keys)); + + $keyIpAddresses = array_map(function ($key) { + return $key->ipAddress; + }, $keys); + $this->assertContains('192.168.0.1', $keyIpAddresses); + $this->assertContains('192.168.0.2', $keyIpAddresses); + + foreach ($keyIds as $keyId) { + static::$client->secretKey()->delete($keyId); + } + } + + public function testDelete() + { + $keyId = static::$client->secretKey()->create('192.168.0.1'); + static::$client->secretKey()->delete($keyId); + + try { + static::$client->secretKey()->get($keyId); + $this->fail("Secret key $keyId was not deleted."); + } catch (Exception $exception) { + $this->assertEquals(1013, $exception->getCode()); + } + } + + public function testListEmpty() + { + $keys = static::$client->secretKey()->getAll(); + foreach ($keys as $key) { + static::$client->secretKey()->delete($key->key); + } + + $keys = static::$client->secretKey()->getAll(); + $this->assertEquals(0, count($keys)); + } +} diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php deleted file mode 100644 index 0e04ccaa..00000000 --- a/tests/SecretKeyTest.php +++ /dev/null @@ -1,96 +0,0 @@ -secretKey()->create('192.168.0.1'); - $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 testCreateAutoIp() - { - $keyId = static::$_client->secretKey()->create(); - $this->assertNotEmpty($keyId); - 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'); - $keyInfo = static::$_client->secretKey()->get($keyId); - - $this->assertEquals('test key', $keyInfo->description); - - static::$_client->secretKey()->delete($keyId); - } - - public function testGet() - { - $keyId = static::$_client->secretKey()->create('192.168.0.1'); - $keyInfo = static::$_client->secretKey()->get($keyId); - - $this->assertNotEmpty($keyInfo->key); - $this->assertEquals('192.168.0.1', $keyInfo->ipAddress); - $this->assertEquals('admin', $keyInfo->login); - - static::$_client->secretKey()->delete($keyId); - } - - public function testGetAll() - { - $keyIds = []; - $keyIds[] = static::$_client->secretKey()->create('192.168.0.1'); - $keyIds[] = static::$_client->secretKey()->create('192.168.0.2'); - - $keys = static::$_client->secretKey()->getAll(); - $this->assertGreaterThanOrEqual(2, count($keys)); - - $keyIpAddresses = array_map(function ($key) { - return $key->ipAddress; - }, $keys); - $this->assertContains('192.168.0.1', $keyIpAddresses); - $this->assertContains('192.168.0.2', $keyIpAddresses); - - foreach ($keyIds as $keyId) { - static::$_client->secretKey()->delete($keyId); - } - } - - public function testDelete() - { - $keyId = static::$_client->secretKey()->create('192.168.0.1'); - static::$_client->secretKey()->delete($keyId); - - try { - static::$_client->secretKey()->get($keyId); - $this->fail("Secret key $keyId was not deleted."); - } catch (Exception $exception) { - $this->assertEquals(1013, $exception->getCode()); - } - } - - public function testListEmpty() - { - $keys = static::$_client->secretKey()->getAll(); - foreach ($keys as $key) { - static::$_client->secretKey()->delete($key->key); - } - - $keys = static::$_client->secretKey()->getAll(); - $this->assertEquals(0, count($keys)); - } -} diff --git a/tests/ServerTest.php b/tests/ServerAbstractTest.php similarity index 75% rename from tests/ServerTest.php rename to tests/ServerAbstractTest.php index 29be9d6c..73befea3 100644 --- a/tests/ServerTest.php +++ b/tests/ServerAbstractTest.php @@ -3,26 +3,29 @@ namespace PleskXTest; -class ServerTest extends TestCase +class ServerAbstractTest extends AbstractTestCase { public function testGetProtos() { - $protos = static::$_client->server()->getProtos(); + $protos = static::$client->server()->getProtos(); $this->assertIsArray($protos); $this->assertContains('1.6.3.0', $protos); } public function testGetGenInfo() { - $generalInfo = static::$_client->server()->getGeneralInfo(); + $generalInfo = static::$client->server()->getGeneralInfo(); $this->assertGreaterThan(0, strlen($generalInfo->serverName)); - $this->assertMatchesRegularExpression('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', strtolower($generalInfo->serverGuid)); + $this->assertMatchesRegularExpression( + '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', + strtolower($generalInfo->serverGuid) + ); $this->assertEquals('standard', $generalInfo->mode); } public function testGetPreferences() { - $preferences = static::$_client->server()->getPreferences(); + $preferences = static::$client->server()->getPreferences(); $this->assertIsNumeric($preferences->statTtl); $this->assertGreaterThan(0, $preferences->statTtl); $this->assertEquals(0, $preferences->restartApacheInterval); @@ -30,14 +33,14 @@ public function testGetPreferences() public function testGetAdmin() { - $admin = static::$_client->server()->getAdmin(); + $admin = static::$client->server()->getAdmin(); $this->assertGreaterThan(0, strlen($admin->name)); $this->assertStringContainsString('@', $admin->email); } public function testGetKeyInfo() { - $keyInfo = static::$_client->server()->getKeyInfo(); + $keyInfo = static::$client->server()->getKeyInfo(); $this->assertIsArray($keyInfo); $this->assertGreaterThan(0, count($keyInfo)); $this->assertArrayHasKey('plesk_key_id', $keyInfo); @@ -46,7 +49,7 @@ public function testGetKeyInfo() public function testGetComponents() { - $components = static::$_client->server()->getComponents(); + $components = static::$client->server()->getComponents(); $this->assertIsArray($components); $this->assertGreaterThan(0, count($components)); $this->assertArrayHasKey('psa', $components); @@ -54,7 +57,7 @@ public function testGetComponents() public function testGetServiceStates() { - $serviceStates = static::$_client->server()->getServiceStates(); + $serviceStates = static::$client->server()->getServiceStates(); $this->assertIsArray($serviceStates); $this->assertGreaterThan(0, count($serviceStates)); @@ -68,14 +71,14 @@ public function testGetServiceStates() public function testGetSessionPreferences() { - $preferences = static::$_client->server()->getSessionPreferences(); + $preferences = static::$client->server()->getSessionPreferences(); $this->assertIsNumeric($preferences->loginTimeout); $this->assertGreaterThan(0, $preferences->loginTimeout); } public function testGetShells() { - $shells = static::$_client->server()->getShells(); + $shells = static::$client->server()->getShells(); $this->assertIsArray($shells); $this->assertGreaterThan(0, count($shells)); @@ -83,14 +86,14 @@ public function testGetShells() public function testGetNetworkInterfaces() { - $netInterfaces = static::$_client->server()->getNetworkInterfaces(); + $netInterfaces = static::$client->server()->getNetworkInterfaces(); $this->assertIsArray($netInterfaces); $this->assertGreaterThan(0, count($netInterfaces)); } public function testGetStatistics() { - $stats = static::$_client->server()->getStatistics(); + $stats = static::$client->server()->getStatistics(); $this->assertIsNumeric($stats->objects->clients); $this->assertIsNumeric($stats->objects->domains); $this->assertIsNumeric($stats->objects->databases); @@ -109,7 +112,7 @@ public function testGetStatistics() public function testGetSiteIsolationConfig() { - $config = static::$_client->server()->getSiteIsolationConfig(); + $config = static::$client->server()->getSiteIsolationConfig(); $this->assertIsArray($config); $this->assertGreaterThan(0, count($config)); $this->assertArrayHasKey('php', $config); @@ -117,7 +120,7 @@ public function testGetSiteIsolationConfig() public function testGetUpdatesInfo() { - $updatesInfo = static::$_client->server()->getUpdatesInfo(); + $updatesInfo = static::$client->server()->getUpdatesInfo(); $this->assertIsBool($updatesInfo->installUpdatesAutomatically); } } diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanAbstractTest.php similarity index 64% rename from tests/ServicePlanTest.php rename to tests/ServicePlanAbstractTest.php index 5d759800..d6f72605 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanAbstractTest.php @@ -3,25 +3,25 @@ namespace PleskXTest; -class ServicePlanTest extends TestCase +class ServicePlanAbstractTest extends AbstractTestCase { public function testGet() { - $servicePlan = static::_createServicePlan(); - $servicePlanInfo = static::$_client->servicePlan()->get('id', $servicePlan->id); + $servicePlan = static::createServicePlan(); + $servicePlanInfo = static::$client->servicePlan()->get('id', $servicePlan->id); $this->assertNotEmpty($servicePlanInfo->name); $this->assertSame($servicePlan->id, $servicePlanInfo->id); - static::$_client->servicePlan()->delete('id', $servicePlan->id); + static::$client->servicePlan()->delete('id', $servicePlan->id); } public function testGetAll() { - static::_createServicePlan(); - static::_createServicePlan(); - static::_createServicePlan(); + static::createServicePlan(); + static::createServicePlan(); + static::createServicePlan(); - $servicePlans = static::$_client->servicePlan()->getAll(); + $servicePlans = static::$client->servicePlan()->getAll(); $this->assertIsArray($servicePlans); $this->assertGreaterThan(2, count($servicePlans)); $this->assertNotEmpty($servicePlans[0]->name); @@ -29,16 +29,16 @@ public function testGetAll() public function testCreateServicePlan() { - $servicePlan = static::_createServicePlan(); + $servicePlan = static::createServicePlan(); $this->assertGreaterThan(0, $servicePlan->id); - static::$_client->servicePlan()->delete('id', $servicePlan->id); + static::$client->servicePlan()->delete('id', $servicePlan->id); } public function testDelete() { - $servicePlan = static::_createServicePlan(); - $result = static::$_client->servicePlan()->delete('id', $servicePlan->id); + $servicePlan = static::createServicePlan(); + $result = static::$client->servicePlan()->delete('id', $servicePlan->id); $this->assertTrue($result); } @@ -72,9 +72,9 @@ public function testCreateComplexServicePlan() ], ]; - $servicePlan = static::$_client->servicePlan()->create($properties); + $servicePlan = static::$client->servicePlan()->create($properties); $this->assertGreaterThan(0, $servicePlan->id); - static::$_client->servicePlan()->delete('id', $servicePlan->id); + static::$client->servicePlan()->delete('id', $servicePlan->id); } } diff --git a/tests/SessionTest.php b/tests/SessionAbstractTest.php similarity index 58% rename from tests/SessionTest.php rename to tests/SessionAbstractTest.php index 4486103f..e27d7fb3 100644 --- a/tests/SessionTest.php +++ b/tests/SessionAbstractTest.php @@ -3,11 +3,11 @@ namespace PleskXTest; -class SessionTest extends TestCase +class SessionAbstractTest extends AbstractTestCase { public function testCreate() { - $sessionToken = static::$_client->session()->create('admin', '127.0.0.1'); + $sessionToken = static::$client->session()->create('admin', '127.0.0.1'); $this->assertIsString($sessionToken); $this->assertGreaterThan(10, strlen($sessionToken)); @@ -15,8 +15,8 @@ public function testCreate() public function testGet() { - $sessionId = static::$_client->server()->createSession('admin', '127.0.0.1'); - $sessions = static::$_client->session()->get(); + $sessionId = static::$client->server()->createSession('admin', '127.0.0.1'); + $sessions = static::$client->session()->get(); $this->assertArrayHasKey($sessionId, $sessions); $sessionInfo = $sessions[$sessionId]; @@ -27,9 +27,9 @@ public function testGet() public function testTerminate() { - $sessionId = static::$_client->server()->createSession('admin', '127.0.0.1'); - static::$_client->session()->terminate($sessionId); - $sessions = static::$_client->session()->get(); + $sessionId = static::$client->server()->createSession('admin', '127.0.0.1'); + static::$client->session()->terminate($sessionId); + $sessions = static::$client->session()->get(); $this->assertArrayNotHasKey($sessionId, $sessions); } } diff --git a/tests/SiteTest.php b/tests/SiteAbstractTest.php similarity index 59% rename from tests/SiteTest.php rename to tests/SiteAbstractTest.php index c1f2703b..f3ca8a66 100644 --- a/tests/SiteTest.php +++ b/tests/SiteAbstractTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\KeyLimitChecker; -class SiteTest extends TestCase +class SiteAbstractTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; @@ -13,72 +13,72 @@ class SiteTest extends TestCase public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - static::$webspace = static::_createWebspace(); + static::$webspace = static::createWebspace(); } protected function setUp(): void { parent::setUp(); - $keyInfo = static::$_client->server()->getKeyInfo(); + $keyInfo = static::$client->server()->getKeyInfo(); if (!KeyLimitChecker::checkByType($keyInfo, KeyLimitChecker::LIMIT_DOMAINS, 2)) { $this->markTestSkipped('License does not allow to create more than 1 domain.'); } } - private function _createSite($name, array $properties = []) + private function createSite($name, array $properties = []) { $properties = array_merge([ 'name' => $name, 'webspace-id' => static::$webspace->id, ], $properties); - return static::$_client->site()->create($properties); + return static::$client->site()->create($properties); } public function testCreate() { - $site = $this->_createSite('addon.dom'); + $site = $this->createSite('addon.dom'); $this->assertIsNumeric($site->id); $this->assertGreaterThan(0, $site->id); - static::$_client->site()->delete('id', $site->id); + static::$client->site()->delete('id', $site->id); } public function testDelete() { - $site = $this->_createSite('addon.dom'); + $site = $this->createSite('addon.dom'); - $result = static::$_client->site()->delete('id', $site->id); + $result = static::$client->site()->delete('id', $site->id); $this->assertTrue($result); } public function testGet() { - $site = $this->_createSite('addon.dom'); + $site = $this->createSite('addon.dom'); - $siteInfo = static::$_client->site()->get('id', $site->id); + $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); + $siteInfo = static::$client->site()->get('guid', $siteGuid); $this->assertEquals($site->id, $siteInfo->id); - static::$_client->site()->delete('id', $site->id); + static::$client->site()->delete('id', $site->id); } public function testGetHostingWoHosting() { - $site = $this->_createSite('addon.dom'); + $site = $this->createSite('addon.dom'); - $siteHosting = static::$_client->site()->getHosting('id', $site->id); + $siteHosting = static::$client->site()->getHosting('id', $site->id); $this->assertNull($siteHosting); - static::$_client->site()->delete('id', $site->id); + static::$client->site()->delete('id', $site->id); } public function testGetHostingWithHosting() @@ -88,33 +88,33 @@ public function testGetHostingWithHosting() 'www_root' => 'addon.dom', ], ]; - $site = $this->_createSite('addon.dom', $properties); + $site = $this->createSite('addon.dom', $properties); - $siteHosting = static::$_client->site()->getHosting('id', $site->id); + $siteHosting = static::$client->site()->getHosting('id', $site->id); $this->assertArrayHasKey('www_root', $siteHosting->properties); $this->assertStringEndsWith('addon.dom', $siteHosting->properties['www_root']); - static::$_client->site()->delete('id', $site->id); + static::$client->site()->delete('id', $site->id); } public function testGetAll() { - $site = $this->_createSite('addon.dom'); - $site2 = $this->_createSite('addon2.dom'); + $site = $this->createSite('addon.dom'); + $site2 = $this->createSite('addon2.dom'); - $sitesInfo = static::$_client->site()->getAll(); + $sitesInfo = static::$client->site()->getAll(); $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); + static::$client->site()->delete('id', $site->id); + static::$client->site()->delete('id', $site2->id); } public function testGetAllWithoutSites() { - $sitesInfo = static::$_client->site()->getAll(); + $sitesInfo = static::$client->site()->getAll(); $this->assertEmpty($sitesInfo); } } diff --git a/tests/SiteAliasAbstractTest.php b/tests/SiteAliasAbstractTest.php new file mode 100644 index 00000000..1a1b634d --- /dev/null +++ b/tests/SiteAliasAbstractTest.php @@ -0,0 +1,71 @@ + $name, + 'site-id' => static::$webspace->id, + ], $properties); + + return static::$client->siteAlias()->create($properties); + } + + public function testCreate() + { + $siteAlias = $this->createSiteAlias('alias.dom'); + + $this->assertIsNumeric($siteAlias->id); + $this->assertGreaterThan(0, $siteAlias->id); + + static::$client->siteAlias()->delete('id', $siteAlias->id); + } + + public function testDelete() + { + $siteAlias = $this->createSiteAlias('alias.dom'); + + $result = static::$client->siteAlias()->delete('id', $siteAlias->id); + $this->assertTrue($result); + } + + public function testGet() + { + $siteAlias = $this->createSiteAlias('alias.dom'); + + $siteAliasInfo = static::$client->siteAlias()->get('id', $siteAlias->id); + $this->assertEquals('alias.dom', $siteAliasInfo->name); + + static::$client->siteAlias()->delete('id', $siteAlias->id); + } + + public function testGetAll() + { + $siteAlias = $this->createSiteAlias('alias.dom'); + $siteAlias2 = $this->createSiteAlias('alias2.dom'); + + $siteAliasInfo = static::$client->siteAlias()->get('id', $siteAlias->id); + $this->assertEquals('alias.dom', $siteAliasInfo->name); + + $siteAliasesInfo = static::$client->siteAlias()->getAll('site-id', self::$webspace->id); + $this->assertCount(2, $siteAliasesInfo); + $this->assertEquals('alias.dom', $siteAliasesInfo[0]->name); + $this->assertEquals('alias.dom', $siteAliasesInfo[0]->asciiName); + + static::$client->siteAlias()->delete('id', $siteAlias->id); + static::$client->siteAlias()->delete('id', $siteAlias2->id); + } +} diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php deleted file mode 100644 index 645fc861..00000000 --- a/tests/SiteAliasTest.php +++ /dev/null @@ -1,71 +0,0 @@ - $name, - 'site-id' => static::$webspace->id, - ], $properties); - - return static::$_client->siteAlias()->create($properties); - } - - public function testCreate() - { - $siteAlias = $this->_createSiteAlias('alias.dom'); - - $this->assertIsNumeric($siteAlias->id); - $this->assertGreaterThan(0, $siteAlias->id); - - static::$_client->siteAlias()->delete('id', $siteAlias->id); - } - - public function testDelete() - { - $siteAlias = $this->_createSiteAlias('alias.dom'); - - $result = static::$_client->siteAlias()->delete('id', $siteAlias->id); - $this->assertTrue($result); - } - - public function testGet() - { - $siteAlias = $this->_createSiteAlias('alias.dom'); - - $siteAliasInfo = static::$_client->siteAlias()->get('id', $siteAlias->id); - $this->assertEquals('alias.dom', $siteAliasInfo->name); - - static::$_client->siteAlias()->delete('id', $siteAlias->id); - } - - public function testGetAll() - { - $siteAlias = $this->_createSiteAlias('alias.dom'); - $siteAlias2 = $this->_createSiteAlias('alias2.dom'); - - $siteAliasInfo = static::$_client->siteAlias()->get('id', $siteAlias->id); - $this->assertEquals('alias.dom', $siteAliasInfo->name); - - $siteAliasesInfo = static::$_client->siteAlias()->getAll('site-id', self::$webspace->id); - $this->assertCount(2, $siteAliasesInfo); - $this->assertEquals('alias.dom', $siteAliasesInfo[0]->name); - $this->assertEquals('alias.dom', $siteAliasesInfo[0]->asciiName); - - static::$_client->siteAlias()->delete('id', $siteAlias->id); - static::$_client->siteAlias()->delete('id', $siteAlias2->id); - } -} diff --git a/tests/SubdomainTest.php b/tests/SubdomainAbstractTest.php similarity index 51% rename from tests/SubdomainTest.php rename to tests/SubdomainAbstractTest.php index bd75f9e9..3e452166 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainAbstractTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class SubdomainTest extends TestCase +class SubdomainAbstractTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; @@ -14,8 +14,8 @@ class SubdomainTest extends TestCase public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - static::$webspace = static::_createWebspace(); - $webspaceInfo = static::$_client->webspace()->get('id', static::$webspace->id); + static::$webspace = static::createWebspace(); + $webspaceInfo = static::$client->webspace()->get('id', static::$webspace->id); static::$webspaceName = $webspaceInfo->name; } @@ -24,9 +24,9 @@ public static function setUpBeforeClass(): void * * @return \PleskX\Api\Struct\Subdomain\Info */ - private function _createSubdomain($name) + private function createSubdomain(string $name) { - return static::$_client->subdomain()->create([ + return static::$client->subdomain()->create([ 'parent' => static::$webspaceName, 'name' => $name, 'property' => [ @@ -37,53 +37,53 @@ private function _createSubdomain($name) public function testCreate() { - $subdomain = $this->_createSubdomain('sub'); + $subdomain = $this->createSubdomain('sub'); $this->assertIsInt($subdomain->id); $this->assertGreaterThan(0, $subdomain->id); - static::$_client->subdomain()->delete('id', $subdomain->id); + static::$client->subdomain()->delete('id', $subdomain->id); } public function testDelete() { - $subdomain = $this->_createSubdomain('sub'); + $subdomain = $this->createSubdomain('sub'); - $result = static::$_client->subdomain()->delete('id', $subdomain->id); + $result = static::$client->subdomain()->delete('id', $subdomain->id); $this->assertTrue($result); } public function testGet() { $name = 'sub'; - $subdomain = $this->_createSubdomain($name); + $subdomain = $this->createSubdomain($name); - $subdomainInfo = static::$_client->subdomain()->get('id', $subdomain->id); - $this->assertEquals($name.'.'.$subdomainInfo->parent, $subdomainInfo->name); + $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); + static::$client->subdomain()->delete('id', $subdomain->id); } public function testGetAll() { $name = 'sub'; $name2 = 'sub2'; - $subdomain = $this->_createSubdomain($name); - $subdomain2 = $this->_createSubdomain($name2); + $subdomain = $this->createSubdomain($name); + $subdomain2 = $this->createSubdomain($name2); - $subdomainsInfo = static::$_client->subdomain()->getAll(); + $subdomainsInfo = static::$client->subdomain()->getAll(); $this->assertCount(2, $subdomainsInfo); - $this->assertEquals($name.'.'.$subdomainsInfo[0]->parent, $subdomainsInfo[0]->name); + $this->assertEquals($name . '.' . $subdomainsInfo[0]->parent, $subdomainsInfo[0]->name); $this->assertTrue(false !== strpos($subdomainsInfo[0]->properties['www_root'], $name)); - $this->assertEquals($name2.'.'.$subdomainsInfo[1]->parent, $subdomainsInfo[1]->name); + $this->assertEquals($name2 . '.' . $subdomainsInfo[1]->parent, $subdomainsInfo[1]->name); $this->assertTrue(false !== strpos($subdomainsInfo[1]->properties['www_root'], $name2)); - static::$_client->subdomain()->delete('id', $subdomain->id); - static::$_client->subdomain()->delete('id', $subdomain2->id); + static::$client->subdomain()->delete('id', $subdomain->id); + static::$client->subdomain()->delete('id', $subdomain2->id); - $subdomainsInfo = static::$_client->subdomain()->getAll(); + $subdomainsInfo = static::$client->subdomain()->getAll(); $this->assertEmpty($subdomainsInfo); } } diff --git a/tests/UiTest.php b/tests/UiAbstractTest.php similarity index 59% rename from tests/UiTest.php rename to tests/UiAbstractTest.php index 6b997653..3e8ce04c 100644 --- a/tests/UiTest.php +++ b/tests/UiAbstractTest.php @@ -3,9 +3,9 @@ namespace PleskXTest; -class UiTest extends TestCase +class UiAbstractTest extends AbstractTestCase { - private $_customButtonProperties = [ + private array $customButtonProperties = [ 'place' => 'admin', 'url' => 'http://example.com/', 'text' => 'Example site', @@ -13,7 +13,7 @@ class UiTest extends TestCase public function testGetNavigation() { - $navigation = static::$_client->ui()->getNavigation(); + $navigation = static::$client->ui()->getNavigation(); $this->assertIsArray($navigation); $this->assertGreaterThan(0, count($navigation)); $this->assertArrayHasKey('general', $navigation); @@ -27,26 +27,26 @@ public function testGetNavigation() public function testCreateCustomButton() { - $buttonId = static::$_client->ui()->createCustomButton('admin', $this->_customButtonProperties); + $buttonId = static::$client->ui()->createCustomButton('admin', $this->customButtonProperties); $this->assertGreaterThan(0, $buttonId); - static::$_client->ui()->deleteCustomButton($buttonId); + static::$client->ui()->deleteCustomButton($buttonId); } public function testGetCustomButton() { - $buttonId = static::$_client->ui()->createCustomButton('admin', $this->_customButtonProperties); - $customButtonInfo = static::$_client->ui()->getCustomButton($buttonId); + $buttonId = static::$client->ui()->createCustomButton('admin', $this->customButtonProperties); + $customButtonInfo = static::$client->ui()->getCustomButton($buttonId); $this->assertEquals('http://example.com/', $customButtonInfo->url); $this->assertEquals('Example site', $customButtonInfo->text); - static::$_client->ui()->deleteCustomButton($buttonId); + static::$client->ui()->deleteCustomButton($buttonId); } public function testDeleteCustomButton() { - $buttonId = static::$_client->ui()->createCustomButton('admin', $this->_customButtonProperties); - $result = static::$_client->ui()->deleteCustomButton($buttonId); + $buttonId = static::$client->ui()->createCustomButton('admin', $this->customButtonProperties); + $result = static::$client->ui()->deleteCustomButton($buttonId); $this->assertTrue($result); } } diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index 46951147..851e577f 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -5,9 +5,9 @@ class KeyLimitChecker { - const LIMIT_CLIENTS = 'limit_clients'; - const LIMIT_RESELLERS = 'limit_resellers'; - const LIMIT_DOMAINS = 'limit_domains'; + public const LIMIT_CLIENTS = 'limit_clients'; + public const LIMIT_RESELLERS = 'limit_resellers'; + public const LIMIT_DOMAINS = 'limit_domains'; /** * Checks whether limit is within the required constraint. diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 1c306aa2..22bd737e 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#'; + public const STRONG_PASSWORD = 'test-&PWD*1@42!13#'; } diff --git a/tests/WebspaceTest.php b/tests/WebspaceAbstractTest.php similarity index 66% rename from tests/WebspaceTest.php rename to tests/WebspaceAbstractTest.php index af04b3e4..abe4fe0f 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceAbstractTest.php @@ -5,35 +5,35 @@ use PleskXTest\Utility\PasswordProvider; -class WebspaceTest extends TestCase +class WebspaceAbstractTest extends AbstractTestCase { public function testGetPermissionDescriptor() { - $descriptor = static::$_client->webspace()->getPermissionDescriptor(); + $descriptor = static::$client->webspace()->getPermissionDescriptor(); $this->assertIsArray($descriptor->permissions); $this->assertNotEmpty($descriptor->permissions); } public function testGetLimitDescriptor() { - $descriptor = static::$_client->webspace()->getLimitDescriptor(); + $descriptor = static::$client->webspace()->getLimitDescriptor(); $this->assertIsArray($descriptor->limits); $this->assertNotEmpty($descriptor->limits); } public function testGetDiskUsage() { - $webspace = static::_createWebspace(); - $diskusage = static::$_client->webspace()->getDiskUsage('id', $webspace->id); + $webspace = static::createWebspace(); + $diskusage = static::$client->webspace()->getDiskUsage('id', $webspace->id); $this->assertObjectHasAttribute('httpdocs', $diskusage); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testGetPhysicalHostingDescriptor() { - $descriptor = static::$_client->webspace()->getPhysicalHostingDescriptor(); + $descriptor = static::$client->webspace()->getPhysicalHostingDescriptor(); $this->assertIsArray($descriptor->properties); $this->assertNotEmpty($descriptor->properties); @@ -44,53 +44,53 @@ public function testGetPhysicalHostingDescriptor() public function testGetPhpSettings() { - $webspace = static::_createWebspace(); - $info = static::$_client->webspace()->getPhpSettings('id', $webspace->id); + $webspace = static::createWebspace(); + $info = static::$client->webspace()->getPhpSettings('id', $webspace->id); $this->assertArrayHasKey('open_basedir', $info->properties); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testGetLimits() { - $webspace = static::_createWebspace(); - $limits = static::$_client->webspace()->getLimits('id', $webspace->id); + $webspace = static::createWebspace(); + $limits = static::$client->webspace()->getLimits('id', $webspace->id); $this->assertIsArray($limits->limits); $this->assertNotEmpty($limits->limits); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testCreateWebspace() { - $webspace = static::_createWebspace(); + $webspace = static::createWebspace(); $this->assertGreaterThan(0, $webspace->id); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testDelete() { - $webspace = static::_createWebspace(); - $result = static::$_client->webspace()->delete('id', $webspace->id); + $webspace = static::createWebspace(); + $result = static::$client->webspace()->delete('id', $webspace->id); $this->assertTrue($result); } public function testDeleteByName() { - $webspace = static::_createWebspace(); - $result = static::$_client->webspace()->delete('name', $webspace->name); + $webspace = static::createWebspace(); + $result = static::$client->webspace()->delete('name', $webspace->name); $this->assertTrue($result); } public function testRequestCreateWebspace() { - $handlers = static::$_client->phpHandler()->getAll(); + $handlers = static::$client->phpHandler()->getAll(); $enabledHandlers = array_filter($handlers, function ($handler) { return $handler->handlerStatus !== 'disabled'; }); @@ -103,7 +103,7 @@ public function testRequestCreateWebspace() 'name' => 'webspace-test-full.test', 'htype' => 'vrt_hst', 'status' => '0', - 'ip_address' => [static::_getIpAddress()], + 'ip_address' => [static::getIpAddress()], ], 'hosting' => [ 'vrt_hst' => [ @@ -121,7 +121,7 @@ public function testRequestCreateWebspace() 'value' => PasswordProvider::STRONG_PASSWORD, ], ], - 'ip_address' => static::_getIpAddress(), + 'ip_address' => static::getIpAddress(), ], ], 'limits' => [ @@ -165,17 +165,17 @@ public function testRequestCreateWebspace() ], ]; - $webspace = static::$_client->webspace()->request($request); + $webspace = static::$client->webspace()->request($request); $this->assertGreaterThan(0, $webspace->id); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testGet() { - $webspace = static::_createWebspace(); - $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + $webspace = static::createWebspace(); + $webspaceInfo = static::$client->webspace()->get('id', $webspace->id); $this->assertNotEmpty($webspaceInfo->name); $this->assertEquals(0, $webspaceInfo->realSize); @@ -185,41 +185,41 @@ public function testGet() $this->assertMatchesRegularExpression("/^\d{4}-\d{2}-\d{2}$/", $webspaceInfo->creationDate); $this->assertEquals($webspace->id, $webspaceInfo->id); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testEnable() { - $webspace = static::_createWebspace(); + $webspace = static::createWebspace(); - static::$_client->webspace()->disable('id', $webspace->id); - static::$_client->webspace()->enable('id', $webspace->id); - $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + static::$client->webspace()->disable('id', $webspace->id); + static::$client->webspace()->enable('id', $webspace->id); + $webspaceInfo = static::$client->webspace()->get('id', $webspace->id); $this->assertTrue($webspaceInfo->enabled); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testDisable() { - $webspace = static::_createWebspace(); + $webspace = static::createWebspace(); - static::$_client->webspace()->disable('id', $webspace->id); - $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + static::$client->webspace()->disable('id', $webspace->id); + $webspaceInfo = static::$client->webspace()->get('id', $webspace->id); $this->assertFalse($webspaceInfo->enabled); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } public function testSetProperties() { - $webspace = static::_createWebspace(); - static::$_client->webspace()->setProperties('id', $webspace->id, [ + $webspace = static::createWebspace(); + static::$client->webspace()->setProperties('id', $webspace->id, [ 'description' => 'Test Description', ]); - $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + $webspaceInfo = static::$client->webspace()->get('id', $webspace->id); $this->assertEquals('Test Description', $webspaceInfo->description); - static::$_client->webspace()->delete('id', $webspace->id); + static::$client->webspace()->delete('id', $webspace->id); } } From ebeace71ea435501c5847f7753aea0c3e71d2daf Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 26 Oct 2021 23:11:53 +0700 Subject: [PATCH 033/126] Replace StyleCI with phpcs --- .styleci.yml | 6 ------ README.md | 1 - composer.json | 5 ++++- 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 518d094f..00000000 --- a/.styleci.yml +++ /dev/null @@ -1,6 +0,0 @@ -preset: recommended - -disabled: - - align_double_arrow - - phpdoc_align - - blank_line_after_opening_tag diff --git a/README.md b/README.md index ac6c2e9d..25fa379a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![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) PHP object-oriented library for Plesk XML-RPC API. diff --git a/composer.json b/composer.json index 6bc965b5..ef6f9710 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,10 @@ "scripts": { "test": "phpunit", "test:watch": "phpunit-watcher watch", - "lint": "psalm" + "lint": [ + "psalm", + "phpcs" + ] }, "autoload": { "psr-4": { From 639560d3884a14e9c9f139e1fa6cdaa09b5bc993 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 27 Oct 2021 10:42:48 +0700 Subject: [PATCH 034/126] Fix test class names due to incorrect automatic refactoring --- tests/{ApiClientAbstractTest.php => ApiClientTest.php} | 2 +- tests/{CertificateAbstractTest.php => CertificateTest.php} | 2 +- tests/{CustomerAbstractTest.php => CustomerTest.php} | 2 +- .../{DatabaseServerAbstractTest.php => DatabaseServerTest.php} | 2 +- tests/{DatabaseAbstractTest.php => DatabaseTest.php} | 2 +- tests/{DnsTemplateAbstractTest.php => DnsTemplateTest.php} | 2 +- tests/{DnsAbstractTest.php => DnsTest.php} | 2 +- tests/{EventLogAbstractTest.php => EventLogTest.php} | 2 +- tests/{IpAbstractTest.php => IpTest.php} | 2 +- tests/{LocaleAbstractTest.php => LocaleTest.php} | 2 +- tests/{MailAbstractTest.php => MailTest.php} | 2 +- tests/{PhpHandlerAbstractTest.php => PhpHandlerTest.php} | 2 +- ...ctedDirectoryAbstractTest.php => ProtectedDirectoryTest.php} | 2 +- tests/{ResellerAbstractTest.php => ResellerTest.php} | 2 +- tests/{SecretKeyAbstractTest.php => SecretKeyTest.php} | 2 +- tests/{ServerAbstractTest.php => ServerTest.php} | 2 +- tests/{ServicePlanAbstractTest.php => ServicePlanTest.php} | 2 +- tests/{SessionAbstractTest.php => SessionTest.php} | 2 +- tests/{SiteAliasAbstractTest.php => SiteAliasTest.php} | 2 +- tests/{SiteAbstractTest.php => SiteTest.php} | 2 +- tests/{SubdomainAbstractTest.php => SubdomainTest.php} | 2 +- tests/{UiAbstractTest.php => UiTest.php} | 2 +- tests/{WebspaceAbstractTest.php => WebspaceTest.php} | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) rename tests/{ApiClientAbstractTest.php => ApiClientTest.php} (99%) rename tests/{CertificateAbstractTest.php => CertificateTest.php} (93%) rename tests/{CustomerAbstractTest.php => CustomerTest.php} (98%) rename tests/{DatabaseServerAbstractTest.php => DatabaseServerTest.php} (93%) rename tests/{DatabaseAbstractTest.php => DatabaseTest.php} (99%) rename tests/{DnsTemplateAbstractTest.php => DnsTemplateTest.php} (97%) rename tests/{DnsAbstractTest.php => DnsTest.php} (99%) rename tests/{EventLogAbstractTest.php => EventLogTest.php} (93%) rename tests/{IpAbstractTest.php => IpTest.php} (88%) rename tests/{LocaleAbstractTest.php => LocaleTest.php} (90%) rename tests/{MailAbstractTest.php => MailTest.php} (98%) rename tests/{PhpHandlerAbstractTest.php => PhpHandlerTest.php} (94%) rename tests/{ProtectedDirectoryAbstractTest.php => ProtectedDirectoryTest.php} (97%) rename tests/{ResellerAbstractTest.php => ResellerTest.php} (98%) rename tests/{SecretKeyAbstractTest.php => SecretKeyTest.php} (98%) rename tests/{ServerAbstractTest.php => ServerTest.php} (98%) rename tests/{ServicePlanAbstractTest.php => ServicePlanTest.php} (97%) rename tests/{SessionAbstractTest.php => SessionTest.php} (95%) rename tests/{SiteAliasAbstractTest.php => SiteAliasTest.php} (97%) rename tests/{SiteAbstractTest.php => SiteTest.php} (98%) rename tests/{SubdomainAbstractTest.php => SubdomainTest.php} (98%) rename tests/{UiAbstractTest.php => UiTest.php} (97%) rename tests/{WebspaceAbstractTest.php => WebspaceTest.php} (99%) diff --git a/tests/ApiClientAbstractTest.php b/tests/ApiClientTest.php similarity index 99% rename from tests/ApiClientAbstractTest.php rename to tests/ApiClientTest.php index e1943349..7931731b 100644 --- a/tests/ApiClientAbstractTest.php +++ b/tests/ApiClientTest.php @@ -5,7 +5,7 @@ use PleskX\Api\Client\Exception; -class ApiClientAbstractTest extends AbstractTestCase +class ApiClientTest extends AbstractTestCase { public function testWrongProtocol() { diff --git a/tests/CertificateAbstractTest.php b/tests/CertificateTest.php similarity index 93% rename from tests/CertificateAbstractTest.php rename to tests/CertificateTest.php index b83c0979..fbb94a16 100644 --- a/tests/CertificateAbstractTest.php +++ b/tests/CertificateTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class CertificateAbstractTest extends AbstractTestCase +class CertificateTest extends AbstractTestCase { public function testGenerate() { diff --git a/tests/CustomerAbstractTest.php b/tests/CustomerTest.php similarity index 98% rename from tests/CustomerAbstractTest.php rename to tests/CustomerTest.php index 428e44cc..5cffa152 100644 --- a/tests/CustomerAbstractTest.php +++ b/tests/CustomerTest.php @@ -6,7 +6,7 @@ use PleskXTest\Utility\KeyLimitChecker; use PleskXTest\Utility\PasswordProvider; -class CustomerAbstractTest extends AbstractTestCase +class CustomerTest extends AbstractTestCase { private array $customerProperties; diff --git a/tests/DatabaseServerAbstractTest.php b/tests/DatabaseServerTest.php similarity index 93% rename from tests/DatabaseServerAbstractTest.php rename to tests/DatabaseServerTest.php index a6288188..71b2e2f3 100644 --- a/tests/DatabaseServerAbstractTest.php +++ b/tests/DatabaseServerTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class DatabaseServerAbstractTest extends AbstractTestCase +class DatabaseServerTest extends AbstractTestCase { public function testGetSupportedTypes() { diff --git a/tests/DatabaseAbstractTest.php b/tests/DatabaseTest.php similarity index 99% rename from tests/DatabaseAbstractTest.php rename to tests/DatabaseTest.php index c02632b7..50075e6e 100644 --- a/tests/DatabaseAbstractTest.php +++ b/tests/DatabaseTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\PasswordProvider; -class DatabaseAbstractTest extends AbstractTestCase +class DatabaseTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/DnsTemplateAbstractTest.php b/tests/DnsTemplateTest.php similarity index 97% rename from tests/DnsTemplateAbstractTest.php rename to tests/DnsTemplateTest.php index e7536bc6..69b06d0a 100644 --- a/tests/DnsTemplateAbstractTest.php +++ b/tests/DnsTemplateTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class DnsTemplateAbstractTest extends AbstractTestCase +class DnsTemplateTest extends AbstractTestCase { private static bool $isDnsSupported; diff --git a/tests/DnsAbstractTest.php b/tests/DnsTest.php similarity index 99% rename from tests/DnsAbstractTest.php rename to tests/DnsTest.php index ec63f766..1ab6f746 100644 --- a/tests/DnsAbstractTest.php +++ b/tests/DnsTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class DnsAbstractTest extends AbstractTestCase +class DnsTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/EventLogAbstractTest.php b/tests/EventLogTest.php similarity index 93% rename from tests/EventLogAbstractTest.php rename to tests/EventLogTest.php index 283dd25a..bf2eb28b 100644 --- a/tests/EventLogAbstractTest.php +++ b/tests/EventLogTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class EventLogAbstractTest extends AbstractTestCase +class EventLogTest extends AbstractTestCase { public function testGet() { diff --git a/tests/IpAbstractTest.php b/tests/IpTest.php similarity index 88% rename from tests/IpAbstractTest.php rename to tests/IpTest.php index c6147fc1..a9bc70f4 100644 --- a/tests/IpAbstractTest.php +++ b/tests/IpTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class IpAbstractTest extends AbstractTestCase +class IpTest extends AbstractTestCase { public function testGet() { diff --git a/tests/LocaleAbstractTest.php b/tests/LocaleTest.php similarity index 90% rename from tests/LocaleAbstractTest.php rename to tests/LocaleTest.php index be3bc07b..a9a480a7 100644 --- a/tests/LocaleAbstractTest.php +++ b/tests/LocaleTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class LocaleAbstractTest extends AbstractTestCase +class LocaleTest extends AbstractTestCase { public function testGet() { diff --git a/tests/MailAbstractTest.php b/tests/MailTest.php similarity index 98% rename from tests/MailAbstractTest.php rename to tests/MailTest.php index f6370160..5e48e516 100644 --- a/tests/MailAbstractTest.php +++ b/tests/MailTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\PasswordProvider; -class MailAbstractTest extends AbstractTestCase +class MailTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/PhpHandlerAbstractTest.php b/tests/PhpHandlerTest.php similarity index 94% rename from tests/PhpHandlerAbstractTest.php rename to tests/PhpHandlerTest.php index f950e057..8c94c08e 100644 --- a/tests/PhpHandlerAbstractTest.php +++ b/tests/PhpHandlerTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class PhpHandlerAbstractTest extends AbstractTestCase +class PhpHandlerTest extends AbstractTestCase { public function testGet() { diff --git a/tests/ProtectedDirectoryAbstractTest.php b/tests/ProtectedDirectoryTest.php similarity index 97% rename from tests/ProtectedDirectoryAbstractTest.php rename to tests/ProtectedDirectoryTest.php index 0b94f85d..6fb76de2 100644 --- a/tests/ProtectedDirectoryAbstractTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\PasswordProvider; -class ProtectedDirectoryAbstractTest extends AbstractTestCase +class ProtectedDirectoryTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/ResellerAbstractTest.php b/tests/ResellerTest.php similarity index 98% rename from tests/ResellerAbstractTest.php rename to tests/ResellerTest.php index db404fef..025a77a7 100644 --- a/tests/ResellerAbstractTest.php +++ b/tests/ResellerTest.php @@ -6,7 +6,7 @@ use PleskXTest\Utility\KeyLimitChecker; use PleskXTest\Utility\PasswordProvider; -class ResellerAbstractTest extends AbstractTestCase +class ResellerTest extends AbstractTestCase { private array $resellerProperties; diff --git a/tests/SecretKeyAbstractTest.php b/tests/SecretKeyTest.php similarity index 98% rename from tests/SecretKeyAbstractTest.php rename to tests/SecretKeyTest.php index e2704280..be5dd1b7 100644 --- a/tests/SecretKeyAbstractTest.php +++ b/tests/SecretKeyTest.php @@ -5,7 +5,7 @@ use PleskX\Api\Exception; -class SecretKeyAbstractTest extends AbstractTestCase +class SecretKeyTest extends AbstractTestCase { public function testCreate() { diff --git a/tests/ServerAbstractTest.php b/tests/ServerTest.php similarity index 98% rename from tests/ServerAbstractTest.php rename to tests/ServerTest.php index 73befea3..217d2315 100644 --- a/tests/ServerAbstractTest.php +++ b/tests/ServerTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class ServerAbstractTest extends AbstractTestCase +class ServerTest extends AbstractTestCase { public function testGetProtos() { diff --git a/tests/ServicePlanAbstractTest.php b/tests/ServicePlanTest.php similarity index 97% rename from tests/ServicePlanAbstractTest.php rename to tests/ServicePlanTest.php index d6f72605..56bc96c0 100644 --- a/tests/ServicePlanAbstractTest.php +++ b/tests/ServicePlanTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class ServicePlanAbstractTest extends AbstractTestCase +class ServicePlanTest extends AbstractTestCase { public function testGet() { diff --git a/tests/SessionAbstractTest.php b/tests/SessionTest.php similarity index 95% rename from tests/SessionAbstractTest.php rename to tests/SessionTest.php index e27d7fb3..a0a42faf 100644 --- a/tests/SessionAbstractTest.php +++ b/tests/SessionTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class SessionAbstractTest extends AbstractTestCase +class SessionTest extends AbstractTestCase { public function testCreate() { diff --git a/tests/SiteAliasAbstractTest.php b/tests/SiteAliasTest.php similarity index 97% rename from tests/SiteAliasAbstractTest.php rename to tests/SiteAliasTest.php index 1a1b634d..64da0a53 100644 --- a/tests/SiteAliasAbstractTest.php +++ b/tests/SiteAliasTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class SiteAliasAbstractTest extends AbstractTestCase +class SiteAliasTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/SiteAbstractTest.php b/tests/SiteTest.php similarity index 98% rename from tests/SiteAbstractTest.php rename to tests/SiteTest.php index f3ca8a66..0dc091f8 100644 --- a/tests/SiteAbstractTest.php +++ b/tests/SiteTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\KeyLimitChecker; -class SiteAbstractTest extends AbstractTestCase +class SiteTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/SubdomainAbstractTest.php b/tests/SubdomainTest.php similarity index 98% rename from tests/SubdomainAbstractTest.php rename to tests/SubdomainTest.php index 3e452166..474dbba8 100644 --- a/tests/SubdomainAbstractTest.php +++ b/tests/SubdomainTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class SubdomainAbstractTest extends AbstractTestCase +class SubdomainTest extends AbstractTestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; diff --git a/tests/UiAbstractTest.php b/tests/UiTest.php similarity index 97% rename from tests/UiAbstractTest.php rename to tests/UiTest.php index 3e8ce04c..03a3d44e 100644 --- a/tests/UiAbstractTest.php +++ b/tests/UiTest.php @@ -3,7 +3,7 @@ namespace PleskXTest; -class UiAbstractTest extends AbstractTestCase +class UiTest extends AbstractTestCase { private array $customButtonProperties = [ 'place' => 'admin', diff --git a/tests/WebspaceAbstractTest.php b/tests/WebspaceTest.php similarity index 99% rename from tests/WebspaceAbstractTest.php rename to tests/WebspaceTest.php index abe4fe0f..01e63323 100644 --- a/tests/WebspaceAbstractTest.php +++ b/tests/WebspaceTest.php @@ -5,7 +5,7 @@ use PleskXTest\Utility\PasswordProvider; -class WebspaceAbstractTest extends AbstractTestCase +class WebspaceTest extends AbstractTestCase { public function testGetPermissionDescriptor() { From bd32dba37e56bb5a3f36118145d4729fbc6838b3 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 27 Oct 2021 11:16:54 +0700 Subject: [PATCH 035/126] Replace docblock with type hints in tests to enforce type checks --- tests/AbstractTestCase.php | 25 ++++++++++--------------- tests/DatabaseTest.php | 17 +++-------------- tests/DnsTest.php | 12 +++++------- tests/MailTest.php | 9 ++------- tests/ProtectedDirectoryTest.php | 3 +-- tests/SiteAliasTest.php | 5 ++--- tests/SiteTest.php | 5 ++--- tests/SubdomainTest.php | 14 +++----------- 8 files changed, 28 insertions(+), 62 deletions(-) diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 435ca224..f25f8b03 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -3,15 +3,16 @@ namespace PleskXTest; +use PHPUnit\Framework\TestCase; +use PleskX\Api\Client; use PleskXTest\Utility\PasswordProvider; -abstract class AbstractTestCase extends \PHPUnit\Framework\TestCase +abstract class AbstractTestCase extends TestCase { - /** @var \PleskX\Api\Client */ - protected static $client; + protected static Client $client; - private static $webspaces = []; - private static $servicePlans = []; + private static array $webspaces = []; + private static array $servicePlans = []; public static function setUpBeforeClass(): void { @@ -27,7 +28,7 @@ public static function setUpBeforeClass(): void list($host, $port, $scheme) = [$parsedUrl['host'], $parsedUrl['port'], $parsedUrl['scheme']]; } - static::$client = new \PleskX\Api\Client($host, $port, $scheme); + static::$client = new Client($host, $port, $scheme); static::$client->setCredentials($login, $password); $proxy = getenv('REMOTE_PROXY'); @@ -55,10 +56,7 @@ public static function tearDownAfterClass(): void } } - /** - * @return string - */ - protected static function getIpAddress() + protected static function getIpAddress(): string { $ips = static::$client->ip()->get(); $ipInfo = reset($ips); @@ -66,10 +64,7 @@ protected static function getIpAddress() return $ipInfo->ipAddress; } - /** - * @return \PleskX\Api\Struct\Webspace\Info - */ - protected static function createWebspace() + protected static function createWebspace(): \PleskX\Api\Struct\Webspace\Info { $id = uniqid(); $webspace = static::$client->webspace()->create( @@ -87,7 +82,7 @@ protected static function createWebspace() return $webspace; } - protected static function createServicePlan() + protected static function createServicePlan(): \PleskX\Api\Struct\ServicePlan\Info { $id = uniqid(); $servicePlan = static::$client->servicePlan()->create(['name' => "test{$id}plan"]); diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 50075e6e..f87ef721 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -7,8 +7,7 @@ class DatabaseTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; + private static \PleskX\Api\Struct\Webspace\Info $webspace; public static function setUpBeforeClass(): void { @@ -207,12 +206,7 @@ public function testDeleteUser() static::$client->database()->delete('id', $database->id); } - /** - * @param array $params - * - * @return \PleskX\Api\Struct\Database\Info - */ - private function createDatabase(array $params) + private function createDatabase(array $params): \PleskX\Api\Struct\Database\Info { $database = static::$client->database()->create($params); $this->assertIsInt($database->id); @@ -221,12 +215,7 @@ private function createDatabase(array $params) return $database; } - /** - * @param array $params - * - * @return \PleskX\Api\Struct\Database\UserInfo - */ - private function createUser(array $params) + private function createUser(array $params): \PleskX\Api\Struct\Database\UserInfo { $user = static::$client->database()->createUser($params); $this->assertIsInt($user->id); diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 1ab6f746..b7f84fee 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -5,10 +5,8 @@ class DnsTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; - - private static $isDnsSupported; + private static \PleskX\Api\Struct\Webspace\Info $webspace; + private static bool $isDnsSupported; public static function setUpBeforeClass(): void { @@ -45,9 +43,9 @@ public function testCreate() } /** - * @return \PleskX\Api\XmlResponse[] + * @return \SimpleXMLElement[] */ - public function testBulkCreate() + public function testBulkCreate(): array { $response = static::$client->dns()->bulkCreate([ [ @@ -84,7 +82,7 @@ public function testBulkCreate() /** * @depends testBulkCreate * - * @param \PleskX\Api\XmlResponse[] $createdRecords + * @param \SimpleXMLElement[] $createdRecords */ public function testBulkDelete(array $createdRecords) { diff --git a/tests/MailTest.php b/tests/MailTest.php index 5e48e516..4afd05ff 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -7,13 +7,8 @@ class MailTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; - - /** - * @var bool - */ - private static $isMailSupported; + private static \PleskX\Api\Struct\Webspace\Info $webspace; + private static bool $isMailSupported; public static function setUpBeforeClass(): void { diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 6fb76de2..319c079b 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -7,8 +7,7 @@ class ProtectedDirectoryTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; + private static \PleskX\Api\Struct\Webspace\Info $webspace; public static function setUpBeforeClass(): void { diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php index 64da0a53..4538d104 100644 --- a/tests/SiteAliasTest.php +++ b/tests/SiteAliasTest.php @@ -5,8 +5,7 @@ class SiteAliasTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; + private static \PleskX\Api\Struct\Webspace\Info $webspace; public static function setUpBeforeClass(): void { @@ -14,7 +13,7 @@ public static function setUpBeforeClass(): void static::$webspace = static::createWebspace(); } - private function createSiteAlias($name, array $properties = []) + private function createSiteAlias($name, array $properties = []): \PleskX\Api\Struct\SiteAlias\Info { $properties = array_merge([ 'name' => $name, diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 0dc091f8..f53f1f52 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -7,8 +7,7 @@ class SiteTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; + private static \PleskX\Api\Struct\Webspace\Info $webspace; public static function setUpBeforeClass(): void { @@ -27,7 +26,7 @@ protected function setUp(): void } } - private function createSite($name, array $properties = []) + private function createSite($name, array $properties = []): \PleskX\Api\Struct\Site\Info { $properties = array_merge([ 'name' => $name, diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 474dbba8..8b5e1752 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -5,11 +5,8 @@ class SubdomainTest extends AbstractTestCase { - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; - - /** @var string */ - private static $webspaceName; + private static \PleskX\Api\Struct\Webspace\Info $webspace; + private static string $webspaceName; public static function setUpBeforeClass(): void { @@ -19,12 +16,7 @@ public static function setUpBeforeClass(): void static::$webspaceName = $webspaceInfo->name; } - /** - * @param string $name - * - * @return \PleskX\Api\Struct\Subdomain\Info - */ - private function createSubdomain(string $name) + private function createSubdomain(string $name): \PleskX\Api\Struct\Subdomain\Info { return static::$client->subdomain()->create([ 'parent' => static::$webspaceName, From 4191ffd5c00dccea7f8e9ea22faaac4885b49d28 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 29 Oct 2021 12:45:40 +0700 Subject: [PATCH 036/126] Enforce type checks for better code quality --- src/Api/Operator.php | 6 ++-- src/Api/Operator/Certificate.php | 7 +--- src/Api/Operator/Customer.php | 13 +++---- src/Api/Operator/Database.php | 46 +++++++------------------ src/Api/Operator/DatabaseServer.php | 11 +++--- src/Api/Operator/Dns.php | 9 ++--- src/Api/Operator/DnsTemplate.php | 6 ++-- src/Api/Operator/EventLog.php | 9 ++--- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Mail.php | 22 +++--------- src/Api/Operator/ProtectedDirectory.php | 15 +++----- src/Api/Operator/Reseller.php | 13 +++---- src/Api/Operator/SecretKey.php | 26 +++----------- src/Api/Operator/Server.php | 6 ---- src/Api/Operator/ServicePlan.php | 15 +++----- src/Api/Operator/Session.php | 17 ++------- src/Api/Operator/Site.php | 15 +++----- src/Api/Operator/SiteAlias.php | 12 ++----- src/Api/Operator/Subdomain.php | 11 ++---- src/Api/Operator/Ui.php | 27 +++------------ src/Api/XmlResponse.php | 2 +- 21 files changed, 75 insertions(+), 215 deletions(-) diff --git a/src/Api/Operator.php b/src/Api/Operator.php index b22768b4..8cfb656e 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -27,7 +27,7 @@ public function __construct(Client $client) * * @return XmlResponse */ - public function request($request, $mode = Client::RESPONSE_SHORT) + public function request($request, $mode = Client::RESPONSE_SHORT): XmlResponse { $wrapperTag = $this->wrapperTag; @@ -69,9 +69,9 @@ protected function deleteBy(string $field, $value, string $deleteMethodName = 'd * @param int|string|null $value * @param callable|null $filter * - * @return mixed + * @return array */ - protected function getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null) + protected function getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index cb7dacb3..25bc2b1f 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -7,12 +7,7 @@ class Certificate extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function generate($properties) + public function generate(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('generate')->addChild('info'); diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index be58f919..f927c594 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -7,12 +7,7 @@ class Customer extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create($properties) + public function create(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add')->addChild('gen_info'); @@ -32,7 +27,7 @@ public function create($properties) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value); } @@ -43,7 +38,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); @@ -53,7 +48,7 @@ public function get($field, $value) /** * @return Struct\GeneralInfo[] */ - public function getAll() + public function getAll(): array { return $this->getItems(Struct\GeneralInfo::class, 'gen_info'); } diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index dd5ddc6e..b2b64ef7 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -4,36 +4,21 @@ namespace PleskX\Api\Operator; use PleskX\Api\Struct\Database as Struct; +use PleskX\Api\XmlResponse; class Database extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create($properties) + public function create(array $properties): Struct\Info { return new Struct\Info($this->process('add-db', $properties)); } - /** - * @param array $properties - * - * @return Struct\UserInfo - */ - public function createUser($properties) + public function createUser(array $properties): Struct\UserInfo { return new Struct\UserInfo($this->process('add-db-user', $properties)); } - /** - * @param string $command - * @param array $properties - * - * @return \PleskX\Api\XmlResponse - */ - private function process($command, array $properties) + private function process(string $command, array $properties): XmlResponse { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild($command); @@ -49,12 +34,7 @@ private function process($command, array $properties) return $this->client->request($packet); } - /** - * @param array $properties - * - * @return bool - */ - public function updateUser(array $properties) + public function updateUser(array $properties): bool { $response = $this->process('set-db-user', $properties); @@ -67,7 +47,7 @@ public function updateUser(array $properties) * * @return Struct\Info */ - public function get($field, $value) + public function get(string $field, $value): Struct\Info { $items = $this->getAll($field, $value); @@ -80,7 +60,7 @@ public function get($field, $value) * * @return Struct\UserInfo */ - public function getUser($field, $value) + public function getUser(string $field, $value): Struct\UserInfo { $items = $this->getAllUsers($field, $value); @@ -93,7 +73,7 @@ public function getUser($field, $value) * * @return Struct\Info[] */ - public function getAll($field, $value) + public function getAll(string $field, $value): array { $response = $this->getBy('get-db', $field, $value); $items = []; @@ -110,7 +90,7 @@ public function getAll($field, $value) * * @return Struct\UserInfo[] */ - public function getAllUsers($field, $value) + public function getAllUsers(string $field, $value): array { $response = $this->getBy('get-db-users', $field, $value); $items = []; @@ -126,9 +106,9 @@ public function getAllUsers($field, $value) * @param string $field * @param int|string $value * - * @return \PleskX\Api\XmlResponse + * @return XmlResponse */ - private function getBy(string $command, string $field, $value) + private function getBy(string $command, string $field, $value): XmlResponse { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild($command); @@ -145,7 +125,7 @@ private function getBy(string $command, string $field, $value) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value, 'del-db'); } @@ -156,7 +136,7 @@ public function delete($field, $value) * * @return bool */ - public function deleteUser($field, $value) + public function deleteUser(string $field, $value): bool { return $this->deleteBy($field, $value, 'del-db-user'); } diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 09c7f6ce..6b8066a0 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -9,10 +9,7 @@ class DatabaseServer extends \PleskX\Api\Operator { protected string $wrapperTag = 'db_server'; - /** - * @return array - */ - public function getSupportedTypes() + public function getSupportedTypes(): array { $response = $this->request('get-supported-types'); @@ -25,7 +22,7 @@ public function getSupportedTypes() * * @return Struct\Info */ - public function get(string $field, $value) + public function get(string $field, $value): Struct\Info { $items = $this->getBy($field, $value); @@ -35,7 +32,7 @@ public function get(string $field, $value) /** * @return Struct\Info[] */ - public function getAll() + public function getAll(): array { return $this->getBy(); } @@ -46,7 +43,7 @@ public function getAll() * * @return Struct\Info[] */ - private function getBy($field = null, $value = null) + private function getBy($field = null, $value = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 6a193dc6..ed3db23a 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -7,12 +7,7 @@ class Dns extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create($properties) + public function create(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add_rec'); @@ -58,7 +53,7 @@ public function bulkCreate(array $records): array * * @return Struct\Info */ - public function get(string $field, $value) + public function get(string $field, $value): Struct\Info { $items = $this->getAll($field, $value); diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index a20f4e57..7c2d014c 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -14,7 +14,7 @@ class DnsTemplate extends \PleskX\Api\Operator * * @return Struct\Info */ - public function create(array $properties) + public function create(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add_rec'); @@ -31,9 +31,9 @@ public function create(array $properties) * @param string $field * @param int|string $value * - * @return Struct\Info|null + * @return Struct\Info */ - public function get($field, $value) + public function get(string $field, $value): Struct\Info { $items = $this->getAll($field, $value); diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 823a97fe..43adb05f 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -12,7 +12,7 @@ class EventLog extends \PleskX\Api\Operator /** * @return Struct\Event[] */ - public function get() + public function get(): array { $records = []; $response = $this->request('get'); @@ -27,7 +27,7 @@ public function get() /** * @return Struct\DetailedEvent[] */ - public function getDetailedLog() + public function getDetailedLog(): array { $records = []; $response = $this->request('get_events'); @@ -39,10 +39,7 @@ public function getDetailedLog() return $records; } - /** - * @return int - */ - public function getLastId() + public function getLastId(): int { return (int) $this->request('get-last-id')->getValue('id'); } diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 9e500a54..1c1667bd 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -10,7 +10,7 @@ class Ip extends \PleskX\Api\Operator /** * @return Struct\Info[] */ - public function get() + public function get(): array { $ips = []; $packet = $this->client->getPacket(); diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 5986a8b8..dadd0639 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -9,15 +9,7 @@ class Mail extends Operator { - /** - * @param string $name - * @param int $siteId - * @param bool $mailbox - * @param string $password - * - * @return Struct\Info - */ - public function create($name, $siteId, $mailbox = false, $password = '') + public function create(string $name, int $siteId, bool $mailbox = false, string $password = ''): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('create'); @@ -45,7 +37,7 @@ public function create($name, $siteId, $mailbox = false, $password = '') * * @return bool */ - public function delete(string $field, $value, $siteId): bool + public function delete(string $field, $value, int $siteId): bool { $packet = $this->client->getPacket(); $filter = $packet->addChild($this->wrapperTag)->addChild('remove')->addChild('filter'); @@ -58,13 +50,7 @@ public function delete(string $field, $value, $siteId): bool return 'ok' === (string) $response->status; } - /** - * @param string $name - * @param int $siteId - * - * @return Struct\GeneralInfo - */ - public function get($name, $siteId) + public function get(string $name, int $siteId): Struct\GeneralInfo { $items = $this->getAll($siteId, $name); @@ -77,7 +63,7 @@ public function get($name, $siteId) * * @return Struct\GeneralInfo[] */ - public function getAll($siteId, $name = null) + public function getAll(int $siteId, $name = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get_info'); diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 529b7e3e..a0dbb776 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -11,14 +11,7 @@ class ProtectedDirectory extends Operator { protected string $wrapperTag = 'protected-dir'; - /** - * @param string $name - * @param int $siteId - * @param string $header - * - * @return Struct\Info - */ - public function add($name, $siteId, $header = '') + public function add(string $name, int $siteId, string $header = ''): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add'); @@ -36,7 +29,7 @@ public function add($name, $siteId, $header = '') * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value, 'delete'); } @@ -45,9 +38,9 @@ public function delete($field, $value) * @param string $field * @param int|string $value * - * @return Struct\DataInfo|false + * @return Struct\DataInfo */ - public function get(string $field, $value) + public function get(string $field, $value): Struct\DataInfo { $items = $this->getAll($field, $value); diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 729721ee..147b468b 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -7,12 +7,7 @@ class Reseller extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create($properties) + public function create(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add')->addChild('gen-info'); @@ -32,7 +27,7 @@ public function create($properties) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value); } @@ -43,7 +38,7 @@ public function delete($field, $value) * * @return Struct\GeneralInfo */ - public function get($field, $value) + public function get(string $field, $value): Struct\GeneralInfo { $items = $this->getAll($field, $value); @@ -56,7 +51,7 @@ public function get($field, $value) * * @return Struct\GeneralInfo[] */ - public function getAll($field = null, $value = null) + public function getAll($field = null, $value = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index bd41db07..b2be4cd5 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -9,13 +9,7 @@ class SecretKey extends \PleskX\Api\Operator { protected string $wrapperTag = 'secret_key'; - /** - * @param string $ipAddress - * @param string $description - * - * @return string - */ - public function create($ipAddress = '', $description = '') + public function create(string $ipAddress = '', string $description = ''): string { $packet = $this->client->getPacket(); $createTag = $packet->addChild($this->wrapperTag)->addChild('create'); @@ -33,22 +27,12 @@ public function create($ipAddress = '', $description = '') return (string) $response->key; } - /** - * @param string $keyId - * - * @return bool - */ - public function delete($keyId) + public function delete(string $keyId): bool { return $this->deleteBy('key', $keyId, 'delete'); } - /** - * @param string $keyId - * - * @return Struct\Info - */ - public function get($keyId) + public function get(string $keyId): Struct\Info { $items = $this->getBy($keyId); @@ -58,7 +42,7 @@ public function get($keyId) /** * @return Struct\Info[] */ - public function getAll() + public function getAll(): array { return $this->getBy(); } @@ -68,7 +52,7 @@ public function getAll() * * @return Struct\Info[] */ - public function getBy($keyId = null) + public function getBy($keyId = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get_info'); diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index a5d79968..1a72d849 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -118,12 +118,6 @@ public function getUpdatesInfo(): Struct\UpdatesInfo return new Struct\UpdatesInfo($this->getInfo('updates')); } - /** - * @param string $login - * @param string $clientIp - * - * @return string - */ public function createSession(string $login, string $clientIp): string { $packet = $this->client->getPacket(); diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 3e38a3f7..f9a1d887 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -7,12 +7,7 @@ class ServicePlan extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create($properties) + public function create(array $properties): Struct\Info { $response = $this->request(['add' => $properties]); @@ -25,7 +20,7 @@ public function create($properties) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value); } @@ -36,7 +31,7 @@ public function delete($field, $value) * * @return Struct\Info */ - public function get($field, $value) + public function get(string $field, $value): Struct\Info { $items = $this->getBy($field, $value); @@ -46,7 +41,7 @@ public function get($field, $value) /** * @return Struct\Info[] */ - public function getAll() + public function getAll(): array { return $this->getBy(); } @@ -57,7 +52,7 @@ public function getAll() * * @return Struct\Info[] */ - private function getBy($field = null, $value = null) + private function getBy($field = null, $value = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index cea02004..b4713822 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -7,13 +7,7 @@ class Session extends \PleskX\Api\Operator { - /** - * @param string $username - * @param string $userIp - * - * @return string - */ - public function create($username, $userIp) + public function create(string $username, string $userIp): string { $packet = $this->client->getPacket(); $creator = $packet->addChild('server')->addChild('create_session'); @@ -32,7 +26,7 @@ public function create($username, $userIp) /** * @return Struct\Info[] */ - public function get() + public function get(): array { $sessions = []; $response = $this->request('get'); @@ -44,12 +38,7 @@ public function get() return $sessions; } - /** - * @param string $sessionId - * - * @return bool - */ - public function terminate($sessionId) + public function terminate(string $sessionId): bool { $response = $this->request("terminate.session-id=$sessionId"); diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 67e0a875..273757bb 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -9,12 +9,7 @@ class Site extends \PleskX\Api\Operator { public const PROPERTIES_HOSTING = 'hosting'; - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create(array $properties) + public function create(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add'); @@ -48,7 +43,7 @@ public function create(array $properties) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value); } @@ -59,7 +54,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); @@ -72,7 +67,7 @@ public function get($field, $value) * * @return Struct\HostingInfo|null */ - public function getHosting($field, $value) + public function getHosting(string $field, $value): ?Struct\HostingInfo { $items = $this->getItems( Struct\HostingInfo::class, @@ -90,7 +85,7 @@ function (\SimpleXMLElement $node) { /** * @return Struct\GeneralInfo[] */ - public function getAll() + public function getAll(): array { return $this->getItems(Struct\GeneralInfo::class, 'gen_info'); } diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 34539b6d..fce9afc0 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -7,13 +7,7 @@ class SiteAlias extends \PleskX\Api\Operator { - /** - * @param array $properties - * @param array $preferences - * - * @return Struct\Info - */ - public function create(array $properties, array $preferences = []) + public function create(array $properties, array $preferences = []): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('create'); @@ -40,7 +34,7 @@ public function create(array $properties, array $preferences = []) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value, 'delete'); } @@ -51,7 +45,7 @@ public function delete($field, $value) * * @return Struct\GeneralInfo */ - public function get($field, $value) + public function get(string $field, $value): Struct\GeneralInfo { $items = $this->getAll($field, $value); diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index db88138e..5158993b 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -7,12 +7,7 @@ class Subdomain extends \PleskX\Api\Operator { - /** - * @param array $properties - * - * @return Struct\Info - */ - public function create($properties) + public function create(array $properties): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add'); @@ -40,7 +35,7 @@ public function create($properties) * * @return bool */ - public function delete($field, $value) + public function delete(string $field, $value): bool { return $this->deleteBy($field, $value); } @@ -51,7 +46,7 @@ public function delete($field, $value) * * @return Struct\Info */ - public function get($field, $value) + public function get(string $field, $value): Struct\Info { $items = $this->getAll($field, $value); diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index b14f84c9..1577dec3 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -7,23 +7,14 @@ class Ui extends \PleskX\Api\Operator { - /** - * @return array - */ - public function getNavigation() + public function getNavigation(): array { $response = $this->request('get-navigation'); return unserialize(base64_decode($response->navigation)); } - /** - * @param string $owner - * @param array $properties - * - * @return int - */ - public function createCustomButton($owner, $properties) + public function createCustomButton(string $owner, array $properties): int { $packet = $this->client->getPacket(); $buttonNode = $packet->addChild($this->wrapperTag)->addChild('create-custombutton'); @@ -39,24 +30,14 @@ public function createCustomButton($owner, $properties) return (int) $response->id; } - /** - * @param int $id - * - * @return Struct\CustomButton - */ - public function getCustomButton($id) + public function getCustomButton(int $id): Struct\CustomButton { $response = $this->request("get-custombutton.filter.custombutton-id=$id"); return new Struct\CustomButton($response); } - /** - * @param int $id - * - * @return bool - */ - public function deleteCustomButton($id) + public function deleteCustomButton(int $id): bool { return $this->deleteBy('custombutton-id', $id, 'delete-custombutton'); } diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 073116a4..825ea671 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -15,7 +15,7 @@ class XmlResponse extends \SimpleXMLElement * * @return string */ - public function getValue($node) + public function getValue(string $node): string { return (string) $this->xpath('//' . $node)[0]; } From b2b7ebe7b6f1dc108217c5daea40e65137b8c1b6 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 28 Nov 2021 19:46:16 +0700 Subject: [PATCH 037/126] Update PHP deps to latest versions --- composer.lock | 214 ++++++++++++++++++++++++++------------------------ 1 file changed, 110 insertions(+), 104 deletions(-) diff --git a/composer.lock b/composer.lock index b6695290..9c968df9 100644 --- a/composer.lock +++ b/composer.lock @@ -175,24 +175,24 @@ }, { "name": "clue/stdio-react", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-stdio.git", - "reference": "5722686d3cc0cdf2ccedb6079bfd066220611f00" + "reference": "c73bcdc228eca627992c0088f7bc30b794fde8da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/5722686d3cc0cdf2ccedb6079bfd066220611f00", - "reference": "5722686d3cc0cdf2ccedb6079bfd066220611f00", + "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/c73bcdc228eca627992c0088f7bc30b794fde8da", + "reference": "c73bcdc228eca627992c0088f7bc30b794fde8da", "shasum": "" }, "require": { "clue/term-react": "^1.0 || ^0.1.1", "clue/utf8-react": "^1.0 || ^0.1", "php": ">=5.3", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", - "react/stream": "^1.0 || ^0.7 || ^0.6" + "react/event-loop": "^1.2", + "react/stream": "^1.2" }, "require-dev": { "clue/arguments": "^2.0", @@ -235,7 +235,7 @@ ], "support": { "issues": "https://github.com/clue/reactphp-stdio/issues", - "source": "https://github.com/clue/reactphp-stdio/tree/v2.4.0" + "source": "https://github.com/clue/reactphp-stdio/tree/v2.5.0" }, "funding": [ { @@ -247,7 +247,7 @@ "type": "github" } ], - "time": "2020-11-20T14:28:39+00:00" + "time": "2021-10-25T08:01:22+00:00" }, { "name": "clue/term-react", @@ -460,16 +460,16 @@ }, { "name": "composer/semver", - "version": "3.2.5", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + "reference": "83e511e247de329283478496f7a1e114c9517506" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506", + "reference": "83e511e247de329283478496f7a1e114c9517506", "shasum": "" }, "require": { @@ -521,7 +521,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.5" + "source": "https://github.com/composer/semver/tree/3.2.6" }, "funding": [ { @@ -537,7 +537,7 @@ "type": "tidelift" } ], - "time": "2021-05-24T12:41:47+00:00" + "time": "2021-10-25T11:34:17+00:00" }, { "name": "composer/xdebug-handler", @@ -1035,16 +1035,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.0", + "version": "v4.13.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53" + "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", "shasum": "" }, "require": { @@ -1085,9 +1085,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" }, - "time": "2021-09-20T12:20:58+00:00" + "time": "2021-11-03T20:52:16+00:00" }, { "name": "openlss/lib-array2xml", @@ -1308,16 +1308,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -1328,7 +1328,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1358,22 +1359,22 @@ "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" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -1408,9 +1409,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" }, - "time": "2021-09-17T15:28:14+00:00" + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", @@ -1481,23 +1482,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.7", + "version": "9.2.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", + "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.12.0", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1546,7 +1547,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9" }, "funding": [ { @@ -1554,7 +1555,7 @@ "type": "github" } ], - "time": "2021-09-17T05:39:03+00:00" + "time": "2021-11-19T15:21:02+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1902,20 +1903,20 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -1944,9 +1945,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/log", @@ -2587,16 +2588,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -2645,14 +2646,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -2660,7 +2661,7 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", @@ -3243,16 +3244,16 @@ }, { "name": "symfony/console", - "version": "v5.3.7", + "version": "v5.3.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" + "reference": "3e7ab8f5905058984899b05a4648096f558bfeba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", + "url": "https://api.github.com/repos/symfony/console/zipball/3e7ab8f5905058984899b05a4648096f558bfeba", + "reference": "3e7ab8f5905058984899b05a4648096f558bfeba", "shasum": "" }, "require": { @@ -3265,7 +3266,6 @@ "symfony/string": "^5.1" }, "conflict": { - "psr/log": ">=3", "symfony/dependency-injection": "<4.4", "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", @@ -3322,7 +3322,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.7" + "source": "https://github.com/symfony/console/tree/v5.3.11" }, "funding": [ { @@ -3338,20 +3338,20 @@ "type": "tidelift" } ], - "time": "2021-08-25T20:02:16+00:00" + "time": "2021-11-21T19:41:05+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "shasum": "" }, "require": { @@ -3360,7 +3360,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3389,7 +3389,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" }, "funding": [ { @@ -3405,7 +3405,7 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-07-12T14:48:14+00:00" }, { "name": "symfony/finder", @@ -3957,16 +3957,16 @@ }, { "name": "symfony/process", - "version": "v5.3.7", + "version": "v5.3.12", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967" + "reference": "e498803a6e95ede78e9d5646ad32a2255c033a6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/38f26c7d6ed535217ea393e05634cb0b244a1967", - "reference": "38f26c7d6ed535217ea393e05634cb0b244a1967", + "url": "https://api.github.com/repos/symfony/process/zipball/e498803a6e95ede78e9d5646ad32a2255c033a6a", + "reference": "e498803a6e95ede78e9d5646ad32a2255c033a6a", "shasum": "" }, "require": { @@ -3999,7 +3999,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.7" + "source": "https://github.com/symfony/process/tree/v5.3.12" }, "funding": [ { @@ -4015,25 +4015,29 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2021-11-22T22:39:13+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", - "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", "shasum": "" }, "require": { "php": ">=7.2.5", - "psr/container": "^1.1" + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -4041,7 +4045,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4078,7 +4082,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" }, "funding": [ { @@ -4094,20 +4098,20 @@ "type": "tidelift" } ], - "time": "2021-04-01T10:43:52+00:00" + "time": "2021-11-04T16:48:04+00:00" }, { "name": "symfony/string", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", "shasum": "" }, "require": { @@ -4161,7 +4165,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.7" + "source": "https://github.com/symfony/string/tree/v5.3.10" }, "funding": [ { @@ -4177,20 +4181,20 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:00:08+00:00" + "time": "2021-10-27T18:21:46+00:00" }, { "name": "symfony/yaml", - "version": "v5.3.6", + "version": "v5.3.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7" + "reference": "226638aa877bc4104e619a15f27d8141cd6b4e4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", - "reference": "4500fe63dc9c6ffc32d3b1cb0448c329f9c814b7", + "url": "https://api.github.com/repos/symfony/yaml/zipball/226638aa877bc4104e619a15f27d8141cd6b4e4a", + "reference": "226638aa877bc4104e619a15f27d8141cd6b4e4a", "shasum": "" }, "require": { @@ -4236,7 +4240,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.3.6" + "source": "https://github.com/symfony/yaml/tree/v5.3.11" }, "funding": [ { @@ -4252,7 +4256,7 @@ "type": "tidelift" } ], - "time": "2021-07-29T06:20:01+00:00" + "time": "2021-11-20T16:42:42+00:00" }, { "name": "theseer/tokenizer", @@ -4306,16 +4310,16 @@ }, { "name": "vimeo/psalm", - "version": "4.10.0", + "version": "4.13.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa" + "reference": "5cf660f63b548ccd4a56f62d916ee4d6028e01a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/916b098b008f6de4543892b1e0651c1c3b92cbfa", - "reference": "916b098b008f6de4543892b1e0651c1c3b92cbfa", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/5cf660f63b548ccd4a56f62d916ee4d6028e01a3", + "reference": "5cf660f63b548ccd4a56f62d916ee4d6028e01a3", "shasum": "" }, "require": { @@ -4335,11 +4339,11 @@ "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", + "nikic/php-parser": "^4.13", "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", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", "webmozart/path-util": "^2.3" }, "provide": { @@ -4357,11 +4361,12 @@ "psalm/plugin-phpunit": "^0.16", "slevomat/coding-standard": "^7.0", "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0", + "symfony/process": "^4.3 || ^5.0 || ^6.0", "weirdan/prophecy-shim": "^1.0 || ^2.0" }, "suggest": { - "ext-igbinary": "^2.0.5" + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" }, "bin": [ "psalm", @@ -4405,9 +4410,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.10.0" + "source": "https://github.com/vimeo/psalm/tree/4.13.1" }, - "time": "2021-09-04T21:00:09+00:00" + "time": "2021-11-23T23:52:49+00:00" }, { "name": "webmozart/assert", @@ -4515,6 +4520,7 @@ "issues": "https://github.com/webmozart/path-util/issues", "source": "https://github.com/webmozart/path-util/tree/2.3.0" }, + "abandoned": "symfony/filesystem", "time": "2015-12-17T08:42:14+00:00" }, { From f65d8fa297be0745e0a6aa7c70c43f320b0a585f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 28 Nov 2021 21:12:19 +0700 Subject: [PATCH 038/126] Fix #63: Add an ability to set two IPs (v4 and v6) for webspace --- src/Api/Operator/Webspace.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 360ade89..af952da2 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -87,7 +87,9 @@ public function create(array $properties, array $hostingProperties = null, strin } if (isset($properties['ip_address'])) { - $infoHosting->addChild('ip_address', $properties['ip_address']); + foreach ((array) $properties['ip_address'] as $ipAddress) { + $infoHosting->addChild('ip_address', $ipAddress); + } } } From b282679107776ff08205980ba3e6e5c52aa37912 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 19 Jan 2022 10:51:40 +0700 Subject: [PATCH 039/126] Use forced cast to proper response type (including SDK API use case) --- src/Api/Client.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index 48564e8b..f259569c 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -149,8 +149,9 @@ public function getPacket($version = null): SimpleXMLElement * @param int $mode * * @return XmlResponse + * @throws \Exception */ - public function request($request, $mode = self::RESPONSE_SHORT) + public function request($request, int $mode = self::RESPONSE_SHORT): XmlResponse { if ($request instanceof SimpleXMLElement) { $request = $request->asXml(); @@ -177,7 +178,8 @@ public function request($request, $mode = self::RESPONSE_SHORT) ? call_user_func($this->verifyResponseCallback, $xml) : $this->verifyResponse($xml); - return (self::RESPONSE_FULL == $mode) ? $xml : $xml->xpath('//result')[0]; + $result = (self::RESPONSE_FULL === $mode) ? $xml : $xml->xpath('//result')[0]; + return new XmlResponse((string) $result->asXML()); } /** From 37f798d3450bee10f8e0b4044175fb07c2abbb86 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 20 Jan 2022 11:06:13 +0700 Subject: [PATCH 040/126] TECH Update copyright year --- LICENSE | 2 +- phpunit.xml.dist | 2 +- src/Api/AbstractStruct.php | 2 +- src/Api/Client.php | 2 +- src/Api/Client/Exception.php | 2 +- src/Api/Exception.php | 2 +- src/Api/InternalClient.php | 2 +- src/Api/Operator.php | 2 +- src/Api/Operator/Aps.php | 2 +- src/Api/Operator/Certificate.php | 2 +- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Database.php | 2 +- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/Dns.php | 2 +- src/Api/Operator/DnsTemplate.php | 2 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Locale.php | 2 +- src/Api/Operator/LogRotation.php | 2 +- src/Api/Operator/Mail.php | 2 +- src/Api/Operator/PhpHandler.php | 2 +- src/Api/Operator/ProtectedDirectory.php | 2 +- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/ResellerPlan.php | 2 +- src/Api/Operator/SecretKey.php | 2 +- src/Api/Operator/Server.php | 2 +- src/Api/Operator/ServicePlan.php | 2 +- src/Api/Operator/ServicePlanAddon.php | 2 +- src/Api/Operator/Session.php | 2 +- src/Api/Operator/Site.php | 2 +- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Operator/Subdomain.php | 2 +- src/Api/Operator/Ui.php | 2 +- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Certificate/Info.php | 2 +- src/Api/Struct/Customer/GeneralInfo.php | 2 +- src/Api/Struct/Customer/Info.php | 2 +- src/Api/Struct/Database/Info.php | 2 +- src/Api/Struct/Database/UserInfo.php | 2 +- src/Api/Struct/DatabaseServer/Info.php | 2 +- src/Api/Struct/Dns/Info.php | 2 +- src/Api/Struct/EventLog/DetailedEvent.php | 2 +- src/Api/Struct/EventLog/Event.php | 2 +- src/Api/Struct/Ip/Info.php | 2 +- src/Api/Struct/Locale/Info.php | 2 +- src/Api/Struct/Mail/GeneralInfo.php | 2 +- src/Api/Struct/Mail/Info.php | 2 +- src/Api/Struct/PhpHandler/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/DataInfo.php | 2 +- src/Api/Struct/ProtectedDirectory/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/UserInfo.php | 2 +- src/Api/Struct/Reseller/GeneralInfo.php | 2 +- src/Api/Struct/Reseller/Info.php | 2 +- src/Api/Struct/SecretKey/Info.php | 2 +- src/Api/Struct/Server/Admin.php | 2 +- src/Api/Struct/Server/GeneralInfo.php | 2 +- src/Api/Struct/Server/Preferences.php | 2 +- src/Api/Struct/Server/SessionPreferences.php | 2 +- src/Api/Struct/Server/Statistics.php | 2 +- src/Api/Struct/Server/Statistics/DiskSpace.php | 2 +- src/Api/Struct/Server/Statistics/LoadAverage.php | 2 +- src/Api/Struct/Server/Statistics/Memory.php | 2 +- src/Api/Struct/Server/Statistics/Objects.php | 2 +- src/Api/Struct/Server/Statistics/Other.php | 2 +- src/Api/Struct/Server/Statistics/Swap.php | 2 +- src/Api/Struct/Server/Statistics/Version.php | 2 +- src/Api/Struct/Server/UpdatesInfo.php | 2 +- src/Api/Struct/ServicePlan/Info.php | 2 +- src/Api/Struct/Session/Info.php | 2 +- src/Api/Struct/Site/GeneralInfo.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 2 +- src/Api/Struct/Site/Info.php | 2 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 2 +- src/Api/Struct/SiteAlias/Info.php | 2 +- src/Api/Struct/Subdomain/Info.php | 2 +- src/Api/Struct/Ui/CustomButton.php | 2 +- src/Api/Struct/Webspace/DiskUsage.php | 2 +- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/HostingPropertyInfo.php | 2 +- src/Api/Struct/Webspace/Info.php | 2 +- src/Api/Struct/Webspace/Limit.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- src/Api/Struct/Webspace/LimitInfo.php | 2 +- src/Api/Struct/Webspace/Limits.php | 2 +- src/Api/Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PermissionInfo.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- src/Api/Struct/Webspace/PhysicalHostingDescriptor.php | 2 +- src/Api/XmlResponse.php | 2 +- tests/AbstractTestCase.php | 2 +- tests/ApiClientTest.php | 2 +- tests/CertificateTest.php | 2 +- tests/CustomerTest.php | 2 +- tests/DatabaseServerTest.php | 2 +- tests/DatabaseTest.php | 2 +- tests/DnsTemplateTest.php | 2 +- tests/DnsTest.php | 2 +- tests/EventLogTest.php | 2 +- tests/IpTest.php | 2 +- tests/LocaleTest.php | 2 +- tests/MailTest.php | 2 +- tests/PhpHandlerTest.php | 2 +- tests/ProtectedDirectoryTest.php | 2 +- tests/ResellerTest.php | 2 +- tests/SecretKeyTest.php | 2 +- tests/ServerTest.php | 2 +- tests/ServicePlanTest.php | 2 +- tests/SessionTest.php | 2 +- tests/SiteAliasTest.php | 2 +- tests/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/UiTest.php | 2 +- tests/Utility/KeyLimitChecker.php | 2 +- tests/Utility/PasswordProvider.php | 2 +- tests/WebspaceTest.php | 2 +- wait-for-plesk.sh | 2 +- 117 files changed, 117 insertions(+), 117 deletions(-) diff --git a/LICENSE b/LICENSE index 8113e2a4..914de1aa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2021. Plesk International GmbH. +Copyright 1999-2022. Plesk International GmbH. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 40244388..d32b2193 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index ea7a3917..042bd46c 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -1,5 +1,5 @@ Plesk" > /dev/null From 4bef1cd7f8bda46899124f4efa3e08060a0c211b Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 10 Mar 2022 17:22:20 +0600 Subject: [PATCH 041/126] Fix #110: correct processing of multiple IPs on webspace creation --- src/Api/Operator/Webspace.php | 6 +++++- tests/WebspaceTest.php | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 67fae267..a3f0563b 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -75,7 +75,11 @@ public function create(array $properties, array $hostingProperties = null, strin $infoGeneral = $info->addChild('gen_setup'); foreach ($properties as $name => $value) { - $infoGeneral->addChild($name, $value); + if (is_array($value)) { + continue; + } else { + $infoGeneral->addChild($name, (string) $value); + } } if ($hostingProperties) { diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index c271549b..09c863ed 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -222,4 +222,22 @@ public function testSetProperties() static::$client->webspace()->delete('id', $webspace->id); } + + public function testIpsAsArray() + { + $webspace = static::$client->webspace()->create( + [ + 'name' => "test-ips.test", + 'ip_address' => [static::getIpAddress()], + ], + [ + 'ftp_login' => "u-ips", + 'ftp_password' => PasswordProvider::STRONG_PASSWORD, + ] + ); + + $this->assertGreaterThan(0, $webspace->id); + + static::$client->webspace()->delete('id', $webspace->id); + } } From 0120437e7cb6d38c246eb7ff7e38858aa6e41882 Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov Date: Mon, 28 Mar 2022 20:25:14 +0700 Subject: [PATCH 042/126] BUGFIX EXTREST-143 Extend already set properties instead of overwriting them --- src/Api/Client.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index f622028f..74d274c7 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -361,8 +361,10 @@ private function arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = nul $el = is_int($key) && $parentEl ? $parentEl : $key; if (is_array($value)) { $this->arrayToXml($value, $this->isAssocArray($value) ? $xml->addChild($el) : $xml, $el); - } else { + } elseif(!isset($xml->{$el})) { $xml->{$el} = (string) $value; + } else { + $xml->{$el}[] = (string) $value; } } From 465c2074e17cc6b80ca675b2a63a4b3c1f1cb5ac Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov Date: Mon, 28 Mar 2022 23:57:08 +0700 Subject: [PATCH 043/126] BUGFIX EXTREST-143 Fix incorrect line formatting --- src/Api/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index 74d274c7..0562d73c 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -361,7 +361,7 @@ private function arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = nul $el = is_int($key) && $parentEl ? $parentEl : $key; if (is_array($value)) { $this->arrayToXml($value, $this->isAssocArray($value) ? $xml->addChild($el) : $xml, $el); - } elseif(!isset($xml->{$el})) { + } elseif (!isset($xml->{$el})) { $xml->{$el} = (string) $value; } else { $xml->{$el}[] = (string) $value; From 9f7a06fd130079eb5779c87408df077350187c96 Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov Date: Tue, 29 Mar 2022 14:03:28 +0700 Subject: [PATCH 044/126] TECH Add a test for extended field values --- tests/MailTest.php | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/tests/MailTest.php b/tests/MailTest.php index 408d877a..21505d99 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -47,6 +47,57 @@ public function testCreate() static::$client->mail()->delete('name', $mailname->name, static::$webspace->id); } + public function testCreateMultiForwarding() + { + $mailname = static::$client->request([ + 'mail' => [ + 'create' => [ + 'filter' => [ + 'site-id' => static::$webspace->id, + 'mailname' => [ + 'name' => 'test', + 'mailbox' => [ + 'enabled' => true, + ], + 'forwarding' => [ + 'enabled' => true, + 'address' => [ + 'user1@example.com', + 'user2@example.com', + ], + ], + 'alias' => [ + 'test1', + 'test2', + ], + 'password' => [ + 'value' => PasswordProvider::STRONG_PASSWORD, + ], + ], + ], + ], + ], + ]); + + $mailnameInfo = static::$client->request([ + 'mail' => [ + 'get_info' => [ + 'filter' => [ + 'site-id' => static::$webspace->id, + 'name' => 'test', + ], + 'forwarding' => null, + 'aliases' => null, + ], + ], + ]); + + $this->assertSame(2, count($mailnameInfo->mailname->forwarding->address)); + $this->assertSame(2, count($mailnameInfo->mailname->alias)); + + static::$client->mail()->delete('name', 'test', static::$webspace->id); + } + public function testDelete() { $mailname = static::$client->mail()->create('test', static::$webspace->id); From 9d134fb068a09a78c88c0733811f1e9ed462aa1f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 9 Nov 2022 18:02:44 +0200 Subject: [PATCH 045/126] Fix #116: correct handling of empty resellers list --- src/Api/Operator/Reseller.php | 4 ++++ tests/CustomerTest.php | 6 ++++++ tests/ResellerTest.php | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index f0981d65..bd918144 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -69,6 +69,10 @@ public function getAll($field = null, $value = null): array $items = []; foreach ($response->xpath('//result') as $xmlResult) { + if (!$xmlResult->data) { + continue; + } + $item = new Struct\GeneralInfo($xmlResult->data); $item->id = (int) $xmlResult->id; $items[] = $item; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 3bd4f802..760ee45a 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -85,6 +85,12 @@ public function testGetAll() static::$client->customer()->delete('login', 'customer-b'); } + public function testGetAllEmpty() + { + $customersInfo = static::$client->customer()->getAll(); + $this->assertCount(0, $customersInfo); + } + public function testEnable() { $customer = static::$client->customer()->create($this->customerProperties); diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 89043192..9c43f4db 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -74,4 +74,10 @@ public function testGetAll() static::$client->reseller()->delete('login', 'reseller-a'); static::$client->reseller()->delete('login', 'reseller-b'); } + + public function testGetAllEmpty() + { + $resellersInfo = static::$client->reseller()->getAll(); + $this->assertCount(0, $resellersInfo); + } } From f0c91a45f3ceb7073253e74ad2b07676de1de0fb Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 15 Mar 2023 18:25:55 +0200 Subject: [PATCH 046/126] Fix #119: return correct result type in the case of empty structure --- src/Api/Operator/Site.php | 6 +++--- tests/SiteTest.php | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 96955ce5..324c9a97 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -52,13 +52,13 @@ public function delete(string $field, $value): bool * @param string $field * @param int|string $value * - * @return Struct\GeneralInfo + * @return ?Struct\GeneralInfo */ - public function get(string $field, $value): Struct\GeneralInfo + public function get(string $field, $value): ?Struct\GeneralInfo { $items = $this->getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); - return reset($items); + return reset($items) ?: null; } /** diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 739aaded..550f98c5 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -68,6 +68,9 @@ public function testGet() $this->assertEquals($site->id, $siteInfo->id); static::$client->site()->delete('id', $site->id); + + $siteInfo = static::$client->site()->get('parent-id', static::$webspace->id); + $this->assertNull($siteInfo); } public function testGetHostingWoHosting() From b5283d2ee058bf5ec72422d524d4883ab3dad376 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 16 Mar 2023 21:49:53 +0200 Subject: [PATCH 047/126] Fix outdated GitHub Action --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 622691cd..a2f2e4ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,6 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: docker-compose run tests - - run: bash <(curl -s https://codecov.io/bash) \ No newline at end of file + - run: bash <(curl -s https://codecov.io/bash) From 9e0211772f94040e4fb2230ce13deaceccafe489 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 16 Mar 2023 21:56:54 +0200 Subject: [PATCH 048/126] Use PHP 8.0 for tests pipeline --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b114ff79..d3b77dae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4-cli +FROM php:8.0-cli RUN apt-get update \ && apt-get install -y unzip \ From 5cdd09cf66287d94fd2050543d708f8b570c242a Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 20 Mar 2023 18:15:45 +0200 Subject: [PATCH 049/126] Use previous version of Ubuntu for tests to avoid interference between Plesk, Docker and systemd --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2f2e4ce..432e7823 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push] jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 - run: docker-compose run tests From 99e8b979c601189653eade1358996ef47698fe0e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 22 Mar 2023 16:53:14 +0200 Subject: [PATCH 050/126] Implement SSL certificates install/remove procedures Co-authored-by: Bobi <69676022+bobicloudvision@users.noreply.github.com> --- src/Api/Operator/Certificate.php | 34 +++++++++++++++++++++++ tests/CertificateTest.php | 46 +++++++++++++++++++++++++------- 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index b019bfc2..4e8c9df4 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -20,4 +20,38 @@ public function generate(array $properties): Struct\Info return new Struct\Info($response); } + + public function install(array $properties, string $request, string $privateKey): bool + { + $packet = $this->client->getPacket(); + + $installTag = $packet->addChild($this->wrapperTag)->addChild('install'); + foreach ($properties as $name => $value) { + $installTag->{$name} = $value; + } + + $contentTag = $installTag->addChild('content'); + $contentTag->addChild('csr', $request); + $contentTag->addChild('pvt', $privateKey); + + $result = $this->client->request($packet); + + return 'ok' == (string) $result->status; + } + + public function delete(string $name, array $properties): bool + { + $packet = $this->client->getPacket(); + + $removeTag = $packet->addChild($this->wrapperTag)->addChild('remove'); + $removeTag->addChild('filter')->addChild('name', $name); + + foreach ($properties as $name => $value) { + $removeTag->{$name} = $value; + } + + $result = $this->client->request($packet); + + return 'ok' == (string) $result->status; + } } diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index a65ee85a..77c85ffd 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -5,20 +5,48 @@ class CertificateTest extends AbstractTestCase { + private array $certificateProperties = [ + 'bits' => 2048, + 'country' => 'CH', + 'state' => 'Schaffhausen', + 'location' => 'Schaffhausen', + 'company' => 'Plesk', + 'email' => 'info@plesk.com', + 'name' => 'plesk.com', + ]; + public function testGenerate() { - $certificate = static::$client->certificate()->generate([ - 'bits' => 2048, - 'country' => 'RU', - 'state' => 'NSO', - 'location' => 'Novosibirsk', - 'company' => 'Plesk', - 'email' => 'info@plesk.com', - 'name' => 'plesk.com', - ]); + $certificate = static::$client->certificate()->generate($this->certificateProperties); $this->assertGreaterThan(0, strlen($certificate->request)); $this->assertStringStartsWith('-----BEGIN CERTIFICATE REQUEST-----', $certificate->request); $this->assertGreaterThan(0, strlen($certificate->privateKey)); $this->assertStringStartsWith('-----BEGIN PRIVATE KEY-----', $certificate->privateKey); } + + public function testInstall() + { + $certificate = static::$client->certificate()->generate($this->certificateProperties); + + $result = static::$client->certificate()->install([ + 'name' => 'test', + 'admin' => true, + ], $certificate->request, $certificate->privateKey); + $this->assertTrue($result); + + static::$client->certificate()->delete('test', ['admin' => true]); + } + + public function testDelete() + { + $certificate = static::$client->certificate()->generate($this->certificateProperties); + + static::$client->certificate()->install([ + 'name' => 'test', + 'admin' => true, + ], $certificate->request, $certificate->privateKey); + + $result = static::$client->certificate()->delete('test', ['admin' => true]); + $this->assertTrue($result); + } } From 2ea3564fc5c99a048d401102c3eb7551b3228c2e Mon Sep 17 00:00:00 2001 From: David H <50745202+DavidHDJ@users.noreply.github.com> Date: Sat, 22 Apr 2023 15:48:58 +0200 Subject: [PATCH 051/126] Add ServicePlanAddon --- src/Api/Operator/ServicePlanAddon.php | 67 ++++++++++++++++++++++++ src/Api/Struct/ServicePlanAddon/Info.php | 24 +++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/Api/Struct/ServicePlanAddon/Info.php diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 7eee5799..8cb5a965 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -3,6 +3,73 @@ namespace PleskX\Api\Operator; +use PleskX\Api\Struct\ServicePlanAddon as Struct; + class ServicePlanAddon extends \PleskX\Api\Operator { + + public function create(array $properties): Struct\Info + { + $response = $this->request(['add' => $properties]); + + return new Struct\Info($response); + } + + /** + * @param string $field + * @param int|string $value + * + * @return bool + */ + public function delete(string $field, $value): bool + { + return $this->deleteBy($field, $value); + } + + /** + * @param string $field + * @param int|string $value + * + * @return Struct\Info + */ + public function get(string $field, $value): Struct\Info + { + $items = $this->getBy($field, $value); + + return reset($items); + } + + /** + * @return Struct\Info[] + */ + public function getAll(): array + { + return $this->getBy(); + } + + /** + * @param string|null $field + * @param int|string|null $value + * + * @return Struct\Info[] + */ + private function getBy($field = null, $value = null): array + { + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, (string) $value); + } + + $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $items[] = new Struct\Info($xmlResult); + } + + return $items; + } } diff --git a/src/Api/Struct/ServicePlanAddon/Info.php b/src/Api/Struct/ServicePlanAddon/Info.php new file mode 100644 index 00000000..4ec2bd78 --- /dev/null +++ b/src/Api/Struct/ServicePlanAddon/Info.php @@ -0,0 +1,24 @@ +initScalarProperties($apiResponse, [ + 'id', + 'name', + 'guid', + 'external-id', + ]); + } +} From a1f9fe7793e28fed89c62497a96a667efa040d31 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 1 May 2023 18:36:49 +0300 Subject: [PATCH 052/126] Add tests for Service Plan Addons --- src/Api/Operator/ServicePlanAddon.php | 3 +- tests/AbstractTestCase.php | 19 ++++++++ tests/ServicePlanAddonTest.php | 62 +++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 tests/ServicePlanAddonTest.php diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 8cb5a965..6d348da2 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ request(['add' => $properties]); diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 35b62afe..853488af 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -13,6 +13,7 @@ abstract class AbstractTestCase extends TestCase private static array $webspaces = []; private static array $servicePlans = []; + private static array $servicePlanAddons = []; public static function setUpBeforeClass(): void { @@ -54,6 +55,14 @@ public static function tearDownAfterClass(): void } catch (\Exception $e) { } } + + foreach (self::$servicePlanAddons as $servicePlanAddon) { + try { + static::$client->servicePlanAddon()->delete('id', $servicePlanAddon->id); + // phpcs:ignore + } catch (\Exception $e) { + } + } } protected static function getIpAddress(): string @@ -91,4 +100,14 @@ protected static function createServicePlan(): \PleskX\Api\Struct\ServicePlan\In return $servicePlan; } + + protected static function createServicePlanAddon(): \PleskX\Api\Struct\ServicePlanAddon\Info + { + $id = uniqid(); + $servicePlanAddon = static::$client->servicePlanAddon()->create(['name' => "test{$id}planaddon"]); + + self::$servicePlanAddons[] = $servicePlanAddon; + + return $servicePlanAddon; + } } diff --git a/tests/ServicePlanAddonTest.php b/tests/ServicePlanAddonTest.php new file mode 100644 index 00000000..5f5e6b20 --- /dev/null +++ b/tests/ServicePlanAddonTest.php @@ -0,0 +1,62 @@ +servicePlanAddon()->get('id', $servicePlanAddon->id); + + $this->assertNotEmpty($servicePlanAddonInfo->name); + $this->assertSame($servicePlanAddon->id, $servicePlanAddonInfo->id); + } + + public function testGetAll() + { + static::createServicePlanAddon(); + static::createServicePlanAddon(); + static::createServicePlanAddon(); + + $servicePlanAddons = static::$client->servicePlanAddon()->getAll(); + $this->assertIsArray($servicePlanAddons); + $this->assertGreaterThan(2, count($servicePlanAddons)); + $this->assertNotEmpty($servicePlanAddons[0]->name); + } + + public function testCreate() + { + $servicePlanAddon = static::createServicePlanAddon(); + $this->assertGreaterThan(0, $servicePlanAddon->id); + + static::$client->servicePlanAddon()->delete('id', $servicePlanAddon->id); + } + + public function testDelete() + { + $servicePlanAddon = static::createServicePlanAddon(); + $result = static::$client->servicePlanAddon()->delete('id', $servicePlanAddon->id); + + $this->assertTrue($result); + } + + public function testCreateComplex() + { + $properties = [ + 'name' => 'Complex Service Plan Addon', + 'limits' => [ + 'limit' => [ + 'name' => 'disk_space', + 'value' => 1024 * 1024 * 1024, // 1 GB + ], + ], + ]; + + $servicePlanAddon = static::$client->servicePlanAddon()->create($properties); + $this->assertGreaterThan(0, $servicePlanAddon->id); + + static::$client->servicePlanAddon()->delete('id', $servicePlanAddon->id); + } +} From 94bcd0bf52056e87f27a60ada9334cb2491ef919 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 1 May 2023 18:43:42 +0300 Subject: [PATCH 053/126] TECH Update copyright year --- docker-compose.yml | 1 + phpcs.xml.dist | 1 + phpunit-watcher.yml | 1 + phpunit.xml.dist | 2 +- psalm.xml | 1 + src/Api/AbstractStruct.php | 2 +- src/Api/Client.php | 2 +- src/Api/Client/Exception.php | 2 +- src/Api/Exception.php | 2 +- src/Api/InternalClient.php | 2 +- src/Api/Operator.php | 2 +- src/Api/Operator/Aps.php | 2 +- src/Api/Operator/Certificate.php | 2 +- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Database.php | 2 +- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/Dns.php | 2 +- src/Api/Operator/DnsTemplate.php | 2 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Locale.php | 2 +- src/Api/Operator/LogRotation.php | 2 +- src/Api/Operator/Mail.php | 2 +- src/Api/Operator/PhpHandler.php | 2 +- src/Api/Operator/ProtectedDirectory.php | 2 +- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/ResellerPlan.php | 2 +- src/Api/Operator/SecretKey.php | 2 +- src/Api/Operator/Server.php | 2 +- src/Api/Operator/ServicePlan.php | 2 +- src/Api/Operator/Session.php | 2 +- src/Api/Operator/Site.php | 2 +- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Operator/Subdomain.php | 2 +- src/Api/Operator/Ui.php | 2 +- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Certificate/Info.php | 2 +- src/Api/Struct/Customer/GeneralInfo.php | 2 +- src/Api/Struct/Customer/Info.php | 2 +- src/Api/Struct/Database/Info.php | 2 +- src/Api/Struct/Database/UserInfo.php | 2 +- src/Api/Struct/DatabaseServer/Info.php | 2 +- src/Api/Struct/Dns/Info.php | 2 +- src/Api/Struct/EventLog/DetailedEvent.php | 2 +- src/Api/Struct/EventLog/Event.php | 2 +- src/Api/Struct/Ip/Info.php | 2 +- src/Api/Struct/Locale/Info.php | 2 +- src/Api/Struct/Mail/GeneralInfo.php | 2 +- src/Api/Struct/Mail/Info.php | 2 +- src/Api/Struct/PhpHandler/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/DataInfo.php | 2 +- src/Api/Struct/ProtectedDirectory/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/UserInfo.php | 2 +- src/Api/Struct/Reseller/GeneralInfo.php | 2 +- src/Api/Struct/Reseller/Info.php | 2 +- src/Api/Struct/SecretKey/Info.php | 2 +- src/Api/Struct/Server/Admin.php | 2 +- src/Api/Struct/Server/GeneralInfo.php | 2 +- src/Api/Struct/Server/Preferences.php | 2 +- src/Api/Struct/Server/SessionPreferences.php | 2 +- src/Api/Struct/Server/Statistics.php | 2 +- src/Api/Struct/Server/Statistics/DiskSpace.php | 2 +- src/Api/Struct/Server/Statistics/LoadAverage.php | 2 +- src/Api/Struct/Server/Statistics/Memory.php | 2 +- src/Api/Struct/Server/Statistics/Objects.php | 2 +- src/Api/Struct/Server/Statistics/Other.php | 2 +- src/Api/Struct/Server/Statistics/Swap.php | 2 +- src/Api/Struct/Server/Statistics/Version.php | 2 +- src/Api/Struct/Server/UpdatesInfo.php | 2 +- src/Api/Struct/ServicePlan/Info.php | 2 +- src/Api/Struct/ServicePlanAddon/Info.php | 2 +- src/Api/Struct/Session/Info.php | 2 +- src/Api/Struct/Site/GeneralInfo.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 2 +- src/Api/Struct/Site/Info.php | 2 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 2 +- src/Api/Struct/SiteAlias/Info.php | 2 +- src/Api/Struct/Subdomain/Info.php | 2 +- src/Api/Struct/Ui/CustomButton.php | 2 +- src/Api/Struct/Webspace/DiskUsage.php | 2 +- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/HostingPropertyInfo.php | 2 +- src/Api/Struct/Webspace/Info.php | 2 +- src/Api/Struct/Webspace/Limit.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- src/Api/Struct/Webspace/LimitInfo.php | 2 +- src/Api/Struct/Webspace/Limits.php | 2 +- src/Api/Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PermissionInfo.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- src/Api/Struct/Webspace/PhysicalHostingDescriptor.php | 2 +- src/Api/XmlResponse.php | 2 +- tests/AbstractTestCase.php | 2 +- tests/ApiClientTest.php | 2 +- tests/CertificateTest.php | 2 +- tests/CustomerTest.php | 2 +- tests/DatabaseServerTest.php | 2 +- tests/DatabaseTest.php | 2 +- tests/DnsTemplateTest.php | 2 +- tests/DnsTest.php | 2 +- tests/EventLogTest.php | 2 +- tests/IpTest.php | 2 +- tests/LocaleTest.php | 2 +- tests/MailTest.php | 2 +- tests/PhpHandlerTest.php | 2 +- tests/ProtectedDirectoryTest.php | 2 +- tests/ResellerTest.php | 2 +- tests/SecretKeyTest.php | 2 +- tests/ServerTest.php | 2 +- tests/ServicePlanTest.php | 2 +- tests/SessionTest.php | 2 +- tests/SiteAliasTest.php | 2 +- tests/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/UiTest.php | 2 +- tests/Utility/KeyLimitChecker.php | 2 +- tests/Utility/PasswordProvider.php | 2 +- tests/WebspaceTest.php | 2 +- wait-for-plesk.sh | 2 +- 120 files changed, 120 insertions(+), 116 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a0332132..8c9c6e32 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ +# Copyright 1999-2023. Plesk International GmbH. version: '2' services: plesk: diff --git a/phpcs.xml.dist b/phpcs.xml.dist index b6263f5b..05b5cd74 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,4 +1,5 @@ + src tests diff --git a/phpunit-watcher.yml b/phpunit-watcher.yml index 8bae500e..8c24a088 100644 --- a/phpunit-watcher.yml +++ b/phpunit-watcher.yml @@ -1,3 +1,4 @@ +# Copyright 1999-2023. Plesk International GmbH. phpunit: arguments: '--stop-on-failure' timeout: 0 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d32b2193..4ae5ea63 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/psalm.xml b/psalm.xml index 43b6fdac..91d9afed 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,4 +1,5 @@ + Plesk" > /dev/null From 95803579ca90f8aa6367d2dd933690143b84e046 Mon Sep 17 00:00:00 2001 From: Stanislav Matukevich Date: Tue, 2 May 2023 17:03:28 +0300 Subject: [PATCH 054/126] Add test for Update Certificate --- src/Api/Operator/Certificate.php | 40 +++++++++++++++++++++--- src/Api/Struct/Certificate/Info.php | 30 ++++++++++++++---- tests/CertificateTest.php | 47 ++++++++++++++++++++++++++++- 3 files changed, 105 insertions(+), 12 deletions(-) diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 980dd2fc..06f4371a 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -21,19 +21,49 @@ public function generate(array $properties): Struct\Info return new Struct\Info($response); } - public function install(array $properties, string $request, string $privateKey): bool + /** + * @param array $properties + * @param string|Struct\Info $certificate + * @param string|null $privateKey + */ + public function install(array $properties, $certificate, ?string $privateKey = null): bool + { + return $this->callApi('install', $properties, $certificate, $privateKey); + } + + /** + * @param array $properties + * @param Struct\Info $certificate + */ + public function update(array $properties, Struct\Info $certificate): bool + { + return $this->callApi('update', $properties, $certificate); + } + + /** + * @param string $method + * @param array $properties + * @param string|Struct\Info $certificate + * @param string|null $privateKey + */ + private function callApi(string $method, array $properties, $certificate, ?string $privateKey = null): bool { $packet = $this->client->getPacket(); - $installTag = $packet->addChild($this->wrapperTag)->addChild('install'); + $installTag = $packet->addChild($this->wrapperTag)->addChild($method); foreach ($properties as $name => $value) { $installTag->{$name} = $value; } $contentTag = $installTag->addChild('content'); - $contentTag->addChild('csr', $request); - $contentTag->addChild('pvt', $privateKey); - + if (is_string($certificate)) { + $contentTag->addChild('csr', $certificate); + $contentTag->addChild('pvt', $privateKey); + } elseif ($certificate instanceof \PleskX\Api\Struct\Certificate\Info) { + foreach ($certificate->getMapping() as $name => $value) { + $contentTag->{$name} = $value; + } + } $result = $this->client->request($packet); return 'ok' == (string) $result->status; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 4b147e06..49b86c43 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -7,14 +7,32 @@ class Info extends AbstractStruct { - public string $request; - public string $privateKey; + public ?string $request = null; + public ?string $privateKey = null; + public ?string $publicKey = null; + public ?string $publicKeyCA = null; - public function __construct(\SimpleXMLElement $apiResponse) + public function __construct($input) { - $this->initScalarProperties($apiResponse, [ - ['csr' => 'request'], - ['pvt' => 'privateKey'], + if ($input instanceof \SimpleXMLElement) { + $this->initScalarProperties($input, [ + ['csr' => 'request'], + ['pvt' => 'privateKey'], + ]); + } else { + foreach ($input as $name => $value) { + $this->$name = $value; + } + } + } + + public function getMapping(): array + { + return array_filter([ + 'csr' => $this->request, + 'pvt' => $this->privateKey, + 'cert' => $this->publicKey, + 'ca' => $this->publicKeyCA, ]); } } diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 1ff3e311..6b0df6e7 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -3,6 +3,8 @@ namespace PleskXTest; +use PleskX\Api\Struct\Certificate as Struct; + class CertificateTest extends AbstractTestCase { private array $certificateProperties = [ @@ -14,6 +16,13 @@ class CertificateTest extends AbstractTestCase 'email' => 'info@plesk.com', 'name' => 'plesk.com', ]; + private array $distinguishedNames = [ + "countryName" => "CH", + "stateOrProvinceName" => "Schaffhausen", + "localityName" => "Schaffhausen", + "organizationName" => "Plesk", + "emailAddress" => "info@plesk.com" + ]; public function testGenerate() { @@ -37,6 +46,22 @@ public function testInstall() static::$client->certificate()->delete('test', ['admin' => true]); } + public function testUpdate() + { + $payLoad = [ + 'name' => 'test', + 'admin' => true, + ]; + $certificate = static::$client->certificate()->generate($this->certificateProperties); + static::$client->certificate()->install($payLoad, $certificate); + + $certificate = $this->generateCertificateOpenSsl($this->distinguishedNames); + $result = static::$client->certificate()->update($payLoad, $certificate); + $this->assertTrue($result); + + static::$client->certificate()->delete('test', ['admin' => true]); + } + public function testDelete() { $certificate = static::$client->certificate()->generate($this->certificateProperties); @@ -44,9 +69,29 @@ public function testDelete() static::$client->certificate()->install([ 'name' => 'test', 'admin' => true, - ], $certificate->request, $certificate->privateKey); + ], $certificate); $result = static::$client->certificate()->delete('test', ['admin' => true]); $this->assertTrue($result); } + + private function generateCertificateOpenSsl(array $dn): Struct\Info + { + $privkey = openssl_pkey_new([ + "private_key_bits" => 2048, + "private_key_type" => OPENSSL_KEYTYPE_RSA, + ]); + $csr = openssl_csr_new($dn, $privkey, ['digest_alg' => 'sha256']); + $x509 = openssl_csr_sign($csr, null, $privkey, $days = 365, ['digest_alg' => 'sha256']); + + openssl_csr_export($csr, $csrout); + openssl_x509_export($x509, $certout); + openssl_pkey_export($privkey, $pkeyout); + + return new Struct\Info([ + 'publicKey' => $certout, + 'request' => $csrout, + 'privateKey' => $pkeyout + ]); + } } From 167c71a75e5228e11d8603609e84c871ef181ffc Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 9 May 2023 18:08:59 +0300 Subject: [PATCH 055/126] Add support for PHP 8.2 --- Dockerfile | 2 +- composer.json | 5 +- composer.lock | 1113 +++++++++++++++++++++++--------------------- src/Api/Client.php | 26 +- 4 files changed, 598 insertions(+), 548 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3b77dae..d163d3f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0-cli +FROM php:8.2-cli RUN apt-get update \ && apt-get install -y unzip \ diff --git a/composer.json b/composer.json index ef6f9710..5a34e5c8 100644 --- a/composer.json +++ b/composer.json @@ -14,10 +14,11 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^7.4 || ^8.0 || ^8.2", "ext-curl": "*", "ext-xml": "*", - "ext-simplexml": "*" + "ext-simplexml": "*", + "ext-dom": "*" }, "require-dev": { "phpunit/phpunit": "^9", diff --git a/composer.lock b/composer.lock index 9c968df9..f26f10c2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d10c51a90b73fb910cfb5516625446f8", + "content-hash": "346f0c9e4762a2b782a3a4b8907d0c6b", "packages": [], "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae" + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", - "reference": "c5fc66a78ee38d7ac9195a37bacaf940eb3f65ae", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", "shasum": "" }, "require": { @@ -40,13 +40,13 @@ } }, "autoload": { - "psr-4": { - "Amp\\": "lib" - }, "files": [ "lib/functions.php", "lib/Internal/functions.php" - ] + ], + "psr-4": { + "Amp\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -71,7 +71,7 @@ } ], "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "http://amphp.org/amp", + "homepage": "https://amphp.org/amp", "keywords": [ "async", "asynchronous", @@ -86,7 +86,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.1" + "source": "https://github.com/amphp/amp/tree/v2.6.2" }, "funding": [ { @@ -94,7 +94,7 @@ "type": "github" } ], - "time": "2021-09-23T18:43:08+00:00" + "time": "2022-02-20T17:52:18+00:00" }, { "name": "amphp/byte-stream", @@ -129,12 +129,12 @@ } }, "autoload": { - "psr-4": { - "Amp\\ByteStream\\": "lib" - }, "files": [ "lib/functions.php" - ] + ], + "psr-4": { + "Amp\\ByteStream\\": "lib" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -175,16 +175,16 @@ }, { "name": "clue/stdio-react", - "version": "v2.5.0", + "version": "v2.6.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-stdio.git", - "reference": "c73bcdc228eca627992c0088f7bc30b794fde8da" + "reference": "dfa6c378aabdff718202d4e2453f752c38ea3399" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/c73bcdc228eca627992c0088f7bc30b794fde8da", - "reference": "c73bcdc228eca627992c0088f7bc30b794fde8da", + "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/dfa6c378aabdff718202d4e2453f752c38ea3399", + "reference": "dfa6c378aabdff718202d4e2453f752c38ea3399", "shasum": "" }, "require": { @@ -235,7 +235,7 @@ ], "support": { "issues": "https://github.com/clue/reactphp-stdio/issues", - "source": "https://github.com/clue/reactphp-stdio/tree/v2.5.0" + "source": "https://github.com/clue/reactphp-stdio/tree/v2.6.0" }, "funding": [ { @@ -247,7 +247,7 @@ "type": "github" } ], - "time": "2021-10-25T08:01:22+00:00" + "time": "2022-03-18T15:09:30+00:00" }, { "name": "clue/term-react", @@ -387,16 +387,16 @@ }, { "name": "composer/package-versions-deprecated", - "version": "1.11.99.4", + "version": "1.11.99.5", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b174585d1fe49ceed21928a945138948cb394600" + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", - "reference": "b174585d1fe49ceed21928a945138948cb394600", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", "shasum": "" }, "require": { @@ -440,7 +440,7 @@ "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" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" }, "funding": [ { @@ -456,27 +456,98 @@ "type": "tidelift" } ], - "time": "2021-09-13T08:41:34+00:00" + "time": "2022-01-17T14:14:24+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be/" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "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": "2022-11-17T09:50:14+00:00" }, { "name": "composer/semver", - "version": "3.2.6", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "83e511e247de329283478496f7a1e114c9517506" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506", - "reference": "83e511e247de329283478496f7a1e114c9517506", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan": "^1.4", "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", @@ -521,7 +592,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.6" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -537,29 +608,31 @@ "type": "tidelift" } ], - "time": "2021-10-25T11:34:17+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -585,7 +658,7 @@ "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" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -601,7 +674,7 @@ "type": "tidelift" } ], - "time": "2021-07-31T17:03:58+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -640,31 +713,75 @@ }, "time": "2019-12-04T15:06:13+00:00" }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" + }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -691,7 +808,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -707,7 +824,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "evenement/evenement", @@ -803,16 +920,16 @@ }, { "name": "felixfbecker/language-server-protocol", - "version": "1.5.1", + "version": "v1.5.2", "source": { "type": "git", "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", - "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", "shasum": "" }, "require": { @@ -853,42 +970,37 @@ ], "support": { "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" }, - "time": "2021-02-22T14:02:09+00:00" + "time": "2022-03-02T22:36:06+00:00" }, { "name": "jolicode/jolinotif", - "version": "v2.3.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/jolicode/JoliNotif.git", - "reference": "9cca717bbc47aa2ffeca51d77daa13b824a489ee" + "reference": "a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/9cca717bbc47aa2ffeca51d77daa13b824a489ee", - "reference": "9cca717bbc47aa2ffeca51d77daa13b824a489ee", + "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa", + "reference": "a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa", "shasum": "" }, "require": { - "php": ">=7.0", - "symfony/process": "^3.3|^4.0|^5.0" + "php": ">=8.0", + "symfony/process": "^5.4 || ^6.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "symfony/finder": "^3.3|^4.0|^5.0", - "symfony/phpunit-bridge": "^3.4.26|^4.0|^5.0" + "friendsofphp/php-cs-fixer": "^3.13", + "symfony/finder": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^5.4 || ^6.0" }, "bin": [ "jolinotif" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, "autoload": { "psr-4": { "Joli\\JoliNotif\\": "src/" @@ -914,7 +1026,7 @@ ], "support": { "issues": "https://github.com/jolicode/JoliNotif/issues", - "source": "https://github.com/jolicode/JoliNotif/tree/v2.3.0" + "source": "https://github.com/jolicode/JoliNotif/tree/v2.5.0" }, "funding": [ { @@ -922,41 +1034,42 @@ "type": "tidelift" } ], - "time": "2021-03-07T12:30:00+00:00" + "time": "2022-12-24T13:38:12+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -972,7 +1085,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -980,20 +1093,20 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.0.0", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", "shasum": "" }, "require": { @@ -1029,22 +1142,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" }, - "time": "2020-12-01T19:48:11+00:00" + "time": "2023-04-09T17:37:40+00:00" }, { "name": "nikic/php-parser", - "version": "v4.13.1", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -1085,9 +1198,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" }, - "time": "2021-11-03T20:52:16+00:00" + "time": "2023-03-05T19:49:14+00:00" }, { "name": "openlss/lib-array2xml", @@ -1204,16 +1317,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -1249,9 +1362,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1365,25 +1478,33 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.1", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + "reference": "dfc078e8af9c99210337325ff5aa152872c98714" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714", + "reference": "dfc078e8af9c99210337325ff5aa152872c98714", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -1409,96 +1530,74 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.1" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2023-03-27T19:02:04+00:00" }, { - "name": "phpspec/prophecy", - "version": "1.14.0", + "name": "phpstan/phpdoc-parser", + "version": "1.20.4", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", + "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "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" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Prophecy\\": "src/Prophecy" + "PHPStan\\PhpDocParser\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com/" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.4" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2023-05-02T09:19:37+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.9", + "version": "9.2.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b" + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", - "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.15", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1513,8 +1612,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -1547,7 +1646,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" }, "funding": [ { @@ -1555,20 +1654,20 @@ "type": "github" } ], - "time": "2021-11-19T15:21:02+00:00" + "time": "2023-03-06T12:58:08+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -1607,7 +1706,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -1615,7 +1714,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -1800,20 +1899,20 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.6.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", + "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1824,31 +1923,26 @@ "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.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -1856,15 +1950,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1887,38 +1981,48 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2023-04-14T08:58:40+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1945,36 +2049,36 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1995,39 +2099,37 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "react/event-loop", - "version": "v1.2.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2" + "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/be6dee480fc4692cec0504e65eb486e3be1aa6f2", - "reference": "be6dee480fc4692cec0504e65eb486e3be1aa6f2", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "suggest": { - "ext-event": "~1.0 for ExtEventLoop", - "ext-pcntl": "For signal handling support when using the StreamSelectLoop", - "ext-uv": "* for ExtUvLoop" + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, "type": "library", "autoload": { "psr-4": { - "React\\EventLoop\\": "src" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2063,19 +2165,15 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.2.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2021-07-11T12:31:24+00:00" + "time": "2023-05-05T10:11:24+00:00" }, { "name": "react/stream", @@ -2328,16 +2426,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -2390,7 +2488,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -2398,7 +2496,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -2459,16 +2557,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { @@ -2513,7 +2611,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -2521,20 +2619,20 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -2576,7 +2674,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -2584,20 +2682,20 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -2653,7 +2751,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -2661,20 +2759,20 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { @@ -2717,7 +2815,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" }, "funding": [ { @@ -2725,7 +2823,7 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2022-02-14T08:28:10+00:00" }, { "name": "sebastian/lines-of-code", @@ -2898,16 +2996,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -2946,10 +3044,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://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" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -2957,7 +3055,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -3016,28 +3114,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -3060,7 +3158,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -3068,7 +3166,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", @@ -3125,33 +3223,34 @@ }, { "name": "spatie/phpunit-watcher", - "version": "1.23.2", + "version": "1.23.6", "source": { "type": "git", "url": "https://github.com/spatie/phpunit-watcher.git", - "reference": "548be41abab87336ef95cef5bf5cbd564bce5c26" + "reference": "c192fff763810c8378511bcf0069df4b91478866" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/548be41abab87336ef95cef5bf5cbd564bce5c26", - "reference": "548be41abab87336ef95cef5bf5cbd564bce5c26", + "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/c192fff763810c8378511bcf0069df4b91478866", + "reference": "c192fff763810c8378511bcf0069df4b91478866", "shasum": "" }, "require": { "clue/stdio-react": "^2.4", "jolicode/jolinotif": "^2.2", - "php": "^7.2 | ^8.0", - "symfony/console": "^5.2", - "symfony/finder": "^5.2", - "symfony/process": "^5.2", - "symfony/yaml": "^5.2", - "yosymfony/resource-watcher": "^2.0" + "php": "^7.2 | ^8.0 | ^8.1", + "symfony/console": "^5 | ^6", + "symfony/finder": "^5.4 | ^6", + "symfony/process": "^5.4 | ^6", + "symfony/yaml": "^5.2 | ^6", + "yosymfony/resource-watcher": "^2.0 | ^3.0" }, "conflict": { + "symfony/console": "<5.2", "yosymfony/resource-watcher": "<2.0" }, "require-dev": { - "phpunit/phpunit": "^8.0 | ^9.0" + "phpunit/phpunit": "^8.6 | ^9.0" }, "bin": [ "phpunit-watcher" @@ -3182,22 +3281,22 @@ ], "support": { "issues": "https://github.com/spatie/phpunit-watcher/issues", - "source": "https://github.com/spatie/phpunit-watcher/tree/1.23.2" + "source": "https://github.com/spatie/phpunit-watcher/tree/1.23.6" }, - "time": "2021-02-26T08:00:42+00:00" + "time": "2022-01-31T11:57:13+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e", - "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -3233,56 +3332,55 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-10-11T04:00:11+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "symfony/console", - "version": "v5.3.11", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e7ab8f5905058984899b05a4648096f558bfeba" + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e7ab8f5905058984899b05a4648096f558bfeba", - "reference": "3e7ab8f5905058984899b05a4648096f558bfeba", + "url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f", + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3317,12 +3415,12 @@ "homepage": "https://symfony.com/", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.11" + "source": "https://github.com/symfony/console/tree/v6.2.10" }, "funding": [ { @@ -3338,29 +3436,29 @@ "type": "tidelift" } ], - "time": "2021-11-21T19:41:05+00:00" + "time": "2023-04-28T13:37:43+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -3389,7 +3487,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" }, "funding": [ { @@ -3405,24 +3503,25 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/finder", - "version": "v5.3.7", + "version": "v5.4.21", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" + "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", + "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -3451,7 +3550,7 @@ "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" + "source": "https://github.com/symfony/finder/tree/v5.4.21" }, "funding": [ { @@ -3467,32 +3566,35 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2023-02-16T09:33:00+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3500,12 +3602,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3530,7 +3632,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -3546,20 +3648,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.23.1", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", - "reference": "16880ba9c5ebe3642d1995ab866db29270b36535", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -3571,7 +3673,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3579,12 +3681,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3611,7 +3713,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -3627,20 +3729,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -3652,7 +3754,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3660,12 +3762,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -3695,7 +3797,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -3711,32 +3813,35 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3744,12 +3849,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3775,7 +3880,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -3791,20 +3896,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "name": "symfony/polyfill-php80", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -3813,7 +3918,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3821,91 +3926,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com/", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.23.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, - "files": [ - "bootstrap.php" - ], "classmap": [ "Resources/stubs" ] @@ -3937,7 +3963,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -3953,25 +3979,24 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", - "version": "v5.3.12", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e498803a6e95ede78e9d5646ad32a2255c033a6a" + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e498803a6e95ede78e9d5646ad32a2255c033a6a", - "reference": "e498803a6e95ede78e9d5646ad32a2255c033a6a", + "url": "https://api.github.com/repos/symfony/process/zipball/b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -3999,7 +4024,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.12" + "source": "https://github.com/symfony/process/tree/v6.2.10" }, "funding": [ { @@ -4015,26 +4040,25 @@ "type": "tidelift" } ], - "time": "2021-11-22T22:39:13+00:00" + "time": "2023-04-18T13:56:57+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "php": ">=8.1", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4045,7 +4069,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -4055,7 +4079,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4082,7 +4109,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" }, "funding": [ { @@ -4098,44 +4125,47 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/string", - "version": "v5.3.10", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, "files": [ "Resources/functions.php" ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, "exclude-from-classmap": [ "/Tests/" ] @@ -4165,7 +4195,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.10" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -4181,32 +4211,31 @@ "type": "tidelift" } ], - "time": "2021-10-27T18:21:46+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/yaml", - "version": "v5.3.11", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "226638aa877bc4104e619a15f27d8141cd6b4e4a" + "reference": "61916f3861b1e9705b18cfde723921a71dd1559d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/226638aa877bc4104e619a15f27d8141cd6b4e4a", - "reference": "226638aa877bc4104e619a15f27d8141cd6b4e4a", + "url": "https://api.github.com/repos/symfony/yaml/zipball/61916f3861b1e9705b18cfde723921a71dd1559d", + "reference": "61916f3861b1e9705b18cfde723921a71dd1559d", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-ctype": "~1.8" + "php": ">=8.1", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^4.4|^5.0" + "symfony/console": "^5.4|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -4240,7 +4269,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.3.11" + "source": "https://github.com/symfony/yaml/tree/v6.2.10" }, "funding": [ { @@ -4256,7 +4285,7 @@ "type": "tidelift" } ], - "time": "2021-11-20T16:42:42+00:00" + "time": "2023-04-28T13:25:36+00:00" }, { "name": "theseer/tokenizer", @@ -4310,16 +4339,16 @@ }, { "name": "vimeo/psalm", - "version": "4.13.1", + "version": "4.30.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "5cf660f63b548ccd4a56f62d916ee4d6028e01a3" + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/5cf660f63b548ccd4a56f62d916ee4d6028e01a3", - "reference": "5cf660f63b548ccd4a56f62d916ee4d6028e01a3", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", "shasum": "" }, "require": { @@ -4327,7 +4356,7 @@ "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", + "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -4344,6 +4373,7 @@ "php": "^7.1|^8", "sebastian/diff": "^3.0 || ^4.0", "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", "webmozart/path-util": "^2.3" }, "provide": { @@ -4357,6 +4387,7 @@ "phpdocumentor/reflection-docblock": "^5", "phpmyadmin/sql-parser": "5.1.0||dev-master", "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", "phpunit/phpunit": "^9.0", "psalm/plugin-phpunit": "^0.16", "slevomat/coding-standard": "^7.0", @@ -4385,13 +4416,13 @@ } }, "autoload": { - "psr-4": { - "Psalm\\": "src/Psalm/" - }, "files": [ "src/functions.php", "src/spl_object_id.php" - ] + ], + "psr-4": { + "Psalm\\": "src/Psalm/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4410,27 +4441,27 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.13.1" + "source": "https://github.com/vimeo/psalm/tree/4.30.0" }, - "time": "2021-11-23T23:52:49+00:00" + "time": "2022-11-06T20:37:08+00:00" }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -4468,9 +4499,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" }, { "name": "webmozart/path-util", @@ -4525,16 +4556,16 @@ }, { "name": "yosymfony/resource-watcher", - "version": "v2.0.1", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/yosymfony/resource-watcher.git", - "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73" + "reference": "2f197cee0231c06db865d4ad2d8d7cd3faead2f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", - "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", + "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/2f197cee0231c06db865d4ad2d8d7cd3faead2f8", + "reference": "2f197cee0231c06db865d4ad2d8d7cd3faead2f8", "shasum": "" }, "require": { @@ -4548,7 +4579,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4578,7 +4609,7 @@ "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" + "time": "2020-06-10T14:58:36+00:00" } ], "aliases": [], @@ -4587,11 +4618,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", + "php": "^7.4 || ^8.0 || ^8.2", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/src/Api/Client.php b/src/Api/Client.php index 47b286a3..e9c31469 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -3,6 +3,7 @@ namespace PleskX\Api; +use DOMDocument; use SimpleXMLElement; /** @@ -257,17 +258,24 @@ public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): arr $responseXml = $this->performHttpRequest($xmlString); } + return $this->splitResponseToArray($responseXml, $mode); + } + + private function splitResponseToArray(XmlResponse $responseXml, $mode = self::RESPONSE_SHORT): array + { $responses = []; + foreach ($responseXml->children() as $childNode) { - $xml = $this->getPacket(); - $dom = dom_import_simplexml($xml)->ownerDocument; + $dom = $this->getDomDocument($this->getPacket()); if (!$dom) { continue; } $childDomNode = dom_import_simplexml($childNode); - $childDomNode = $dom->importNode($childDomNode, true); - $dom->documentElement->appendChild($childDomNode); + if (!is_null($childDomNode)) { + $childDomNode = $dom->importNode($childDomNode, true); + $dom->documentElement->appendChild($childDomNode); + } $response = simplexml_load_string($dom->saveXML()); $responses[] = (self::RESPONSE_FULL == $mode) ? $response : $response->xpath('//result')[0]; @@ -276,6 +284,16 @@ public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): arr return $responses; } + private function getDomDocument(SimpleXMLElement $xml): ?DOMDocument + { + $dom = dom_import_simplexml($xml); + if (is_null($dom)) { + return null; + } + + return $dom->ownerDocument; + } + /** * Retrieve list of headers needed for request. * From 1cd7ec1882de0bd5e4f21de2e9fa68365161cb26 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 9 May 2023 18:12:57 +0300 Subject: [PATCH 056/126] Remove unnecessary comments and sections because the file is very small --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 73ee258c..2f573155 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -# vendor /vendor/ - -# tests /phpunit.xml /.phpunit.result.cache -/coverage.xml \ No newline at end of file +/coverage.xml From db2baca0f85ed44e7f064f53d90280b0f608f1a5 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 9 May 2023 18:13:40 +0300 Subject: [PATCH 057/126] Ignore local env used by direnv/autoenv --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2f573155..3efa5ae6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.env /vendor/ /phpunit.xml /.phpunit.result.cache From e49ca0a9185637232b0ad5253380551c970c0885 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 10 May 2023 09:28:32 +0300 Subject: [PATCH 058/126] Make the deps compatible with PHP 7.4, 8.0 and 8.2 --- composer.lock | 314 +++++++++++++++++++++++++++++++------------------- 1 file changed, 196 insertions(+), 118 deletions(-) diff --git a/composer.lock b/composer.lock index f26f10c2..af46dd92 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "346f0c9e4762a2b782a3a4b8907d0c6b", + "content-hash": "0af44f0a343dc95f4c512963022fe374", "packages": [], "packages-dev": [ { @@ -758,30 +758,30 @@ }, { "name": "doctrine/instantiator", - "version": "2.0.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^8.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^11", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { @@ -808,7 +808,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { @@ -824,7 +824,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:23:10+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { "name": "evenement/evenement", @@ -976,26 +976,26 @@ }, { "name": "jolicode/jolinotif", - "version": "v2.5.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/jolicode/JoliNotif.git", - "reference": "a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa" + "reference": "a15bfc0d5aef432f150385924ede4e099643edb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa", - "reference": "a10a7cb3bf6dbf8833d1d1f1f0554506cb1d9eaa", + "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/a15bfc0d5aef432f150385924ede4e099643edb7", + "reference": "a15bfc0d5aef432f150385924ede4e099643edb7", "shasum": "" }, "require": { - "php": ">=8.0", - "symfony/process": "^5.4 || ^6.0" + "php": ">=7.4", + "symfony/process": "^4.0|^5.0|^6.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.13", - "symfony/finder": "^5.4 || ^6.0", - "symfony/phpunit-bridge": "^5.4 || ^6.0" + "friendsofphp/php-cs-fixer": "^3.0", + "symfony/finder": "^5.0", + "symfony/phpunit-bridge": "^5.0" }, "bin": [ "jolinotif" @@ -1026,7 +1026,7 @@ ], "support": { "issues": "https://github.com/jolicode/JoliNotif/issues", - "source": "https://github.com/jolicode/JoliNotif/tree/v2.5.0" + "source": "https://github.com/jolicode/JoliNotif/tree/v2.4.0" }, "funding": [ { @@ -1034,7 +1034,7 @@ "type": "tidelift" } ], - "time": "2022-12-24T13:38:12+00:00" + "time": "2021-12-01T16:20:42+00:00" }, { "name": "myclabs/deep-copy", @@ -2002,27 +2002,22 @@ }, { "name": "psr/container", - "version": "2.0.2", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -2049,36 +2044,36 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/log", - "version": "3.0.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "src" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2099,9 +2094,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/1.1.4" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2021-05-03T11:20:27+00:00" }, { "name": "react/event-loop", @@ -3344,43 +3339,46 @@ }, { "name": "symfony/console", - "version": "v6.2.10", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "12288d9f4500f84a4d02254d4aa968b15488476f" + "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f", - "reference": "12288d9f4500f84a4d02254d4aa968b15488476f", + "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", + "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=7.2.5", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^5.1|^6.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" }, "provide": { - "psr/log-implementation": "1.0|2.0|3.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3420,7 +3418,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.10" + "source": "https://github.com/symfony/console/tree/v5.4.23" }, "funding": [ { @@ -3436,29 +3434,29 @@ "type": "tidelift" } ], - "time": "2023-04-28T13:37:43+00:00" + "time": "2023-04-24T18:47:29+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3487,7 +3485,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -3503,7 +3501,7 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:25:55+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/finder", @@ -3898,6 +3896,85 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/polyfill-php80", "version": "v1.27.0", @@ -3983,20 +4060,21 @@ }, { "name": "symfony/process", - "version": "v6.2.10", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e" + "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", - "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", + "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", + "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", "autoload": { @@ -4024,7 +4102,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.10" + "source": "https://github.com/symfony/process/tree/v5.4.23" }, "funding": [ { @@ -4040,25 +4118,26 @@ "type": "tidelift" } ], - "time": "2023-04-18T13:56:57+00:00" + "time": "2023-04-18T13:50:24+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.2.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "a8c9cedf55f314f3a186041d19537303766df09a" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", - "reference": "a8c9cedf55f314f3a186041d19537303766df09a", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/container": "^2.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4069,7 +4148,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4079,10 +4158,7 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4109,7 +4185,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -4125,38 +4201,38 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:32:47+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/string", - "version": "v6.2.8", + "version": "v5.4.22", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" + "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", - "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", + "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": ">=3.0" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.0|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", "autoload": { @@ -4195,7 +4271,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.8" + "source": "https://github.com/symfony/string/tree/v5.4.22" }, "funding": [ { @@ -4211,31 +4287,32 @@ "type": "tidelift" } ], - "time": "2023-03-20T16:06:02+00:00" + "time": "2023-03-14T06:11:53+00:00" }, { "name": "symfony/yaml", - "version": "v6.2.10", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "61916f3861b1e9705b18cfde723921a71dd1559d" + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/61916f3861b1e9705b18cfde723921a71dd1559d", - "reference": "61916f3861b1e9705b18cfde723921a71dd1559d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<5.3" }, "require-dev": { - "symfony/console": "^5.4|^6.0" + "symfony/console": "^5.3|^6.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -4269,7 +4346,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.2.10" + "source": "https://github.com/symfony/yaml/tree/v5.4.23" }, "funding": [ { @@ -4285,7 +4362,7 @@ "type": "tidelift" } ], - "time": "2023-04-28T13:25:36+00:00" + "time": "2023-04-23T19:33:36+00:00" }, { "name": "theseer/tokenizer", @@ -4621,7 +4698,8 @@ "php": "^7.4 || ^8.0 || ^8.2", "ext-curl": "*", "ext-xml": "*", - "ext-simplexml": "*" + "ext-simplexml": "*", + "ext-dom": "*" }, "platform-dev": [], "plugin-api-version": "2.3.0" From f3c93f460f97bf6d927b149ec1ef14a970fc5b5e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 10 May 2023 12:48:36 +0300 Subject: [PATCH 059/126] Set PHP 7.4 as a minimal required version for dependencies --- composer.json | 5 ++++- composer.lock | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 5a34e5c8..edd29d47 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,10 @@ "squizlabs/php_codesniffer": "^3.6" }, "config": { - "process-timeout": 0 + "process-timeout": 0, + "platform": { + "php": "7.4.27" + } }, "scripts": { "test": "phpunit", diff --git a/composer.lock b/composer.lock index af46dd92..b20a8f46 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0af44f0a343dc95f4c512963022fe374", + "content-hash": "8693c4e6fa75b816346d0f466dcb2f92", "packages": [], "packages-dev": [ { @@ -4702,5 +4702,8 @@ "ext-dom": "*" }, "platform-dev": [], + "platform-overrides": { + "php": "7.4.27" + }, "plugin-api-version": "2.3.0" } From e0d9fdc403d0910d404685c29bbe5584000674a0 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 11 Jul 2023 13:18:58 +0300 Subject: [PATCH 060/126] Maintain dependencies using Dependabot --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..dd34ec4e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "TECH " From 4e8145cd8040e8c7ee130854ab8d0f54663baf39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 10:19:28 +0000 Subject: [PATCH 061/126] TECH Bump phpunit/phpunit from 9.6.7 to 9.6.10 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.7 to 9.6.10. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.10/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.7...9.6.10) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index b20a8f46..af0f3885 100644 --- a/composer.lock +++ b/composer.lock @@ -1148,16 +1148,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.4", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -1198,9 +1198,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-03-05T19:49:14+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "openlss/lib-array2xml", @@ -1899,16 +1899,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.7", + "version": "9.6.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2" + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", - "reference": "c993f0d3b0489ffc42ee2fe0bd645af1538a63b2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", + "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", "shasum": "" }, "require": { @@ -1982,7 +1982,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.7" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" }, "funding": [ { @@ -1998,7 +1998,7 @@ "type": "tidelift" } ], - "time": "2023-04-14T08:58:40+00:00" + "time": "2023-07-10T04:04:23+00:00" }, { "name": "psr/container", From 7accbec42dd21d2cbe7ebdb8a23121478dde4cf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:23:17 +0000 Subject: [PATCH 062/126] TECH Bump vimeo/psalm from 4.30.0 to 5.13.1 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 4.30.0 to 5.13.1. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/4.30.0...5.13.1) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- composer.lock | 496 ++++++++++++++++++++++++++------------------------ 2 files changed, 257 insertions(+), 241 deletions(-) diff --git a/composer.json b/composer.json index edd29d47..c28720b1 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require-dev": { "phpunit/phpunit": "^9", "spatie/phpunit-watcher": "^1.22", - "vimeo/psalm": "^4.10", + "vimeo/psalm": "^4.10 || ^5.0", "squizlabs/php_codesniffer": "^3.6" }, "config": { diff --git a/composer.lock b/composer.lock index af0f3885..67e86521 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8693c4e6fa75b816346d0f466dcb2f92", + "content-hash": "3eb1fd049f2b5d629b669a5dea01f0d2", "packages": [], "packages-dev": [ { @@ -385,79 +385,6 @@ ], "time": "2020-11-06T11:48:09+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "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.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": "2022-01-17T14:14:24+00:00" - }, { "name": "composer/pcre", "version": "3.1.0", @@ -715,25 +642,29 @@ }, { "name": "doctrine/deprecations", - "version": "v1.0.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", - "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -752,9 +683,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2022-05-02T15:47:09+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "doctrine/instantiator", @@ -974,6 +905,67 @@ }, "time": "2022-03-02T22:36:06+00:00" }, + { + "name": "fidry/cpu-core-counter", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.26 || ^8.5.31", + "theofidry/php-cs-fixer-config": "^1.0", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2022-12-24T12:35:10+00:00" + }, { "name": "jolicode/jolinotif", "version": "v2.4.0", @@ -1202,59 +1194,6 @@ }, "time": "2023-06-25T14:52:30+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/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "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": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com/", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "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.3", @@ -1478,16 +1417,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.1", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "dfc078e8af9c99210337325ff5aa152872c98714" + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714", - "reference": "dfc078e8af9c99210337325ff5aa152872c98714", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", + "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", "shasum": "" }, "require": { @@ -1530,28 +1469,30 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" }, - "time": "2023-03-27T19:02:04+00:00" + "time": "2023-05-30T18:13:47+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.20.4", + "version": "1.22.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd" + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", + "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -1575,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" }, - "time": "2023-05-02T09:19:37+00:00" + "time": "2023-06-29T20:46:06+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3216,6 +3157,70 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "spatie/array-to-xml", + "version": "2.17.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/array-to-xml.git", + "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", + "reference": "5cbec9c6ab17e320c58a259f0cebe88bde4a7c46", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^7.4|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "pestphp/pest": "^1.21", + "phpunit/phpunit": "^9.0", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ArrayToXml\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://freek.dev/", + "role": "Developer" + } + ], + "description": "Convert an array to xml", + "homepage": "https://github.com/spatie/array-to-xml", + "keywords": [ + "array", + "convert", + "xml" + ], + "support": { + "source": "https://github.com/spatie/array-to-xml/tree/2.17.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-12-26T08:22:07+00:00" + }, { "name": "spatie/phpunit-watcher", "version": "1.23.6", @@ -3339,16 +3344,16 @@ }, { "name": "symfony/console", - "version": "v5.4.23", + "version": "v5.4.24", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" + "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", - "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", + "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", "shasum": "" }, "require": { @@ -3418,7 +3423,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.23" + "source": "https://github.com/symfony/console/tree/v5.4.24" }, "funding": [ { @@ -3434,7 +3439,7 @@ "type": "tidelift" } ], - "time": "2023-04-24T18:47:29+00:00" + "time": "2023-05-26T05:13:16+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3503,6 +3508,70 @@ ], "time": "2022-01-02T09:53:40+00:00" }, + { + "name": "symfony/filesystem", + "version": "v5.4.25", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com/", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-31T13:04:02+00:00" + }, { "name": "symfony/finder", "version": "v5.4.21", @@ -4416,24 +4485,24 @@ }, { "name": "vimeo/psalm", - "version": "4.30.0", + "version": "5.13.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" + "reference": "086b94371304750d1c673315321a55d15fc59015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/086b94371304750d1c673315321a55d15fc59015", + "reference": "086b94371304750d1c673315321a55d15fc59015", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", + "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -4442,35 +4511,35 @@ "ext-mbstring": "*", "ext-simplexml": "*", "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.2", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "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 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" + "nikic/php-parser": "^4.14", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "sebastian/diff": "^4.0 || ^5.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", + "symfony/console": "^4.1.6 || ^5.0 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", + "amphp/phpunit-util": "^2.0", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.9", "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", "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", - "phpstan/phpdoc-parser": "1.2.* || 1.6.4", - "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 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.6", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^4.4 || ^5.0 || ^6.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -4486,17 +4555,14 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev", + "dev-master": "5.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], "psr-4": { "Psalm\\": "src/Psalm/" } @@ -4514,13 +4580,14 @@ "keywords": [ "code", "inspection", - "php" + "php", + "static analysis" ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.30.0" + "source": "https://github.com/vimeo/psalm/tree/5.13.1" }, - "time": "2022-11-06T20:37:08+00:00" + "time": "2023-06-27T16:39:49+00:00" }, { "name": "webmozart/assert", @@ -4580,57 +4647,6 @@ }, "time": "2022-06-03T18:03:27+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" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" - }, { "name": "yosymfony/resource-watcher", "version": "v3.0.0", From 8853bace23802e78cf0537ef0707253c10e8f6d2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 13 Jul 2023 23:13:41 +0300 Subject: [PATCH 063/126] TECH Get rid of ambiguous constructions --- psalm.xml | 2 ++ src/Api/Client.php | 45 +++++++++++++++++++------ src/Api/Operator.php | 6 ++-- src/Api/Operator/Database.php | 12 ++++--- src/Api/Operator/DatabaseServer.php | 5 ++- src/Api/Operator/Dns.php | 17 +++++++--- src/Api/Operator/DnsTemplate.php | 5 ++- src/Api/Operator/Mail.php | 4 +-- src/Api/Operator/PhpHandler.php | 11 +++--- src/Api/Operator/ProtectedDirectory.php | 5 ++- src/Api/Operator/Reseller.php | 4 +-- src/Api/Operator/SecretKey.php | 5 ++- src/Api/Operator/ServicePlan.php | 5 ++- src/Api/Operator/ServicePlanAddon.php | 5 ++- src/Api/Operator/SiteAlias.php | 5 ++- src/Api/Operator/Subdomain.php | 4 +-- src/Api/XmlResponse.php | 7 +++- 17 files changed, 107 insertions(+), 40 deletions(-) diff --git a/psalm.xml b/psalm.xml index 91d9afed..ee216500 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,6 +3,8 @@ 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); + $xml = $this->performSdkCall((string) $request); } else { $xml = $this->performHttpRequest((string) $request); } @@ -179,8 +176,25 @@ public function request($request, int $mode = self::RESPONSE_SHORT): XmlResponse ? call_user_func($this->verifyResponseCallback, $xml) : $this->verifyResponse($xml); - $result = (self::RESPONSE_FULL === $mode) ? $xml : $xml->xpath('//result')[0]; - return new XmlResponse((string) $result->asXML()); + $result = (self::RESPONSE_FULL === $mode) + ? $xml + : ($xml->xpath('//result') ?: [null])[0]; + + return new XmlResponse($result ? (string) $result->asXML() : ''); + } + + private function performSdkCall(string $request): XmlResponse + { + $version = ('' == $this->version) ? null : $this->version; + + $requestXml = new SimpleXMLElement($request); + $innerNodes = $requestXml->children(); + $innerXml = $innerNodes && count($innerNodes) > 0 && $innerNodes[0] ? $innerNodes[0]->asXml() : ''; + + /** @psalm-suppress UndefinedClass */ + $result = \pm_ApiRpc::getService($version)->call($innerXml, $this->login); + + return new XmlResponse($result ? (string) $result->asXML() : ''); } /** @@ -265,7 +279,12 @@ private function splitResponseToArray(XmlResponse $responseXml, $mode = self::RE { $responses = []; - foreach ($responseXml->children() as $childNode) { + $nodes = $responseXml->children(); + if (!$nodes) { + return []; + } + + foreach ($nodes as $childNode) { $dom = $this->getDomDocument($this->getPacket()); if (!$dom) { continue; @@ -278,7 +297,13 @@ private function splitResponseToArray(XmlResponse $responseXml, $mode = self::RE } $response = simplexml_load_string($dom->saveXML()); - $responses[] = (self::RESPONSE_FULL == $mode) ? $response : $response->xpath('//result')[0]; + if (!$response) { + return []; + } + + $responses[] = (self::RESPONSE_FULL == $mode) + ? $response + : ($response->xpath('//result') ?: [null])[0]; } return $responses; @@ -330,8 +355,8 @@ private function verifyResponse($xml): void } if ($xml->xpath('//status[text()="error"]') && $xml->xpath('//errcode') && $xml->xpath('//errtext')) { - $errorCode = (int) $xml->xpath('//errcode')[0]; - $errorMessage = (string) $xml->xpath('//errtext')[0]; + $errorCode = (int) ($xml->xpath('//errcode') ?: [null])[0]; + $errorMessage = (string) ($xml->xpath('//errtext') ?: [null])[0]; throw new Exception($errorMessage, $errorCode); } diff --git a/src/Api/Operator.php b/src/Api/Operator.php index 835f1552..ee3fcb73 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -86,11 +86,11 @@ protected function getItems($structClass, $infoTag, $field = null, $value = null $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - if (!is_null($filter) && !$filter($xmlResult->data->$infoTag)) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult || !isset($xmlResult->data) || !isset($xmlResult->data->$infoTag)) { continue; } - if (!isset($xmlResult->data) || !isset($xmlResult->data->$infoTag)) { + if (!is_null($filter) && !$filter($xmlResult->data->$infoTag)) { continue; } /** @psalm-suppress InvalidStringClass */ diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 39614a10..803e454e 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -77,8 +77,10 @@ public function getAll(string $field, $value): array { $response = $this->getBy('get-db', $field, $value); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - $items[] = new Struct\Info($xmlResult); + foreach ((array) $response->xpath('//result') as $xmlResult) { + if ($xmlResult) { + $items[] = new Struct\Info($xmlResult); + } } return $items; @@ -94,8 +96,10 @@ public function getAllUsers(string $field, $value): array { $response = $this->getBy('get-db-users', $field, $value); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - $items[] = new Struct\UserInfo($xmlResult); + foreach ((array) $response->xpath('//result') as $xmlResult) { + if ($xmlResult) { + $items[] = new Struct\UserInfo($xmlResult); + } } return $items; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index bc077674..4066a359 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -56,7 +56,10 @@ private function getBy($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $item = new Struct\Info($xmlResult->data); $item->id = (int) $xmlResult->id; $items[] = $item; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 60f6e813..fab5fb99 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -40,8 +40,10 @@ public function bulkCreate(array $records): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - $items[] = $xmlResult; + foreach ((array) $response->xpath('//result') as $xmlResult) { + if ($xmlResult) { + $items[] = $xmlResult; + } } return $items; @@ -76,7 +78,10 @@ public function getAll(string $field, $value): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $item = new Struct\Info($xmlResult->data); $item->id = (int) $xmlResult->id; $items[] = $item; @@ -114,8 +119,10 @@ public function bulkDelete(array $recordIds): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - $items[] = $xmlResult; + foreach ((array) $response->xpath('//result') as $xmlResult) { + if ($xmlResult) { + $items[] = $xmlResult; + } } return $items; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index bfea44b0..34a471a8 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -59,7 +59,10 @@ public function getAll($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $item = new Struct\Info($xmlResult->data); $item->id = (int) $xmlResult->id; $items[] = $item; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 0679fd95..d9ccf2d1 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -76,8 +76,8 @@ public function getAll(int $siteId, $name = null): array $response = $this->client->request($packet, Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - if (!isset($xmlResult->mailname)) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult || !isset($xmlResult->mailname)) { continue; } $item = new Struct\GeneralInfo($xmlResult->mailname); diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 3fdd15f8..68725b51 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -15,7 +15,7 @@ class PhpHandler extends Operator * * @return Info */ - public function get($field = null, $value = null): Info + public function get($field = null, $value = null): ?Info { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); @@ -26,9 +26,9 @@ public function get($field = null, $value = null): Info } $response = $this->client->request($packet, Client::RESPONSE_FULL); - $xmlResult = $response->xpath('//result')[0]; + $xmlResult = ($response->xpath('//result') ?: [null])[0]; - return new Info($xmlResult); + return $xmlResult ? new Info($xmlResult) : null; } /** @@ -49,7 +49,10 @@ public function getAll($field = null, $value = null): array $response = $this->client->request($packet, Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $item = new Info($xmlResult); $items[] = $item; } diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 0292cc0e..ce555358 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -57,7 +57,10 @@ public function getAll(string $field, $value): array { $response = $this->getBy('get', $field, $value); $items = []; - foreach ($response->xpath('//result/data') as $xmlResult) { + foreach ((array) $response->xpath('//result/data') as $xmlResult) { + if (!$xmlResult) { + continue; + } $items[] = new Struct\DataInfo($xmlResult); } diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index ff5678d7..d5fe2965 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -68,8 +68,8 @@ public function getAll($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - if (!$xmlResult->data) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult || !$xmlResult->data) { continue; } diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index b8ef6c86..4cf93a88 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -65,7 +65,10 @@ public function getBy($keyId = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result/key_info') as $keyInfo) { + foreach ((array) $response->xpath('//result/key_info') as $keyInfo) { + if (!$keyInfo) { + continue; + } $items[] = new Struct\Info($keyInfo); } diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index e351738a..5e446cab 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -65,7 +65,10 @@ private function getBy($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $items[] = new Struct\Info($xmlResult); } diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 6d348da2..f17cedf4 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -65,7 +65,10 @@ private function getBy($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $items[] = new Struct\Info($xmlResult); } diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index d7ee2100..ec5aaee0 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -70,7 +70,10 @@ public function getAll($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult) { + continue; + } $item = new Struct\GeneralInfo($xmlResult->info); $items[] = $item; } diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index baf7f643..2eff9636 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -72,8 +72,8 @@ public function getAll($field = null, $value = null): array $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - if (empty($xmlResult->data)) { + foreach ((array) $response->xpath('//result') as $xmlResult) { + if (!$xmlResult || empty($xmlResult->data)) { continue; } $item = new Struct\Info($xmlResult->data); diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 1d681c05..a2aaab8f 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -17,6 +17,11 @@ class XmlResponse extends \SimpleXMLElement */ public function getValue(string $node): string { - return (string) $this->xpath('//' . $node)[0]; + $result = $this->xpath('//' . $node); + if (is_array($result) && isset($result[0])) { + return (string) $result[0]; + } + + return ''; } } From 8989791c3d02f7ad097a8976b6b30e160d65177a Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 14 Jul 2023 18:24:46 +0300 Subject: [PATCH 064/126] TECH Replace PHPUnit checks with plain PHP because there is no backward-compatible upgrade path --- tests/PhpHandlerTest.php | 4 ++-- tests/WebspaceTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index e1b068f8..e4fb3090 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -9,7 +9,7 @@ public function testGet() { $handler = static::$client->phpHandler()->get(); - $this->assertObjectHasAttribute('type', $handler); + $this->assertTrue(property_exists($handler, 'type')); } public function testGetAll() @@ -22,7 +22,7 @@ public function testGetAll() $handler = current($handlers); $this->assertIsObject($handler); - $this->assertObjectHasAttribute('type', $handler); + $this->assertTrue(property_exists($handler, 'type')); } public function testGetUnknownHandlerThrowsException() diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index fabe82fb..92edeb9d 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -26,7 +26,7 @@ public function testGetDiskUsage() $webspace = static::createWebspace(); $diskusage = static::$client->webspace()->getDiskUsage('id', $webspace->id); - $this->assertObjectHasAttribute('httpdocs', $diskusage); + $this->assertTrue(property_exists($diskusage, 'httpdocs')); static::$client->webspace()->delete('id', $webspace->id); } From ca5d6507e6b918c068109e9d0a659bbdc3424c6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:14:52 +0000 Subject: [PATCH 065/126] TECH Bump vimeo/psalm from 5.13.1 to 5.14.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.13.1 to 5.14.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.13.1...5.14.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index 67e86521..8983e1d0 100644 --- a/composer.lock +++ b/composer.lock @@ -1475,16 +1475,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.1", + "version": "1.23.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0" + "reference": "a2b24135c35852b348894320d47b3902a94bc494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0", - "reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a2b24135c35852b348894320d47b3902a94bc494", + "reference": "a2b24135c35852b348894320d47b3902a94bc494", "shasum": "" }, "require": { @@ -1516,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.0" }, - "time": "2023-06-29T20:46:06+00:00" + "time": "2023-07-23T22:17:56+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3344,16 +3344,16 @@ }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273", + "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273", "shasum": "" }, "require": { @@ -3423,7 +3423,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.26" }, "funding": [ { @@ -3439,7 +3439,7 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-07-19T20:11:33+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4274,16 +4274,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -4340,7 +4340,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -4356,7 +4356,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" }, { "name": "symfony/yaml", @@ -4485,16 +4485,16 @@ }, { "name": "vimeo/psalm", - "version": "5.13.1", + "version": "5.14.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "086b94371304750d1c673315321a55d15fc59015" + "reference": "b2942cefed8443002bd3f245c4cd0a54193716d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/086b94371304750d1c673315321a55d15fc59015", - "reference": "086b94371304750d1c673315321a55d15fc59015", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/b2942cefed8443002bd3f245c4cd0a54193716d8", + "reference": "b2942cefed8443002bd3f245c4cd0a54193716d8", "shasum": "" }, "require": { @@ -4515,8 +4515,8 @@ "felixfbecker/language-server-protocol": "^1.5.2", "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.14", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "sebastian/diff": "^4.0 || ^5.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0", @@ -4585,9 +4585,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.13.1" + "source": "https://github.com/vimeo/psalm/tree/5.14.0" }, - "time": "2023-06-27T16:39:49+00:00" + "time": "2023-07-30T20:18:56+00:00" }, { "name": "webmozart/assert", From 2de56a49dceef0c72da3596546de3990094bd3c9 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 3 Aug 2023 15:02:20 +0300 Subject: [PATCH 066/126] TECH Suppress psalm incorrect complain --- src/Api/AbstractStruct.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index 5d63c073..60955127 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -31,6 +31,7 @@ protected function initScalarProperties($apiResponse, array $properties): void $classPropertyName = current($property); $value = $apiResponse->{key($property)}; } else { + /** @psalm-suppress PossiblyInvalidArgument */ $classPropertyName = $this->underToCamel(str_replace('-', '_', $property)); $value = $apiResponse->$property; } From d5b70f9daaf47b6b62fd110110bfc566df13f56f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 06:59:04 +0000 Subject: [PATCH 067/126] TECH Bump vimeo/psalm from 5.14.0 to 5.14.1 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.14.0 to 5.14.1. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.14.0...5.14.1) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 8983e1d0..0dd36349 100644 --- a/composer.lock +++ b/composer.lock @@ -1475,16 +1475,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.0", + "version": "1.23.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "a2b24135c35852b348894320d47b3902a94bc494" + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a2b24135c35852b348894320d47b3902a94bc494", - "reference": "a2b24135c35852b348894320d47b3902a94bc494", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", "shasum": "" }, "require": { @@ -1516,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" }, - "time": "2023-07-23T22:17:56+00:00" + "time": "2023-08-03T16:32:59+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4485,16 +4485,16 @@ }, { "name": "vimeo/psalm", - "version": "5.14.0", + "version": "5.14.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "b2942cefed8443002bd3f245c4cd0a54193716d8" + "reference": "b9d355e0829c397b9b3b47d0c0ed042a8a70284d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/b2942cefed8443002bd3f245c4cd0a54193716d8", - "reference": "b2942cefed8443002bd3f245c4cd0a54193716d8", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/b9d355e0829c397b9b3b47d0c0ed042a8a70284d", + "reference": "b9d355e0829c397b9b3b47d0c0ed042a8a70284d", "shasum": "" }, "require": { @@ -4585,9 +4585,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.14.0" + "source": "https://github.com/vimeo/psalm/tree/5.14.1" }, - "time": "2023-07-30T20:18:56+00:00" + "time": "2023-08-01T05:16:55+00:00" }, { "name": "webmozart/assert", From 2234d0d1770a6fce7985f920ed75b00debe78300 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 06:14:47 +0000 Subject: [PATCH 068/126] TECH Bump vimeo/psalm from 5.14.1 to 5.15.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.14.1 to 5.15.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.14.1...5.15.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index 0dd36349..b4e171ab 100644 --- a/composer.lock +++ b/composer.lock @@ -1140,16 +1140,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1190,9 +1190,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", @@ -1417,16 +1417,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", "shasum": "" }, "require": { @@ -1469,9 +1469,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" }, - "time": "2023-05-30T18:13:47+00:00" + "time": "2023-08-12T11:01:26+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -4485,16 +4485,16 @@ }, { "name": "vimeo/psalm", - "version": "5.14.1", + "version": "5.15.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "b9d355e0829c397b9b3b47d0c0ed042a8a70284d" + "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/b9d355e0829c397b9b3b47d0c0ed042a8a70284d", - "reference": "b9d355e0829c397b9b3b47d0c0ed042a8a70284d", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", + "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", "shasum": "" }, "require": { @@ -4522,6 +4522,9 @@ "symfony/console": "^4.1.6 || ^5.0 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0" }, + "conflict": { + "nikic/php-parser": "4.17.0" + }, "provide": { "psalm/psalm": "self.version" }, @@ -4585,9 +4588,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.14.1" + "source": "https://github.com/vimeo/psalm/tree/5.15.0" }, - "time": "2023-08-01T05:16:55+00:00" + "time": "2023-08-20T23:07:30+00:00" }, { "name": "webmozart/assert", From 7b98d2b15a4b90b539b8ffc25d247ff754dabf5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 06:14:52 +0000 Subject: [PATCH 069/126] TECH Bump phpunit/phpunit from 9.6.10 to 9.6.11 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.10 to 9.6.11. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.11/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.10...9.6.11) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/composer.lock b/composer.lock index 0dd36349..83f2657c 100644 --- a/composer.lock +++ b/composer.lock @@ -1140,16 +1140,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1190,9 +1190,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phar-io/manifest", @@ -1522,16 +1522,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -1587,7 +1587,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -1595,7 +1596,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1840,16 +1841,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.10", + "version": "9.6.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328" + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a6d351645c3fe5a30f5e86be6577d946af65a328", - "reference": "a6d351645c3fe5a30f5e86be6577d946af65a328", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", + "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", "shasum": "" }, "require": { @@ -1923,7 +1924,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" }, "funding": [ { @@ -1939,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2023-07-10T04:04:23+00:00" + "time": "2023-08-19T07:10:56+00:00" }, { "name": "psr/container", @@ -2699,16 +2700,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -2751,7 +2752,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -2759,7 +2760,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", From 4a2ec7c3d915d4c377fb68ed61d13194885ac0c6 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 25 Aug 2023 18:02:09 +0300 Subject: [PATCH 070/126] TECH Add missed type hint for parameter --- src/Api/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index 9450a870..d49727aa 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -243,7 +243,7 @@ private function performHttpRequest($request) * * @return array */ - public function multiRequest(array $requests, $mode = self::RESPONSE_SHORT): array + public function multiRequest(array $requests, int $mode = self::RESPONSE_SHORT): array { $requestXml = $this->getPacket(); From 5c6317f99ffe1e47477f1983202feba34aa78e62 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 29 Aug 2023 18:17:41 +0300 Subject: [PATCH 071/126] TECH Satisfy linters --- src/Api/AbstractStruct.php | 2 +- src/Api/Operator/DatabaseServer.php | 8 ++++--- src/Api/Operator/Dns.php | 8 ++++--- src/Api/Operator/DnsTemplate.php | 8 ++++--- src/Api/Operator/EventLog.php | 4 ++-- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Locale.php | 6 ++++-- src/Api/Operator/Mail.php | 2 ++ src/Api/Operator/ProtectedDirectory.php | 1 + src/Api/Operator/Server.php | 11 +++++----- src/Api/Operator/Session.php | 2 +- src/Api/Operator/Site.php | 2 ++ src/Api/Operator/SiteAlias.php | 6 ++++-- src/Api/Operator/Subdomain.php | 2 ++ src/Api/Operator/Ui.php | 1 + src/Api/Operator/Webspace.php | 2 ++ src/Api/Struct/Reseller/GeneralInfo.php | 12 ++++++----- src/Api/Struct/Server/Statistics.php | 6 +++++- .../Struct/Server/Statistics/LoadAverage.php | 6 +++--- src/Api/Struct/Site/GeneralInfo.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 11 ++++++---- src/Api/Struct/Subdomain/Info.php | 2 +- src/Api/Struct/Ui/CustomButton.php | 21 +++++++++++-------- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- src/Api/Struct/Webspace/Limits.php | 2 +- .../Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- .../Webspace/PhysicalHostingDescriptor.php | 2 +- 29 files changed, 86 insertions(+), 53 deletions(-) diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index 60955127..303e806a 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -24,7 +24,7 @@ public function __set(string $property, $value) * * @throws \Exception */ - protected function initScalarProperties($apiResponse, array $properties): void + protected function initScalarProperties(\SimpleXMLElement $apiResponse, array $properties): void { foreach ($properties as $property) { if (is_array($property)) { diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 4066a359..1d5247cb 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -60,9 +60,11 @@ private function getBy($field = null, $value = null): array if (!$xmlResult) { continue; } - $item = new Struct\Info($xmlResult->data); - $item->id = (int) $xmlResult->id; - $items[] = $item; + if (!is_null($xmlResult->data)) { + $item = new Struct\Info($xmlResult->data); + $item->id = (int) $xmlResult->id; + $items[] = $item; + } } return $items; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index fab5fb99..6087aa7c 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -82,9 +82,11 @@ public function getAll(string $field, $value): array if (!$xmlResult) { continue; } - $item = new Struct\Info($xmlResult->data); - $item->id = (int) $xmlResult->id; - $items[] = $item; + if (!is_null($xmlResult->data)) { + $item = new Struct\Info($xmlResult->data); + $item->id = (int) $xmlResult->id; + $items[] = $item; + } } return $items; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 34a471a8..cf552886 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -63,9 +63,11 @@ public function getAll($field = null, $value = null): array if (!$xmlResult) { continue; } - $item = new Struct\Info($xmlResult->data); - $item->id = (int) $xmlResult->id; - $items[] = $item; + if (!is_null($xmlResult->data)) { + $item = new Struct\Info($xmlResult->data); + $item->id = (int) $xmlResult->id; + $items[] = $item; + } } return $items; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index a059f98c..b4adfcc1 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -17,7 +17,7 @@ public function get(): array $records = []; $response = $this->request('get'); - foreach ($response->event as $eventInfo) { + foreach ($response->event ?? [] as $eventInfo) { $records[] = new Struct\Event($eventInfo); } @@ -32,7 +32,7 @@ public function getDetailedLog(): array $records = []; $response = $this->request('get_events'); - foreach ($response->event as $eventInfo) { + foreach ($response->event ?? [] as $eventInfo) { $records[] = new Struct\DetailedEvent($eventInfo); } diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 028ea1bb..13b6b556 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -17,7 +17,7 @@ public function get(): array $packet->addChild($this->wrapperTag)->addChild('get'); $response = $this->client->request($packet); - foreach ($response->addresses->ip_info as $ipInfo) { + foreach ($response->addresses->ip_info ?? [] as $ipInfo) { $ips[] = new Struct\Info($ipInfo); } diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index d5d360b2..608e0746 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -24,8 +24,10 @@ public function get($id = null) $response = $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); - foreach ($response->locale->get->result as $localeInfo) { - $locales[(string) $localeInfo->info->id] = new Struct\Info($localeInfo->info); + foreach ($response->locale->get->result ?? [] as $localeInfo) { + if (!is_null($localeInfo->info)) { + $locales[(string) $localeInfo->info->id] = new Struct\Info($localeInfo->info); + } } return !is_null($id) ? reset($locales) : $locales; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index d9ccf2d1..46718694 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -22,11 +22,13 @@ public function create(string $name, int $siteId, bool $mailbox = false, string $mailname->addChild('mailbox')->addChild('enabled', 'true'); } if (!empty($password)) { + /** @psalm-suppress UndefinedPropertyAssignment */ $mailname->addChild('password')->value = $password; } $response = $this->client->request($packet); + /** @psalm-suppress PossiblyNullArgument */ return new Struct\Info($response->mailname); } diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index ce555358..241d9ed2 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -73,6 +73,7 @@ public function getAll(string $field, $value): array * @param string $password * * @return Struct\UserInfo + * @psalm-suppress UndefinedPropertyAssignment */ public function addUser($protectedDirectory, $login, $password) { diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 642b773a..ba088763 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -14,6 +14,7 @@ public function getProtos(): array $packet->addChild($this->wrapperTag)->addChild('get_protos'); $response = $this->client->request($packet); + /** @psalm-suppress PossiblyNullPropertyFetch */ return (array) $response->protos->proto; } @@ -37,7 +38,7 @@ public function getKeyInfo(): array $keyInfo = []; $keyInfoXml = $this->getInfo('key'); - foreach ($keyInfoXml->property as $property) { + foreach ($keyInfoXml->property ?? [] as $property) { $keyInfo[(string) $property->name] = (string) $property->value; } @@ -49,7 +50,7 @@ public function getComponents(): array $components = []; $componentsXml = $this->getInfo('components'); - foreach ($componentsXml->component as $component) { + foreach ($componentsXml->component ?? [] as $component) { $components[(string) $component->name] = (string) $component->version; } @@ -61,7 +62,7 @@ public function getServiceStates(): array $states = []; $statesXml = $this->getInfo('services_state'); - foreach ($statesXml->srv as $service) { + foreach ($statesXml->srv ?? [] as $service) { $states[(string) $service->id] = [ 'id' => (string) $service->id, 'title' => (string) $service->title, @@ -82,7 +83,7 @@ public function getShells(): array $shells = []; $shellsXml = $this->getInfo('shells'); - foreach ($shellsXml->shell as $shell) { + foreach ($shellsXml->shell ?? [] as $shell) { $shells[(string) $shell->name] = (string) $shell->path; } @@ -106,7 +107,7 @@ public function getSiteIsolationConfig(): array $config = []; $configXml = $this->getInfo('site-isolation-config'); - foreach ($configXml->property as $property) { + foreach ($configXml->property ?? [] as $property) { $config[(string) $property->name] = (string) $property->value; } diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index b17c412d..e2854ccd 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -31,7 +31,7 @@ public function get(): array $sessions = []; $response = $this->request('get'); - foreach ($response->session as $sessionInfo) { + foreach ($response->session ?? [] as $sessionInfo) { $sessions[(string) $sessionInfo->id] = new Struct\Info($sessionInfo); } diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 0741576b..20fbd971 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -27,7 +27,9 @@ public function create(array $properties): Struct\Info $hostingNode = $info->addChild('hosting')->addChild('vrt_hst'); foreach ($properties[static::PROPERTIES_HOSTING] as $name => $value) { $propertyNode = $hostingNode->addChild('property'); + /** @psalm-suppress UndefinedPropertyAssignment */ $propertyNode->name = $name; + /** @psalm-suppress UndefinedPropertyAssignment */ $propertyNode->value = $value; } } diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index ec5aaee0..27874aef 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -74,8 +74,10 @@ public function getAll($field = null, $value = null): array if (!$xmlResult) { continue; } - $item = new Struct\GeneralInfo($xmlResult->info); - $items[] = $item; + if (!is_null($xmlResult->info)) { + $item = new Struct\GeneralInfo($xmlResult->info); + $items[] = $item; + } } return $items; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index 2eff9636..65b2a979 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -16,7 +16,9 @@ public function create(array $properties): Struct\Info if (is_array($value)) { foreach ($value as $propertyName => $propertyValue) { $property = $info->addChild($name); + /** @psalm-suppress UndefinedPropertyAssignment */ $property->name = $propertyName; + /** @psalm-suppress UndefinedPropertyAssignment */ $property->value = $propertyValue; } continue; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 8512faa1..1b50fb6a 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -11,6 +11,7 @@ public function getNavigation(): array { $response = $this->request('get-navigation'); + /** @psalm-suppress ImplicitToStringCast, PossiblyNullArgument */ return unserialize(base64_decode($response->navigation)); } diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 9635816a..e6336d86 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -86,7 +86,9 @@ public function create(array $properties, array $hostingProperties = null, strin $infoHosting = $info->addChild('hosting')->addChild('vrt_hst'); foreach ($hostingProperties as $name => $value) { $property = $infoHosting->addChild('property'); + /** @psalm-suppress UndefinedPropertyAssignment */ $property->name = $name; + /** @psalm-suppress UndefinedPropertyAssignment */ $property->value = $value; } diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 214030e1..5b863083 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -14,13 +14,15 @@ class GeneralInfo extends AbstractStruct public function __construct(\SimpleXMLElement $apiResponse) { - $this->initScalarProperties($apiResponse->{'gen-info'}, [ - ['pname' => 'personalName'], - 'login', - ]); + if (!is_null($apiResponse->{'gen-info'})) { + $this->initScalarProperties($apiResponse->{'gen-info'}, [ + ['pname' => 'personalName'], + 'login', + ]); + } $this->permissions = []; - foreach ($apiResponse->permissions->permission as $permissionInfo) { + foreach ($apiResponse->permissions->permission ?? [] as $permissionInfo) { $this->permissions[(string) $permissionInfo->name] = (string) $permissionInfo->value; } } diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 8d679a63..68c489f5 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -28,6 +28,10 @@ class Statistics extends AbstractStruct /** @var Statistics\DiskSpace[] */ public $diskSpace; + /** + * @param \SimpleXMLElement $apiResponse + * @psalm-suppress PossiblyNullArgument + */ public function __construct(\SimpleXMLElement $apiResponse) { $this->objects = new Statistics\Objects($apiResponse->objects); @@ -38,7 +42,7 @@ public function __construct(\SimpleXMLElement $apiResponse) $this->swap = new Statistics\Swap($apiResponse->swap); $this->diskSpace = []; - foreach ($apiResponse->diskspace as $disk) { + foreach ($apiResponse->diskspace ?? [] as $disk) { $this->diskSpace[(string) $disk->device->name] = new Statistics\DiskSpace($disk->device); } } diff --git a/src/Api/Struct/Server/Statistics/LoadAverage.php b/src/Api/Struct/Server/Statistics/LoadAverage.php index 94fc9a52..0d3eed45 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -13,8 +13,8 @@ class LoadAverage extends AbstractStruct public function __construct(\SimpleXMLElement $apiResponse) { - $this->load1min = $apiResponse->l1 / 100.0; - $this->load5min = $apiResponse->l5 / 100.0; - $this->load15min = $apiResponse->l15 / 100.0; + $this->load1min = (float) $apiResponse->l1 / 100.0; + $this->load5min = (float) $apiResponse->l5 / 100.0; + $this->load15min = (float) $apiResponse->l15 / 100.0; } } diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 1d91cf03..5344eea9 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -33,7 +33,7 @@ public function __construct(\SimpleXMLElement $apiResponse) 'webspace-id', ]); - foreach ($apiResponse->dns_ip_address as $ip) { + 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 0fbcad54..fe750e04 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -12,11 +12,14 @@ class HostingInfo extends AbstractStruct public function __construct(\SimpleXMLElement $apiResponse) { - foreach ($apiResponse->vrt_hst->property as $property) { + foreach ($apiResponse->vrt_hst->property ?? [] as $property) { $this->properties[(string) $property->name] = (string) $property->value; } - $this->initScalarProperties($apiResponse->vrt_hst, [ - 'ip_address', - ]); + + if (!is_null($apiResponse->vrt_hst)) { + $this->initScalarProperties($apiResponse->vrt_hst, [ + 'ip_address', + ]); + } } } diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 14338af6..77956018 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -20,7 +20,7 @@ public function __construct(\SimpleXMLElement $apiResponse) 'parent', 'name', ]); - foreach ($apiResponse->property as $propertyInfo) { + foreach ($apiResponse->property ?? [] as $propertyInfo) { $this->properties[(string) $propertyInfo->name] = (string) $propertyInfo->value; } } diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index 1f06d3f7..aa7932b2 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -19,14 +19,17 @@ class CustomButton extends AbstractStruct public function __construct(\SimpleXMLElement $apiResponse) { $this->initScalarProperties($apiResponse, ['id']); - $this->initScalarProperties($apiResponse->properties, [ - 'sort_key', - 'public', - 'internal', - ['noframe' => 'noFrame'], - 'place', - 'url', - 'text', - ]); + + if (!is_null($apiResponse->properties)) { + $this->initScalarProperties($apiResponse->properties, [ + 'sort_key', + 'public', + 'internal', + ['noframe' => 'noFrame'], + 'place', + 'url', + 'text', + ]); + } } } diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 218798ff..76c922fd 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -36,7 +36,7 @@ public function __construct(\SimpleXMLElement $apiResponse) 'admin-description', ]); - foreach ($apiResponse->dns_ip_address as $ip) { + foreach ($apiResponse->dns_ip_address ?? [] as $ip) { $this->ipAddresses[] = (string) $ip; } diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index a6951555..2370f188 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -13,7 +13,7 @@ public function __construct(\SimpleXMLElement $apiResponse) { $this->limits = []; - foreach ($apiResponse->descriptor->property as $propertyInfo) { + foreach ($apiResponse->descriptor->property ?? [] as $propertyInfo) { $this->limits[(string) $propertyInfo->name] = new LimitInfo($propertyInfo); } } diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index 62ddbfc5..56b8d551 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -15,7 +15,7 @@ public function __construct(\SimpleXMLElement $apiResponse) $this->initScalarProperties($apiResponse, ['overuse']); $this->limits = []; - foreach ($apiResponse->limit as $limit) { + foreach ($apiResponse->limit ?? [] as $limit) { $this->limits[(string) $limit->name] = new Limit($limit); } } diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 1eac939a..91747493 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -13,7 +13,7 @@ public function __construct(\SimpleXMLElement $apiResponse) { $this->permissions = []; - foreach ($apiResponse->descriptor->property as $propertyInfo) { + foreach ($apiResponse->descriptor->property ?? [] as $propertyInfo) { $this->permissions[(string) $propertyInfo->name] = new PermissionInfo($propertyInfo); } } diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 0dea670e..add953c3 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -13,7 +13,7 @@ public function __construct(\SimpleXMLElement $apiResponse) { $this->properties = []; - foreach ($apiResponse->webspace->get->result->data->{'php-settings'}->setting as $setting) { + foreach ($apiResponse->webspace->get->result->data->{'php-settings'}->setting ?? [] as $setting) { $this->properties[(string) $setting->name] = (string) $setting->value; } } diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 66578bc7..6470d180 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -13,7 +13,7 @@ public function __construct(\SimpleXMLElement $apiResponse) { $this->properties = []; - foreach ($apiResponse->descriptor->property as $propertyInfo) { + foreach ($apiResponse->descriptor->property ?? [] as $propertyInfo) { $this->properties[(string) $propertyInfo->name] = new HostingPropertyInfo($propertyInfo); } } From 5999d3a7de90ff1a5cc75396df6ced3eb897528c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 06:41:11 +0000 Subject: [PATCH 072/126] TECH Bump phpunit/phpunit from 9.6.11 to 9.6.13 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.11 to 9.6.13. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.13/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.11...9.6.13) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 472564c1..bb31d61c 100644 --- a/composer.lock +++ b/composer.lock @@ -1522,16 +1522,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.27", + "version": "9.2.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", - "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", "shasum": "" }, "require": { @@ -1588,7 +1588,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" }, "funding": [ { @@ -1596,7 +1596,7 @@ "type": "github" } ], - "time": "2023-07-26T13:44:30+00:00" + "time": "2023-09-19T04:57:46+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1841,16 +1841,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.11", + "version": "9.6.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "810500e92855eba8a7a5319ae913be2da6f957b0" + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/810500e92855eba8a7a5319ae913be2da6f957b0", - "reference": "810500e92855eba8a7a5319ae913be2da6f957b0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", "shasum": "" }, "require": { @@ -1865,7 +1865,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-code-coverage": "^9.2.28", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1924,7 +1924,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.11" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" }, "funding": [ { @@ -1940,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2023-08-19T07:10:56+00:00" + "time": "2023-09-19T05:39:22+00:00" }, { "name": "psr/container", From 91aa4458f44d683c0e250828ab6388ad92c5bcf7 Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Thu, 23 Nov 2023 16:39:47 +0100 Subject: [PATCH 073/126] DatabaseTest should not depend on database server id --- src/Api/Operator/DatabaseServer.php | 13 ++++++++ tests/DatabaseServerTest.php | 7 ++++ tests/DatabaseTest.php | 52 +++++++++++++++-------------- 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 1d5247cb..e80e28b5 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -37,6 +37,19 @@ public function getAll(): array return $this->getBy(); } + public function getDefault(string $type): Struct\Info + { + $packet = $this->client->getPacket(); + $getTag = $packet->addChild($this->wrapperTag)->addChild('get-default'); + $filterTag = $getTag->addChild('filter'); + /** @psalm-suppress UndefinedPropertyAssignment */ + $filterTag->type = $type; + + $response = $this->client->request($packet); + + return new Struct\Info($response); + } + /** * @param string|null $field * @param int|string|null $value diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 0865d665..61737252 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -26,4 +26,11 @@ public function testGetAll() $this->assertGreaterThan(0, count($dbServers)); $this->assertEquals('localhost', $dbServers[0]->host); } + + public function testGetDefault() + { + $dbServer = static::$client->databaseServer()->getDefault('mysql'); + $this->assertEquals('mysql', $dbServer->type); + $this->assertGreaterThan(0, $dbServer->id); + } } diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 6fe19003..bb4a2f78 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -8,11 +8,13 @@ class DatabaseTest extends AbstractTestCase { private static \PleskX\Api\Struct\Webspace\Info $webspace; + private static \PleskX\Api\Struct\DatabaseServer\Info $databaseServer; public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::$webspace = static::createWebspace(); + static::$databaseServer = static::$client->databaseServer()->getDefault('mysql'); } public function testCreate() @@ -20,8 +22,8 @@ public function testCreate() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); static::$client->database()->delete('id', $database->id); } @@ -31,8 +33,8 @@ public function testCreateUser() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $user = $this->createUser([ 'db-id' => $database->id, @@ -48,8 +50,8 @@ public function testUpdateUser() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $user = $this->createUser([ 'db-id' => $database->id, @@ -71,15 +73,15 @@ public function testGetById() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $db = static::$client->database()->get('id', $database->id); $this->assertEquals('test1', $db->name); - $this->assertEquals('mysql', $db->type); + $this->assertEquals(static::$databaseServer->type, $db->type); $this->assertEquals(static::$webspace->id, $db->webspaceId); - $this->assertEquals(1, $db->dbServerId); + $this->assertEquals(static::$databaseServer->id, $db->dbServerId); static::$client->database()->delete('id', $database->id); } @@ -89,20 +91,20 @@ public function testGetAllByWebspaceId() $db1 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $db2 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test2', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $databases = static::$client->database()->getAll('webspace-id', static::$webspace->id); $this->assertEquals('test1', $databases[0]->name); $this->assertEquals('test2', $databases[1]->name); $this->assertEquals(static::$webspace->id, $databases[0]->webspaceId); - $this->assertEquals(1, $databases[1]->dbServerId); + $this->assertEquals(static::$databaseServer->id, $databases[1]->dbServerId); static::$client->database()->delete('id', $db1->id); static::$client->database()->delete('id', $db2->id); @@ -113,8 +115,8 @@ public function testGetUserById() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $user = $this->createUser([ @@ -136,14 +138,14 @@ public function testGetAllUsersByDbId() $db1 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $db2 = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test2', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $user1 = $this->createUser([ 'db-id' => $db1->id, @@ -180,8 +182,8 @@ public function testDelete() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $result = static::$client->database()->delete('id', $database->id); $this->assertTrue($result); @@ -192,8 +194,8 @@ public function testDeleteUser() $database = $this->createDatabase([ 'webspace-id' => static::$webspace->id, 'name' => 'test1', - 'type' => 'mysql', - 'db-server-id' => 1, + 'type' => static::$databaseServer->type, + 'db-server-id' => static::$databaseServer->id, ]); $user = $this->createUser([ 'db-id' => $database->id, From 680e359dbcb82e05b22152dac937724550582eb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 06:42:32 +0000 Subject: [PATCH 074/126] TECH Bump vimeo/psalm from 5.15.0 to 5.16.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.15.0 to 5.16.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.15.0...5.16.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 181 +++++++++++++++++++++++++------------------------- 1 file changed, 91 insertions(+), 90 deletions(-) diff --git a/composer.lock b/composer.lock index bb31d61c..2a519f9f 100644 --- a/composer.lock +++ b/composer.lock @@ -387,16 +387,16 @@ }, { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -438,7 +438,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -454,20 +454,20 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -517,9 +517,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -535,7 +535,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -642,16 +642,16 @@ }, { "name": "doctrine/deprecations", - "version": "v1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", "shasum": "" }, "require": { @@ -683,9 +683,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + "source": "https://github.com/doctrine/deprecations/tree/1.1.2" }, - "time": "2023-06-03T09:27:29+00:00" + "time": "2023-09-27T20:04:15+00:00" }, { "name": "doctrine/instantiator", @@ -1475,16 +1475,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.23.1", + "version": "1.24.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", - "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", "shasum": "" }, "require": { @@ -1516,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" }, - "time": "2023-08-03T16:32:59+00:00" + "time": "2023-11-26T18:29:22+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3345,16 +3345,16 @@ }, { "name": "symfony/console", - "version": "v5.4.26", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273" + "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b504a3d266ad2bb632f196c0936ef2af5ff6e273", - "reference": "b504a3d266ad2bb632f196c0936ef2af5ff6e273", + "url": "https://api.github.com/repos/symfony/console/zipball/11ac5f154e0e5c4c77af83ad11ead9165280b92a", + "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a", "shasum": "" }, "require": { @@ -3424,7 +3424,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.26" + "source": "https://github.com/symfony/console/tree/v5.4.31" }, "funding": [ { @@ -3440,7 +3440,7 @@ "type": "tidelift" } ], - "time": "2023-07-19T20:11:33+00:00" + "time": "2023-10-31T07:58:33+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3638,16 +3638,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -3662,7 +3662,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3700,7 +3700,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -3716,20 +3716,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -3741,7 +3741,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3781,7 +3781,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -3797,20 +3797,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -3822,7 +3822,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3865,7 +3865,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -3881,20 +3881,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -3909,7 +3909,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3948,7 +3948,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -3964,20 +3964,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -3986,7 +3986,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4027,7 +4027,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -4043,20 +4043,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -4065,7 +4065,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4110,7 +4110,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -4126,7 +4126,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", @@ -4275,16 +4275,16 @@ }, { "name": "symfony/string", - "version": "v5.4.26", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "1181fe9270e373537475e826873b5867b863883c" + "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", - "reference": "1181fe9270e373537475e826873b5867b863883c", + "url": "https://api.github.com/repos/symfony/string/zipball/2765096c03f39ddf54f6af532166e42aaa05b24b", + "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b", "shasum": "" }, "require": { @@ -4341,7 +4341,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.26" + "source": "https://github.com/symfony/string/tree/v5.4.31" }, "funding": [ { @@ -4357,7 +4357,7 @@ "type": "tidelift" } ], - "time": "2023-06-28T12:46:07+00:00" + "time": "2023-11-09T08:19:44+00:00" }, { "name": "symfony/yaml", @@ -4486,16 +4486,16 @@ }, { "name": "vimeo/psalm", - "version": "5.15.0", + "version": "5.16.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" + "reference": "2897ba636551a8cb61601cc26f6ccfbba6c36591" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", - "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/2897ba636551a8cb61601cc26f6ccfbba6c36591", + "reference": "2897ba636551a8cb61601cc26f6ccfbba6c36591", "shasum": "" }, "require": { @@ -4520,8 +4520,8 @@ "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "sebastian/diff": "^4.0 || ^5.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0" + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" }, "conflict": { "nikic/php-parser": "4.17.0" @@ -4543,7 +4543,7 @@ "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -4556,7 +4556,7 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { "dev-master": "5.x-dev", @@ -4588,10 +4588,11 @@ "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.15.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2023-08-20T23:07:30+00:00" + "time": "2023-11-22T20:38:47+00:00" }, { "name": "webmozart/assert", @@ -4725,5 +4726,5 @@ "platform-overrides": { "php": "7.4.27" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From 91ed41e160d0828c20c05fe6d7e063b64c19f9ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 06:19:10 +0000 Subject: [PATCH 075/126] TECH Bump phpunit/phpunit from 9.6.13 to 9.6.15 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.13 to 9.6.15. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.15/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.13...9.6.15) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 2a519f9f..1a7f02c7 100644 --- a/composer.lock +++ b/composer.lock @@ -1841,16 +1841,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.13", + "version": "9.6.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", - "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", "shasum": "" }, "require": { @@ -1924,7 +1924,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" }, "funding": [ { @@ -1940,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2023-09-19T05:39:22+00:00" + "time": "2023-12-01T16:55:19+00:00" }, { "name": "psr/container", @@ -4436,16 +4436,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -4474,7 +4474,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -4482,7 +4482,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "vimeo/psalm", From ea133b5aefed1114332c797cb80238d82bf5fc68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 06:13:16 +0000 Subject: [PATCH 076/126] TECH Bump vimeo/psalm from 5.16.0 to 5.17.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.16.0 to 5.17.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.16.0...5.17.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/composer.lock b/composer.lock index 1a7f02c7..70e32cde 100644 --- a/composer.lock +++ b/composer.lock @@ -1140,16 +1140,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", "shasum": "" }, "require": { @@ -1190,9 +1190,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2023-12-10T21:03:43+00:00" }, { "name": "phar-io/manifest", @@ -3345,16 +3345,16 @@ }, { "name": "symfony/console", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a" + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/11ac5f154e0e5c4c77af83ad11ead9165280b92a", - "reference": "11ac5f154e0e5c4c77af83ad11ead9165280b92a", + "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", "shasum": "" }, "require": { @@ -3424,7 +3424,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.31" + "source": "https://github.com/symfony/console/tree/v5.4.32" }, "funding": [ { @@ -3440,7 +3440,7 @@ "type": "tidelift" } ], - "time": "2023-10-31T07:58:33+00:00" + "time": "2023-11-18T18:23:04+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4275,16 +4275,16 @@ }, { "name": "symfony/string", - "version": "v5.4.31", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b" + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2765096c03f39ddf54f6af532166e42aaa05b24b", - "reference": "2765096c03f39ddf54f6af532166e42aaa05b24b", + "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", "shasum": "" }, "require": { @@ -4341,7 +4341,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.31" + "source": "https://github.com/symfony/string/tree/v5.4.32" }, "funding": [ { @@ -4357,7 +4357,7 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:19:44+00:00" + "time": "2023-11-26T13:43:46+00:00" }, { "name": "symfony/yaml", @@ -4486,16 +4486,16 @@ }, { "name": "vimeo/psalm", - "version": "5.16.0", + "version": "5.17.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "2897ba636551a8cb61601cc26f6ccfbba6c36591" + "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/2897ba636551a8cb61601cc26f6ccfbba6c36591", - "reference": "2897ba636551a8cb61601cc26f6ccfbba6c36591", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/c620f6e80d0abfca532b00bda366062aaedf6e5d", + "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d", "shasum": "" }, "require": { @@ -4592,7 +4592,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2023-11-22T20:38:47+00:00" + "time": "2023-12-03T20:21:41+00:00" }, { "name": "webmozart/assert", From 07c9adc16e1814dacb3ac4ad242bcf42a3528e0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 06:13:20 +0000 Subject: [PATCH 077/126] TECH Bump squizlabs/php_codesniffer from 3.7.2 to 3.8.0 Bumps [squizlabs/php_codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) from 3.7.2 to 3.8.0. - [Release notes](https://github.com/squizlabs/PHP_CodeSniffer/releases) - [Commits](https://github.com/squizlabs/PHP_CodeSniffer/commits) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 1a7f02c7..18966a2e 100644 --- a/composer.lock +++ b/composer.lock @@ -3288,16 +3288,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.2", + "version": "3.8.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", - "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", "shasum": "" }, "require": { @@ -3307,7 +3307,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/phpcs", @@ -3326,22 +3326,45 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", "standards", "static analysis" ], "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, - "time": "2023-02-22T23:07:41+00:00" + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T12:32:31+00:00" }, { "name": "symfony/console", From c7886748c67d451d02185ac9f92997771d855da9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 06:28:03 +0000 Subject: [PATCH 078/126] TECH Bump vimeo/psalm from 5.17.0 to 5.18.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.17.0 to 5.18.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.17.0...5.18.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/composer.lock b/composer.lock index 8f18050a..56208912 100644 --- a/composer.lock +++ b/composer.lock @@ -907,16 +907,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", + "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", "shasum": "" }, "require": { @@ -924,13 +924,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -956,7 +956,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" }, "funding": [ { @@ -964,7 +964,7 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2023-09-17T21:38:23+00:00" }, { "name": "jolicode/jolinotif", @@ -1475,16 +1475,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.4", + "version": "1.24.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" + "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", - "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fedf211ff14ec8381c9bf5714e33a7a552dd1acc", + "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc", "shasum": "" }, "require": { @@ -1516,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.5" }, - "time": "2023-11-26T18:29:22+00:00" + "time": "2023-12-16T09:33:33+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4509,16 +4509,16 @@ }, { "name": "vimeo/psalm", - "version": "5.17.0", + "version": "5.18.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d" + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/c620f6e80d0abfca532b00bda366062aaedf6e5d", - "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/b113f3ed0259fd6e212d87c3df80eec95a6abf19", + "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19", "shasum": "" }, "require": { @@ -4537,7 +4537,7 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.16", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", @@ -4615,7 +4615,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2023-12-03T20:21:41+00:00" + "time": "2023-12-16T09:37:35+00:00" }, { "name": "webmozart/assert", From 17fc65e7d59cfabad39ef14bda363a9b87552742 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 2 Jan 2024 12:35:15 +0200 Subject: [PATCH 079/126] TECH Update copyright year --- LICENSE | 2 +- docker-compose.yml | 2 +- phpcs.xml.dist | 2 +- phpunit-watcher.yml | 2 +- phpunit.xml.dist | 2 +- psalm.xml | 2 +- src/Api/AbstractStruct.php | 2 +- src/Api/Client.php | 2 +- src/Api/Client/Exception.php | 2 +- src/Api/Exception.php | 2 +- src/Api/InternalClient.php | 2 +- src/Api/Operator.php | 2 +- src/Api/Operator/Aps.php | 2 +- src/Api/Operator/Certificate.php | 2 +- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Database.php | 2 +- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/Dns.php | 2 +- src/Api/Operator/DnsTemplate.php | 2 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Locale.php | 2 +- src/Api/Operator/LogRotation.php | 2 +- src/Api/Operator/Mail.php | 2 +- src/Api/Operator/PhpHandler.php | 2 +- src/Api/Operator/ProtectedDirectory.php | 2 +- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/ResellerPlan.php | 2 +- src/Api/Operator/SecretKey.php | 2 +- src/Api/Operator/Server.php | 2 +- src/Api/Operator/ServicePlan.php | 2 +- src/Api/Operator/ServicePlanAddon.php | 2 +- src/Api/Operator/Session.php | 2 +- src/Api/Operator/Site.php | 2 +- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Operator/Subdomain.php | 2 +- src/Api/Operator/Ui.php | 2 +- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Certificate/Info.php | 2 +- src/Api/Struct/Customer/GeneralInfo.php | 2 +- src/Api/Struct/Customer/Info.php | 2 +- src/Api/Struct/Database/Info.php | 2 +- src/Api/Struct/Database/UserInfo.php | 2 +- src/Api/Struct/DatabaseServer/Info.php | 2 +- src/Api/Struct/Dns/Info.php | 2 +- src/Api/Struct/EventLog/DetailedEvent.php | 2 +- src/Api/Struct/EventLog/Event.php | 2 +- src/Api/Struct/Ip/Info.php | 2 +- src/Api/Struct/Locale/Info.php | 2 +- src/Api/Struct/Mail/GeneralInfo.php | 2 +- src/Api/Struct/Mail/Info.php | 2 +- src/Api/Struct/PhpHandler/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/DataInfo.php | 2 +- src/Api/Struct/ProtectedDirectory/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/UserInfo.php | 2 +- src/Api/Struct/Reseller/GeneralInfo.php | 2 +- src/Api/Struct/Reseller/Info.php | 2 +- src/Api/Struct/SecretKey/Info.php | 2 +- src/Api/Struct/Server/Admin.php | 2 +- src/Api/Struct/Server/GeneralInfo.php | 2 +- src/Api/Struct/Server/Preferences.php | 2 +- src/Api/Struct/Server/SessionPreferences.php | 2 +- src/Api/Struct/Server/Statistics.php | 2 +- src/Api/Struct/Server/Statistics/DiskSpace.php | 2 +- src/Api/Struct/Server/Statistics/LoadAverage.php | 2 +- src/Api/Struct/Server/Statistics/Memory.php | 2 +- src/Api/Struct/Server/Statistics/Objects.php | 2 +- src/Api/Struct/Server/Statistics/Other.php | 2 +- src/Api/Struct/Server/Statistics/Swap.php | 2 +- src/Api/Struct/Server/Statistics/Version.php | 2 +- src/Api/Struct/Server/UpdatesInfo.php | 2 +- src/Api/Struct/ServicePlan/Info.php | 2 +- src/Api/Struct/ServicePlanAddon/Info.php | 2 +- src/Api/Struct/Session/Info.php | 2 +- src/Api/Struct/Site/GeneralInfo.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 2 +- src/Api/Struct/Site/Info.php | 2 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 2 +- src/Api/Struct/SiteAlias/Info.php | 2 +- src/Api/Struct/Subdomain/Info.php | 2 +- src/Api/Struct/Ui/CustomButton.php | 2 +- src/Api/Struct/Webspace/DiskUsage.php | 2 +- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/HostingPropertyInfo.php | 2 +- src/Api/Struct/Webspace/Info.php | 2 +- src/Api/Struct/Webspace/Limit.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- src/Api/Struct/Webspace/LimitInfo.php | 2 +- src/Api/Struct/Webspace/Limits.php | 2 +- src/Api/Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PermissionInfo.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- src/Api/Struct/Webspace/PhysicalHostingDescriptor.php | 2 +- src/Api/XmlResponse.php | 2 +- tests/AbstractTestCase.php | 2 +- tests/ApiClientTest.php | 2 +- tests/CertificateTest.php | 2 +- tests/CustomerTest.php | 2 +- tests/DatabaseServerTest.php | 2 +- tests/DatabaseTest.php | 2 +- tests/DnsTemplateTest.php | 2 +- tests/DnsTest.php | 2 +- tests/EventLogTest.php | 2 +- tests/IpTest.php | 2 +- tests/LocaleTest.php | 2 +- tests/MailTest.php | 2 +- tests/PhpHandlerTest.php | 2 +- tests/ProtectedDirectoryTest.php | 2 +- tests/ResellerTest.php | 2 +- tests/SecretKeyTest.php | 2 +- tests/ServerTest.php | 2 +- tests/ServicePlanAddonTest.php | 2 +- tests/ServicePlanTest.php | 2 +- tests/SessionTest.php | 2 +- tests/SiteAliasTest.php | 2 +- tests/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/UiTest.php | 2 +- tests/Utility/KeyLimitChecker.php | 2 +- tests/Utility/PasswordProvider.php | 2 +- tests/WebspaceTest.php | 2 +- wait-for-plesk.sh | 2 +- 123 files changed, 123 insertions(+), 123 deletions(-) diff --git a/LICENSE b/LICENSE index 914de1aa..4df0a073 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2022. Plesk International GmbH. +Copyright 1999-2024. Plesk International GmbH. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docker-compose.yml b/docker-compose.yml index 8c9c6e32..166cfed9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -# Copyright 1999-2023. Plesk International GmbH. +# Copyright 1999-2024. Plesk International GmbH. version: '2' services: plesk: diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 05b5cd74..b01ab748 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,5 +1,5 @@ - + src tests diff --git a/phpunit-watcher.yml b/phpunit-watcher.yml index 8c24a088..6a7a24d0 100644 --- a/phpunit-watcher.yml +++ b/phpunit-watcher.yml @@ -1,4 +1,4 @@ -# Copyright 1999-2023. Plesk International GmbH. +# Copyright 1999-2024. Plesk International GmbH. phpunit: arguments: '--stop-on-failure' timeout: 0 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4ae5ea63..f699a42c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/psalm.xml b/psalm.xml index ee216500..2c875ca4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,5 +1,5 @@ - + Plesk" > /dev/null From df57f5b25f436c9f558004dc3f4b8dc2e0817177 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 06:53:53 +0000 Subject: [PATCH 080/126] TECH Bump vimeo/psalm from 5.18.0 to 5.19.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.18.0 to 5.19.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.18.0...5.19.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/composer.lock b/composer.lock index 56208912..938fd03b 100644 --- a/composer.lock +++ b/composer.lock @@ -1417,16 +1417,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.3", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fad452781b3d774e3337b0c0b245dd8e5a4455fc", + "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc", "shasum": "" }, "require": { @@ -1469,22 +1469,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.0" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2024-01-11T11:49:22+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.5", + "version": "1.25.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc" + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fedf211ff14ec8381c9bf5714e33a7a552dd1acc", - "reference": "fedf211ff14ec8381c9bf5714e33a7a552dd1acc", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240", + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240", "shasum": "" }, "require": { @@ -1516,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.5" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0" }, - "time": "2023-12-16T09:33:33+00:00" + "time": "2024-01-04T17:06:16+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3368,16 +3368,16 @@ }, { "name": "symfony/console", - "version": "v5.4.32", + "version": "v5.4.34", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" + "reference": "4b4d8cd118484aa604ec519062113dd87abde18c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", - "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "url": "https://api.github.com/repos/symfony/console/zipball/4b4d8cd118484aa604ec519062113dd87abde18c", + "reference": "4b4d8cd118484aa604ec519062113dd87abde18c", "shasum": "" }, "require": { @@ -3447,7 +3447,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.32" + "source": "https://github.com/symfony/console/tree/v5.4.34" }, "funding": [ { @@ -3463,7 +3463,7 @@ "type": "tidelift" } ], - "time": "2023-11-18T18:23:04+00:00" + "time": "2023-12-08T13:33:03+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4298,16 +4298,16 @@ }, { "name": "symfony/string", - "version": "v5.4.32", + "version": "v5.4.34", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" + "reference": "e3f98bfc7885c957488f443df82d97814a3ce061" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", - "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", + "url": "https://api.github.com/repos/symfony/string/zipball/e3f98bfc7885c957488f443df82d97814a3ce061", + "reference": "e3f98bfc7885c957488f443df82d97814a3ce061", "shasum": "" }, "require": { @@ -4364,7 +4364,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.32" + "source": "https://github.com/symfony/string/tree/v5.4.34" }, "funding": [ { @@ -4380,7 +4380,7 @@ "type": "tidelift" } ], - "time": "2023-11-26T13:43:46+00:00" + "time": "2023-12-09T13:20:28+00:00" }, { "name": "symfony/yaml", @@ -4509,16 +4509,16 @@ }, { "name": "vimeo/psalm", - "version": "5.18.0", + "version": "5.19.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19" + "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/b113f3ed0259fd6e212d87c3df80eec95a6abf19", - "reference": "b113f3ed0259fd6e212d87c3df80eec95a6abf19", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/06b71be009a6bd6d81b9811855d6629b9fe90e1b", + "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b", "shasum": "" }, "require": { @@ -4615,7 +4615,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2023-12-16T09:37:35+00:00" + "time": "2024-01-09T21:02:43+00:00" }, { "name": "webmozart/assert", From a9fe9bba45891117115b71e451fc9db45f582e0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 06:54:03 +0000 Subject: [PATCH 081/126] TECH Bump squizlabs/php_codesniffer from 3.8.0 to 3.8.1 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.8.0 to 3.8.1. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.8.0...3.8.1) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 56208912..1e04276f 100644 --- a/composer.lock +++ b/composer.lock @@ -3288,16 +3288,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.8.0", + "version": "3.8.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7" + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7", - "reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", "shasum": "" }, "require": { @@ -3307,11 +3307,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -3364,7 +3364,7 @@ "type": "open_collective" } ], - "time": "2023-12-08T12:32:31+00:00" + "time": "2024-01-11T20:47:48+00:00" }, { "name": "symfony/console", From 7f821050621183873a5a41c590ba31486add8cfa Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 19 Jan 2024 16:42:28 +0200 Subject: [PATCH 082/126] TECH Update copyrights due to entity name change --- LICENSE | 2 +- composer.json | 2 +- docker-compose.yml | 2 +- phpcs.xml.dist | 2 +- phpunit-watcher.yml | 2 +- phpunit.xml.dist | 2 +- psalm.xml | 2 +- src/Api/AbstractStruct.php | 2 +- src/Api/Client.php | 2 +- src/Api/Client/Exception.php | 2 +- src/Api/Exception.php | 2 +- src/Api/InternalClient.php | 2 +- src/Api/Operator.php | 2 +- src/Api/Operator/Aps.php | 2 +- src/Api/Operator/Certificate.php | 2 +- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Database.php | 2 +- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/Dns.php | 2 +- src/Api/Operator/DnsTemplate.php | 2 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Locale.php | 2 +- src/Api/Operator/LogRotation.php | 2 +- src/Api/Operator/Mail.php | 2 +- src/Api/Operator/PhpHandler.php | 2 +- src/Api/Operator/ProtectedDirectory.php | 2 +- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/ResellerPlan.php | 2 +- src/Api/Operator/SecretKey.php | 2 +- src/Api/Operator/Server.php | 2 +- src/Api/Operator/ServicePlan.php | 2 +- src/Api/Operator/ServicePlanAddon.php | 2 +- src/Api/Operator/Session.php | 2 +- src/Api/Operator/Site.php | 2 +- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Operator/Subdomain.php | 2 +- src/Api/Operator/Ui.php | 2 +- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Certificate/Info.php | 2 +- src/Api/Struct/Customer/GeneralInfo.php | 2 +- src/Api/Struct/Customer/Info.php | 2 +- src/Api/Struct/Database/Info.php | 2 +- src/Api/Struct/Database/UserInfo.php | 2 +- src/Api/Struct/DatabaseServer/Info.php | 2 +- src/Api/Struct/Dns/Info.php | 2 +- src/Api/Struct/EventLog/DetailedEvent.php | 2 +- src/Api/Struct/EventLog/Event.php | 2 +- src/Api/Struct/Ip/Info.php | 2 +- src/Api/Struct/Locale/Info.php | 2 +- src/Api/Struct/Mail/GeneralInfo.php | 2 +- src/Api/Struct/Mail/Info.php | 2 +- src/Api/Struct/PhpHandler/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/DataInfo.php | 2 +- src/Api/Struct/ProtectedDirectory/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/UserInfo.php | 2 +- src/Api/Struct/Reseller/GeneralInfo.php | 2 +- src/Api/Struct/Reseller/Info.php | 2 +- src/Api/Struct/SecretKey/Info.php | 2 +- src/Api/Struct/Server/Admin.php | 2 +- src/Api/Struct/Server/GeneralInfo.php | 2 +- src/Api/Struct/Server/Preferences.php | 2 +- src/Api/Struct/Server/SessionPreferences.php | 2 +- src/Api/Struct/Server/Statistics.php | 2 +- src/Api/Struct/Server/Statistics/DiskSpace.php | 2 +- src/Api/Struct/Server/Statistics/LoadAverage.php | 2 +- src/Api/Struct/Server/Statistics/Memory.php | 2 +- src/Api/Struct/Server/Statistics/Objects.php | 2 +- src/Api/Struct/Server/Statistics/Other.php | 2 +- src/Api/Struct/Server/Statistics/Swap.php | 2 +- src/Api/Struct/Server/Statistics/Version.php | 2 +- src/Api/Struct/Server/UpdatesInfo.php | 2 +- src/Api/Struct/ServicePlan/Info.php | 2 +- src/Api/Struct/ServicePlanAddon/Info.php | 2 +- src/Api/Struct/Session/Info.php | 2 +- src/Api/Struct/Site/GeneralInfo.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 2 +- src/Api/Struct/Site/Info.php | 2 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 2 +- src/Api/Struct/SiteAlias/Info.php | 2 +- src/Api/Struct/Subdomain/Info.php | 2 +- src/Api/Struct/Ui/CustomButton.php | 2 +- src/Api/Struct/Webspace/DiskUsage.php | 2 +- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/HostingPropertyInfo.php | 2 +- src/Api/Struct/Webspace/Info.php | 2 +- src/Api/Struct/Webspace/Limit.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- src/Api/Struct/Webspace/LimitInfo.php | 2 +- src/Api/Struct/Webspace/Limits.php | 2 +- src/Api/Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PermissionInfo.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- src/Api/Struct/Webspace/PhysicalHostingDescriptor.php | 2 +- src/Api/XmlResponse.php | 2 +- tests/AbstractTestCase.php | 2 +- tests/ApiClientTest.php | 2 +- tests/CertificateTest.php | 2 +- tests/CustomerTest.php | 2 +- tests/DatabaseServerTest.php | 2 +- tests/DatabaseTest.php | 2 +- tests/DnsTemplateTest.php | 2 +- tests/DnsTest.php | 2 +- tests/EventLogTest.php | 2 +- tests/IpTest.php | 2 +- tests/LocaleTest.php | 2 +- tests/MailTest.php | 2 +- tests/PhpHandlerTest.php | 2 +- tests/ProtectedDirectoryTest.php | 2 +- tests/ResellerTest.php | 2 +- tests/SecretKeyTest.php | 2 +- tests/ServerTest.php | 2 +- tests/ServicePlanAddonTest.php | 2 +- tests/ServicePlanTest.php | 2 +- tests/SessionTest.php | 2 +- tests/SiteAliasTest.php | 2 +- tests/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/UiTest.php | 2 +- tests/Utility/KeyLimitChecker.php | 2 +- tests/Utility/PasswordProvider.php | 2 +- tests/WebspaceTest.php | 2 +- wait-for-plesk.sh | 2 +- 124 files changed, 124 insertions(+), 124 deletions(-) diff --git a/LICENSE b/LICENSE index 4df0a073..598e4458 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2024. Plesk International GmbH. +Copyright 1999-2024. WebPros International GmbH. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/composer.json b/composer.json index c28720b1..e141239f 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "email": "sibprogrammer@gmail.com" }, { - "name": "Plesk International GmbH.", + "name": "WebPros International GmbH.", "email": "plesk-dev-leads@plesk.com" } ], diff --git a/docker-compose.yml b/docker-compose.yml index 166cfed9..4431a3f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -# Copyright 1999-2024. Plesk International GmbH. +# Copyright 1999-2024. WebPros International GmbH. version: '2' services: plesk: diff --git a/phpcs.xml.dist b/phpcs.xml.dist index b01ab748..56a9a781 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,5 +1,5 @@ - + src tests diff --git a/phpunit-watcher.yml b/phpunit-watcher.yml index 6a7a24d0..8a4d295f 100644 --- a/phpunit-watcher.yml +++ b/phpunit-watcher.yml @@ -1,4 +1,4 @@ -# Copyright 1999-2024. Plesk International GmbH. +# Copyright 1999-2024. WebPros International GmbH. phpunit: arguments: '--stop-on-failure' timeout: 0 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f699a42c..b90bd149 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/psalm.xml b/psalm.xml index 2c875ca4..da2678a1 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,5 +1,5 @@ - + Plesk" > /dev/null From 83487a3beb57a19c1b540009a0f7892eb33bd0b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 06:32:32 +0000 Subject: [PATCH 083/126] TECH Bump vimeo/psalm from 5.19.0 to 5.20.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.19.0 to 5.20.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.19.0...5.20.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 6253b712..1c065791 100644 --- a/composer.lock +++ b/composer.lock @@ -4509,16 +4509,16 @@ }, { "name": "vimeo/psalm", - "version": "5.19.0", + "version": "5.20.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b" + "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/06b71be009a6bd6d81b9811855d6629b9fe90e1b", - "reference": "06b71be009a6bd6d81b9811855d6629b9fe90e1b", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", + "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", "shasum": "" }, "require": { @@ -4615,7 +4615,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-01-09T21:02:43+00:00" + "time": "2024-01-18T12:15:06+00:00" }, { "name": "webmozart/assert", From c242c0c3d75af345809e4be93ed66fc74eb76304 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 06:32:39 +0000 Subject: [PATCH 084/126] TECH Bump phpunit/phpunit from 9.6.15 to 9.6.16 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.15 to 9.6.16. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.16/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.15...9.6.16) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/composer.lock b/composer.lock index 6253b712..c1e6a5df 100644 --- a/composer.lock +++ b/composer.lock @@ -1522,23 +1522,23 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.29", + "version": "9.2.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", - "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1588,7 +1588,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" }, "funding": [ { @@ -1596,7 +1596,7 @@ "type": "github" } ], - "time": "2023-09-19T04:57:46+00:00" + "time": "2023-12-22T06:47:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1841,16 +1841,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.15", + "version": "9.6.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", - "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", + "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", "shasum": "" }, "require": { @@ -1924,7 +1924,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" }, "funding": [ { @@ -1940,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2023-12-01T16:55:19+00:00" + "time": "2024-01-19T07:03:14+00:00" }, { "name": "psr/container", @@ -2437,20 +2437,20 @@ }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -2482,7 +2482,7 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -2490,7 +2490,7 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { "name": "sebastian/diff", @@ -2764,20 +2764,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=7.3" }, "require-dev": { @@ -2809,7 +2809,7 @@ "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" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -2817,7 +2817,7 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { "name": "sebastian/object-enumerator", From 4964dde9d3fc9b2ebdebca815e0874c7600ab220 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 06:53:37 +0000 Subject: [PATCH 085/126] TECH Bump vimeo/psalm from 5.20.0 to 5.21.1 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.20.0 to 5.21.1. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.20.0...5.21.1) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 72 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/composer.lock b/composer.lock index ae4572ba..7a8b864c 100644 --- a/composer.lock +++ b/composer.lock @@ -642,16 +642,16 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -683,9 +683,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "doctrine/instantiator", @@ -1089,16 +1089,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.2.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { @@ -1109,7 +1109,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -1134,9 +1134,9 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" }, - "time": "2023-04-09T17:37:40+00:00" + "time": "2024-01-31T06:18:54+00:00" }, { "name": "nikic/php-parser", @@ -3368,16 +3368,16 @@ }, { "name": "symfony/console", - "version": "v5.4.34", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "4b4d8cd118484aa604ec519062113dd87abde18c" + "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4b4d8cd118484aa604ec519062113dd87abde18c", - "reference": "4b4d8cd118484aa604ec519062113dd87abde18c", + "url": "https://api.github.com/repos/symfony/console/zipball/dbdf6adcb88d5f83790e1efb57ef4074309d3931", + "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931", "shasum": "" }, "require": { @@ -3447,7 +3447,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.34" + "source": "https://github.com/symfony/console/tree/v5.4.35" }, "funding": [ { @@ -3463,7 +3463,7 @@ "type": "tidelift" } ], - "time": "2023-12-08T13:33:03+00:00" + "time": "2024-01-23T14:28:09+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3534,16 +3534,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.25", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" + "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", - "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5a553607d4ffbfa9c0ab62facadea296c9db7086", + "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086", "shasum": "" }, "require": { @@ -3578,7 +3578,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.25" + "source": "https://github.com/symfony/filesystem/tree/v5.4.35" }, "funding": [ { @@ -3594,7 +3594,7 @@ "type": "tidelift" } ], - "time": "2023-05-31T13:04:02+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/finder", @@ -4298,16 +4298,16 @@ }, { "name": "symfony/string", - "version": "v5.4.34", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e3f98bfc7885c957488f443df82d97814a3ce061" + "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e3f98bfc7885c957488f443df82d97814a3ce061", - "reference": "e3f98bfc7885c957488f443df82d97814a3ce061", + "url": "https://api.github.com/repos/symfony/string/zipball/c209c4d0559acce1c9a2067612cfb5d35756edc2", + "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2", "shasum": "" }, "require": { @@ -4364,7 +4364,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.34" + "source": "https://github.com/symfony/string/tree/v5.4.35" }, "funding": [ { @@ -4380,7 +4380,7 @@ "type": "tidelift" } ], - "time": "2023-12-09T13:20:28+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/yaml", @@ -4509,16 +4509,16 @@ }, { "name": "vimeo/psalm", - "version": "5.20.0", + "version": "5.21.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4" + "reference": "8c473e2437be8b6a8fd8f630f0f11a16b114c494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", - "reference": "3f284e96c9d9be6fe6b15c79416e1d1903dcfef4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/8c473e2437be8b6a8fd8f630f0f11a16b114c494", + "reference": "8c473e2437be8b6a8fd8f630f0f11a16b114c494", "shasum": "" }, "require": { @@ -4615,7 +4615,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-01-18T12:15:06+00:00" + "time": "2024-02-01T01:04:32+00:00" }, { "name": "webmozart/assert", From 6f21c38e9c06f2f3d03c8354665236f9cc20c930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 06:07:24 +0000 Subject: [PATCH 086/126] TECH Bump squizlabs/php_codesniffer from 3.8.1 to 3.9.0 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.8.1 to 3.9.0. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.8.1...3.9.0) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 7a8b864c..5e48971d 100644 --- a/composer.lock +++ b/composer.lock @@ -3288,16 +3288,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.8.1", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", "shasum": "" }, "require": { @@ -3364,7 +3364,7 @@ "type": "open_collective" } ], - "time": "2024-01-11T20:47:48+00:00" + "time": "2024-02-16T15:06:51+00:00" }, { "name": "symfony/console", From c8f1776b75d68181382197443b2deadc4430855a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 06:07:31 +0000 Subject: [PATCH 087/126] TECH Bump vimeo/psalm from 5.21.1 to 5.22.1 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.21.1 to 5.22.1. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.21.1...5.22.1) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 114 +++++++++++++++++++++----------------------------- 1 file changed, 48 insertions(+), 66 deletions(-) diff --git a/composer.lock b/composer.lock index 7a8b864c..e873af03 100644 --- a/composer.lock +++ b/composer.lock @@ -907,16 +907,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077" + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/85193c0b0cb5c47894b5eaec906e946f054e7077", - "reference": "85193c0b0cb5c47894b5eaec906e946f054e7077", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { @@ -956,7 +956,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.0.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" }, "funding": [ { @@ -964,7 +964,7 @@ "type": "github" } ], - "time": "2023-09-17T21:38:23+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "jolicode/jolinotif", @@ -3661,16 +3661,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -3684,9 +3684,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3723,7 +3720,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -3739,20 +3736,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -3763,9 +3760,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3804,7 +3798,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -3820,20 +3814,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -3844,9 +3838,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3888,7 +3879,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -3904,20 +3895,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -3931,9 +3922,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3971,7 +3959,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -3987,20 +3975,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", "shasum": "" }, "require": { @@ -4008,9 +3996,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4050,7 +4035,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" }, "funding": [ { @@ -4066,20 +4051,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -4087,9 +4072,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4133,7 +4115,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -4149,7 +4131,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", @@ -4509,16 +4491,16 @@ }, { "name": "vimeo/psalm", - "version": "5.21.1", + "version": "5.22.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8c473e2437be8b6a8fd8f630f0f11a16b114c494" + "reference": "e9dad66e11274315dac27e08349c628c7d6a1a43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8c473e2437be8b6a8fd8f630f0f11a16b114c494", - "reference": "8c473e2437be8b6a8fd8f630f0f11a16b114c494", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/e9dad66e11274315dac27e08349c628c7d6a1a43", + "reference": "e9dad66e11274315dac27e08349c628c7d6a1a43", "shasum": "" }, "require": { @@ -4541,7 +4523,7 @@ "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.16", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", - "sebastian/diff": "^4.0 || ^5.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" @@ -4615,7 +4597,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-02-01T01:04:32+00:00" + "time": "2024-02-15T22:52:31+00:00" }, { "name": "webmozart/assert", From c60c8a2b8c34d57ee1a2089c8d1de2deab766dac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 07:02:37 +0000 Subject: [PATCH 088/126] TECH Bump phpunit/phpunit from 9.6.16 to 9.6.17 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.16 to 9.6.17. - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.17/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.16...9.6.17) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 2f2bb1b9..22e29f30 100644 --- a/composer.lock +++ b/composer.lock @@ -1841,16 +1841,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.16", + "version": "9.6.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" + "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", + "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", "shasum": "" }, "require": { @@ -1924,7 +1924,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" }, "funding": [ { @@ -1940,7 +1940,7 @@ "type": "tidelift" } ], - "time": "2024-01-19T07:03:14+00:00" + "time": "2024-02-23T13:14:51+00:00" }, { "name": "psr/container", From db6c8d0fa52c3c95d30c8b0b14d224c1b6573a17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 07:02:51 +0000 Subject: [PATCH 089/126] TECH Bump vimeo/psalm from 5.22.1 to 5.22.2 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.22.1 to 5.22.2. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.22.1...5.22.2) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/composer.lock b/composer.lock index 2f2bb1b9..2bb3369e 100644 --- a/composer.lock +++ b/composer.lock @@ -1417,21 +1417,21 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.0", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fad452781b3d774e3337b0c0b245dd8e5a4455fc", - "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", "phpstan/phpdoc-parser": "^1.13" }, @@ -1469,22 +1469,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" }, - "time": "2024-01-11T11:49:22+00:00" + "time": "2024-02-23T11:10:43+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.25.0", + "version": "1.26.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240" + "reference": "231e3186624c03d7e7c890ec662b81e6b0405227" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240", - "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/231e3186624c03d7e7c890ec662b81e6b0405227", + "reference": "231e3186624c03d7e7c890ec662b81e6b0405227", "shasum": "" }, "require": { @@ -1516,9 +1516,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.26.0" }, - "time": "2024-01-04T17:06:16+00:00" + "time": "2024-02-23T16:05:55+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4491,16 +4491,16 @@ }, { "name": "vimeo/psalm", - "version": "5.22.1", + "version": "5.22.2", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "e9dad66e11274315dac27e08349c628c7d6a1a43" + "reference": "d768d914152dbbf3486c36398802f74e80cfde48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/e9dad66e11274315dac27e08349c628c7d6a1a43", - "reference": "e9dad66e11274315dac27e08349c628c7d6a1a43", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d768d914152dbbf3486c36398802f74e80cfde48", + "reference": "d768d914152dbbf3486c36398802f74e80cfde48", "shasum": "" }, "require": { @@ -4597,7 +4597,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-02-15T22:52:31+00:00" + "time": "2024-02-22T23:39:07+00:00" }, { "name": "webmozart/assert", From a0177487f33a19917d852537ebef61d36480cef2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 06:58:23 +0000 Subject: [PATCH 090/126] TECH Bump vimeo/psalm from 5.22.2 to 5.23.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.22.2 to 5.23.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.22.2...5.23.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/composer.lock b/composer.lock index 05883e19..26991406 100644 --- a/composer.lock +++ b/composer.lock @@ -387,16 +387,16 @@ }, { "name": "composer/pcre", - "version": "3.1.1", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" + "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace", + "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace", "shasum": "" }, "require": { @@ -438,7 +438,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.1" + "source": "https://github.com/composer/pcre/tree/3.1.2" }, "funding": [ { @@ -454,7 +454,7 @@ "type": "tidelift" } ], - "time": "2023-10-11T07:11:09+00:00" + "time": "2024-03-07T15:38:35+00:00" }, { "name": "composer/semver", @@ -2494,16 +2494,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -2548,7 +2548,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -2556,7 +2556,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -3368,16 +3368,16 @@ }, { "name": "symfony/console", - "version": "v5.4.35", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931" + "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/dbdf6adcb88d5f83790e1efb57ef4074309d3931", - "reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931", + "url": "https://api.github.com/repos/symfony/console/zipball/39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", + "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", "shasum": "" }, "require": { @@ -3447,7 +3447,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.35" + "source": "https://github.com/symfony/console/tree/v5.4.36" }, "funding": [ { @@ -3463,7 +3463,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T14:28:09+00:00" + "time": "2024-02-20T16:33:57+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4280,16 +4280,16 @@ }, { "name": "symfony/string", - "version": "v5.4.35", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2" + "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/c209c4d0559acce1c9a2067612cfb5d35756edc2", - "reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2", + "url": "https://api.github.com/repos/symfony/string/zipball/4e232c83622bd8cd32b794216aa29d0d266d353b", + "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b", "shasum": "" }, "require": { @@ -4346,7 +4346,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.35" + "source": "https://github.com/symfony/string/tree/v5.4.36" }, "funding": [ { @@ -4362,7 +4362,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2024-02-01T08:49:30+00:00" }, { "name": "symfony/yaml", @@ -4491,16 +4491,16 @@ }, { "name": "vimeo/psalm", - "version": "5.22.2", + "version": "5.23.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d768d914152dbbf3486c36398802f74e80cfde48" + "reference": "005e3184fb6de4350a873b9b8c4dc3cede9db762" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d768d914152dbbf3486c36398802f74e80cfde48", - "reference": "d768d914152dbbf3486c36398802f74e80cfde48", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/005e3184fb6de4350a873b9b8c4dc3cede9db762", + "reference": "005e3184fb6de4350a873b9b8c4dc3cede9db762", "shasum": "" }, "require": { @@ -4597,7 +4597,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-02-22T23:39:07+00:00" + "time": "2024-03-09T19:39:11+00:00" }, { "name": "webmozart/assert", From e7ddf904cef1c307c34354b21fa54e4bcfe6d127 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 06:22:58 +0000 Subject: [PATCH 091/126] TECH Bump vimeo/psalm from 5.23.0 to 5.23.1 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.23.0 to 5.23.1. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.23.0...5.23.1) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 26991406..2dc36662 100644 --- a/composer.lock +++ b/composer.lock @@ -1140,21 +1140,21 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v4.19.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", @@ -1190,9 +1190,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-03-17T08:10:35+00:00" }, { "name": "phar-io/manifest", @@ -4491,16 +4491,16 @@ }, { "name": "vimeo/psalm", - "version": "5.23.0", + "version": "5.23.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "005e3184fb6de4350a873b9b8c4dc3cede9db762" + "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/005e3184fb6de4350a873b9b8c4dc3cede9db762", - "reference": "005e3184fb6de4350a873b9b8c4dc3cede9db762", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", + "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", "shasum": "" }, "require": { @@ -4597,7 +4597,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-03-09T19:39:11+00:00" + "time": "2024-03-11T20:33:46+00:00" }, { "name": "webmozart/assert", From 9a580504fa99344a27c1e9004a67b5f6cf5f4b5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 06:15:18 +0000 Subject: [PATCH 092/126] TECH Bump phpunit/phpunit from 9.6.17 to 9.6.18 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.17 to 9.6.18. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.18/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.17...9.6.18) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 106 ++++++++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 50 deletions(-) diff --git a/composer.lock b/composer.lock index 2dc36662..531d0421 100644 --- a/composer.lock +++ b/composer.lock @@ -1196,20 +1196,21 @@ }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -1250,9 +1251,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -1522,16 +1529,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { @@ -1588,7 +1595,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -1596,7 +1603,7 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1841,16 +1848,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.17", + "version": "9.6.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" + "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", + "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", "shasum": "" }, "require": { @@ -1924,7 +1931,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.18" }, "funding": [ { @@ -1940,7 +1947,7 @@ "type": "tidelift" } ], - "time": "2024-02-23T13:14:51+00:00" + "time": "2024-03-21T12:07:32+00:00" }, { "name": "psr/container", @@ -2196,16 +2203,16 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -2240,7 +2247,7 @@ "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" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -2248,7 +2255,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -2623,16 +2630,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -2688,7 +2695,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -2696,20 +2703,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -2752,7 +2759,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -2760,7 +2767,7 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", @@ -2996,16 +3003,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -3017,7 +3024,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3038,8 +3045,7 @@ "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" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -3047,7 +3053,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -4441,16 +4447,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -4479,7 +4485,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -4487,7 +4493,7 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "vimeo/psalm", From 39dbb0163f968f58275e275892b7a50451c6e9a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 06:35:26 +0000 Subject: [PATCH 093/126] TECH Bump squizlabs/php_codesniffer from 3.9.0 to 3.9.1 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.9.0 to 3.9.1. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.9.0...3.9.1) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 531d0421..75cbeb13 100644 --- a/composer.lock +++ b/composer.lock @@ -3294,16 +3294,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.0", + "version": "3.9.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", - "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", + "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", "shasum": "" }, "require": { @@ -3370,7 +3370,7 @@ "type": "open_collective" } ], - "time": "2024-02-16T15:06:51+00:00" + "time": "2024-03-31T21:03:09+00:00" }, { "name": "symfony/console", From 06e9c536a5693f5807621a53555710713eb128cf Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Fri, 5 Apr 2024 16:55:36 +0300 Subject: [PATCH 094/126] Changed test data since It can not add a DS record for the root domain --- tests/DnsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 37ad4c0f..6612dc6f 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -122,13 +122,13 @@ public function testGetAllByWebspaceId() $dns = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'DS', - 'host' => '', + 'host' => 'host', 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292118', ]); $dns2 = static::$client->dns()->create([ 'site-id' => static::$webspace->id, 'type' => 'DS', - 'host' => '', + 'host' => 'host', 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292119', ]); $dnsInfo = static::$client->dns()->getAll('site-id', static::$webspace->id); From 795b470a18312a0821594ec76775d0d5d945a0a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 06:17:12 +0000 Subject: [PATCH 095/126] TECH Bump phpunit/phpunit from 9.6.18 to 9.6.19 Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 9.6.18 to 9.6.19. - [Release notes](https://github.com/sebastianbergmann/phpunit/releases) - [Changelog](https://github.com/sebastianbergmann/phpunit/blob/9.6.19/ChangeLog-9.6.md) - [Commits](https://github.com/sebastianbergmann/phpunit/compare/9.6.18...9.6.19) --- updated-dependencies: - dependency-name: phpunit/phpunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 75cbeb13..49787988 100644 --- a/composer.lock +++ b/composer.lock @@ -1848,16 +1848,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.18", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", - "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { @@ -1931,7 +1931,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.18" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, "funding": [ { @@ -1947,7 +1947,7 @@ "type": "tidelift" } ], - "time": "2024-03-21T12:07:32+00:00" + "time": "2024-04-05T04:35:58+00:00" }, { "name": "psr/container", From 918b12a23164659b0b5ebe3d5afcb64262335f6a Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 10 Apr 2024 22:45:04 +0100 Subject: [PATCH 096/126] TECH Repair code coverage reporting --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 432e7823..faf6f077 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,10 @@ on: [push] jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: docker-compose run tests - - run: bash <(curl -s https://codecov.io/bash) + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} From 109526ef4455e7842c4237c70cd54e3de2b080d5 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 10 Apr 2024 23:05:57 +0100 Subject: [PATCH 097/126] Use previous version of Ubuntu for tests to avoid interference between Plesk, Docker and systemd --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index faf6f077..145999ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push] jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 - run: docker-compose run tests From 61811a45be3718d7b832da47a3da712645f1fc97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 06:10:04 +0000 Subject: [PATCH 098/126] TECH Bump squizlabs/php_codesniffer from 3.9.1 to 3.9.2 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.9.1 to 3.9.2. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.9.1...3.9.2) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 49787988..2e6c1e7b 100644 --- a/composer.lock +++ b/composer.lock @@ -3294,16 +3294,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.1", + "version": "3.9.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909" + "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909", - "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/aac1f6f347a5c5ac6bc98ad395007df00990f480", + "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480", "shasum": "" }, "require": { @@ -3370,7 +3370,7 @@ "type": "open_collective" } ], - "time": "2024-03-31T21:03:09+00:00" + "time": "2024-04-23T20:25:34+00:00" }, { "name": "symfony/console", From 9b9693ac723dfb67b7b998a5e945adce8360b34b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 06:14:58 +0000 Subject: [PATCH 099/126] TECH Bump vimeo/psalm from 5.23.1 to 5.24.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.23.1 to 5.24.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.23.1...5.24.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 190 +++++++++++++++++++++++++------------------------- 1 file changed, 96 insertions(+), 94 deletions(-) diff --git a/composer.lock b/composer.lock index 2e6c1e7b..74773f1e 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "amphp/amp", - "version": "v2.6.2", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { @@ -30,8 +30,8 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { @@ -86,7 +86,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/v2.6.4" }, "funding": [ { @@ -94,20 +94,20 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2024-03-21T18:52:26+00:00" }, { "name": "amphp/byte-stream", - "version": "v1.8.1", + "version": "v1.8.2", "source": { "type": "git", "url": "https://github.com/amphp/byte-stream.git", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", - "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", + "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", "shasum": "" }, "require": { @@ -123,11 +123,6 @@ "psalm/phar": "^3.11.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "files": [ "lib/functions.php" @@ -151,7 +146,7 @@ } ], "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "http://amphp.org/byte-stream", + "homepage": "https://amphp.org/byte-stream", "keywords": [ "amp", "amphp", @@ -161,9 +156,8 @@ "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" + "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" }, "funding": [ { @@ -171,7 +165,7 @@ "type": "github" } ], - "time": "2021-03-30T17:13:30+00:00" + "time": "2024-04-13T18:00:56+00:00" }, { "name": "clue/stdio-react", @@ -387,16 +381,16 @@ }, { "name": "composer/pcre", - "version": "3.1.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace" + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace", - "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace", + "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", "shasum": "" }, "require": { @@ -438,7 +432,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.2" + "source": "https://github.com/composer/pcre/tree/3.1.3" }, "funding": [ { @@ -454,7 +448,7 @@ "type": "tidelift" } ], - "time": "2024-03-07T15:38:35+00:00" + "time": "2024-03-19T10:26:25+00:00" }, { "name": "composer/semver", @@ -539,16 +533,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", "shasum": "" }, "require": { @@ -559,7 +553,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -583,9 +577,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" }, "funding": [ { @@ -601,7 +595,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-03-26T18:29:49+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -1367,28 +1361,35 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", + "version": "5.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + "reference": "298d2febfe79d03fe714eb871d5538da55205b1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/298d2febfe79d03fe714eb871d5538da55205b1a", + "reference": "298d2febfe79d03fe714eb871d5538da55205b1a", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.1", "ext-filter": "*", - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" + "mockery/mockery": "~1.3.5", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^5.13" }, "type": "library", "extra": { @@ -1412,15 +1413,15 @@ }, { "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" + "email": "opensource@ijaap.nl" } ], "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/5.3.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.0" }, - "time": "2021-10-19T17:43:47+00:00" + "time": "2024-04-09T21:13:58+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1482,16 +1483,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.26.0", + "version": "1.28.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "231e3186624c03d7e7c890ec662b81e6b0405227" + "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/231e3186624c03d7e7c890ec662b81e6b0405227", - "reference": "231e3186624c03d7e7c890ec662b81e6b0405227", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", "shasum": "" }, "require": { @@ -1523,9 +1524,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.26.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" }, - "time": "2024-02-23T16:05:55+00:00" + "time": "2024-04-03T18:51:33+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3374,16 +3375,16 @@ }, { "name": "symfony/console", - "version": "v5.4.36", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e" + "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", - "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", + "url": "https://api.github.com/repos/symfony/console/zipball/f3e591c48688a0cfa1a3296205926c05e84b22b1", + "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1", "shasum": "" }, "require": { @@ -3453,7 +3454,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.36" + "source": "https://github.com/symfony/console/tree/v5.4.39" }, "funding": [ { @@ -3469,20 +3470,20 @@ "type": "tidelift" } ], - "time": "2024-02-20T16:33:57+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { @@ -3520,7 +3521,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" }, "funding": [ { @@ -3536,27 +3537,28 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-01-24T14:02:46+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.35", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086" + "reference": "e6edd875d5d39b03de51f3c3951148cfa79a4d12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5a553607d4ffbfa9c0ab62facadea296c9db7086", - "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e6edd875d5d39b03de51f3c3951148cfa79a4d12", + "reference": "e6edd875d5d39b03de51f3c3951148cfa79a4d12", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-php80": "^1.16", + "symfony/process": "^5.4|^6.4" }, "type": "library", "autoload": { @@ -3584,7 +3586,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.35" + "source": "https://github.com/symfony/filesystem/tree/v5.4.39" }, "funding": [ { @@ -3600,7 +3602,7 @@ "type": "tidelift" } ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/finder", @@ -4141,16 +4143,16 @@ }, { "name": "symfony/process", - "version": "v5.4.23", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" + "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", - "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", + "url": "https://api.github.com/repos/symfony/process/zipball/85a554acd7c28522241faf2e97b9541247a0d3d5", + "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5", "shasum": "" }, "require": { @@ -4183,7 +4185,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.23" + "source": "https://github.com/symfony/process/tree/v5.4.39" }, "funding": [ { @@ -4199,20 +4201,20 @@ "type": "tidelift" } ], - "time": "2023-04-18T13:50:24+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v2.5.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", + "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", "shasum": "" }, "require": { @@ -4266,7 +4268,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" }, "funding": [ { @@ -4282,20 +4284,20 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/string", - "version": "v5.4.36", + "version": "v5.4.39", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b" + "reference": "495e71bae5862308051b9e63cc3e34078eed83ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/4e232c83622bd8cd32b794216aa29d0d266d353b", - "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b", + "url": "https://api.github.com/repos/symfony/string/zipball/495e71bae5862308051b9e63cc3e34078eed83ef", + "reference": "495e71bae5862308051b9e63cc3e34078eed83ef", "shasum": "" }, "require": { @@ -4352,7 +4354,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.36" + "source": "https://github.com/symfony/string/tree/v5.4.39" }, "funding": [ { @@ -4368,7 +4370,7 @@ "type": "tidelift" } ], - "time": "2024-02-01T08:49:30+00:00" + "time": "2024-04-18T08:26:06+00:00" }, { "name": "symfony/yaml", @@ -4497,16 +4499,16 @@ }, { "name": "vimeo/psalm", - "version": "5.23.1", + "version": "5.24.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", - "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/462c80e31c34e58cc4f750c656be3927e80e550e", + "reference": "462c80e31c34e58cc4f750c656be3927e80e550e", "shasum": "" }, "require": { @@ -4603,7 +4605,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-03-11T20:33:46+00:00" + "time": "2024-05-01T19:32:08+00:00" }, { "name": "webmozart/assert", From 437d50fe059439f3607eabec4137bc047c142a2f Mon Sep 17 00:00:00 2001 From: Razmik Ayvazyan <79054971+ayvazyan10@users.noreply.github.com> Date: Fri, 24 May 2024 16:57:27 +0400 Subject: [PATCH 100/126] Use documented deactivation status for customers and subscriptions --- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Webspace.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 9f997892..8201e627 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -72,7 +72,7 @@ public function enable(string $field, $value): bool */ public function disable(string $field, $value): bool { - return $this->setProperties($field, $value, ['status' => 1]); + return $this->setProperties($field, $value, ['status' => 16]); } /** diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 42d4e063..b1181106 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -172,7 +172,7 @@ public function enable(string $field, $value): bool */ public function disable(string $field, $value): bool { - return $this->setProperties($field, $value, ['status' => 1]); + return $this->setProperties($field, $value, ['status' => 16]); } /** From d5e81138d8a2c912b4486968741fbcbb51bfe5cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 06:23:00 +0000 Subject: [PATCH 101/126] TECH Bump squizlabs/php_codesniffer from 3.9.2 to 3.10.1 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.9.2 to 3.10.1. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.9.2...3.10.1) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 74773f1e..16d0868b 100644 --- a/composer.lock +++ b/composer.lock @@ -3295,16 +3295,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.9.2", + "version": "3.10.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480" + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/aac1f6f347a5c5ac6bc98ad395007df00990f480", - "reference": "aac1f6f347a5c5ac6bc98ad395007df00990f480", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", "shasum": "" }, "require": { @@ -3371,7 +3371,7 @@ "type": "open_collective" } ], - "time": "2024-04-23T20:25:34+00:00" + "time": "2024-05-22T21:24:41+00:00" }, { "name": "symfony/console", From f04133177f63231211935933b73cfed6c8ea7fd2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 8 Jul 2024 16:35:33 +0100 Subject: [PATCH 102/126] TECH Introduce 5 minutes timeout for the Plesk initialization --- wait-for-plesk.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 5f89d1de..97d6589f 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,8 +1,16 @@ #!/bin/bash ### Copyright 1999-2024. WebPros International GmbH. +COUNTER=1 + while : ; do curl -ksL https://plesk:8443/ | grep "Plesk" > /dev/null [ $? -eq 0 ] && break + echo "($COUNTER) Waiting for the Plesk initialization..." sleep 5 + COUNTER=$((COUNTER + 1)) + if [ $COUNTER -eq 60 ]; then + echo "Too long, interrupting..." + break + fi done From e34be3786c225d8e2f2c2482a7b19f0c64f9ecee Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <alexei.yuzhakov@webpros.com> Date: Mon, 8 Jul 2024 18:02:58 +0100 Subject: [PATCH 103/126] TECH Switch to the latest Ubuntu and Docker Compose to overcome issues with Plesk container start --- .github/workflows/test.yml | 4 ++-- docker-compose.yml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 145999ce..cf9bb311 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,10 @@ on: [push] jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - run: docker-compose run tests + - run: docker compose run tests - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/docker-compose.yml b/docker-compose.yml index 4431a3f5..83ad0e0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ # Copyright 1999-2024. WebPros International GmbH. -version: '2' +version: '3' services: plesk: image: plesk/plesk:latest @@ -12,7 +12,8 @@ services: - /run - /run/lock volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup + cgroup: host tests: build: . environment: From 5a88f34a64f0f65bfe45911146f736134015ec08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:25:14 +0000 Subject: [PATCH 104/126] TECH Bump vimeo/psalm from 5.24.0 to 5.25.0 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.24.0 to 5.25.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.24.0...5.25.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 182 +++++++++++++++++++++++++------------------------- 1 file changed, 92 insertions(+), 90 deletions(-) diff --git a/composer.lock b/composer.lock index 16d0868b..100f0c43 100644 --- a/composer.lock +++ b/composer.lock @@ -381,16 +381,16 @@ }, { "name": "composer/pcre", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" + "reference": "04229f163664973f68f38f6f73d917799168ef24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", - "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", + "reference": "04229f163664973f68f38f6f73d917799168ef24", "shasum": "" }, "require": { @@ -432,7 +432,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.3" + "source": "https://github.com/composer/pcre/tree/3.1.4" }, "funding": [ { @@ -448,7 +448,7 @@ "type": "tidelift" } ], - "time": "2024-03-19T10:26:25+00:00" + "time": "2024-05-27T13:40:54+00:00" }, { "name": "composer/semver", @@ -533,16 +533,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -579,7 +579,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -595,7 +595,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -1361,16 +1361,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.0", + "version": "5.4.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "298d2febfe79d03fe714eb871d5538da55205b1a" + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/298d2febfe79d03fe714eb871d5538da55205b1a", - "reference": "298d2febfe79d03fe714eb871d5538da55205b1a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", "shasum": "" }, "require": { @@ -1419,9 +1419,9 @@ "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/5.4.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" }, - "time": "2024-04-09T21:13:58+00:00" + "time": "2024-05-21T05:55:05+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1483,16 +1483,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.28.0", + "version": "1.29.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", "shasum": "" }, "require": { @@ -1524,9 +1524,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" }, - "time": "2024-04-03T18:51:33+00:00" + "time": "2024-05-31T08:52:43+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3375,16 +3375,16 @@ }, { "name": "symfony/console", - "version": "v5.4.39", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1" + "reference": "6473d441a913cb997123b59ff2dbe3d1cf9e11ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f3e591c48688a0cfa1a3296205926c05e84b22b1", - "reference": "f3e591c48688a0cfa1a3296205926c05e84b22b1", + "url": "https://api.github.com/repos/symfony/console/zipball/6473d441a913cb997123b59ff2dbe3d1cf9e11ba", + "reference": "6473d441a913cb997123b59ff2dbe3d1cf9e11ba", "shasum": "" }, "require": { @@ -3454,7 +3454,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.39" + "source": "https://github.com/symfony/console/tree/v5.4.41" }, "funding": [ { @@ -3470,7 +3470,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T08:26:06+00:00" + "time": "2024-06-28T07:48:55+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3541,23 +3541,25 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.39", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "e6edd875d5d39b03de51f3c3951148cfa79a4d12" + "reference": "6d29dd9340b372fa603f04e6df4dd76bb808591e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e6edd875d5d39b03de51f3c3951148cfa79a4d12", - "reference": "e6edd875d5d39b03de51f3c3951148cfa79a4d12", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/6d29dd9340b372fa603f04e6df4dd76bb808591e", + "reference": "6d29dd9340b372fa603f04e6df4dd76bb808591e", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php80": "^1.16" + }, + "require-dev": { "symfony/process": "^5.4|^6.4" }, "type": "library", @@ -3586,7 +3588,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.39" + "source": "https://github.com/symfony/filesystem/tree/v5.4.41" }, "funding": [ { @@ -3602,7 +3604,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T08:26:06+00:00" + "time": "2024-06-28T09:36:24+00:00" }, { "name": "symfony/finder", @@ -3669,16 +3671,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { @@ -3728,7 +3730,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { @@ -3744,20 +3746,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", + "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", "shasum": "" }, "require": { @@ -3806,7 +3808,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" }, "funding": [ { @@ -3822,20 +3824,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", "shasum": "" }, "require": { @@ -3887,7 +3889,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" }, "funding": [ { @@ -3903,20 +3905,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -3967,7 +3969,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -3983,20 +3985,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1", + "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1", "shasum": "" }, "require": { @@ -4043,7 +4045,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.0" }, "funding": [ { @@ -4059,20 +4061,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -4123,7 +4125,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { @@ -4139,20 +4141,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/process", - "version": "v5.4.39", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5" + "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/85a554acd7c28522241faf2e97b9541247a0d3d5", - "reference": "85a554acd7c28522241faf2e97b9541247a0d3d5", + "url": "https://api.github.com/repos/symfony/process/zipball/deedcb3bb4669cae2148bc920eafd2b16dc7c046", + "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046", "shasum": "" }, "require": { @@ -4185,7 +4187,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.39" + "source": "https://github.com/symfony/process/tree/v5.4.40" }, "funding": [ { @@ -4201,7 +4203,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T08:26:06+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/service-contracts", @@ -4288,16 +4290,16 @@ }, { "name": "symfony/string", - "version": "v5.4.39", + "version": "v5.4.41", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "495e71bae5862308051b9e63cc3e34078eed83ef" + "reference": "065a9611e0b1fd2197a867e1fb7f2238191b7096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/495e71bae5862308051b9e63cc3e34078eed83ef", - "reference": "495e71bae5862308051b9e63cc3e34078eed83ef", + "url": "https://api.github.com/repos/symfony/string/zipball/065a9611e0b1fd2197a867e1fb7f2238191b7096", + "reference": "065a9611e0b1fd2197a867e1fb7f2238191b7096", "shasum": "" }, "require": { @@ -4354,7 +4356,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.39" + "source": "https://github.com/symfony/string/tree/v5.4.41" }, "funding": [ { @@ -4370,7 +4372,7 @@ "type": "tidelift" } ], - "time": "2024-04-18T08:26:06+00:00" + "time": "2024-06-28T09:20:55+00:00" }, { "name": "symfony/yaml", @@ -4499,16 +4501,16 @@ }, { "name": "vimeo/psalm", - "version": "5.24.0", + "version": "5.25.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "462c80e31c34e58cc4f750c656be3927e80e550e" + "reference": "01a8eb06b9e9cc6cfb6a320bf9fb14331919d505" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/462c80e31c34e58cc4f750c656be3927e80e550e", - "reference": "462c80e31c34e58cc4f750c656be3927e80e550e", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/01a8eb06b9e9cc6cfb6a320bf9fb14331919d505", + "reference": "01a8eb06b9e9cc6cfb6a320bf9fb14331919d505", "shasum": "" }, "require": { @@ -4605,7 +4607,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-05-01T19:32:08+00:00" + "time": "2024-06-16T15:08:35+00:00" }, { "name": "webmozart/assert", From 9ca74d1ced219b262f3c76f9a3a9b6c1782e3a82 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <alexei.yuzhakov@webpros.com> Date: Tue, 9 Jul 2024 15:50:29 +0100 Subject: [PATCH 105/126] TECH Update dev dependencies --- composer.lock | 125 ++++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 64 deletions(-) diff --git a/composer.lock b/composer.lock index 100f0c43..e06f6e59 100644 --- a/composer.lock +++ b/composer.lock @@ -245,25 +245,25 @@ }, { "name": "clue/term-react", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-term.git", - "reference": "eb6eb063eda04a714ef89f066586a2c49588f7ca" + "reference": "00f297dc597eaee2ebf98af8f27cca5d21d60fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-term/zipball/eb6eb063eda04a714ef89f066586a2c49588f7ca", - "reference": "eb6eb063eda04a714ef89f066586a2c49588f7ca", + "url": "https://api.github.com/repos/clue/reactphp-term/zipball/00f297dc597eaee2ebf98af8f27cca5d21d60fa3", + "reference": "00f297dc597eaee2ebf98af8f27cca5d21d60fa3", "shasum": "" }, "require": { "php": ">=5.3", - "react/stream": "^1.0 || ^0.7" + "react/stream": "^1.2" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8", - "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/event-loop": "^1.2" }, "type": "library", "autoload": { @@ -302,7 +302,7 @@ ], "support": { "issues": "https://github.com/clue/reactphp-term/issues", - "source": "https://github.com/clue/reactphp-term/tree/v1.3.0" + "source": "https://github.com/clue/reactphp-term/tree/v1.4.0" }, "funding": [ { @@ -314,20 +314,20 @@ "type": "github" } ], - "time": "2020-11-06T11:50:12+00:00" + "time": "2024-01-30T10:22:09+00:00" }, { "name": "clue/utf8-react", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-utf8.git", - "reference": "8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96" + "reference": "d5cd04d39cb5457aa5df830b7c4b301d2694217e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-utf8/zipball/8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96", - "reference": "8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96", + "url": "https://api.github.com/repos/clue/reactphp-utf8/zipball/d5cd04d39cb5457aa5df830b7c4b301d2694217e", + "reference": "d5cd04d39cb5457aa5df830b7c4b301d2694217e", "shasum": "" }, "require": { @@ -335,7 +335,7 @@ "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3" }, "require-dev": { - "phpunit/phpunit": "^9.3 ||^5.7 || ^4.8", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", "react/stream": "^1.0 || ^0.7" }, "type": "library", @@ -365,7 +365,7 @@ ], "support": { "issues": "https://github.com/clue/reactphp-utf8/issues", - "source": "https://github.com/clue/reactphp-utf8/tree/v1.2.0" + "source": "https://github.com/clue/reactphp-utf8/tree/v1.3.0" }, "funding": [ { @@ -377,7 +377,7 @@ "type": "github" } ], - "time": "2020-11-06T11:48:09+00:00" + "time": "2023-12-06T14:52:17+00:00" }, { "name": "composer/pcre", @@ -753,28 +753,28 @@ }, { "name": "evenement/evenement", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", "shasum": "" }, "require": { "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9 || ^6" }, "type": "library", "autoload": { - "psr-0": { - "Evenement": "src" + "psr-4": { + "Evenement\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -794,9 +794,9 @@ ], "support": { "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/master" + "source": "https://github.com/igorw/evenement/tree/v3.0.2" }, - "time": "2017-07-23T21:35:13+00:00" + "time": "2023-08-08T05:53:35+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -1024,16 +1024,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -1041,11 +1041,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -1071,7 +1072,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -1079,7 +1080,7 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "netresearch/jsonmapper", @@ -2050,16 +2051,16 @@ }, { "name": "react/event-loop", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "shasum": "" }, "require": { @@ -2110,7 +2111,7 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" }, "funding": [ { @@ -2118,20 +2119,20 @@ "type": "open_collective" } ], - "time": "2023-05-05T10:11:24+00:00" + "time": "2023-11-13T13:48:05+00:00" }, { "name": "react/stream", - "version": "v1.2.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", "shasum": "" }, "require": { @@ -2141,12 +2142,12 @@ }, "require-dev": { "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { "psr-4": { - "React\\Stream\\": "src" + "React\\Stream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2188,19 +2189,15 @@ ], "support": { "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.2.0" + "source": "https://github.com/reactphp/stream/tree/v1.4.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2021-07-11T12:37:55+00:00" + "time": "2024-06-11T12:45:25+00:00" }, { "name": "sebastian/cli-parser", @@ -3608,16 +3605,16 @@ }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "f51cff4687547641c7d8180d74932ab40b2205ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/f51cff4687547641c7d8180d74932ab40b2205ce", + "reference": "f51cff4687547641c7d8180d74932ab40b2205ce", "shasum": "" }, "require": { @@ -3651,7 +3648,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v5.4.40" }, "funding": [ { @@ -3667,7 +3664,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4376,16 +4373,16 @@ }, { "name": "symfony/yaml", - "version": "v5.4.23", + "version": "v5.4.40", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" + "reference": "81cad0ceab3d61fe14fe941ff18a230ac9c80f83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", - "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/81cad0ceab3d61fe14fe941ff18a230ac9c80f83", + "reference": "81cad0ceab3d61fe14fe941ff18a230ac9c80f83", "shasum": "" }, "require": { @@ -4431,7 +4428,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.23" + "source": "https://github.com/symfony/yaml/tree/v5.4.40" }, "funding": [ { @@ -4447,7 +4444,7 @@ "type": "tidelift" } ], - "time": "2023-04-23T19:33:36+00:00" + "time": "2024-05-31T14:33:22+00:00" }, { "name": "theseer/tokenizer", From 40328d2a322ee842153c9e90644ed7a0f27a476d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <alexei.yuzhakov@webpros.com> Date: Tue, 9 Jul 2024 15:51:16 +0100 Subject: [PATCH 106/126] TECH Simplify PHP version dependency condition because ^8.0 covers all 8.x --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e141239f..86a21b8c 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.4 || ^8.0 || ^8.2", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*", From 099281e7968d922b874927ae9f7afe5dec4fa101 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 06:15:20 +0000 Subject: [PATCH 107/126] TECH Bump squizlabs/php_codesniffer from 3.10.1 to 3.10.2 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.10.1 to 3.10.2. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.1...3.10.2) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index e06f6e59..ff48c05c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3eb1fd049f2b5d629b669a5dea01f0d2", + "content-hash": "4b68490aeb4df72f0efd718342b2318c", "packages": [], "packages-dev": [ { @@ -3292,16 +3292,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.1", + "version": "3.10.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" + "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", "shasum": "" }, "require": { @@ -3368,7 +3368,7 @@ "type": "open_collective" } ], - "time": "2024-05-22T21:24:41+00:00" + "time": "2024-07-21T23:26:44+00:00" }, { "name": "symfony/console", @@ -4728,7 +4728,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0 || ^8.2", + "php": "^7.4 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*", From fe128b6a91dcc68e161333d16fc4e3d633baa55e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <alexei.yuzhakov@webpros.com> Date: Tue, 10 Sep 2024 15:18:18 +0100 Subject: [PATCH 108/126] Remove assertion due to bug on the product side (PPP-66239) --- tests/ServerTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 7e4113fa..86404140 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -107,7 +107,6 @@ public function testGetStatistics() $this->assertGreaterThan($stats->memory->free, $stats->memory->total); $this->assertIsNumeric($stats->swap->total); $this->assertIsArray($stats->diskSpace); - $this->assertGreaterThan(0, array_pop($stats->diskSpace)->total); } public function testGetSiteIsolationConfig() From 6d125cd031c0d9974d5019bf48559fb19acf11dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:20:30 +0000 Subject: [PATCH 109/126] TECH Bump vimeo/psalm from 5.25.0 to 5.26.1 Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 5.25.0 to 5.26.1. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/5.25.0...5.26.1) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 192 ++++++++++++++++++++++++++------------------------ 1 file changed, 100 insertions(+), 92 deletions(-) diff --git a/composer.lock b/composer.lock index ff48c05c..0c543aea 100644 --- a/composer.lock +++ b/composer.lock @@ -381,30 +381,38 @@ }, { "name": "composer/pcre", - "version": "3.1.4", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "04229f163664973f68f38f6f73d917799168ef24" + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", - "reference": "04229f163664973f68f38f6f73d917799168ef24", + "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, "require-dev": { - "phpstan/phpstan": "^1.3", + "phpstan/phpstan": "^1.11.10", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { "branch-alias": { "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -432,7 +440,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.4" + "source": "https://github.com/composer/pcre/tree/3.3.1" }, "funding": [ { @@ -448,20 +456,20 @@ "type": "tidelift" } ], - "time": "2024-05-27T13:40:54+00:00" + "time": "2024-08-27T18:44:43+00:00" }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -513,7 +521,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -529,7 +537,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "composer/xdebug-handler", @@ -901,16 +909,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + "reference": "8520451a140d3f46ac33042715115e290cf5785f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", "shasum": "" }, "require": { @@ -950,7 +958,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { @@ -958,7 +966,7 @@ "type": "github" } ], - "time": "2024-02-07T09:43:46+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "jolicode/jolinotif", @@ -1084,16 +1092,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.4.1", + "version": "v4.5.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", - "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", "shasum": "" }, "require": { @@ -1129,9 +1137,9 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" }, - "time": "2024-01-31T06:18:54+00:00" + "time": "2024-09-08T10:13:13+00:00" }, { "name": "nikic/php-parser", @@ -1484,16 +1492,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.29.1", + "version": "1.30.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + "reference": "51b95ec8670af41009e2b2b56873bad96682413e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", - "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51b95ec8670af41009e2b2b56873bad96682413e", + "reference": "51b95ec8670af41009e2b2b56873bad96682413e", "shasum": "" }, "require": { @@ -1525,9 +1533,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.30.1" }, - "time": "2024-05-31T08:52:43+00:00" + "time": "2024-09-07T20:13:05+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3372,16 +3380,16 @@ }, { "name": "symfony/console", - "version": "v5.4.41", + "version": "v5.4.43", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6473d441a913cb997123b59ff2dbe3d1cf9e11ba" + "reference": "e86f8554de667c16dde8aeb89a3990cfde924df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6473d441a913cb997123b59ff2dbe3d1cf9e11ba", - "reference": "6473d441a913cb997123b59ff2dbe3d1cf9e11ba", + "url": "https://api.github.com/repos/symfony/console/zipball/e86f8554de667c16dde8aeb89a3990cfde924df9", + "reference": "e86f8554de667c16dde8aeb89a3990cfde924df9", "shasum": "" }, "require": { @@ -3451,7 +3459,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.41" + "source": "https://github.com/symfony/console/tree/v5.4.43" }, "funding": [ { @@ -3467,7 +3475,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T07:48:55+00:00" + "time": "2024-08-13T16:31:56+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3668,20 +3676,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -3727,7 +3735,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -3743,24 +3751,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -3805,7 +3813,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -3821,24 +3829,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -3886,7 +3894,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -3902,24 +3910,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -3966,7 +3974,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -3982,24 +3990,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1", - "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -4042,7 +4050,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -4058,24 +4066,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -4122,7 +4130,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -4138,7 +4146,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", @@ -4287,16 +4295,16 @@ }, { "name": "symfony/string", - "version": "v5.4.41", + "version": "v5.4.43", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "065a9611e0b1fd2197a867e1fb7f2238191b7096" + "reference": "8be1d484951ff5ca995eaf8edcbcb8b9a5888450" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/065a9611e0b1fd2197a867e1fb7f2238191b7096", - "reference": "065a9611e0b1fd2197a867e1fb7f2238191b7096", + "url": "https://api.github.com/repos/symfony/string/zipball/8be1d484951ff5ca995eaf8edcbcb8b9a5888450", + "reference": "8be1d484951ff5ca995eaf8edcbcb8b9a5888450", "shasum": "" }, "require": { @@ -4353,7 +4361,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.41" + "source": "https://github.com/symfony/string/tree/v5.4.43" }, "funding": [ { @@ -4369,7 +4377,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:20:55+00:00" + "time": "2024-08-01T10:24:28+00:00" }, { "name": "symfony/yaml", @@ -4498,16 +4506,16 @@ }, { "name": "vimeo/psalm", - "version": "5.25.0", + "version": "5.26.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "01a8eb06b9e9cc6cfb6a320bf9fb14331919d505" + "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/01a8eb06b9e9cc6cfb6a320bf9fb14331919d505", - "reference": "01a8eb06b9e9cc6cfb6a320bf9fb14331919d505", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", + "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", "shasum": "" }, "require": { @@ -4528,7 +4536,7 @@ "felixfbecker/language-server-protocol": "^1.5.2", "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.16", + "nikic/php-parser": "^4.17", "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", @@ -4604,7 +4612,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2024-06-16T15:08:35+00:00" + "time": "2024-09-08T18:53:08+00:00" }, { "name": "webmozart/assert", From e812f112b8bf3c64c85cac010768da4610c8911d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 06:28:05 +0000 Subject: [PATCH 110/126] TECH Bump squizlabs/php_codesniffer from 3.10.2 to 3.10.3 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.10.2 to 3.10.3. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.2...3.10.3) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 0c543aea..aaf87f5d 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.2", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -3376,7 +3376,7 @@ "type": "open_collective" } ], - "time": "2024-07-21T23:26:44+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/console", From 61c2cee53b29fa618c1c22acc011555c36e1e8e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:37:56 +0000 Subject: [PATCH 111/126] TECH Bump symfony/process from 5.4.40 to 5.4.46 Bumps [symfony/process](https://github.com/symfony/process) from 5.4.40 to 5.4.46. - [Release notes](https://github.com/symfony/process/releases) - [Changelog](https://github.com/symfony/process/blob/7.1/CHANGELOG.md) - [Commits](https://github.com/symfony/process/compare/v5.4.40...v5.4.46) --- updated-dependencies: - dependency-name: symfony/process dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index aaf87f5d..358b48ac 100644 --- a/composer.lock +++ b/composer.lock @@ -4150,16 +4150,16 @@ }, { "name": "symfony/process", - "version": "v5.4.40", + "version": "v5.4.46", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046" + "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/deedcb3bb4669cae2148bc920eafd2b16dc7c046", - "reference": "deedcb3bb4669cae2148bc920eafd2b16dc7c046", + "url": "https://api.github.com/repos/symfony/process/zipball/01906871cb9b5e3cf872863b91aba4ec9767daf4", + "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4", "shasum": "" }, "require": { @@ -4192,7 +4192,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.40" + "source": "https://github.com/symfony/process/tree/v5.4.46" }, "funding": [ { @@ -4208,7 +4208,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-11-06T09:18:28+00:00" }, { "name": "symfony/service-contracts", From 545980d71f5eccffb3b2df2b5801d9185ba59176 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:01:54 +0000 Subject: [PATCH 112/126] TECH Bump squizlabs/php_codesniffer from 3.10.3 to 3.11.1 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.10.3 to 3.11.1. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.10.3...3.11.1) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 358b48ac..1c9a6339 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.3", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", "shasum": "" }, "require": { @@ -3376,7 +3376,7 @@ "type": "open_collective" } ], - "time": "2024-09-18T10:38:58+00:00" + "time": "2024-11-16T12:02:36+00:00" }, { "name": "symfony/console", From 9c8f4be5bc3f9a1664da54e4bf0670e099916dc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 07:01:57 +0000 Subject: [PATCH 113/126] TECH Bump squizlabs/php_codesniffer from 3.11.1 to 3.11.2 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.11.1 to 3.11.2. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.1...3.11.2) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 1c9a6339..a073f14a 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.11.1", + "version": "3.11.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" + "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", - "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079", + "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079", "shasum": "" }, "require": { @@ -3376,7 +3376,7 @@ "type": "open_collective" } ], - "time": "2024-11-16T12:02:36+00:00" + "time": "2024-12-11T16:04:26+00:00" }, { "name": "symfony/console", From 4221849a2d08d4848646aa7f9943985d3f9067dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 06:51:41 +0000 Subject: [PATCH 114/126] TECH Bump squizlabs/php_codesniffer from 3.11.2 to 3.11.3 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.11.2 to 3.11.3. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.2...3.11.3) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index a073f14a..eaa4256a 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.11.2", + "version": "3.11.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079" + "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079", - "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", + "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", "shasum": "" }, "require": { @@ -3374,9 +3374,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-12-11T16:04:26+00:00" + "time": "2025-01-23T17:04:15+00:00" }, { "name": "symfony/console", @@ -4746,5 +4750,5 @@ "platform-overrides": { "php": "7.4.27" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } From cf0f30da26cc70b4b7034ea7f9f60216ac56d169 Mon Sep 17 00:00:00 2001 From: Aleksei Fedorov <aleksei.fedorov@webpros.com> Date: Mon, 10 Feb 2025 11:15:47 +0200 Subject: [PATCH 115/126] TECH Add support php8.4 --- src/Api/Client.php | 2 +- src/Api/Operator.php | 2 +- src/Api/Operator/Webspace.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index 7895ab0e..12d19b6c 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -92,7 +92,7 @@ public function setVersion(string $version): void * * @param callable|null $function */ - public function setVerifyResponse(callable $function = null): void + public function setVerifyResponse(?callable $function = null): void { $this->verifyResponseCallback = $function; } diff --git a/src/Api/Operator.php b/src/Api/Operator.php index a694d105..d53bb103 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -71,7 +71,7 @@ protected function deleteBy(string $field, $value, string $deleteMethodName = 'd * * @return array */ - protected function getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null): array + protected function getItems($structClass, $infoTag, $field = null, $value = null, ?callable $filter = null): array { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild('get'); diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index b1181106..a555b2c4 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -68,7 +68,7 @@ public function getLimits(string $field, $value): Struct\Limits * * @return Struct\Info */ - public function create(array $properties, array $hostingProperties = null, string $planName = ''): Struct\Info + public function create(array $properties, ?array $hostingProperties = null, string $planName = ''): Struct\Info { $packet = $this->client->getPacket(); $info = $packet->addChild($this->wrapperTag)->addChild('add'); From 880bbc727870dc870633421316714819447010d4 Mon Sep 17 00:00:00 2001 From: Aleksei Fedorov <aleksei.fedorov@webpros.com> Date: Mon, 10 Feb 2025 13:14:08 +0200 Subject: [PATCH 116/126] TECH update copyrights --- docker-compose.yml | 2 +- phpcs.xml.dist | 2 +- phpunit-watcher.yml | 2 +- phpunit.xml.dist | 2 +- psalm.xml | 2 +- src/Api/AbstractStruct.php | 2 +- src/Api/Client.php | 2 +- src/Api/Client/Exception.php | 2 +- src/Api/Exception.php | 2 +- src/Api/InternalClient.php | 2 +- src/Api/Operator.php | 2 +- src/Api/Operator/Aps.php | 2 +- src/Api/Operator/Certificate.php | 2 +- src/Api/Operator/Customer.php | 2 +- src/Api/Operator/Database.php | 2 +- src/Api/Operator/DatabaseServer.php | 2 +- src/Api/Operator/Dns.php | 2 +- src/Api/Operator/DnsTemplate.php | 2 +- src/Api/Operator/EventLog.php | 2 +- src/Api/Operator/Ip.php | 2 +- src/Api/Operator/Locale.php | 2 +- src/Api/Operator/LogRotation.php | 2 +- src/Api/Operator/Mail.php | 2 +- src/Api/Operator/PhpHandler.php | 2 +- src/Api/Operator/ProtectedDirectory.php | 2 +- src/Api/Operator/Reseller.php | 2 +- src/Api/Operator/ResellerPlan.php | 2 +- src/Api/Operator/SecretKey.php | 2 +- src/Api/Operator/Server.php | 2 +- src/Api/Operator/ServicePlan.php | 2 +- src/Api/Operator/ServicePlanAddon.php | 2 +- src/Api/Operator/Session.php | 2 +- src/Api/Operator/Site.php | 2 +- src/Api/Operator/SiteAlias.php | 2 +- src/Api/Operator/Subdomain.php | 2 +- src/Api/Operator/Ui.php | 2 +- src/Api/Operator/VirtualDirectory.php | 2 +- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Certificate/Info.php | 2 +- src/Api/Struct/Customer/GeneralInfo.php | 2 +- src/Api/Struct/Customer/Info.php | 2 +- src/Api/Struct/Database/Info.php | 2 +- src/Api/Struct/Database/UserInfo.php | 2 +- src/Api/Struct/DatabaseServer/Info.php | 2 +- src/Api/Struct/Dns/Info.php | 2 +- src/Api/Struct/EventLog/DetailedEvent.php | 2 +- src/Api/Struct/EventLog/Event.php | 2 +- src/Api/Struct/Ip/Info.php | 2 +- src/Api/Struct/Locale/Info.php | 2 +- src/Api/Struct/Mail/GeneralInfo.php | 2 +- src/Api/Struct/Mail/Info.php | 2 +- src/Api/Struct/PhpHandler/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/DataInfo.php | 2 +- src/Api/Struct/ProtectedDirectory/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/UserInfo.php | 2 +- src/Api/Struct/Reseller/GeneralInfo.php | 2 +- src/Api/Struct/Reseller/Info.php | 2 +- src/Api/Struct/SecretKey/Info.php | 2 +- src/Api/Struct/Server/Admin.php | 2 +- src/Api/Struct/Server/GeneralInfo.php | 2 +- src/Api/Struct/Server/Preferences.php | 2 +- src/Api/Struct/Server/SessionPreferences.php | 2 +- src/Api/Struct/Server/Statistics.php | 2 +- src/Api/Struct/Server/Statistics/DiskSpace.php | 2 +- src/Api/Struct/Server/Statistics/LoadAverage.php | 2 +- src/Api/Struct/Server/Statistics/Memory.php | 2 +- src/Api/Struct/Server/Statistics/Objects.php | 2 +- src/Api/Struct/Server/Statistics/Other.php | 2 +- src/Api/Struct/Server/Statistics/Swap.php | 2 +- src/Api/Struct/Server/Statistics/Version.php | 2 +- src/Api/Struct/Server/UpdatesInfo.php | 2 +- src/Api/Struct/ServicePlan/Info.php | 2 +- src/Api/Struct/ServicePlanAddon/Info.php | 2 +- src/Api/Struct/Session/Info.php | 2 +- src/Api/Struct/Site/GeneralInfo.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 2 +- src/Api/Struct/Site/Info.php | 2 +- src/Api/Struct/SiteAlias/GeneralInfo.php | 2 +- src/Api/Struct/SiteAlias/Info.php | 2 +- src/Api/Struct/Subdomain/Info.php | 2 +- src/Api/Struct/Ui/CustomButton.php | 2 +- src/Api/Struct/Webspace/DiskUsage.php | 2 +- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/HostingPropertyInfo.php | 2 +- src/Api/Struct/Webspace/Info.php | 2 +- src/Api/Struct/Webspace/Limit.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- src/Api/Struct/Webspace/LimitInfo.php | 2 +- src/Api/Struct/Webspace/Limits.php | 2 +- src/Api/Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PermissionInfo.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- src/Api/Struct/Webspace/PhysicalHostingDescriptor.php | 2 +- src/Api/XmlResponse.php | 2 +- tests/AbstractTestCase.php | 2 +- tests/ApiClientTest.php | 2 +- tests/CertificateTest.php | 2 +- tests/CustomerTest.php | 2 +- tests/DatabaseServerTest.php | 2 +- tests/DatabaseTest.php | 2 +- tests/DnsTemplateTest.php | 2 +- tests/DnsTest.php | 2 +- tests/EventLogTest.php | 2 +- tests/IpTest.php | 2 +- tests/LocaleTest.php | 2 +- tests/MailTest.php | 2 +- tests/PhpHandlerTest.php | 2 +- tests/ProtectedDirectoryTest.php | 2 +- tests/ResellerTest.php | 2 +- tests/SecretKeyTest.php | 2 +- tests/ServerTest.php | 2 +- tests/ServicePlanAddonTest.php | 2 +- tests/ServicePlanTest.php | 2 +- tests/SessionTest.php | 2 +- tests/SiteAliasTest.php | 2 +- tests/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/UiTest.php | 2 +- tests/Utility/KeyLimitChecker.php | 2 +- tests/Utility/PasswordProvider.php | 2 +- tests/WebspaceTest.php | 2 +- wait-for-plesk.sh | 2 +- 122 files changed, 122 insertions(+), 122 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 83ad0e0d..39da6f7b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -# Copyright 1999-2024. WebPros International GmbH. +# Copyright 1999-2025. WebPros International GmbH. version: '3' services: plesk: diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 56a9a781..151336e3 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!-- Copyright 1999-2024. WebPros International GmbH. --> +<!-- Copyright 1999-2025. WebPros International GmbH. --> <ruleset name="PHP library for Plesk XML-RPC API"> <file>src</file> <file>tests</file> diff --git a/phpunit-watcher.yml b/phpunit-watcher.yml index 8a4d295f..9da731a5 100644 --- a/phpunit-watcher.yml +++ b/phpunit-watcher.yml @@ -1,4 +1,4 @@ -# Copyright 1999-2024. WebPros International GmbH. +# Copyright 1999-2025. WebPros International GmbH. phpunit: arguments: '--stop-on-failure' timeout: 0 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index b90bd149..baaaa279 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2024. WebPros International GmbH. --> +<!-- Copyright 1999-2025. WebPros International GmbH. --> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" verbose="true" colors="true"> <coverage processUncoveredFiles="true"> <include> diff --git a/psalm.xml b/psalm.xml index da2678a1..ed069912 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!-- Copyright 1999-2024. WebPros International GmbH. --> +<!-- Copyright 1999-2025. WebPros International GmbH. --> <psalm errorLevel="3" resolveFromConfigFile="true" diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index 13952730..f63f51ef 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client.php b/src/Api/Client.php index 12d19b6c..c1dd350b 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index fefda79f..f1cec03c 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index f4058e75..86e23a2a 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index a2601f35..5d78d779 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index d53bb103..d3645d92 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index b73e1c6a..d2c44af8 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index d748daa6..af4fd9a4 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 8201e627..2136a491 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 87c86ca4..ff0db962 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 184fcced..03a5f115 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 36f9602c..2d146d6c 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 982f5e51..d811c0d2 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 8819fa52..912e3628 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index eff9eea6..ba1dfdcd 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 357b9036..c0b026c5 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index 47b93168..1014a287 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 7035e7c5..23439e4e 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index d069e44d..c8bd4889 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 9d232cdb..4c6d78b6 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 0d016698..95671492 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index f94574c1..fd544e1d 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 92f709e3..87048b18 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index a7efb480..b4f7624d 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index f594a637..f1f03697 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 1aedffd4..5c7a0cd9 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index d569d23c..0cb74473 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index bb240b2b..4a1e5cca 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 513b29a1..2899abda 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index 928480ac..ca23f7d2 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index d359416d..c93dc3ce 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 09da7637..081cd2d1 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index a555b2c4..e220f199 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index bdfa71fb..d6ce3246 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Certificate; diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index 2a38393d..755715e0 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 961c61f8..1b4d4f51 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 2becc7ae..61c2ab45 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index 09bac9ac..2e1f2c54 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 1f71679b..678e1afa 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\DatabaseServer; diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 3513450c..e11bb08b 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Dns; diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 20fd6b8f..3577d358 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 94993346..86a4bdb6 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index b349d64c..12c0996f 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Ip; diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 3cdf79f2..addd2c4e 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Locale; diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index f86c7be5..e2309ed3 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index f9e15b3c..552cf89a 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index f4a95632..99e20c51 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\PhpHandler; diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index ab81a51d..b5004beb 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 5ee5f97b..00946111 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 67bc8b7f..11953da1 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 0d2c79a0..bf94d328 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index 6f13cbb1..e17739bd 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 702a9179..f8fd6b34 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\SecretKey; diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index f91446ac..2e9852ff 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 99aea3a9..4fbf87f1 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index efef6de5..894bc62d 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index ceefb122..6acf0562 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index b8c94cef..0bb7063e 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics/DiskSpace.php b/src/Api/Struct/Server/Statistics/DiskSpace.php index 2b0c67f3..01a96058 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/Statistics/LoadAverage.php b/src/Api/Struct/Server/Statistics/LoadAverage.php index 5d7a4455..775d7152 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/Statistics/Memory.php b/src/Api/Struct/Server/Statistics/Memory.php index 0e5ac295..fcd18848 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index 5975ccb5..0487ed28 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/Statistics/Other.php b/src/Api/Struct/Server/Statistics/Other.php index 66dfd1ef..fd3a576c 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/Statistics/Swap.php b/src/Api/Struct/Server/Statistics/Swap.php index f0beaa21..5193fb0e 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/Statistics/Version.php b/src/Api/Struct/Server/Statistics/Version.php index 7cef08c4..58af4bdb 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server\Statistics; diff --git a/src/Api/Struct/Server/UpdatesInfo.php b/src/Api/Struct/Server/UpdatesInfo.php index b64a26e7..cb888d48 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index d92c8f4d..62be1bb9 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\ServicePlan; diff --git a/src/Api/Struct/ServicePlanAddon/Info.php b/src/Api/Struct/ServicePlanAddon/Info.php index 2221eb5b..047674f5 100644 --- a/src/Api/Struct/ServicePlanAddon/Info.php +++ b/src/Api/Struct/ServicePlanAddon/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\ServicePlanAddon; diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index 03b7d97f..d4aba306 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Session; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index ac1b6f6b..44082a06 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index 01f1f0bd..a236c8f6 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index 8ef59c07..4d663d03 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index 89a67723..65951b30 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 977d0b2a..ae9c82e7 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 569f0f0c..5218d352 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Subdomain; diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index e66cc0e1..4130a79e 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Ui; diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 834996cf..e9f44a00 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 5ff38bdc..f2315684 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index 04dd9ea3..4e0f8c45 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index 38d65a69..702d1cf2 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 7c1bcdc0..290b7e67 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 61fb8bb5..2114621b 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index 68a5fdb8..b7f0262f 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index 2e0722ce..63622a2d 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index f5ef3cff..929f3e05 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 5bb7dc83..2328222a 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 02a1fadf..1ddf88d9 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index a27ef9f1..cac2b792 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 032c9395..dd22cf08 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskX\Api; diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 7792ec17..e976f3a1 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 9d20c98b..3fd90546 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 7afcc5cc..bb885986 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index b05f224c..02e4709c 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index f309528a..d4934590 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 9190744e..1b2b1c5f 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index e756424b..14fc351b 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 6612dc6f..e0282b1a 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index 2abd3349..2e53f361 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/IpTest.php b/tests/IpTest.php index c9abb14a..e63adef1 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index ef11ddb1..a4f157de 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/MailTest.php b/tests/MailTest.php index 5752cdb7..242d3dc2 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index a3c18221..21f91046 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 04e6380a..17cab77e 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 72a2b536..d1bb87dc 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 39b257ba..1bfc2d6b 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 86404140..3fe14a0d 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanAddonTest.php b/tests/ServicePlanAddonTest.php index 41e50c60..a73022dd 100644 --- a/tests/ServicePlanAddonTest.php +++ b/tests/ServicePlanAddonTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 438b91a8..901a79ba 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SessionTest.php b/tests/SessionTest.php index f5a49373..b9d2b841 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php index a4967f9b..c0b2d7e4 100644 --- a/tests/SiteAliasTest.php +++ b/tests/SiteAliasTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SiteTest.php b/tests/SiteTest.php index fd37d257..dfaa6fe1 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index ebd54650..db54a110 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/UiTest.php b/tests/UiTest.php index 81d186a0..85e92831 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index 2f5b4bf0..6545ad5c 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest\Utility; diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 6a809967..b6e22e33 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest\Utility; diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 4a6ac728..cb3be01d 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. WebPros International GmbH. +// Copyright 1999-2025. WebPros International GmbH. namespace PleskXTest; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 97d6589f..11f33362 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,5 +1,5 @@ #!/bin/bash -### Copyright 1999-2024. WebPros International GmbH. +### Copyright 1999-2025. WebPros International GmbH. COUNTER=1 From 272d4e8b42477420d0b7624d00b31193327d183d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <alexei.yuzhakov@webpros.com> Date: Thu, 13 Feb 2025 13:59:40 +0000 Subject: [PATCH 117/126] TECH Bump copyright year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 598e4458..3d85e2f9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2024. WebPros International GmbH. +Copyright 1999-2025. WebPros International GmbH. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 5a3d18e4fd1d599a98e2162e7cf40fa1da696881 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 06:10:35 +0000 Subject: [PATCH 118/126] TECH Bump squizlabs/php_codesniffer from 3.11.3 to 3.12.0 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.11.3 to 3.12.0. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.11.3...3.12.0) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index eaa4256a..6719e871 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.11.3", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10" + "reference": "2d1b63db139c3c6ea0c927698e5160f8b3b8d630" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", - "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/2d1b63db139c3c6ea0c927698e5160f8b3b8d630", + "reference": "2d1b63db139c3c6ea0c927698e5160f8b3b8d630", "shasum": "" }, "require": { @@ -3376,11 +3376,11 @@ "type": "open_collective" }, { - "url": "https://thanks.dev/phpcsstandards", + "url": "https://thanks.dev/u/gh/phpcsstandards", "type": "thanks_dev" } ], - "time": "2025-01-23T17:04:15+00:00" + "time": "2025-03-18T05:04:51+00:00" }, { "name": "symfony/console", From 0fdb0d8fe834949a2884ab3dd528811b2e710edc Mon Sep 17 00:00:00 2001 From: Sofiia Kulish <sofiia.kulish@webpros.com> Date: Fri, 4 Apr 2025 11:41:05 +0200 Subject: [PATCH 119/126] TECH Databases::getAll fix for empty filter --- src/Api/Operator/Database.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index ff0db962..817adec5 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -68,12 +68,12 @@ public function getUser(string $field, $value): Struct\UserInfo } /** - * @param string $field + * @param string|null $field * @param int|string $value * * @return Struct\Info[] */ - public function getAll(string $field, $value): array + public function getAll(?string $field, $value): array { $response = $this->getBy('get-db', $field, $value); $items = []; @@ -107,18 +107,20 @@ public function getAllUsers(string $field, $value): array /** * @param string $command - * @param string $field + * @param string|null $field * @param int|string $value * * @return XmlResponse */ - private function getBy(string $command, string $field, $value): XmlResponse + private function getBy(string $command, ?string $field, $value): XmlResponse { $packet = $this->client->getPacket(); $getTag = $packet->addChild($this->wrapperTag)->addChild($command); $filterTag = $getTag->addChild('filter'); - $filterTag->{$field} = (string) $value; + if (!is_null($field)) { + $filterTag->{$field} = (string) $value; + } return $this->client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); } From b468278ab0a8b80cff7003651d131b4c51c1198a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 06:49:15 +0000 Subject: [PATCH 120/126] TECH Bump squizlabs/php_codesniffer from 3.12.0 to 3.12.1 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.12.0 to 3.12.1. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.0...3.12.1) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 3.12.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 6719e871..fbb0a34c 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.12.0", + "version": "3.12.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "2d1b63db139c3c6ea0c927698e5160f8b3b8d630" + "reference": "ea16a1f3719783345febd3aab41beb55c8c84bfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/2d1b63db139c3c6ea0c927698e5160f8b3b8d630", - "reference": "2d1b63db139c3c6ea0c927698e5160f8b3b8d630", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ea16a1f3719783345febd3aab41beb55c8c84bfd", + "reference": "ea16a1f3719783345febd3aab41beb55c8c84bfd", "shasum": "" }, "require": { @@ -3380,7 +3380,7 @@ "type": "thanks_dev" } ], - "time": "2025-03-18T05:04:51+00:00" + "time": "2025-04-04T12:57:55+00:00" }, { "name": "symfony/console", From 342f7bba514c9b26a7ad8bc880786290d2c8dbd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 06:06:01 +0000 Subject: [PATCH 121/126] TECH Bump squizlabs/php_codesniffer from 3.12.1 to 3.13.0 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.12.1 to 3.13.0. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.12.1...3.13.0) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 3.13.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index fbb0a34c..14316bee 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.12.1", + "version": "3.13.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ea16a1f3719783345febd3aab41beb55c8c84bfd" + "reference": "65ff2489553b83b4597e89c3b8b721487011d186" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ea16a1f3719783345febd3aab41beb55c8c84bfd", - "reference": "ea16a1f3719783345febd3aab41beb55c8c84bfd", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186", + "reference": "65ff2489553b83b4597e89c3b8b721487011d186", "shasum": "" }, "require": { @@ -3380,7 +3380,7 @@ "type": "thanks_dev" } ], - "time": "2025-04-04T12:57:55+00:00" + "time": "2025-05-11T03:36:00+00:00" }, { "name": "symfony/console", From ebd41c84c9b2e0d95d58820ef1edb5f9fc7ca31e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 07:00:46 +0000 Subject: [PATCH 122/126] TECH Bump squizlabs/php_codesniffer from 3.13.0 to 3.13.1 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.13.0 to 3.13.1. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.0...3.13.1) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 3.13.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 14316bee..6a0a18ed 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.0", + "version": "3.13.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "65ff2489553b83b4597e89c3b8b721487011d186" + "reference": "1b71b4dd7e7ef651ac749cea67e513c0c832f4bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186", - "reference": "65ff2489553b83b4597e89c3b8b721487011d186", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1b71b4dd7e7ef651ac749cea67e513c0c832f4bd", + "reference": "1b71b4dd7e7ef651ac749cea67e513c0c832f4bd", "shasum": "" }, "require": { @@ -3380,7 +3380,7 @@ "type": "thanks_dev" } ], - "time": "2025-05-11T03:36:00+00:00" + "time": "2025-06-12T15:04:34+00:00" }, { "name": "symfony/console", From 7d38dcf238fa82f8f39862ab990a9e5475d2c684 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 07:31:41 +0000 Subject: [PATCH 123/126] TECH Bump squizlabs/php_codesniffer from 3.13.1 to 3.13.2 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.13.1 to 3.13.2. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.1...3.13.2) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 3.13.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index 6a0a18ed..340d94ac 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.1", + "version": "3.13.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "1b71b4dd7e7ef651ac749cea67e513c0c832f4bd" + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1b71b4dd7e7ef651ac749cea67e513c0c832f4bd", - "reference": "1b71b4dd7e7ef651ac749cea67e513c0c832f4bd", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", "shasum": "" }, "require": { @@ -3380,7 +3380,7 @@ "type": "thanks_dev" } ], - "time": "2025-06-12T15:04:34+00:00" + "time": "2025-06-17T22:17:01+00:00" }, { "name": "symfony/console", From 54d1855da1ff9a36c287583e602039c8db75e190 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 06:05:43 +0000 Subject: [PATCH 124/126] TECH Bump squizlabs/php_codesniffer from 3.13.2 to 3.13.4 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.13.2 to 3.13.4. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.2...3.13.4) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 3.13.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 340d94ac..46405e94 100644 --- a/composer.lock +++ b/composer.lock @@ -3300,16 +3300,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.2", + "version": "3.13.4", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" + "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", - "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", + "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", "shasum": "" }, "require": { @@ -3380,7 +3380,7 @@ "type": "thanks_dev" } ], - "time": "2025-06-17T22:17:01+00:00" + "time": "2025-09-05T05:47:09+00:00" }, { "name": "symfony/console", @@ -4736,7 +4736,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -4746,9 +4746,9 @@ "ext-simplexml": "*", "ext-dom": "*" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "7.4.27" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From ed749c2f333eaceb80c3d0b330cfffe8b84b702d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 06:08:29 +0000 Subject: [PATCH 125/126] TECH Bump squizlabs/php_codesniffer from 3.13.4 to 4.0.0 Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.13.4 to 4.0.0. - [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases) - [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/4.x/CHANGELOG-3.x.md) - [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.4...4.0.0) --- updated-dependencies: - dependency-name: squizlabs/php_codesniffer dependency-version: 4.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> --- composer.json | 2 +- composer.lock | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index 86a21b8c..0c34a4ff 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "phpunit/phpunit": "^9", "spatie/phpunit-watcher": "^1.22", "vimeo/psalm": "^4.10 || ^5.0", - "squizlabs/php_codesniffer": "^3.6" + "squizlabs/php_codesniffer": "^3.6 || ^4.0" }, "config": { "process-timeout": 0, diff --git a/composer.lock b/composer.lock index 46405e94..a1a80227 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4b68490aeb4df72f0efd718342b2318c", + "content-hash": "fb3292e22b0e205555a79dcfa16c74ea", "packages": [], "packages-dev": [ { @@ -3300,37 +3300,32 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119" + "reference": "06113cfdaf117fc2165f9cd040bd0f17fcd5242d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ad545ea9c1b7d270ce0fc9cbfb884161cd706119", - "reference": "ad545ea9c1b7d270ce0fc9cbfb884161cd706119", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/06113cfdaf117fc2165f9cd040bd0f17fcd5242d", + "reference": "06113cfdaf117fc2165f9cd040bd0f17fcd5242d", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=7.2.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31" }, "bin": [ "bin/phpcbf", "bin/phpcs" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -3349,7 +3344,7 @@ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", @@ -3380,7 +3375,7 @@ "type": "thanks_dev" } ], - "time": "2025-09-05T05:47:09+00:00" + "time": "2025-09-15T11:28:58+00:00" }, { "name": "symfony/console", From 2d934baaac26823df97fc296d80bff22f97d9186 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <alexei.yuzhakov@webpros.com> Date: Fri, 3 Oct 2025 17:09:39 +0100 Subject: [PATCH 126/126] TECH Remove the reference to the non-existent sniff --- phpcs.xml.dist | 1 - 1 file changed, 1 deletion(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 151336e3..fddc5cbe 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -14,7 +14,6 @@ <exclude name="Generic.Classes.OpeningBraceSameLine"/> <exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/> <exclude name="Generic.Formatting.MultipleStatementAlignment"/> - <exclude name="Generic.Formatting.NoSpaceAfterCast"/> <exclude name="Generic.Formatting.SpaceBeforeCast"/> <exclude name="Generic.Formatting.SpaceAfterNot"/> <exclude name="Generic.Commenting.DocComment"/>