From 904c18fbfe05fd805271c30cc2badda11f9407a9 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 15 Nov 2016 21:33:43 +0700 Subject: [PATCH 001/243] Use better name for postal code. --- src/PleskX/Api/Struct/Customer/GeneralInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PleskX/Api/Struct/Customer/GeneralInfo.php b/src/PleskX/Api/Struct/Customer/GeneralInfo.php index f49e850f..b1196949 100644 --- a/src/PleskX/Api/Struct/Customer/GeneralInfo.php +++ b/src/PleskX/Api/Struct/Customer/GeneralInfo.php @@ -30,7 +30,7 @@ class GeneralInfo extends \PleskX\Api\Struct public $address; /** @var string */ - public $pcode; + public $postalCode; /** @var string */ public $city; @@ -58,7 +58,7 @@ public function __construct($apiResponse) 'phone', 'fax', 'address', - 'pcode', + ['pcode' => 'postalCode'], 'city', 'state', 'country', From 72836f7f4fbff39cec8adf276a101326e0eeabe6 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 15 Nov 2016 22:44:05 +0700 Subject: [PATCH 002/243] Add usage examples. --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e282d949..a45784e0 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,38 @@ PHP object-oriented library for Plesk XML-RPC API. `composer require plesk/api-php-lib:@dev` +## Usage Examples + +Here is an example on how to use the library and create a customer with desired properties: +```php +$client = new \PleskX\Api\Client($host); +$client->setCredentials($login, $password); + +$client->customer()->create([ + 'cname' => 'Plesk', + 'pname' => 'John Smith', + 'login' => 'john', + 'passwd' => 'secret', + 'email' => 'john@smith.com', +]); +``` + +It is possible to use a secret key instead of password for authentication. + +```php +$client = new \PleskX\Api\Client($host); +$client->setSecretKey($secretKey) +``` + +In case of Plesk extension creation one can use an internal mechanism to access XML-RPC API. It does not require to pass authentication because the extension works in the context of Plesk. + +```php +$client = new \PleskX\Api\InternalClient(); +$protocols = $client->server()->getProtos(); +``` + +For additional examples see tests/ directory. + ## How to Run Unit Tests One the possible ways to become familiar with the library is to check the unit tests. @@ -27,4 +59,3 @@ To use custom port one can provide a URL (e.g. for Docker container): * Install Node.js * Install dependencies via `npm install` command * Run `REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password grunt watch:test` - From 2a68ff6355639d7040cc8a525dd366ceb85d843e Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Wed, 16 Nov 2016 17:40:24 +0700 Subject: [PATCH 003/243] Add method to add subdomain --- src/PleskX/Api/Operator/Subdomain.php | 16 +++++++++ src/PleskX/Api/Struct/Subdomain/Info.php | 17 +++++++++ tests/SubdomainTest.php | 46 ++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 src/PleskX/Api/Struct/Subdomain/Info.php create mode 100644 tests/SubdomainTest.php diff --git a/src/PleskX/Api/Operator/Subdomain.php b/src/PleskX/Api/Operator/Subdomain.php index 3d327e22..39689d1b 100644 --- a/src/PleskX/Api/Operator/Subdomain.php +++ b/src/PleskX/Api/Operator/Subdomain.php @@ -2,8 +2,24 @@ // Copyright 1999-2016. Parallels IP Holdings GmbH. namespace PleskX\Api\Operator; +use PleskX\Api\Struct\Subdomain as Struct; class Subdomain extends \PleskX\Api\Operator { + /** + * @param array $properties + * @return Struct\Info + */ + public function create($properties) + { + $packet = $this->_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + foreach ($properties as $name => $value) { + $info->addChild($name, $value); + } + + $response = $this->_client->request($packet); + return new Struct\Info($response); + } } diff --git a/src/PleskX/Api/Struct/Subdomain/Info.php b/src/PleskX/Api/Struct/Subdomain/Info.php new file mode 100644 index 00000000..89dd1d73 --- /dev/null +++ b/src/PleskX/Api/Struct/Subdomain/Info.php @@ -0,0 +1,17 @@ +_initScalarProperties($apiResponse, [ + 'id', + ]); + } +} diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php new file mode 100644 index 00000000..6c67c6be --- /dev/null +++ b/tests/SubdomainTest.php @@ -0,0 +1,46 @@ +_client->webspace()->create([ + 'name' => $name, + 'ip_address' => $this->_getIpAddress(), + ], [ + 'ftp_login' => 'test-login', + 'ftp_password' => 'test-password', + ]); + } + + /** + * @param string $name + * @param string $webspaceName + * @return \PleskX\Api\Struct\Subdomain\Info + */ + private function _createSubdomain($name, $webspaceName) + { + return $this->_client->subdomain()->create([ + 'parent' => $webspaceName, + 'name' => $name, + ]); + } + + public function testCreate() + { + $webspaceName = 'example.tld'; + $webspace = $this->_createWebspace($webspaceName); + $subdomain = $this->_createSubdomain('sub', $webspaceName); + + $this->assertInternalType('integer', $subdomain->id); + $this->assertGreaterThan(0, $subdomain->id); + + $this->_client->webspace()->delete('id', $webspace->id); + } +} From a3db84858f2243dff19c4507130fb53ffa5c4110 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 16 Nov 2016 22:39:41 +0700 Subject: [PATCH 004/243] Add an ability to delete a subdomain. --- src/PleskX/Api/Operator/Subdomain.php | 10 ++++++++++ tests/SubdomainTest.php | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/PleskX/Api/Operator/Subdomain.php b/src/PleskX/Api/Operator/Subdomain.php index 39689d1b..9f87348e 100644 --- a/src/PleskX/Api/Operator/Subdomain.php +++ b/src/PleskX/Api/Operator/Subdomain.php @@ -22,4 +22,14 @@ public function create($properties) $response = $this->_client->request($packet); return new Struct\Info($response); } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function delete($field, $value) + { + return $this->_delete($field, $value); + } } diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 6c67c6be..e06ee538 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -43,4 +43,15 @@ public function testCreate() $this->_client->webspace()->delete('id', $webspace->id); } + + public function testDelete() + { + $webspaceName = 'example.tld'; + $webspace = $this->_createWebspace($webspaceName); + $subdomain = $this->_createSubdomain('sub', $webspaceName); + + $result = $this->_client->subdomain()->delete('id', $subdomain->id); + $this->assertTrue($result); + $this->_client->webspace()->delete('id', $webspace->id); + } } From f4896a37a0eee896a71ccb39fc78f20837bedb7f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 16 Nov 2016 23:33:51 +0700 Subject: [PATCH 005/243] Add create/delete operations for mailnames. --- src/PleskX/Api/Operator/Mail.php | 44 +++++++++++++++++++++++++++++ src/PleskX/Api/Struct/Mail/Info.php | 21 ++++++++++++++ tests/MailTest.php | 44 +++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 src/PleskX/Api/Struct/Mail/Info.php create mode 100644 tests/MailTest.php diff --git a/src/PleskX/Api/Operator/Mail.php b/src/PleskX/Api/Operator/Mail.php index 3a84a52a..4a91eef2 100644 --- a/src/PleskX/Api/Operator/Mail.php +++ b/src/PleskX/Api/Operator/Mail.php @@ -2,8 +2,52 @@ // Copyright 1999-2016. Parallels IP Holdings GmbH. namespace PleskX\Api\Operator; +use PleskX\Api\Struct\Mail as Struct; class Mail extends \PleskX\Api\Operator { + /** + * @param string $name + * @param integer $siteId + * @param boolean $mailbox + * @param string $password + * @return Struct\Info + */ + public function create($name, $siteId, $mailbox = false, $password = '') + { + $packet = $this->_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('create'); + + $filter = $info->addChild('filter'); + $filter->addChild('site-id', $siteId); + $mailname = $filter->addChild('mailname'); + $mailname->addChild('name', $name); + if ($mailbox) { + $mailname->addChild('mailbox')->addChild('enabled', 'true'); + } + if (!empty($password)) { + $mailname->addChild('password')->addChild('value', $password); + } + + $response = $this->_client->request($packet); + return new Struct\Info($response->mailname); + } + + /** + * @param string $field + * @param integer|string $value + * @param integer $siteId + * @return bool + */ + 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); + $response = $this->_client->request($packet); + return 'ok' === (string)$response->status; + } + } diff --git a/src/PleskX/Api/Struct/Mail/Info.php b/src/PleskX/Api/Struct/Mail/Info.php new file mode 100644 index 00000000..be00923b --- /dev/null +++ b/src/PleskX/Api/Struct/Mail/Info.php @@ -0,0 +1,21 @@ +_initScalarProperties($apiResponse, [ + 'id', + 'name', + ]); + } +} \ No newline at end of file diff --git a/tests/MailTest.php b/tests/MailTest.php new file mode 100644 index 00000000..acd697e5 --- /dev/null +++ b/tests/MailTest.php @@ -0,0 +1,44 @@ +_client->webspace()->create([ + 'name' => $name, + 'ip_address' => $this->_getIpAddress(), + ], [ + 'ftp_login' => 'test-login', + 'ftp_password' => 'test-password', + ]); + } + + public function testCreate() + { + $webspace = $this->_createWebspace('example.dom'); + $mailname = $this->_client->mail()->create('test', $webspace->id, true, 'secret'); + + $this->assertInternalType('integer', $mailname->id); + $this->assertGreaterThan(0, $mailname->id); + $this->assertEquals('test', $mailname->name); + + $this->_client->webspace()->delete('id', $webspace->id); + } + + public function testDelete() + { + $webspace = $this->_createWebspace('example.dom'); + $mailname = $this->_client->mail()->create('test', $webspace->id); + + $result = $this->_client->mail()->delete('name', $mailname->name, $webspace->id); + $this->assertTrue($result); + $this->_client->webspace()->delete('id', $webspace->id); + } + +} From 6aa3fcc387d632769a36bd2df4ac01662e199cf7 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 16 Nov 2016 23:43:55 +0700 Subject: [PATCH 006/243] Reduce duplication of helper method. --- tests/MailTest.php | 15 --------------- tests/SiteTest.php | 15 --------------- tests/SubdomainTest.php | 15 --------------- tests/TestCase.php | 15 +++++++++++++++ 4 files changed, 15 insertions(+), 45 deletions(-) diff --git a/tests/MailTest.php b/tests/MailTest.php index acd697e5..fec0dd6c 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -4,21 +4,6 @@ class MailTest extends TestCase { - /** - * @param string $name - * @return \PleskX\Api\Struct\Webspace\Info - */ - private function _createWebspace($name) - { - return $this->_client->webspace()->create([ - 'name' => $name, - 'ip_address' => $this->_getIpAddress(), - ], [ - 'ftp_login' => 'test-login', - 'ftp_password' => 'test-password', - ]); - } - public function testCreate() { $webspace = $this->_createWebspace('example.dom'); diff --git a/tests/SiteTest.php b/tests/SiteTest.php index c7e18224..74184c57 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -4,21 +4,6 @@ class SiteTest extends TestCase { - /** - * @param string $name - * @return \PleskX\Api\Struct\Webspace\Info - */ - private function _createWebspace($name) - { - return $this->_client->webspace()->create([ - 'name' => $name, - 'ip_address' => $this->_getIpAddress(), - ], [ - 'ftp_login' => 'test-login', - 'ftp_password' => 'test-password', - ]); - } - private function _createSite($name, $webspace) { return $this->_client->site()->create([ diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index e06ee538..74647afc 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -4,21 +4,6 @@ class SubdomainTest extends TestCase { - /** - * @param string $name - * @return \PleskX\Api\Struct\Webspace\Info - */ - private function _createWebspace($name) - { - return $this->_client->webspace()->create([ - 'name' => $name, - 'ip_address' => $this->_getIpAddress(), - ], [ - 'ftp_login' => 'test-login', - 'ftp_password' => 'test-password', - ]); - } - /** * @param string $name * @param string $webspaceName diff --git a/tests/TestCase.php b/tests/TestCase.php index 7deaff4a..c2d829fc 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -34,4 +34,19 @@ protected function _getIpAddress() return $ipInfo->ipAddress; } + /** + * @param string $name + * @return \PleskX\Api\Struct\Webspace\Info + */ + protected function _createWebspace($name) + { + return $this->_client->webspace()->create([ + 'name' => $name, + 'ip_address' => $this->_getIpAddress(), + ], [ + 'ftp_login' => 'test-login', + 'ftp_password' => 'test-password', + ]); + } + } From d673135b783f276ae5a44b9d2f92745858dd083b Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Wed, 16 Nov 2016 19:06:31 +0700 Subject: [PATCH 007/243] Add methods to databases and db users (create, delete, get) --- src/PleskX/Api/Operator/Database.php | 126 +++++++++++ src/PleskX/Api/Struct/Database/Info.php | 37 ++++ src/PleskX/Api/Struct/Database/UserInfo.php | 25 +++ tests/DatabaseTest.php | 220 ++++++++++++++++++++ 4 files changed, 408 insertions(+) create mode 100644 src/PleskX/Api/Struct/Database/Info.php create mode 100644 src/PleskX/Api/Struct/Database/UserInfo.php create mode 100644 tests/DatabaseTest.php diff --git a/src/PleskX/Api/Operator/Database.php b/src/PleskX/Api/Operator/Database.php index 105a2baf..fb501237 100644 --- a/src/PleskX/Api/Operator/Database.php +++ b/src/PleskX/Api/Operator/Database.php @@ -2,8 +2,134 @@ // Copyright 1999-2016. Parallels IP Holdings GmbH. namespace PleskX\Api\Operator; +use PleskX\Api\Struct\Database as Struct; class Database extends \PleskX\Api\Operator { + /** + * @param array $properties + * @return Struct\Info + */ + public function create($properties) + { + return new Struct\Info($this->_create('add-db', $properties)); + } + /** + * @param $properties + * @return Struct\UserInfo + */ + public function createUser($properties) + { + return new Struct\UserInfo($this->_create('add-db-user', $properties)); + } + + /** + * @param $command + * @param array $properties + * @return \PleskX\Api\XmlResponse + */ + private function _create($command, array $properties) + { + $packet = $this->_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild($command); + + foreach ($properties as $name => $value) { + $info->addChild($name, $value); + } + + return $this->_client->request($packet); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info + */ + public function get($field, $value) + { + $items = $this->getAll($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\UserInfo + */ + public function getUser($field, $value) + { + $items = $this->getAllUsers($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info[] + */ + public function getAll($field, $value) + { + $response = $this->_get('get-db', $field, $value); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $items[] = new Struct\Info($xmlResult); + } + return $items; + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\UserInfo[] + */ + public function getAllUsers($field, $value) + { + $response = $this->_get('get-db-users', $field, $value); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $items[] = new Struct\UserInfo($xmlResult); + } + return $items; + } + + /** + * @param $command + * @param $field + * @param $value + * @return \PleskX\Api\XmlResponse + */ + private function _get($command, $field, $value) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild($command); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + return $response; + } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function delete($field, $value) + { + return $this->_delete($field, $value, 'del-db'); + } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function deleteUser($field, $value) + { + return $this->_delete($field, $value, 'del-db-user'); + } } diff --git a/src/PleskX/Api/Struct/Database/Info.php b/src/PleskX/Api/Struct/Database/Info.php new file mode 100644 index 00000000..a85c6033 --- /dev/null +++ b/src/PleskX/Api/Struct/Database/Info.php @@ -0,0 +1,37 @@ +_initScalarProperties($apiResponse, [ + 'id', + 'name', + 'type', + 'webspace-id', + 'db-server-id', + 'default-user-id', + ]); + } +} diff --git a/src/PleskX/Api/Struct/Database/UserInfo.php b/src/PleskX/Api/Struct/Database/UserInfo.php new file mode 100644 index 00000000..af367bac --- /dev/null +++ b/src/PleskX/Api/Struct/Database/UserInfo.php @@ -0,0 +1,25 @@ +_initScalarProperties($apiResponse, [ + 'id', + 'login', + 'db-id', + ]); + } +} diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php new file mode 100644 index 00000000..e503fd80 --- /dev/null +++ b/tests/DatabaseTest.php @@ -0,0 +1,220 @@ +_webspace = $this->_client->webspace()->create([ + 'name' => 'example.tld', + 'ip_address' => $this->_getIpAddress(), + ], [ + 'ftp_login' => 'test-login', + 'ftp_password' => 'test-password', + ]); + } + + protected function tearDown() + { + $this->_client->webspace()->delete('id', $this->_webspace->id); + } + + public function testCreate() + { + $database = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $this->_client->database()->delete('id', $database->id); + } + + public function testCreateUser() + { + $database = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $user = $this->_createUser([ + 'db-id' => $database->id, + 'login' => 'test_user1', + 'password' => 'setup1Q', + ]); + $this->_client->database()->deleteUser('id', $user->id); + $this->_client->database()->delete('id', $database->id); + + } + + public function testGetById() + { + $database = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + + $db = $this->_client->database()->get('id', $database->id); + $this->assertEquals('test1', $db->name); + $this->assertEquals('mysql', $db->type); + $this->assertEquals($this->_webspace->id, $db->webspaceId); + $this->assertEquals(1, $db->dbServerId); + + $this->_client->database()->delete('id', $database->id); + } + + public function testGetAllByWebspaceId() + { + $db1 = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $db2 = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test2', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $databases = $this->_client->database()->getAll('webspace-id', $this->_webspace->id); + $this->assertEquals('test1', $databases[0]->name); + $this->assertEquals('test2', $databases[1]->name); + $this->assertEquals($this->_webspace->id, $databases[0]->webspaceId); + $this->assertEquals(1, $databases[1]->dbServerId); + + $this->_client->database()->delete('id', $db1->id); + $this->_client->database()->delete('id', $db2->id); + } + + public function testGetUserById() + { + $database = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + + $user = $this->_createUser([ + 'db-id' => $database->id, + 'login' => 'test_user1', + 'password' => 'setup1Q', + ]); + + $dbUser = $this->_client->database()->getUser('id', $user->id); + $this->assertEquals('test_user1', $dbUser->login); + $this->assertEquals($database->id, $dbUser->dbId); + + $this->_client->database()->deleteUser('id', $user->id); + $this->_client->database()->delete('id', $database->id); + } + + public function testGetAllUsersByDbId() + { + $db1 = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $db2 = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test2', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $user1 = $this->_createUser([ + 'db-id' => $db1->id, + 'login' => 'test_user1', + 'password' => 'setup1Q', + ]); + + $user2 = $this->_createUser([ + 'db-id' => $db1->id, + 'login' => 'test_user2', + 'password' => 'setup1Q', + ]); + + $user3 = $this->_createUser([ + 'db-id' => $db2->id, + 'login' => 'test_user3', + 'password' => 'setup1Q', + ]); + + $dbUsers = $this->_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); + + $this->_client->database()->deleteUser('id', $user1->id); + $this->_client->database()->deleteUser('id', $user2->id); + $this->_client->database()->deleteUser('id', $user3->id); + $this->_client->database()->delete('id', $db1->id); + $this->_client->database()->delete('id', $db2->id); + } + + public function testDelete() + { + $database = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $result = $this->_client->database()->delete('id', $database->id); + $this->assertTrue($result); + } + + public function testDeleteUser() + { + $database = $this->_createDatabase([ + 'webspace-id' => $this->_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $user = $this->_createUser([ + 'db-id' => $database->id, + 'login' => 'test_user1', + 'password' => 'setup1Q', + ]); + + $result = $this->_client->database()->deleteUser('id', $user->id); + $this->assertTrue($result); + $this->_client->database()->delete('id', $database->id); + } + + /** + * @param array $params + * @return \PleskX\Api\Struct\Database\Info + */ + private function _createDatabase(array $params) + { + $database = $this->_client->database()->create($params); + $this->assertInternalType('integer', $database->id); + $this->assertGreaterThan(0, $database->id); + return $database; + } + + /** + * @param array $params + * @return \PleskX\Api\Struct\Database\UserInfo + */ + private function _createUser(array $params) + { + $user = $this->_client->database()->createUser($params); + $this->assertInternalType('integer', $user->id); + $this->assertGreaterThan(0, $user->id); + return $user; + } +} From 5914ab9786a7221adf481fd680456da89f57801d Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Thu, 17 Nov 2016 13:06:58 +0700 Subject: [PATCH 008/243] Verify response if protocol = sdk. --- src/PleskX/Api/Client.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index 8eab4cf0..5705325a 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -142,6 +142,7 @@ public function request($request, $mode = self::RESPONSE_SHORT) } else { $xml = $this->_performHttpRequest($request); } + $this->_verifyResponse($xml); return (self::RESPONSE_FULL == $mode) ? $xml : $xml->xpath('//result')[0]; } @@ -182,8 +183,6 @@ private function _performHttpRequest($request) curl_close($curl); $xml = new XmlResponse($result); - $this->_verifyResponse($xml); - return $xml; } From 95a6826bd87f6cce415f2fc344e68014c7f80716 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Thu, 17 Nov 2016 13:09:40 +0700 Subject: [PATCH 009/243] Add id field value for database server response of get operation --- src/PleskX/Api/Operator/DatabaseServer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PleskX/Api/Operator/DatabaseServer.php b/src/PleskX/Api/Operator/DatabaseServer.php index f6d74c8e..0d186bfa 100644 --- a/src/PleskX/Api/Operator/DatabaseServer.php +++ b/src/PleskX/Api/Operator/DatabaseServer.php @@ -57,7 +57,9 @@ private function _get($field = null, $value = null) $items = []; foreach ($response->xpath('//result') as $xmlResult) { - $items[] = new Struct\Info($xmlResult->data); + $item = new Struct\Info($xmlResult->data); + $item->id = (int)$xmlResult->id; + $items[] = $item; } return $items; From a9684ac7e827aaf4bbf49682bf06d3f67f66d189 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 19 Nov 2016 17:09:49 +0700 Subject: [PATCH 010/243] Unit tests last more then default timeout (300 sec). --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 410c2f26..14d9cccb 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,9 @@ "phpunit/php-invoker": "*", "phpunit/dbunit": ">=1.2" }, + "config": { + "process-timeout": 0 + }, "scripts": { "test": "phpunit" }, From 1b9a6693336e1a8233d40c783fa933a3d5560fe5 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 20 Nov 2016 14:46:35 +0700 Subject: [PATCH 011/243] Speed up unit tests execution. --- tests/ApiClientTest.php | 44 +++++++++--------- tests/CertificateTest.php | 2 +- tests/CustomerTest.php | 24 +++++----- tests/DatabaseServerTest.php | 6 +-- tests/DatabaseTest.php | 87 +++++++++++++++++------------------- tests/EventLogTest.php | 6 +-- tests/IpTest.php | 2 +- tests/LocaleTest.php | 4 +- tests/MailTest.php | 28 +++++++++--- tests/ResellerTest.php | 14 +++--- tests/SecretKeyTest.php | 24 +++++----- tests/ServerTest.php | 26 +++++------ tests/ServicePlanTest.php | 4 +- tests/SessionTest.php | 10 ++--- tests/SiteTest.php | 50 +++++++++++++-------- tests/SubdomainTest.php | 35 ++++++++++----- tests/TestCase.php | 18 ++++---- tests/UiTest.php | 16 +++---- tests/UserTest.php | 18 ++++---- tests/WebspaceTest.php | 24 +++++----- 20 files changed, 237 insertions(+), 205 deletions(-) diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 42b4c82d..8d794681 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -10,9 +10,9 @@ class ApiClientTest extends TestCase */ public function testWrongProtocol() { - $packet = $this->_client->getPacket('100.0.0'); + $packet = static::$_client->getPacket('100.0.0'); $packet->addChild('server')->addChild('get_protos'); - $this->_client->request($packet); + static::$_client->request($packet); } /** @@ -21,9 +21,9 @@ public function testWrongProtocol() */ public function testUnknownOperator() { - $packet = $this->_client->getPacket(); + $packet = static::$_client->getPacket(); $packet->addChild('unknown'); - $this->_client->request($packet); + static::$_client->request($packet); } /** @@ -32,7 +32,7 @@ public function testUnknownOperator() */ public function testInvalidXmlRequest() { - $this->_client->request(''); + static::$_client->request(''); } /** @@ -41,12 +41,12 @@ public function testInvalidXmlRequest() */ public function testInvalidCredentials() { - $host = $this->_client->getHost(); - $port = $this->_client->getPort(); - $protocol = $this->_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 = $this->_client->getPacket(); + $packet = static::$_client->getPacket(); $packet->addChild('server')->addChild('get_protos'); $client->request($packet); } @@ -57,46 +57,46 @@ public function testInvalidCredentials() */ public function testInvalidSecretKey() { - $host = $this->_client->getHost(); - $port = $this->_client->getPort(); - $protocol = $this->_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 = $this->_client->getPacket(); + $packet = static::$_client->getPacket(); $packet->addChild('server')->addChild('get_protos'); $client->request($packet); } public function testLatestMajorProtocol() { - $packet = $this->_client->getPacket('1.6'); + $packet = static::$_client->getPacket('1.6'); $packet->addChild('server')->addChild('get_protos'); - $this->_client->request($packet); + static::$_client->request($packet); } public function testLatestMinorProtocol() { - $packet = $this->_client->getPacket('1.6.5'); + $packet = static::$_client->getPacket('1.6.5'); $packet->addChild('server')->addChild('get_protos'); - $this->_client->request($packet); + static::$_client->request($packet); } public function testRequestShortSyntax() { - $response = $this->_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 = $this->_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 = $this->_client->request([ + $response = static::$_client->request([ 'server' => [ 'get' => [ 'gen_info' => '', @@ -108,13 +108,13 @@ public function testRequestArraySyntax() public function testOperatorArraySyntax() { - $response = $this->_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 = $this->_client->multiRequest([ + $responses = static::$_client->multiRequest([ 'server.get_protos', 'server.get.gen_info', ]); diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index f5ce39e4..5ead19e9 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -6,7 +6,7 @@ class CertificateTest extends TestCase public function testGenerate() { - $certificate = $this->_client->certificate()->generate([ + $certificate = static::$_client->certificate()->generate([ 'bits' => 2048, 'country' => 'RU', 'state' => 'NSO', diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index e5cf4ae4..a6ac291b 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -16,24 +16,24 @@ class CustomerTest extends TestCase public function testCreate() { - $customer = $this->_client->customer()->create($this->_customerProperties); + $customer = static::$_client->customer()->create($this->_customerProperties); $this->assertInternalType('integer', $customer->id); $this->assertGreaterThan(0, $customer->id); - $this->_client->customer()->delete('id', $customer->id); + static::$_client->customer()->delete('id', $customer->id); } public function testDelete() { - $customer = $this->_client->customer()->create($this->_customerProperties); - $result = $this->_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 = $this->_client->customer()->create($this->_customerProperties); - $customerInfo = $this->_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); @@ -41,29 +41,29 @@ public function testGet() $this->assertEquals('Good guy', $customerInfo->description); $this->assertEquals('link:12345', $customerInfo->externalId); - $this->_client->customer()->delete('id', $customer->id); + static::$_client->customer()->delete('id', $customer->id); } public function testGetAll() { - $this->_client->customer()->create([ + static::$_client->customer()->create([ 'pname' => 'John Smith', 'login' => 'customer-a', 'passwd' => 'simple-password', ]); - $this->_client->customer()->create([ + static::$_client->customer()->create([ 'pname' => 'Mike Black', 'login' => 'customer-b', 'passwd' => 'simple-password', ]); - $customersInfo = $this->_client->customer()->getAll(); + $customersInfo = static::$_client->customer()->getAll(); $this->assertCount(2, $customersInfo); $this->assertEquals('John Smith', $customersInfo[0]->personalName); $this->assertEquals('customer-a', $customersInfo[0]->login); - $this->_client->customer()->delete('login', 'customer-a'); - $this->_client->customer()->delete('login', 'customer-b'); + static::$_client->customer()->delete('login', 'customer-a'); + static::$_client->customer()->delete('login', 'customer-b'); } } diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index ad900f9b..5ab1e372 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -6,21 +6,21 @@ class DatabaseServerTest extends TestCase public function testGetSupportedTypes() { - $types = $this->_client->databaseServer()->getSupportedTypes(); + $types = static::$_client->databaseServer()->getSupportedTypes(); $this->assertGreaterThan(0, count($types)); $this->assertContains('mysql', $types); } public function testGet() { - $dbServer = $this->_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 = $this->_client->databaseServer()->getAll(); + $dbServers = static::$_client->databaseServer()->getAll(); $this->assertInternalType('array', $dbServers); $this->assertGreaterThan(0, count($dbServers)); $this->assertEquals('localhost', $dbServers[0]->host); diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index e503fd80..84e2dcd0 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -6,40 +6,35 @@ class DatabaseTest extends TestCase /** * @var \PleskX\Api\Struct\Webspace\Info */ - private $_webspace; + private static $_webspace; - protected function setUp() + public static function setUpBeforeClass() { - parent::setUp(); - $this->_webspace = $this->_client->webspace()->create([ - 'name' => 'example.tld', - 'ip_address' => $this->_getIpAddress(), - ], [ - 'ftp_login' => 'test-login', - 'ftp_password' => 'test-password', - ]); + parent::setUpBeforeClass(); + static::$_webspace = static::_createWebspace('example.dom'); } - protected function tearDown() + public static function tearDownAfterClass() { - $this->_client->webspace()->delete('id', $this->_webspace->id); + parent::tearDownAfterClass(); + static::$_client->webspace()->delete('id', static::$_webspace->id); } public function testCreate() { $database = $this->_createDatabase([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 ]); - $this->_client->database()->delete('id', $database->id); + static::$_client->database()->delete('id', $database->id); } public function testCreateUser() { $database = $this->_createDatabase([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 @@ -49,57 +44,57 @@ public function testCreateUser() 'login' => 'test_user1', 'password' => 'setup1Q', ]); - $this->_client->database()->deleteUser('id', $user->id); - $this->_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([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 ]); - $db = $this->_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($this->_webspace->id, $db->webspaceId); + $this->assertEquals(static::$_webspace->id, $db->webspaceId); $this->assertEquals(1, $db->dbServerId); - $this->_client->database()->delete('id', $database->id); + static::$_client->database()->delete('id', $database->id); } public function testGetAllByWebspaceId() { $db1 = $this->_createDatabase([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 ]); $db2 = $this->_createDatabase([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test2', 'type' => 'mysql', 'db-server-id' => 1 ]); - $databases = $this->_client->database()->getAll('webspace-id', $this->_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($this->_webspace->id, $databases[0]->webspaceId); + $this->assertEquals(static::$_webspace->id, $databases[0]->webspaceId); $this->assertEquals(1, $databases[1]->dbServerId); - $this->_client->database()->delete('id', $db1->id); - $this->_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([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 @@ -111,24 +106,24 @@ public function testGetUserById() 'password' => 'setup1Q', ]); - $dbUser = $this->_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); - $this->_client->database()->deleteUser('id', $user->id); - $this->_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([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 ]); $db2 = $this->_createDatabase([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test2', 'type' => 'mysql', 'db-server-id' => 1 @@ -151,34 +146,34 @@ public function testGetAllUsersByDbId() 'password' => 'setup1Q', ]); - $dbUsers = $this->_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); - $this->_client->database()->deleteUser('id', $user1->id); - $this->_client->database()->deleteUser('id', $user2->id); - $this->_client->database()->deleteUser('id', $user3->id); - $this->_client->database()->delete('id', $db1->id); - $this->_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([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 ]); - $result = $this->_client->database()->delete('id', $database->id); + $result = static::$_client->database()->delete('id', $database->id); $this->assertTrue($result); } public function testDeleteUser() { $database = $this->_createDatabase([ - 'webspace-id' => $this->_webspace->id, + 'webspace-id' => static::$_webspace->id, 'name' => 'test1', 'type' => 'mysql', 'db-server-id' => 1 @@ -189,9 +184,9 @@ public function testDeleteUser() 'password' => 'setup1Q', ]); - $result = $this->_client->database()->deleteUser('id', $user->id); + $result = static::$_client->database()->deleteUser('id', $user->id); $this->assertTrue($result); - $this->_client->database()->delete('id', $database->id); + static::$_client->database()->delete('id', $database->id); } /** @@ -200,7 +195,7 @@ public function testDeleteUser() */ private function _createDatabase(array $params) { - $database = $this->_client->database()->create($params); + $database = static::$_client->database()->create($params); $this->assertInternalType('integer', $database->id); $this->assertGreaterThan(0, $database->id); return $database; @@ -212,7 +207,7 @@ private function _createDatabase(array $params) */ private function _createUser(array $params) { - $user = $this->_client->database()->createUser($params); + $user = static::$_client->database()->createUser($params); $this->assertInternalType('integer', $user->id); $this->assertGreaterThan(0, $user->id); return $user; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index 677a75b8..eb350076 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -6,7 +6,7 @@ class EventLogTest extends TestCase public function testGet() { - $events = $this->_client->eventLog()->get(); + $events = static::$_client->eventLog()->get(); $this->assertGreaterThan(0, $events); $event = reset($events); @@ -15,7 +15,7 @@ public function testGet() public function testGetDetailedLog() { - $events = $this->_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 = $this->_client->eventLog()->getLastId(); + $lastId = static::$_client->eventLog()->getLastId(); $this->assertGreaterThan(0, $lastId); } diff --git a/tests/IpTest.php b/tests/IpTest.php index 09a1ef9d..d9cab6bb 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -6,7 +6,7 @@ class IpTest extends TestCase public function testGet() { - $ips = $this->_client->ip()->get(); + $ips = static::$_client->ip()->get(); $this->assertGreaterThan(0, count($ips)); $ip = reset($ips); diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index 2274021f..739217c8 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -6,7 +6,7 @@ class LocaleTest extends TestCase public function testGet() { - $locales = $this->_client->locale()->get(); + $locales = static::$_client->locale()->get(); $this->assertGreaterThan(0, count($locales)); $locale = $locales['en-US']; @@ -15,7 +15,7 @@ public function testGet() public function testGetById() { - $locale = $this->_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/MailTest.php index fec0dd6c..b9e97d54 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -4,26 +4,40 @@ class MailTest extends TestCase { + /** + * @var \PleskX\Api\Struct\Webspace\Info + */ + private static $_webspace; + + public static function setUpBeforeClass() + { + parent::setUpBeforeClass(); + static::$_webspace = static::_createWebspace('example.dom'); + } + + public static function tearDownAfterClass() + { + parent::tearDownAfterClass(); + static::$_client->webspace()->delete('id', static::$_webspace->id); + } + public function testCreate() { - $webspace = $this->_createWebspace('example.dom'); - $mailname = $this->_client->mail()->create('test', $webspace->id, true, 'secret'); + $mailname = static::$_client->mail()->create('test', static::$_webspace->id, true, 'secret'); $this->assertInternalType('integer', $mailname->id); $this->assertGreaterThan(0, $mailname->id); $this->assertEquals('test', $mailname->name); - $this->_client->webspace()->delete('id', $webspace->id); + static::$_client->mail()->delete('name', $mailname->name, static::$_webspace->id); } public function testDelete() { - $webspace = $this->_createWebspace('example.dom'); - $mailname = $this->_client->mail()->create('test', $webspace->id); + $mailname = static::$_client->mail()->create('test', static::$_webspace->id); - $result = $this->_client->mail()->delete('name', $mailname->name, $webspace->id); + $result = static::$_client->mail()->delete('name', $mailname->name, static::$_webspace->id); $this->assertTrue($result); - $this->_client->webspace()->delete('id', $webspace->id); } } diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 7da215ac..fe5cde72 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -12,28 +12,28 @@ class ResellerTest extends TestCase public function testCreate() { - $reseller = $this->_client->reseller()->create($this->_resellerProperties); + $reseller = static::$_client->reseller()->create($this->_resellerProperties); $this->assertInternalType('integer', $reseller->id); $this->assertGreaterThan(0, $reseller->id); - $this->_client->reseller()->delete('id', $reseller->id); + static::$_client->reseller()->delete('id', $reseller->id); } public function testDelete() { - $reseller = $this->_client->reseller()->create($this->_resellerProperties); - $result = $this->_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 = $this->_client->reseller()->create($this->_resellerProperties); - $resellerInfo = $this->_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->_client->reseller()->delete('id', $reseller->id); + static::$_client->reseller()->delete('id', $reseller->id); } } diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index e359b7ba..e5e96bcb 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -6,45 +6,45 @@ class SecretKeyTest extends TestCase public function testCreate() { - $keyId = $this->_client->secretKey()->create('192.168.0.1'); + $keyId = static::$_client->secretKey()->create('192.168.0.1'); $this->assertRegExp('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $keyId); - $this->_client->secretKey()->delete($keyId); + static::$_client->secretKey()->delete($keyId); } public function testGet() { - $keyId = $this->_client->secretKey()->create('192.168.0.1'); - $keyInfo = $this->_client->secretKey()->get($keyId); + $keyId = static::$_client->secretKey()->create('192.168.0.1'); + $keyInfo = static::$_client->secretKey()->get($keyId); $this->assertEquals($keyId, $keyInfo->key); $this->assertEquals('192.168.0.1', $keyInfo->ipAddress); $this->assertEquals('admin', $keyInfo->login); - $this->_client->secretKey()->delete($keyId); + static::$_client->secretKey()->delete($keyId); } public function testGetAll() { $keyIds = []; - $keyIds[] = $this->_client->secretKey()->create('192.168.0.1'); - $keyIds[] = $this->_client->secretKey()->create('192.168.0.2'); + $keyIds[] = static::$_client->secretKey()->create('192.168.0.1'); + $keyIds[] = static::$_client->secretKey()->create('192.168.0.2'); - $keys = $this->_client->secretKey()->getAll(); + $keys = static::$_client->secretKey()->getAll(); $this->assertGreaterThanOrEqual(2, count($keys)); $this->assertEquals('192.168.0.1', $keys[0]->ipAddress); foreach ($keyIds as $keyId) { - $this->_client->secretKey()->delete($keyId); + static::$_client->secretKey()->delete($keyId); } } public function testDelete() { - $keyId = $this->_client->secretKey()->create('192.168.0.1'); - $this->_client->secretKey()->delete($keyId); + $keyId = static::$_client->secretKey()->create('192.168.0.1'); + static::$_client->secretKey()->delete($keyId); try { - $this->_client->secretKey()->get($keyId); + static::$_client->secretKey()->get($keyId); $this->fail("Secret key $keyId was not deleted."); } catch (Exception $exception) { $this->assertEquals(1013, $exception->getCode()); diff --git a/tests/ServerTest.php b/tests/ServerTest.php index c8de045c..94288d10 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -6,14 +6,14 @@ class ServerTest extends TestCase public function testGetProtos() { - $protos = $this->_client->server()->getProtos(); + $protos = static::$_client->server()->getProtos(); $this->assertInternalType('array', $protos); $this->assertContains('1.6.3.0', $protos); } public function testGetGenInfo() { - $generalInfo = $this->_client->server()->getGeneralInfo(); + $generalInfo = static::$_client->server()->getGeneralInfo(); $this->assertGreaterThan(0, strlen($generalInfo->serverName)); $this->assertRegExp('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $generalInfo->serverGuid); $this->assertEquals('standard', $generalInfo->mode); @@ -21,7 +21,7 @@ public function testGetGenInfo() public function testGetPreferences() { - $preferences = $this->_client->server()->getPreferences(); + $preferences = static::$_client->server()->getPreferences(); $this->assertInternalType('integer', $preferences->statTtl); $this->assertGreaterThan(0, $preferences->statTtl); $this->assertEquals(0, $preferences->restartApacheInterval); @@ -29,7 +29,7 @@ public function testGetPreferences() public function testGetAdmin() { - $admin = $this->_client->server()->getAdmin(); + $admin = static::$_client->server()->getAdmin(); $this->assertGreaterThan(0, strlen($admin->companyName)); $this->assertGreaterThan(0, strlen($admin->name)); $this->assertContains('@', $admin->email); @@ -37,7 +37,7 @@ public function testGetAdmin() public function testGetKeyInfo() { - $keyInfo = $this->_client->server()->getKeyInfo(); + $keyInfo = static::$_client->server()->getKeyInfo(); $this->assertInternalType('array', $keyInfo); $this->assertGreaterThan(0, count($keyInfo)); $this->assertArrayHasKey('plesk_key_id', $keyInfo); @@ -46,7 +46,7 @@ public function testGetKeyInfo() public function testGetComponents() { - $components = $this->_client->server()->getComponents(); + $components = static::$_client->server()->getComponents(); $this->assertInternalType('array', $components); $this->assertGreaterThan(0, count($components)); $this->assertArrayHasKey('psa', $components); @@ -55,7 +55,7 @@ public function testGetComponents() public function testGetServiceStates() { - $serviceStates = $this->_client->server()->getServiceStates(); + $serviceStates = static::$_client->server()->getServiceStates(); $this->assertInternalType('array', $serviceStates); $this->assertGreaterThan(0, count($serviceStates)); $this->assertArrayHasKey('web', $serviceStates); @@ -70,14 +70,14 @@ public function testGetServiceStates() public function testGetSessionPreferences() { - $preferences = $this->_client->server()->getSessionPreferences(); + $preferences = static::$_client->server()->getSessionPreferences(); $this->assertInternalType('integer', $preferences->loginTimeout); $this->assertGreaterThan(0, $preferences->loginTimeout); } public function testGetShells() { - $shells = $this->_client->server()->getShells(); + $shells = static::$_client->server()->getShells(); $this->assertInternalType('array', $shells); $this->assertGreaterThan(0, count($shells)); $this->assertArrayHasKey('/bin/bash', $shells); @@ -88,21 +88,21 @@ public function testGetShells() public function testGetNetworkInterfaces() { - $netInterfaces = $this->_client->server()->getNetworkInterfaces(); + $netInterfaces = static::$_client->server()->getNetworkInterfaces(); $this->assertInternalType('array', $netInterfaces); $this->assertGreaterThan(0, count($netInterfaces)); } public function testGetStatistics() { - $stats = $this->_client->server()->getStatistics(); + $stats = static::$_client->server()->getStatistics(); $this->assertInternalType('integer', $stats->objects->clients); $this->assertEquals('psa', $stats->version->internalName); } public function testGetSiteIsolationConfig() { - $config = $this->_client->server()->getSiteIsolationConfig(); + $config = static::$_client->server()->getSiteIsolationConfig(); $this->assertInternalType('array', $config); $this->assertGreaterThan(0, count($config)); $this->assertArrayHasKey('php', $config); @@ -110,7 +110,7 @@ public function testGetSiteIsolationConfig() public function testGetUpdatesInfo() { - $updatesInfo = $this->_client->server()->getUpdatesInfo(); + $updatesInfo = static::$_client->server()->getUpdatesInfo(); $this->assertInternalType('boolean', $updatesInfo->installUpdatesAutomatically); } diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index d92a1d3f..196eb280 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -6,14 +6,14 @@ class ServicePlanTest extends TestCase public function testGet() { - $servicePlan = $this->_client->servicePlan()->get('name', 'Default Domain'); + $servicePlan = static::$_client->servicePlan()->get('name', 'Default Domain'); $this->assertEquals('Default Domain', $servicePlan->name); $this->assertGreaterThan(0, $servicePlan->id); } public function testGetAll() { - $servicePlans = $this->_client->servicePlan()->getAll(); + $servicePlans = static::$_client->servicePlan()->getAll(); $this->assertInternalType('array', $servicePlans); $this->assertGreaterThan(0, count($servicePlans)); $this->assertNotEmpty($servicePlans[0]->name); diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 65986258..8aabab53 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -6,8 +6,8 @@ class SessionTest extends TestCase public function testGet() { - $sessionId = $this->_client->server()->createSession('admin', '127.0.0.1'); - $sessions = $this->_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]; @@ -18,9 +18,9 @@ public function testGet() public function testTerminate() { - $sessionId = $this->_client->server()->createSession('admin', '127.0.0.1'); - $this->_client->session()->terminate($sessionId); - $sessions = $this->_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/SiteTest.php index 74184c57..699dab12 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -3,59 +3,71 @@ class SiteTest extends TestCase { + /** + * @var \PleskX\Api\Struct\Webspace\Info + */ + private static $_webspace; - private function _createSite($name, $webspace) + public static function setUpBeforeClass() { - return $this->_client->site()->create([ + parent::setUpBeforeClass(); + static::$_webspace = static::_createWebspace('example.dom'); + } + + public static function tearDownAfterClass() + { + parent::tearDownAfterClass(); + static::$_client->webspace()->delete('id', static::$_webspace->id); + } + + private function _createSite($name) + { + return static::$_client->site()->create([ 'name' => $name, - 'webspace-id' => $webspace->id, + 'webspace-id' => static::$_webspace->id, ]); } public function testCreate() { - $webspace = $this->_createWebspace('example.dom'); - $site = $this->_createSite('addon.dom', $webspace); + $site = $this->_createSite('addon.dom'); $this->assertInternalType('integer', $site->id); $this->assertGreaterThan(0, $site->id); - $this->_client->webspace()->delete('id', $webspace->id); + static::$_client->site()->delete('id', $site->id); } public function testDelete() { - $webspace = $this->_createWebspace('example.dom'); - $site = $this->_createSite('addon.dom', $webspace); + $site = $this->_createSite('addon.dom'); - $result = $this->_client->site()->delete('id', $site->id); + $result = static::$_client->site()->delete('id', $site->id); $this->assertTrue($result); - $this->_client->webspace()->delete('id', $webspace->id); } public function testGet() { - $webspace = $this->_createWebspace('example.dom'); - $site = $this->_createSite('addon.dom', $webspace); + $site = $this->_createSite('addon.dom'); - $siteInfo = $this->_client->site()->get('id', $site->id); + $siteInfo = static::$_client->site()->get('id', $site->id); $this->assertEquals('addon.dom', $siteInfo->name); - $this->_client->webspace()->delete('id', $webspace->id); + static::$_client->site()->delete('id', $site->id); } public function testGetAll() { - $webspace = $this->_createWebspace('example.dom'); - $this->_createSite('addon.dom', $webspace); - $this->_createSite('addon2.dom', $webspace); + $site = $this->_createSite('addon.dom'); + $site2 = $this->_createSite('addon2.dom'); - $sitesInfo = $this->_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->_client->webspace()->delete('id', $webspace->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 74647afc..9dca2561 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -3,40 +3,51 @@ class SubdomainTest extends TestCase { + /** + * @var \PleskX\Api\Struct\Webspace\Info + */ + private static $_webspace; + + public static function setUpBeforeClass() + { + parent::setUpBeforeClass(); + static::$_webspace = static::_createWebspace('example.dom'); + } + + public static function tearDownAfterClass() + { + parent::tearDownAfterClass(); + static::$_client->webspace()->delete('id', static::$_webspace->id); + } /** * @param string $name * @param string $webspaceName * @return \PleskX\Api\Struct\Subdomain\Info */ - private function _createSubdomain($name, $webspaceName) + private function _createSubdomain($name) { - return $this->_client->subdomain()->create([ - 'parent' => $webspaceName, + return static::$_client->subdomain()->create([ + 'parent' => 'example.dom', 'name' => $name, ]); } public function testCreate() { - $webspaceName = 'example.tld'; - $webspace = $this->_createWebspace($webspaceName); - $subdomain = $this->_createSubdomain('sub', $webspaceName); + $subdomain = $this->_createSubdomain('sub'); $this->assertInternalType('integer', $subdomain->id); $this->assertGreaterThan(0, $subdomain->id); - $this->_client->webspace()->delete('id', $webspace->id); + static::$_client->subdomain()->delete('id', $subdomain->id); } public function testDelete() { - $webspaceName = 'example.tld'; - $webspace = $this->_createWebspace($webspaceName); - $subdomain = $this->_createSubdomain('sub', $webspaceName); + $subdomain = $this->_createSubdomain('sub'); - $result = $this->_client->subdomain()->delete('id', $subdomain->id); + $result = static::$_client->subdomain()->delete('id', $subdomain->id); $this->assertTrue($result); - $this->_client->webspace()->delete('id', $webspace->id); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index c2d829fc..a8b82aac 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -5,9 +5,9 @@ abstract class TestCase extends PHPUnit_Framework_TestCase { /** @var PleskX\Api\Client */ - protected $_client; + protected static $_client; - protected function setUp() + public static function setUpBeforeClass() { $login = getenv('REMOTE_LOGIN'); $password = getenv('REMOTE_PASSWORD'); @@ -20,16 +20,16 @@ protected function setUp() list($host, $port, $scheme) = [$parsedUrl['host'], $parsedUrl['port'], $parsedUrl['scheme']]; } - $this->_client = new PleskX\Api\Client($host, $port, $scheme); - $this->_client->setCredentials($login, $password); + static::$_client = new PleskX\Api\Client($host, $port, $scheme); + static::$_client->setCredentials($login, $password); } /** * @return string */ - protected function _getIpAddress() + protected static function _getIpAddress() { - $ips = $this->_client->ip()->get(); + $ips = static::$_client->ip()->get(); $ipInfo = reset($ips); return $ipInfo->ipAddress; } @@ -38,11 +38,11 @@ protected function _getIpAddress() * @param string $name * @return \PleskX\Api\Struct\Webspace\Info */ - protected function _createWebspace($name) + protected static function _createWebspace($name) { - return $this->_client->webspace()->create([ + return static::$_client->webspace()->create([ 'name' => $name, - 'ip_address' => $this->_getIpAddress(), + 'ip_address' => static::_getIpAddress(), ], [ 'ftp_login' => 'test-login', 'ftp_password' => 'test-password', diff --git a/tests/UiTest.php b/tests/UiTest.php index 997a5809..59a0507b 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -12,7 +12,7 @@ class UiTest extends TestCase public function testGetNavigation() { - $navigation = $this->_client->ui()->getNavigation(); + $navigation = static::$_client->ui()->getNavigation(); $this->assertInternalType('array', $navigation); $this->assertGreaterThan(0, count($navigation)); $this->assertArrayHasKey('general', $navigation); @@ -26,26 +26,26 @@ public function testGetNavigation() public function testCreateCustomButton() { - $buttonId = $this->_client->ui()->createCustomButton('admin', $this->_customButtonProperties); + $buttonId = static::$_client->ui()->createCustomButton('admin', $this->_customButtonProperties); $this->assertGreaterThan(0, $buttonId); - $this->_client->ui()->deleteCustomButton($buttonId); + static::$_client->ui()->deleteCustomButton($buttonId); } public function testGetCustomButton() { - $buttonId = $this->_client->ui()->createCustomButton('admin', $this->_customButtonProperties); - $customButtonInfo = $this->_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); - $this->_client->ui()->deleteCustomButton($buttonId); + static::$_client->ui()->deleteCustomButton($buttonId); } public function testDeleteCustomButton() { - $buttonId = $this->_client->ui()->createCustomButton('admin', $this->_customButtonProperties); - $result = $this->_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/UserTest.php b/tests/UserTest.php index b85ca366..b0deb1f1 100644 --- a/tests/UserTest.php +++ b/tests/UserTest.php @@ -18,7 +18,7 @@ protected function setUp() { parent::setUp(); - $this->_customer = $this->_client->customer()->create([ + $this->_customer = static::$_client->customer()->create([ 'pname' => 'John Smith', 'login' => 'john-unit-test', 'passwd' => 'simple-password', @@ -28,35 +28,35 @@ protected function setUp() protected function tearDown() { - $this->_client->customer()->delete('id', $this->_customer->id); + static::$_client->customer()->delete('id', $this->_customer->id); } public function testCreate() { - $user = $this->_client->user()->create('Application User', $this->_userProperties); + $user = static::$_client->user()->create('Application User', $this->_userProperties); $this->assertInternalType('integer', $user->id); $this->assertGreaterThan(0, $user->id); - $this->_client->user()->delete('guid', $user->guid); + static::$_client->user()->delete('guid', $user->guid); } public function testDelete() { - $user = $this->_client->user()->create('Application User', $this->_userProperties); - $result = $this->_client->user()->delete('guid', $user->guid); + $user = static::$_client->user()->create('Application User', $this->_userProperties); + $result = static::$_client->user()->delete('guid', $user->guid); $this->assertTrue($result); } public function testGet() { - $user = $this->_client->user()->create('Application User', $this->_userProperties); - $userInfo = $this->_client->user()->get('guid', $user->guid); + $user = static::$_client->user()->create('Application User', $this->_userProperties); + $userInfo = static::$_client->user()->get('guid', $user->guid); $this->assertEquals('mike-test', $userInfo->login); $this->assertEquals('Mike Black', $userInfo->name); $this->assertEquals('mike@example.com', $userInfo->email); $this->assertEquals($user->guid, $userInfo->guid); - $this->_client->user()->delete('guid', $user->guid); + static::$_client->user()->delete('guid', $user->guid); } } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 9037667a..569c5047 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -9,29 +9,29 @@ class WebspaceTest extends TestCase */ private function _createDomain() { - return $this->_client->webspace()->create([ + return static::$_client->webspace()->create([ 'name' => 'example-test.dom', - 'ip_address' => $this->_getIpAddress(), + 'ip_address' => static::_getIpAddress(), ]); } public function testGetPermissionDescriptor() { - $descriptor = $this->_client->webspace()->getPermissionDescriptor(); + $descriptor = static::$_client->webspace()->getPermissionDescriptor(); $this->assertInternalType('array', $descriptor->permissions); $this->assertGreaterThan(0, count($descriptor->permissions)); } public function testGetLimitDescriptor() { - $descriptor = $this->_client->webspace()->getLimitDescriptor(); + $descriptor = static::$_client->webspace()->getLimitDescriptor(); $this->assertInternalType('array', $descriptor->limits); $this->assertGreaterThan(0, count($descriptor->limits)); } public function testGetPhysicalHostingDescriptor() { - $descriptor = $this->_client->webspace()->getPhysicalHostingDescriptor(); + $descriptor = static::$_client->webspace()->getPhysicalHostingDescriptor(); $this->assertInternalType('array', $descriptor->properties); $this->assertGreaterThan(0, count($descriptor->properties)); @@ -46,35 +46,35 @@ public function testCreate() $this->assertInternalType('integer', $domain->id); $this->assertGreaterThan(0, $domain->id); - $this->_client->webspace()->delete('id', $domain->id); + static::$_client->webspace()->delete('id', $domain->id); } public function testCreateWebspace() { - $webspace = $this->_client->webspace()->create([ + $webspace = static::$_client->webspace()->create([ 'name' => 'example-test.dom', - 'ip_address' => $this->_getIpAddress(), + 'ip_address' => static::_getIpAddress(), ], [ 'ftp_login' => 'test-login', 'ftp_password' => 'test-password', ]); - $this->_client->webspace()->delete('id', $webspace->id); + static::$_client->webspace()->delete('id', $webspace->id); } public function testDelete() { $domain = $this->_createDomain(); - $result = $this->_client->webspace()->delete('id', $domain->id); + $result = static::$_client->webspace()->delete('id', $domain->id); $this->assertTrue($result); } public function testGet() { $domain = $this->_createDomain(); - $domainInfo = $this->_client->webspace()->get('id', $domain->id); + $domainInfo = static::$_client->webspace()->get('id', $domain->id); $this->assertEquals('example-test.dom', $domainInfo->name); - $this->_client->webspace()->delete('id', $domain->id); + static::$_client->webspace()->delete('id', $domain->id); } } From a624dcce8b93a1ed251100092eadf7cc8e81ea54 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Mon, 21 Nov 2016 15:50:00 +0700 Subject: [PATCH 012/243] Add get and getAll operations for subdomains --- src/PleskX/Api/Operator/Subdomain.php | 38 ++++++++++++++++++++++++ src/PleskX/Api/Struct/Subdomain/Info.php | 15 ++++++++++ tests/SubdomainTest.php | 30 +++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/src/PleskX/Api/Operator/Subdomain.php b/src/PleskX/Api/Operator/Subdomain.php index 9f87348e..d1f19522 100644 --- a/src/PleskX/Api/Operator/Subdomain.php +++ b/src/PleskX/Api/Operator/Subdomain.php @@ -32,4 +32,42 @@ public function delete($field, $value) { return $this->_delete($field, $value); } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info + */ + public function get($field, $value) + { + $items = $this->getAll($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info[] + */ + public function getAll($field = null, $value = null) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $item = new Struct\Info($xmlResult->data); + $item->id = (int)$xmlResult->id; + $items[] = $item; + } + + return $items; + } } diff --git a/src/PleskX/Api/Struct/Subdomain/Info.php b/src/PleskX/Api/Struct/Subdomain/Info.php index 89dd1d73..6a81d021 100644 --- a/src/PleskX/Api/Struct/Subdomain/Info.php +++ b/src/PleskX/Api/Struct/Subdomain/Info.php @@ -8,10 +8,25 @@ class Info extends \PleskX\Api\Struct /** @var integer */ public $id; + /** @var string */ + public $parent; + + /** @var string */ + public $name; + + /** @var array */ + public $properties; + public function __construct($apiResponse) { + $this->properties = []; $this->_initScalarProperties($apiResponse, [ 'id', + 'parent', + 'name' ]); + foreach ($apiResponse->property as $propertyInfo) { + $this->properties[(string)$propertyInfo->name] = (string)$propertyInfo->value; + } } } diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 9dca2561..93ab1ed1 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -50,4 +50,34 @@ public function testDelete() $result = static::$_client->subdomain()->delete('id', $subdomain->id); $this->assertTrue($result); } + + public function testGet() + { + $subdomain = $this->_createSubdomain('sub'); + + $subdomainInfo = static::$_client->subdomain()->get('id', $subdomain->id); + $name = explode('.', $subdomainInfo->name); + $parent = explode('.', $subdomainInfo->parent); + $this->assertEquals('sub', reset(array_diff($name, $parent))); + + static::$_client->subdomain()->delete('id', $subdomain->id); + } + + public function testGetAll() + { + $subdomain = $this->_createSubdomain('sub'); + $subdomain2 = $this->_createSubdomain('sub2'); + + $subdomainInfo = static::$_client->subdomain()->getAll(); + $this->assertCount(2, $subdomainInfo); + $name = explode('.', $subdomainInfo[0]->name); + $parent = explode('.', $subdomainInfo[0]->parent); + $name2 = explode('.', $subdomainInfo[1]->name); + $parent2 = explode('.', $subdomainInfo[1]->parent); + $this->assertEquals('sub', reset(array_diff($name, $parent))); + $this->assertEquals('sub2', reset(array_diff($name2, $parent2))); + + static::$_client->subdomain()->delete('id', $subdomain->id); + static::$_client->subdomain()->delete('id', $subdomain2->id); + } } From 360c3864b39d70430f9fc64e97e8966bf774de62 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 23 Nov 2016 22:13:03 +0700 Subject: [PATCH 013/243] Skip mail tests if mail system is not supported. --- tests/MailTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/MailTest.php b/tests/MailTest.php index b9e97d54..d4213fda 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -9,9 +9,18 @@ class MailTest extends TestCase */ private static $_webspace; + /** + * @var bool + */ + private static $_isMailSupported; + public static function setUpBeforeClass() { parent::setUpBeforeClass(); + + $serviceStates = static::$_client->server()->getServiceStates(); + static::$_isMailSupported = $serviceStates['smtp'] && ('running' == $serviceStates['smtp']['state']); + static::$_webspace = static::_createWebspace('example.dom'); } @@ -21,6 +30,15 @@ public static function tearDownAfterClass() static::$_client->webspace()->delete('id', static::$_webspace->id); } + protected function setUp() + { + parent::setUp(); + + if (!static::$_isMailSupported) { + $this->markTestSkipped('Mail system is not supported.'); + } + } + public function testCreate() { $mailname = static::$_client->mail()->create('test', static::$_webspace->id, true, 'secret'); From a081fe597800ad3a669af5579e1dd0622fb32e73 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 23 Nov 2016 22:52:49 +0700 Subject: [PATCH 014/243] Fix issues with referencies and simplify the test. --- tests/SubdomainTest.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 93ab1ed1..d7056f22 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -56,9 +56,7 @@ public function testGet() $subdomain = $this->_createSubdomain('sub'); $subdomainInfo = static::$_client->subdomain()->get('id', $subdomain->id); - $name = explode('.', $subdomainInfo->name); - $parent = explode('.', $subdomainInfo->parent); - $this->assertEquals('sub', reset(array_diff($name, $parent))); + $this->assertEquals('sub.' . $subdomainInfo->parent, $subdomainInfo->name); static::$_client->subdomain()->delete('id', $subdomain->id); } @@ -68,14 +66,10 @@ public function testGetAll() $subdomain = $this->_createSubdomain('sub'); $subdomain2 = $this->_createSubdomain('sub2'); - $subdomainInfo = static::$_client->subdomain()->getAll(); - $this->assertCount(2, $subdomainInfo); - $name = explode('.', $subdomainInfo[0]->name); - $parent = explode('.', $subdomainInfo[0]->parent); - $name2 = explode('.', $subdomainInfo[1]->name); - $parent2 = explode('.', $subdomainInfo[1]->parent); - $this->assertEquals('sub', reset(array_diff($name, $parent))); - $this->assertEquals('sub2', reset(array_diff($name2, $parent2))); + $subdomainsInfo = static::$_client->subdomain()->getAll(); + $this->assertCount(2, $subdomainsInfo); + $this->assertEquals('sub.' . $subdomainsInfo[0]->parent, $subdomainsInfo[0]->name); + $this->assertEquals('sub2.' . $subdomainsInfo[1]->parent, $subdomainsInfo[1]->name); static::$_client->subdomain()->delete('id', $subdomain->id); static::$_client->subdomain()->delete('id', $subdomain2->id); From aa8ef684e015bf6e117a5289ca03c869b121186d Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Thu, 24 Nov 2016 01:38:06 +0700 Subject: [PATCH 015/243] Add methods to "dns" object (create,get, delete) --- src/PleskX/Api/Operator/Dns.php | 62 +++++++++++++++++++- src/PleskX/Api/Struct/Dns/Info.php | 41 +++++++++++++ tests/DnsTest.php | 94 ++++++++++++++++++++++++++++++ 3 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 src/PleskX/Api/Struct/Dns/Info.php create mode 100644 tests/DnsTest.php diff --git a/src/PleskX/Api/Operator/Dns.php b/src/PleskX/Api/Operator/Dns.php index 7bcce32e..d8380b13 100644 --- a/src/PleskX/Api/Operator/Dns.php +++ b/src/PleskX/Api/Operator/Dns.php @@ -1,9 +1,69 @@ _client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); + + foreach ($properties as $name => $value) { + $info->addChild($name, $value); + } + + return new Struct\Info($this->_client->request($packet)); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info + */ + public function get($field, $value) + { + $items = $this->getAll($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info[] + */ + public function getAll($field, $value) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_rec'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $item = new Struct\Info($xmlResult->data); + $item->id = (int)$xmlResult->id; + $items[] = $item; + } + return $items; + } + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function delete($field, $value) + { + return $this->_delete($field, $value, 'del_rec'); + } } diff --git a/src/PleskX/Api/Struct/Dns/Info.php b/src/PleskX/Api/Struct/Dns/Info.php new file mode 100644 index 00000000..e5021668 --- /dev/null +++ b/src/PleskX/Api/Struct/Dns/Info.php @@ -0,0 +1,41 @@ +_initScalarProperties($apiResponse, [ + 'id', + 'site-id', + 'site-alias-id', + 'type', + 'host', + 'value', + 'opt', + ]); + } +} diff --git a/tests/DnsTest.php b/tests/DnsTest.php new file mode 100644 index 00000000..44d82149 --- /dev/null +++ b/tests/DnsTest.php @@ -0,0 +1,94 @@ +webspace()->delete('id', static::$_webspace->id); + } + + public function testCreate() + { + $dns = static::$_client->dns()->create([ + 'site-id' => static::$_webspace->id, + 'type' => 'TXT', + 'host' => 'host', + 'value' => 'value' + ]); + $this->assertInternalType('integer', $dns->id); + $this->assertGreaterThan(0, $dns->id); + static::$_client->dns()->delete('id', $dns->id); + } + + public function testGetById() + { + $dns = static::$_client->dns()->create([ + 'site-id' => static::$_webspace->id, + 'type' => 'TXT', + 'host' => '', + 'value' => 'value' + ]); + + $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); + } + + public function testGetAllByWebspaceId() + { + $dns = static::$_client->dns()->create([ + 'site-id' => static::$_webspace->id, + 'type' => 'DS', + 'host' => '', + 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292118' + ]); + $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); + $dsRecords = []; + foreach ($dnsInfo as $dnsRec) { + if ('DS' == $dnsRec->type ) { + $dsRecords[] = $dnsRec; + } + } + $this->assertEquals(2, count($dsRecords)); + foreach ($dsRecords as $dsRecord) { + $this->assertEquals(static::$_webspace->id, $dsRecord->siteId); + } + + static::$_client->dns()->delete('id', $dns->id); + static::$_client->dns()->delete('id', $dns2->id); + } + + public function testDelete() + { + $dns = static::$_client->dns()->create([ + 'site-id' => static::$_webspace->id, + 'type' => 'TXT', + 'host' => 'host', + 'value' => 'value' + ]); + $result = static::$_client->dns()->delete('id', $dns->id); + $this->assertTrue($result); + } +} From 9fd2eda1b500b049d4f74514b5b9a62ea2617a8d Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Sat, 26 Nov 2016 23:11:41 +0700 Subject: [PATCH 016/243] Add set-db-user method to database object --- src/PleskX/Api/Operator/Database.php | 20 +++++++++++++++++--- tests/DatabaseTest.php | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/PleskX/Api/Operator/Database.php b/src/PleskX/Api/Operator/Database.php index fb501237..70e8a338 100644 --- a/src/PleskX/Api/Operator/Database.php +++ b/src/PleskX/Api/Operator/Database.php @@ -12,7 +12,7 @@ class Database extends \PleskX\Api\Operator */ public function create($properties) { - return new Struct\Info($this->_create('add-db', $properties)); + return new Struct\Info($this->_process('add-db', $properties)); } /** @@ -21,7 +21,7 @@ public function create($properties) */ public function createUser($properties) { - return new Struct\UserInfo($this->_create('add-db-user', $properties)); + return new Struct\UserInfo($this->_process('add-db-user', $properties)); } /** @@ -29,18 +29,32 @@ public function createUser($properties) * @param array $properties * @return \PleskX\Api\XmlResponse */ - private function _create($command, array $properties) + private function _process($command, array $properties) { $packet = $this->_client->getPacket(); $info = $packet->addChild($this->_wrapperTag)->addChild($command); foreach ($properties as $name => $value) { + if (false !== strpos($value, '&')) { + $info->$name = $value; + continue; + } $info->addChild($name, $value); } return $this->_client->request($packet); } + /** + * @param array $properties + * @return bool + */ + public function updateUser(array $properties) + { + $response = $this->_process('set-db-user', $properties); + return 'ok' === (string)$response->status; + } + /** * @param string $field * @param integer|string $value diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 84e2dcd0..2ab1e117 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -46,7 +46,29 @@ public function testCreateUser() ]); static::$_client->database()->deleteUser('id', $user->id); static::$_client->database()->delete('id', $database->id); + } + public function testUpdateUser() + { + $database = $this->_createDatabase([ + 'webspace-id' => static::$_webspace->id, + 'name' => 'test1', + 'type' => 'mysql', + 'db-server-id' => 1 + ]); + $user = $this->_createUser([ + 'db-id' => $database->id, + 'login' => 'test_user1', + 'password' => 'setup1Q', + ]); + $updatedUser = static::$_client->database()->updateUser([ + 'id' => $user->id, + 'login' => 'test_user2', + 'password' => 'setup2Q' + ]); + $this->assertEquals(true, $updatedUser); + static::$_client->database()->deleteUser('id', $user->id); + static::$_client->database()->delete('id', $database->id); } public function testGetById() From 761f85bfe124d7fd727ce879c53ab0e09559d098 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Mon, 5 Dec 2016 13:14:59 +0700 Subject: [PATCH 017/243] Add possibility to specify login for 'sdk' protocol --- src/PleskX/Api/Client.php | 2 +- src/PleskX/Api/InternalClient.php | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index 5705325a..f863b110 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -138,7 +138,7 @@ public function request($request, $mode = self::RESPONSE_SHORT) if ('sdk' == $this->_protocol) { $requestXml = new SimpleXMLElement((string)$request); - $xml = \pm_ApiRpc::getService()->call($requestXml->children()[0]->asXml()); + $xml = \pm_ApiRpc::getService()->call($requestXml->children()[0]->asXml(), $this->_login); } else { $xml = $this->_performHttpRequest($request); } diff --git a/src/PleskX/Api/InternalClient.php b/src/PleskX/Api/InternalClient.php index 834e37b4..eb529566 100644 --- a/src/PleskX/Api/InternalClient.php +++ b/src/PleskX/Api/InternalClient.php @@ -12,4 +12,14 @@ public function __construct() { parent::__construct('localhost', 0, 'sdk'); } -} \ No newline at end of file + + /** + * Setup login to execute requests under certain user + * + * @param $login + */ + public function setLogin($login) + { + $this->_login = $login; + } +} From 841fdc00887c473d0c0a0c4327a9539e1fa8bbed Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 7 Dec 2016 20:29:22 +0700 Subject: [PATCH 018/243] Skip DNS tests if DNS sub-system is turned off. --- tests/DnsTest.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 44d82149..d3cfd8da 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -8,9 +8,18 @@ class DnsTest extends TestCase */ private static $_webspace; + /** + * @var bool + */ + private static $_isDnsSupported; + public static function setUpBeforeClass() { parent::setUpBeforeClass(); + + $serviceStates = static::$_client->server()->getServiceStates(); + static::$_isDnsSupported = $serviceStates['dns'] && ('running' == $serviceStates['dns']['state']); + static::$_webspace = static::_createWebspace('example.dom'); } @@ -20,6 +29,15 @@ public static function tearDownAfterClass() static::$_client->webspace()->delete('id', static::$_webspace->id); } + protected function setUp() + { + parent::setUp(); + + if (!static::$_isDnsSupported) { + $this->markTestSkipped('DNS system is not supported.'); + } + } + public function testCreate() { $dns = static::$_client->dns()->create([ From 0ec7b144d00a7bc695bab6c03a2a607e1d945ad8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 7 Dec 2016 23:32:44 +0700 Subject: [PATCH 019/243] Reduce amount of code duplication for "get" operations. --- src/PleskX/Api/Operator.php | 29 ++++++++++++++++++++++++++ src/PleskX/Api/Operator/Customer.php | 31 ++-------------------------- src/PleskX/Api/Operator/Reseller.php | 19 +++++++++++------ src/PleskX/Api/Operator/Site.php | 25 +++------------------- src/PleskX/Api/Operator/Webspace.php | 16 ++++++++------ 5 files changed, 57 insertions(+), 63 deletions(-) diff --git a/src/PleskX/Api/Operator.php b/src/PleskX/Api/Operator.php index 01c2393c..b0e61b6f 100644 --- a/src/PleskX/Api/Operator.php +++ b/src/PleskX/Api/Operator.php @@ -57,4 +57,33 @@ protected function _delete($field, $value, $deleteMethodName = 'del') return 'ok' === (string)$response->status; } + /** + * @param string $structClass + * @param string $infoTag + * @param string|null $field + * @param integer|string|null $value + * @return mixed + */ + protected function _getItems($structClass, $infoTag, $field = null, $value = null) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $getTag->addChild('dataset')->addChild($infoTag); + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $items[] = new $structClass($xmlResult->data->$infoTag); + } + + return $items; + } + } diff --git a/src/PleskX/Api/Operator/Customer.php b/src/PleskX/Api/Operator/Customer.php index 32c54525..16824539 100644 --- a/src/PleskX/Api/Operator/Customer.php +++ b/src/PleskX/Api/Operator/Customer.php @@ -41,7 +41,7 @@ public function delete($field, $value) */ public function get($field, $value) { - $items = $this->_get($field, $value); + $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); return reset($items); } @@ -50,34 +50,7 @@ public function get($field, $value) */ public function getAll() { - return $this->_get(); - } - - /** - * @param string|null $field - * @param integer|string|null $value - * @return Struct\GeneralInfo|Struct\GeneralInfo[] - */ - private function _get($field = null, $value = null) - { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); - - $filterTag = $getTag->addChild('filter'); - if (!is_null($field)) { - $filterTag->addChild($field, $value); - } - - $getTag->addChild('dataset')->addChild('gen_info'); - - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); - - $customers = []; - foreach ($response->xpath('//result') as $xmlResult) { - $customers[] = new Struct\GeneralInfo($xmlResult->data->gen_info); - } - - return $customers; + return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } } diff --git a/src/PleskX/Api/Operator/Reseller.php b/src/PleskX/Api/Operator/Reseller.php index 5646d625..563c435d 100644 --- a/src/PleskX/Api/Operator/Reseller.php +++ b/src/PleskX/Api/Operator/Reseller.php @@ -34,6 +34,7 @@ public function delete($field, $value) return $this->_delete($field, $value); } + /** * @param string $field * @param integer|string $value @@ -41,12 +42,18 @@ public function delete($field, $value) */ public function get($field, $value) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); - $getTag->addChild('filter')->addChild($field, $value); - $getTag->addChild('dataset')->addChild('gen-info'); - $response = $this->_client->request($packet); - return new Struct\GeneralInfo($response->data->{'gen-info'}); + $items = $this->_getItems(Struct\GeneralInfo::class, 'gen-info', $field, $value); + return reset($items); + } + + /** + * @return Struct\GeneralInfo[] + */ + public function getAll() + { + return $this->_getItems(Struct\GeneralInfo::class, 'gen-info'); } + + } diff --git a/src/PleskX/Api/Operator/Site.php b/src/PleskX/Api/Operator/Site.php index f298c309..5a7734fb 100644 --- a/src/PleskX/Api/Operator/Site.php +++ b/src/PleskX/Api/Operator/Site.php @@ -42,35 +42,16 @@ public function delete($field, $value) */ public function get($field, $value) { - $items = $this->getAll($field, $value); + $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); return reset($items); } /** - * @param string $field - * @param integer|string $value * @return Struct\GeneralInfo[] */ - public function getAll($field = null, $value = null) + public function getAll() { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); - - $filterTag = $getTag->addChild('filter'); - if (!is_null($field)) { - $filterTag->addChild($field, $value); - } - - $getTag->addChild('dataset')->addChild('gen_info'); - - $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); - - $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - $items[] = new Struct\GeneralInfo($xmlResult->data->gen_info); - } - - return $items; + return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } } diff --git a/src/PleskX/Api/Operator/Webspace.php b/src/PleskX/Api/Operator/Webspace.php index b5247a9b..0b20b9be 100644 --- a/src/PleskX/Api/Operator/Webspace.php +++ b/src/PleskX/Api/Operator/Webspace.php @@ -74,12 +74,16 @@ public function delete($field, $value) */ public function get($field, $value) { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); - $getTag->addChild('filter')->addChild($field, $value); - $getTag->addChild('dataset')->addChild('gen_info'); - $response = $this->_client->request($packet); - return new Struct\GeneralInfo($response->data->gen_info); + $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + return reset($items); + } + + /** + * @return Struct\GeneralInfo[] + */ + public function getAll() + { + return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } } From 5147f35057625f2b1eb044cabeb0152b3d3cf173 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 7 Dec 2016 23:33:19 +0700 Subject: [PATCH 020/243] Check getAll behaviour for resellers. --- tests/ResellerTest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index fe5cde72..443ab86f 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -36,4 +36,26 @@ public function testGet() static::$_client->reseller()->delete('id', $reseller->id); } + public function testGetAll() + { + static::$_client->reseller()->create([ + 'pname' => 'John Reseller', + 'login' => 'reseller-a', + 'passwd' => 'simple-password', + ]); + static::$_client->reseller()->create([ + 'pname' => 'Mike Reseller', + 'login' => 'reseller-b', + 'passwd' => 'simple-password', + ]); + + $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'); + } + } From 7968718a5631e55faed1b12f67135a98ffa0e2e9 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Tue, 13 Dec 2016 14:14:29 +0700 Subject: [PATCH 021/243] Add permissions node to reseller's get operations --- src/PleskX/Api/Operator/Reseller.php | 29 +++++++++++++++++-- .../Api/Struct/Reseller/GeneralInfo.php | 15 ++++++++-- tests/ResellerTest.php | 1 + 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/PleskX/Api/Operator/Reseller.php b/src/PleskX/Api/Operator/Reseller.php index 563c435d..e0a7f694 100644 --- a/src/PleskX/Api/Operator/Reseller.php +++ b/src/PleskX/Api/Operator/Reseller.php @@ -42,16 +42,39 @@ public function delete($field, $value) */ public function get($field, $value) { - $items = $this->_getItems(Struct\GeneralInfo::class, 'gen-info', $field, $value); + $items = $this->getAll($field, $value); return reset($items); } /** + * @param string $field + * @param integer|string $value * @return Struct\GeneralInfo[] */ - public function getAll() + public function getAll($field = null, $value = null) { - return $this->_getItems(Struct\GeneralInfo::class, 'gen-info'); + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $datasetTag = $getTag->addChild('dataset'); + $datasetTag->addChild('gen-info'); + $datasetTag->addChild('permissions'); + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $item = new Struct\GeneralInfo($xmlResult->data); + $item->id = (int)$xmlResult->id; + $items[] = $item; + } + + return $items; } diff --git a/src/PleskX/Api/Struct/Reseller/GeneralInfo.php b/src/PleskX/Api/Struct/Reseller/GeneralInfo.php index 1791d1de..8a9232bf 100644 --- a/src/PleskX/Api/Struct/Reseller/GeneralInfo.php +++ b/src/PleskX/Api/Struct/Reseller/GeneralInfo.php @@ -5,17 +5,28 @@ class GeneralInfo extends \PleskX\Api\Struct { + /** @var int */ + public $id; + /** @var string */ public $personalName; /** @var string */ public $login; + /** @var array */ + public $permissions; + public function __construct($apiResponse) { - $this->_initScalarProperties($apiResponse, [ + $this->_initScalarProperties($apiResponse->{'gen-info'}, [ ['pname' => 'personalName'], 'login', ]); + + $this->permissions = []; + foreach ($apiResponse->permissions->permission as $permissionInfo) { + $this->permissions[(string)$permissionInfo->name] = (string)$permissionInfo->value; + } } -} \ No newline at end of file +} diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 443ab86f..f59f61d8 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -32,6 +32,7 @@ public function testGet() $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)); static::$_client->reseller()->delete('id', $reseller->id); } From 650c1ef625bb4a76b8d5d69e2d335d748a28452a Mon Sep 17 00:00:00 2001 From: Serguei Milke Date: Thu, 29 Dec 2016 16:47:23 +0700 Subject: [PATCH 022/243] prevented incorrect handling of empty secret key list --- src/PleskX/Api/Operator/SecretKey.php | 4 ++-- tests/SecretKeyTest.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/PleskX/Api/Operator/SecretKey.php b/src/PleskX/Api/Operator/SecretKey.php index 8e139cdd..8d3c0f1a 100644 --- a/src/PleskX/Api/Operator/SecretKey.php +++ b/src/PleskX/Api/Operator/SecretKey.php @@ -65,8 +65,8 @@ public function _get($keyId = null) $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); $items = []; - foreach ($response->xpath('//result') as $xmlResult) { - $items[] = new Struct\Info($xmlResult->key_info); + foreach ($response->xpath('//result/key_info') as $keyInfo) { + $items[] = new Struct\Info($keyInfo); } return $items; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index e5e96bcb..7354ebca 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -51,4 +51,14 @@ public function testDelete() } } + public function testListEmpty() + { + $keys = $this->_client->secretKey()->getAll(); + foreach ($keys as $key) { + $this->_client->secretKey()->delete($key->key); + } + + $keys = $this->_client->secretKey()->getAll(); + $this->assertEquals(0, count($keys)); + } } From 9db5f0258e8d4418ded169e7da9a19fe9aa78bd8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 5 Jan 2017 21:47:42 +0700 Subject: [PATCH 023/243] Align minimal PHP version with used constructions. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 14d9cccb..993c214b 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.3.0" + "php": ">=5.5.0" }, "require-dev": { "phpunit/phpunit": "5.5.*", From 3f7d3d68c0ac1e9414db6717b589ae2b4c654f0e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 5 Jan 2017 23:33:05 +0700 Subject: [PATCH 024/243] Switch to PHP 5.6 for compliance with Plesk itself. --- composer.json | 2 +- composer.lock | 156 +++++++++++++++++++++++++------------------------- 2 files changed, 79 insertions(+), 79 deletions(-) diff --git a/composer.json b/composer.json index 993c214b..44e60fa7 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.5.0" + "php": ">=5.6.0" }, "require-dev": { "phpunit/phpunit": "5.5.*", diff --git a/composer.lock b/composer.lock index a41b7e01..24274fc1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8597573d81302570cfe6d72c0be686c0", - "content-hash": "c0c8d9dae72af87fb0c980308571d50d", + "hash": "68c35c846e7d490af6ad1a0ed1e88a8b", + "content-hash": "83bd5960d11896b7812351c0227a0479", "packages": [], "packages-dev": [ { @@ -205,16 +205,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "0.2", + "version": "0.2.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", "shasum": "" }, "require": { @@ -248,7 +248,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10 07:14:17" + "time": "2016-11-25 06:54:22" }, { "name": "phpspec/prophecy", @@ -256,12 +256,12 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "5c324f4951aca87a2de61b7903b75126516b6386" + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/5c324f4951aca87a2de61b7903b75126516b6386", - "reference": "5c324f4951aca87a2de61b7903b75126516b6386", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", "shasum": "" }, "require": { @@ -269,11 +269,11 @@ "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" + "sebastian/recursion-context": "^1.0|^2.0" }, "require-dev": { "phpspec/phpspec": "^2.0", - "phpunit/phpunit": "^4.8 || ^5" + "phpunit/phpunit": "^4.8 || ^5.6.5" }, "type": "library", "extra": { @@ -311,7 +311,7 @@ "spy", "stub" ], - "time": "2016-10-02 13:12:17" + "time": "2016-11-21 14:58:47" }, { "name": "phpunit/dbunit", @@ -319,20 +319,20 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/dbunit.git", - "reference": "38f88a393cbdb50c78287a7b84dc1439a3afa518" + "reference": "4de41a2191690e8e1ad4d5197964f21cf1f975ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/38f88a393cbdb50c78287a7b84dc1439a3afa518", - "reference": "38f88a393cbdb50c78287a7b84dc1439a3afa518", + "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/4de41a2191690e8e1ad4d5197964f21cf1f975ba", + "reference": "4de41a2191690e8e1ad4d5197964f21cf1f975ba", "shasum": "" }, "require": { "ext-pdo": "*", "ext-simplexml": "*", - "php": ">=5.4", - "phpunit/phpunit": "~4|~5", - "symfony/yaml": "~2.1|~3.0" + "php": "^5.4 || ^7.0", + "phpunit/phpunit": "^4.0 || ^5.0", + "symfony/yaml": "^2.1 || ^3.0" }, "bin": [ "dbunit" @@ -366,20 +366,20 @@ "testing", "xunit" ], - "time": "2016-08-18 09:31:47" + "time": "2017-01-04 08:08:01" }, { "name": "phpunit/php-code-coverage", - "version": "dev-master", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d" + "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6cba06ff75a1a63a71033e1a01b89056f3af1e8d", - "reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c14196e64a78570034afd0b7a9f3757ba71c2a0a", + "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a", "shasum": "" }, "require": { @@ -429,7 +429,7 @@ "testing", "xunit" ], - "time": "2016-11-01 05:06:24" + "time": "2016-12-20 15:22:42" }, { "name": "phpunit/php-file-iterator", @@ -480,7 +480,7 @@ }, { "name": "phpunit/php-invoker", - "version": "dev-master", + "version": "1.1.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", @@ -615,12 +615,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "2ef59c57cd196301eeb88865d25916898dd72872" + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/2ef59c57cd196301eeb88865d25916898dd72872", - "reference": "2ef59c57cd196301eeb88865d25916898dd72872", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", "shasum": "" }, "require": { @@ -656,7 +656,7 @@ "keywords": [ "tokenizer" ], - "time": "2016-10-03 07:38:46" + "time": "2016-11-15 14:06:22" }, { "name": "phpunit/phpunit", @@ -664,12 +664,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3f67cee782c9abfaee5e32fd2f57cdd54bc257ba" + "reference": "753fa2e14499ed64e7bb0bfff249d2b6ab06d41c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3f67cee782c9abfaee5e32fd2f57cdd54bc257ba", - "reference": "3f67cee782c9abfaee5e32fd2f57cdd54bc257ba", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/753fa2e14499ed64e7bb0bfff249d2b6ab06d41c", + "reference": "753fa2e14499ed64e7bb0bfff249d2b6ab06d41c", "shasum": "" }, "require": { @@ -681,12 +681,12 @@ "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0.1", + "phpunit/php-code-coverage": "^4.0.4", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.1", + "sebastian/comparator": "~1.2.2", "sebastian/diff": "~1.2", "sebastian/environment": "^1.3 || ^2.0", "sebastian/exporter": "~1.2", @@ -739,27 +739,27 @@ "testing", "xunit" ], - "time": "2016-10-03 13:04:15" + "time": "2016-12-31 06:55:17" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.4.0", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "238d7a2723bce689c79eeac9c7d5e1d623bb9dc2" + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/238d7a2723bce689c79eeac9c7d5e1d623bb9dc2", - "reference": "238d7a2723bce689c79eeac9c7d5e1d623bb9dc2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.6 || ^7.0", "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2" + "sebastian/exporter": "^1.2 || ^2.0" }, "conflict": { "phpunit/phpunit": "<5.4.0" @@ -798,7 +798,7 @@ "mock", "xunit" ], - "time": "2016-10-09 07:01:45" + "time": "2016-12-08 20:27:08" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -806,12 +806,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "0a16efaff1cb18cf03d612d54e449db4a9e138c6" + "reference": "99805768a703b1b8200354f6cfe4269f4c5372b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/0a16efaff1cb18cf03d612d54e449db4a9e138c6", - "reference": "0a16efaff1cb18cf03d612d54e449db4a9e138c6", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/99805768a703b1b8200354f6cfe4269f4c5372b8", + "reference": "99805768a703b1b8200354f6cfe4269f4c5372b8", "shasum": "" }, "require": { @@ -843,7 +843,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-10-03 07:37:58" + "time": "2016-12-06 20:00:09" }, { "name": "sebastian/comparator", @@ -851,21 +851,21 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "21400bd9503c3782f5ee80349117483dcf8cec3f" + "reference": "2f09d5a251c4a92d1a80518c2166b5d0d742bc63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/21400bd9503c3782f5ee80349117483dcf8cec3f", - "reference": "21400bd9503c3782f5ee80349117483dcf8cec3f", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2f09d5a251c4a92d1a80518c2166b5d0d742bc63", + "reference": "2f09d5a251c4a92d1a80518c2166b5d0d742bc63", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^5.3.3 || ^7.0", + "sebastian/diff": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8" }, "type": "library", "extra": { @@ -907,7 +907,7 @@ "compare", "equality" ], - "time": "2016-10-03 07:45:42" + "time": "2016-12-10 08:07:52" }, { "name": "sebastian/diff", @@ -967,12 +967,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "845620270f5b0714beeefd161efc0d7878d2a6d9" + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/845620270f5b0714beeefd161efc0d7878d2a6d9", - "reference": "845620270f5b0714beeefd161efc0d7878d2a6d9", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "shasum": "" }, "require": { @@ -1009,11 +1009,11 @@ "environment", "hhvm" ], - "time": "2016-10-03 07:36:49" + "time": "2016-11-26 07:53:53" }, { "name": "sebastian/exporter", - "version": "dev-master", + "version": "1.2.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", @@ -1080,23 +1080,23 @@ }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "1.1.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d", + "reference": "5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.2|~5.0" }, "suggest": { "ext-uopz": "*" @@ -1127,11 +1127,11 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2016-10-03 07:46:22" }, { "name": "sebastian/object-enumerator", - "version": "dev-master", + "version": "1.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", @@ -1177,7 +1177,7 @@ }, { "name": "sebastian/recursion-context", - "version": "dev-master", + "version": "1.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", @@ -1319,12 +1319,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e0c8bd45fdab197ccdd4723125e4ed424f54288d" + "reference": "22c2fd4103c7271ddcce21cab30e1919275e239b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e0c8bd45fdab197ccdd4723125e4ed424f54288d", - "reference": "e0c8bd45fdab197ccdd4723125e4ed424f54288d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/22c2fd4103c7271ddcce21cab30e1919275e239b", + "reference": "22c2fd4103c7271ddcce21cab30e1919275e239b", "shasum": "" }, "require": { @@ -1339,7 +1339,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -1366,7 +1366,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2016-11-06 16:24:48" + "time": "2017-01-03 13:51:44" }, { "name": "webmozart/assert", @@ -1374,12 +1374,12 @@ "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "c0c92082a2ffef8fab7941d4f6fd6a6a72ed627c" + "reference": "4a8bf11547e139e77b651365113fc12850c43d9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/c0c92082a2ffef8fab7941d4f6fd6a6a72ed627c", - "reference": "c0c92082a2ffef8fab7941d4f6fd6a6a72ed627c", + "url": "https://api.github.com/repos/webmozart/assert/zipball/4a8bf11547e139e77b651365113fc12850c43d9a", + "reference": "4a8bf11547e139e77b651365113fc12850c43d9a", "shasum": "" }, "require": { @@ -1392,7 +1392,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1416,7 +1416,7 @@ "check", "validate" ], - "time": "2016-10-17 06:50:33" + "time": "2016-11-23 20:04:41" } ], "aliases": [], @@ -1425,7 +1425,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.3.0" + "php": ">=5.6.0" }, "platform-dev": [] } From 50a7e19a4b41859d4abc8754ef58f1522fc094ac Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 5 Jan 2017 23:34:07 +0700 Subject: [PATCH 025/243] Fix the access to API client. --- tests/SecretKeyTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 7354ebca..a6bef2ca 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -53,12 +53,12 @@ public function testDelete() public function testListEmpty() { - $keys = $this->_client->secretKey()->getAll(); + $keys = static::$_client->secretKey()->getAll(); foreach ($keys as $key) { - $this->_client->secretKey()->delete($key->key); + static::$_client->secretKey()->delete($key->key); } - $keys = $this->_client->secretKey()->getAll(); + $keys = static::$_client->secretKey()->getAll(); $this->assertEquals(0, count($keys)); } } From f5033bdbfeda9a60952a0251bd33f880d21330c6 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 5 Jan 2017 23:55:30 +0700 Subject: [PATCH 026/243] Under certain circumstances company name can be empty, do not fail on it. --- tests/ServerTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 94288d10..19e40f51 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -30,7 +30,6 @@ public function testGetPreferences() public function testGetAdmin() { $admin = static::$_client->server()->getAdmin(); - $this->assertGreaterThan(0, strlen($admin->companyName)); $this->assertGreaterThan(0, strlen($admin->name)); $this->assertContains('@', $admin->email); } From 5e8b83123c2e2d67ea2b8dcbc13158bff18271ea Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 6 Jan 2017 00:48:06 +0700 Subject: [PATCH 027/243] Initial draft of ability to develop and test the library using Docker. --- Dockerfile | 5 +++++ docker-compose.yml | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..2d127c45 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM php:5.6-cli + +RUN mkdir /opt/api-php-lib +RUN docker-php-ext-install pcntl \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..7b909b68 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '2' +services: + plesk: + image: plesk/plesk:17.0 + logging: + driver: none + tests: + build: . + environment: + REMOTE_URL: https://plesk:8443 + REMOTE_PASSWORD: changeme + command: bash -c "cd /opt/api-php-lib && composer install && composer test" + depends_on: + - plesk + links: + - plesk + volumes: + - .:/opt/api-php-lib + From 1a124a4c3dda7aa38d825516cceb164ff387a6b0 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Fri, 10 Mar 2017 14:46:19 +0700 Subject: [PATCH 028/243] Fix webspace creation in tests on Windows --- tests/TestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index a8b82aac..2363f507 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -45,7 +45,7 @@ protected static function _createWebspace($name) 'ip_address' => static::_getIpAddress(), ], [ 'ftp_login' => 'test-login', - 'ftp_password' => 'test-password', + 'ftp_password' => 'TEST-password', ]); } From ce2e3b24074cf92d9b8e90f26b196a479c2d3135 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Fri, 10 Mar 2017 15:39:58 +0700 Subject: [PATCH 029/243] Extends "create subdomain" command: add property node --- src/PleskX/Api/Operator/Subdomain.php | 8 ++++++++ tests/SubdomainTest.php | 21 +++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/PleskX/Api/Operator/Subdomain.php b/src/PleskX/Api/Operator/Subdomain.php index d1f19522..db5fb473 100644 --- a/src/PleskX/Api/Operator/Subdomain.php +++ b/src/PleskX/Api/Operator/Subdomain.php @@ -16,6 +16,14 @@ public function create($properties) $info = $packet->addChild($this->_wrapperTag)->addChild('add'); foreach ($properties as $name => $value) { + if (is_array($value)) { + foreach ($value as $propertyName => $propertyValue) { + $property = $info->addChild($name); + $property->addChild('name', $propertyName); + $property->addChild('value', $propertyValue); + } + continue; + } $info->addChild($name, $value); } diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index d7056f22..e9f23745 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -30,6 +30,9 @@ private function _createSubdomain($name) return static::$_client->subdomain()->create([ 'parent' => 'example.dom', 'name' => $name, + 'property' => [ + 'www_root' => $name, + ] ]); } @@ -53,23 +56,29 @@ public function testDelete() public function testGet() { - $subdomain = $this->_createSubdomain('sub'); + $name = 'sub'; + $subdomain = $this->_createSubdomain($name); $subdomainInfo = static::$_client->subdomain()->get('id', $subdomain->id); - $this->assertEquals('sub.' . $subdomainInfo->parent, $subdomainInfo->name); + $this->assertEquals($name . '.' . $subdomainInfo->parent, $subdomainInfo->name); + $this->assertTrue(false !== strpos($subdomainInfo->properties['www_root'], $name)); static::$_client->subdomain()->delete('id', $subdomain->id); } public function testGetAll() { - $subdomain = $this->_createSubdomain('sub'); - $subdomain2 = $this->_createSubdomain('sub2'); + $name = 'sub'; + $name2 = 'sub2'; + $subdomain = $this->_createSubdomain($name); + $subdomain2 = $this->_createSubdomain($name2); $subdomainsInfo = static::$_client->subdomain()->getAll(); $this->assertCount(2, $subdomainsInfo); - $this->assertEquals('sub.' . $subdomainsInfo[0]->parent, $subdomainsInfo[0]->name); - $this->assertEquals('sub2.' . $subdomainsInfo[1]->parent, $subdomainsInfo[1]->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->assertTrue(false !== strpos($subdomainsInfo[1]->properties['www_root'], $name2)); static::$_client->subdomain()->delete('id', $subdomain->id); static::$_client->subdomain()->delete('id', $subdomain2->id); From de34485119cd6eeb8c15e8ab1bc9b406da80bcb1 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Wed, 22 Mar 2017 16:45:57 +0700 Subject: [PATCH 030/243] Add possibility to specify version of protocol for Internal client (pm_ApiRpc) --- src/PleskX/Api/Client.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index f863b110..8942572b 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -137,8 +137,9 @@ public function request($request, $mode = self::RESPONSE_SHORT) } if ('sdk' == $this->_protocol) { + $version = ('' == $this->_version) ? null : $this->_version; $requestXml = new SimpleXMLElement((string)$request); - $xml = \pm_ApiRpc::getService()->call($requestXml->children()[0]->asXml(), $this->_login); + $xml = \pm_ApiRpc::getService($version)->call($requestXml->children()[0]->asXml(), $this->_login); } else { $xml = $this->_performHttpRequest($request); } From 402aa31bb5f7a3e3dbb9ac2e72b085be4ce807bb Mon Sep 17 00:00:00 2001 From: Alexey Filatev Date: Sun, 26 Mar 2017 17:40:35 +0600 Subject: [PATCH 031/243] Add ability to retrieve site hosting properties --- src/PleskX/Api/Operator.php | 6 +++- src/PleskX/Api/Operator/Site.php | 27 ++++++++++++++++++ src/PleskX/Api/Struct/Site/HostingInfo.php | 23 +++++++++++++++ tests/SiteTest.php | 33 ++++++++++++++++++++-- 4 files changed, 85 insertions(+), 4 deletions(-) mode change 100644 => 100755 src/PleskX/Api/Operator.php mode change 100644 => 100755 src/PleskX/Api/Operator/Site.php create mode 100755 src/PleskX/Api/Struct/Site/HostingInfo.php mode change 100644 => 100755 tests/SiteTest.php diff --git a/src/PleskX/Api/Operator.php b/src/PleskX/Api/Operator.php old mode 100644 new mode 100755 index b0e61b6f..c4880e8b --- a/src/PleskX/Api/Operator.php +++ b/src/PleskX/Api/Operator.php @@ -62,9 +62,10 @@ protected function _delete($field, $value, $deleteMethodName = 'del') * @param string $infoTag * @param string|null $field * @param integer|string|null $value + * @param callable|null $filter * @return mixed */ - protected function _getItems($structClass, $infoTag, $field = null, $value = null) + protected function _getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null) { $packet = $this->_client->getPacket(); $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); @@ -80,6 +81,9 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul $items = []; foreach ($response->xpath('//result') as $xmlResult) { + if (!is_null($filter) && !$filter($xmlResult->data->$infoTag)) { + continue; + } $items[] = new $structClass($xmlResult->data->$infoTag); } diff --git a/src/PleskX/Api/Operator/Site.php b/src/PleskX/Api/Operator/Site.php old mode 100644 new mode 100755 index 5a7734fb..106110b6 --- a/src/PleskX/Api/Operator/Site.php +++ b/src/PleskX/Api/Operator/Site.php @@ -6,6 +6,7 @@ class Site extends \PleskX\Api\Operator { + const PROPERTIES_HOSTING = 'hosting'; /** * @param array $properties @@ -18,9 +19,22 @@ public function create(array $properties) $infoGeneral = $info->addChild('gen_setup'); foreach ($properties as $name => $value) { + if (!is_scalar($value)) { + continue; + } $infoGeneral->addChild($name, $value); } + // set hosting properties + if (isset($properties[static::PROPERTIES_HOSTING]) && is_array($properties[static::PROPERTIES_HOSTING])) { + $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); + } + } + $response = $this->_client->request($packet); return new Struct\Info($response); } @@ -46,6 +60,19 @@ public function get($field, $value) return reset($items); } + /** + * @param string $field + * @param integer|string $value + * @return Struct\HostingInfo|null + */ + public function getHosting($field, $value) + { + $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function ($node) { + return isset($node->vrt_hst); + }); + return empty($items) ? null : reset($items); + } + /** * @return Struct\GeneralInfo[] */ diff --git a/src/PleskX/Api/Struct/Site/HostingInfo.php b/src/PleskX/Api/Struct/Site/HostingInfo.php new file mode 100755 index 00000000..96bea6e6 --- /dev/null +++ b/src/PleskX/Api/Struct/Site/HostingInfo.php @@ -0,0 +1,23 @@ +vrt_hst->property as $property) { + $this->properties[(string)$property->name] = (string)$property->value; + } + $this->_initScalarProperties($apiResponse->vrt_hst, [ + 'ip_address', + ]); + } +} \ No newline at end of file diff --git a/tests/SiteTest.php b/tests/SiteTest.php old mode 100644 new mode 100755 index 699dab12..9205cf92 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -20,12 +20,13 @@ public static function tearDownAfterClass() static::$_client->webspace()->delete('id', static::$_webspace->id); } - private function _createSite($name) + private function _createSite($name, array $properties = []) { - return static::$_client->site()->create([ + $properties = array_merge([ 'name' => $name, 'webspace-id' => static::$_webspace->id, - ]); + ], $properties); + return static::$_client->site()->create($properties); } public function testCreate() @@ -56,6 +57,32 @@ public function testGet() static::$_client->site()->delete('id', $site->id); } + public function testGetHostingWoHosting() + { + $site = $this->_createSite('addon.dom'); + + $siteHosting = static::$_client->site()->getHosting('id', $site->id); + $this->assertNull($siteHosting); + + static::$_client->site()->delete('id', $site->id); + } + + public function testGetHostingWithHosting() + { + $properties = [ + 'hosting' => [ + 'www_root' => 'addon.dom' + ] + ]; + $site = $this->_createSite('addon.dom', $properties); + + $siteHosting = static::$_client->site()->getHosting('id', $site->id); + $this->assertArrayHasKey('www_root', $siteHosting->properties); + $this->assertEquals('addon.dom', basename($siteHosting->properties['www_root'])); + + static::$_client->site()->delete('id', $site->id); + } + public function testGetAll() { $site = $this->_createSite('addon.dom'); From bf66beceed171dc7b5fcf02c34da439c933a6ea8 Mon Sep 17 00:00:00 2001 From: Alexey Filatev Date: Mon, 27 Mar 2017 11:42:18 +0600 Subject: [PATCH 032/243] Add new line into and of file --- src/PleskX/Api/Struct/Site/HostingInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PleskX/Api/Struct/Site/HostingInfo.php b/src/PleskX/Api/Struct/Site/HostingInfo.php index 96bea6e6..db1af385 100755 --- a/src/PleskX/Api/Struct/Site/HostingInfo.php +++ b/src/PleskX/Api/Struct/Site/HostingInfo.php @@ -20,4 +20,4 @@ public function __construct($apiResponse) 'ip_address', ]); } -} \ No newline at end of file +} From 5d778aa5fe39c802bcdc17dd1250f1d646c471ac Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sun, 2 Jul 2017 18:25:47 +0700 Subject: [PATCH 033/243] Switch to latest PHPUnit for PHP 5 branch. --- composer.json | 5 +- composer.lock | 262 +++++++++++++++++++++++++------------------------- 2 files changed, 136 insertions(+), 131 deletions(-) diff --git a/composer.json b/composer.json index 44e60fa7..c651082e 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,10 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "5.5.*", + "phpunit/phpunit": "5.7.*", "phpunit/php-invoker": "*", - "phpunit/dbunit": ">=1.2" + "phpunit/dbunit": ">=1.2", + "sebastian/environment": "^2.0" }, "config": { "process-timeout": 0 diff --git a/composer.lock b/composer.lock index 24274fc1..c3feeca5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "68c35c846e7d490af6ad1a0ed1e88a8b", - "content-hash": "83bd5960d11896b7812351c0227a0479", + "hash": "fbc1f466b0f53331ec17c695470701dd", + "content-hash": "ba2fb56608e462276a5906cda2aa30cb", "packages": [], "packages-dev": [ { @@ -14,12 +14,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a" + "reference": "5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/416fb8ad1d095a87f1d21bc40711843cd122fd4a", - "reference": "416fb8ad1d095a87f1d21bc40711843cd122fd4a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5", + "reference": "5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5", "shasum": "" }, "require": { @@ -60,20 +60,20 @@ "constructor", "instantiate" ], - "time": "2016-03-31 10:24:22" + "time": "2017-02-16 16:15:51" }, { "name": "myclabs/deep-copy", - "version": "1.5.5", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108" + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/399c1f9781e222f6eb6cc238796f5200d1b7f108", - "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", "shasum": "" }, "require": { @@ -102,7 +102,7 @@ "object", "object graph" ], - "time": "2016-10-31 17:19:45" + "time": "2017-04-12 18:52:22" }, { "name": "phpdocumentor/reflection-common", @@ -110,12 +110,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "a046af61c36e9162372f205de091a1cab7340f1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/a046af61c36e9162372f205de091a1cab7340f1c", + "reference": "a046af61c36e9162372f205de091a1cab7340f1c", "shasum": "" }, "require": { @@ -156,7 +156,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2017-04-30 11:58:12" }, { "name": "phpdocumentor/reflection-docblock", @@ -256,29 +256,29 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" + "reference": "79db5dd907ee977039f77ac8471a739497463429" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/79db5dd907ee977039f77ac8471a739497463429", + "reference": "79db5dd907ee977039f77ac8471a739497463429", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0|^2.0" + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.0", + "phpspec/phpspec": "^2.5|^3.2", "phpunit/phpunit": "^4.8 || ^5.6.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -311,11 +311,11 @@ "spy", "stub" ], - "time": "2016-11-21 14:58:47" + "time": "2017-05-31 16:22:32" }, { "name": "phpunit/dbunit", - "version": "dev-master", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/dbunit.git", @@ -374,31 +374,31 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a" + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c14196e64a78570034afd0b7a9f3757ba71c2a0a", - "reference": "c14196e64a78570034afd0b7a9f3757ba71c2a0a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "shasum": "" }, "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "~1.0|~2.0" + "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "^5.4" + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { @@ -429,7 +429,7 @@ "testing", "xunit" ], - "time": "2016-12-20 15:22:42" + "time": "2017-04-02 07:44:40" }, { "name": "phpunit/php-file-iterator", @@ -567,25 +567,30 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "d107f347d368dd8a384601398280c7c608390ab7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/d107f347d368dd8a384601398280c7c608390ab7", + "reference": "d107f347d368dd8a384601398280c7c608390ab7", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -607,7 +612,7 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2017-03-07 15:42:04" }, { "name": "phpunit/php-token-stream", @@ -615,25 +620,25 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" + "reference": "9ddb181faa4a3841fe131c357fd01de75cbb4da9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9ddb181faa4a3841fe131c357fd01de75cbb4da9", + "reference": "9ddb181faa4a3841fe131c357fd01de75cbb4da9", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -656,20 +661,20 @@ "keywords": [ "tokenizer" ], - "time": "2016-11-15 14:06:22" + "time": "2017-03-07 07:36:57" }, { "name": "phpunit/phpunit", - "version": "5.5.x-dev", + "version": "5.7.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "753fa2e14499ed64e7bb0bfff249d2b6ab06d41c" + "reference": "c0c61c97be37e1c77ab61ad73448e9208c05aade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/753fa2e14499ed64e7bb0bfff249d2b6ab06d41c", - "reference": "753fa2e14499ed64e7bb0bfff249d2b6ab06d41c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c0c61c97be37e1c77ab61ad73448e9208c05aade", + "reference": "c0c61c97be37e1c77ab61ad73448e9208c05aade", "shasum": "" }, "require": { @@ -680,20 +685,20 @@ "ext-xml": "*", "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.3.1", + "phpspec/prophecy": "^1.6.2", "phpunit/php-code-coverage": "^4.0.4", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3 || ^2.0", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/object-enumerator": "~1.0", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", + "sebastian/version": "~1.0.3|~2.0", "symfony/yaml": "~2.1|~3.0" }, "conflict": { @@ -703,7 +708,6 @@ "ext-pdo": "*" }, "suggest": { - "ext-tidy": "*", "ext-xdebug": "*", "phpunit/php-invoker": "~1.1" }, @@ -713,7 +717,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.5.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -739,7 +743,7 @@ "testing", "xunit" ], - "time": "2016-12-31 06:55:17" + "time": "2017-06-23 12:45:27" }, { "name": "phpunit/phpunit-mock-objects", @@ -747,12 +751,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" + "reference": "4001a301f86fc006c32f532a741ab613f2bd8990" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/4001a301f86fc006c32f532a741ab613f2bd8990", + "reference": "4001a301f86fc006c32f532a741ab613f2bd8990", "shasum": "" }, "require": { @@ -798,7 +802,7 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "time": "2017-03-07 08:47:31" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -806,19 +810,19 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "99805768a703b1b8200354f6cfe4269f4c5372b8" + "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/99805768a703b1b8200354f6cfe4269f4c5372b8", - "reference": "99805768a703b1b8200354f6cfe4269f4c5372b8", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/3488be0a7b346cd6e5361510ed07e88f9bea2e88", + "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -843,29 +847,29 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-12-06 20:00:09" + "time": "2017-03-04 10:23:55" }, { "name": "sebastian/comparator", - "version": "dev-master", + "version": "1.2.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2f09d5a251c4a92d1a80518c2166b5d0d742bc63" + "reference": "18a5d97c25f408f48acaf6d1b9f4079314c5996a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2f09d5a251c4a92d1a80518c2166b5d0d742bc63", - "reference": "2f09d5a251c4a92d1a80518c2166b5d0d742bc63", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/18a5d97c25f408f48acaf6d1b9f4079314c5996a", + "reference": "18a5d97c25f408f48acaf6d1b9f4079314c5996a", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", - "sebastian/diff": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { @@ -907,27 +911,27 @@ "compare", "equality" ], - "time": "2016-12-10 08:07:52" + "time": "2017-03-07 10:34:43" }, { "name": "sebastian/diff", - "version": "dev-master", + "version": "1.4.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "d0814318784b7756fb932116acd19ee3b0cbe67a" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/d0814318784b7756fb932116acd19ee3b0cbe67a", - "reference": "d0814318784b7756fb932116acd19ee3b0cbe67a", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -959,11 +963,11 @@ "keywords": [ "diff" ], - "time": "2016-10-03 07:45:03" + "time": "2017-05-22 07:24:03" }, { "name": "sebastian/environment", - "version": "dev-master", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", @@ -1013,30 +1017,30 @@ }, { "name": "sebastian/exporter", - "version": "1.2.x-dev", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7dfcd2418aacbdb5e123fb23ac735acfdd6c588d" + "reference": "5e8e30670c3f36481e75211dbbcfd029a41ebf07" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7dfcd2418aacbdb5e123fb23ac735acfdd6c588d", - "reference": "7dfcd2418aacbdb5e123fb23ac735acfdd6c588d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/5e8e30670c3f36481e75211dbbcfd029a41ebf07", + "reference": "5e8e30670c3f36481e75211dbbcfd029a41ebf07", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^5.3.3 || ^7.0", + "sebastian/recursion-context": "^2.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1076,7 +1080,7 @@ "export", "exporter" ], - "time": "2016-10-03 07:44:30" + "time": "2017-03-07 10:36:49" }, { "name": "sebastian/global-state", @@ -1084,12 +1088,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d" + "reference": "cea85a84b00f2795341ebbbca4fa396347f2494e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d", - "reference": "5a2b9ba59e8cf82fd1fdd7efb7d7846fd69ac36d", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/cea85a84b00f2795341ebbbca4fa396347f2494e", + "reference": "cea85a84b00f2795341ebbbca4fa396347f2494e", "shasum": "" }, "require": { @@ -1127,33 +1131,33 @@ "keywords": [ "global state" ], - "time": "2016-10-03 07:46:22" + "time": "2017-02-23 14:11:06" }, { "name": "sebastian/object-enumerator", - "version": "1.0.x-dev", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1a7e888dce73bd3c1deedb345fce00329c75b065" + "reference": "c956fe7a68318639f694fc6bba0c89b7cdf1b08c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1a7e888dce73bd3c1deedb345fce00329c75b065", - "reference": "1a7e888dce73bd3c1deedb345fce00329c75b065", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/c956fe7a68318639f694fc6bba0c89b7cdf1b08c", + "reference": "c956fe7a68318639f694fc6bba0c89b7cdf1b08c", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~1.0" + "php": "^5.6 || ^7.0", + "sebastian/recursion-context": "^2.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1173,20 +1177,20 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-10-03 07:42:27" + "time": "2017-03-07 10:37:45" }, { "name": "sebastian/recursion-context", - "version": "1.0.x-dev", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "reference": "7e4d7c56f6e65d215f71ad913a5256e5439aca1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/7e4d7c56f6e65d215f71ad913a5256e5439aca1c", + "reference": "7e4d7c56f6e65d215f71ad913a5256e5439aca1c", "shasum": "" }, "require": { @@ -1198,7 +1202,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1226,7 +1230,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03 07:41:43" + "time": "2017-03-08 08:21:15" }, { "name": "sebastian/resource-operations", @@ -1315,23 +1319,23 @@ }, { "name": "symfony/yaml", - "version": "dev-master", + "version": "3.4.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "22c2fd4103c7271ddcce21cab30e1919275e239b" + "reference": "1faeaf2aa8180967d80329213f77c1bcb75fe4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/22c2fd4103c7271ddcce21cab30e1919275e239b", - "reference": "22c2fd4103c7271ddcce21cab30e1919275e239b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/1faeaf2aa8180967d80329213f77c1bcb75fe4fa", + "reference": "1faeaf2aa8180967d80329213f77c1bcb75fe4fa", "shasum": "" }, "require": { "php": ">=5.5.9" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~2.8|~3.0|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1339,7 +1343,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1366,7 +1370,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2017-01-03 13:51:44" + "time": "2017-06-24 09:47:31" }, { "name": "webmozart/assert", From 0f382177de4230630d6c592d078c2476489eb690 Mon Sep 17 00:00:00 2001 From: dpfaffenbauer Date: Thu, 6 Jul 2017 14:15:51 +0200 Subject: [PATCH 034/243] add plan-name to Webspace Operator --- src/PleskX/Api/Operator/Webspace.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PleskX/Api/Operator/Webspace.php b/src/PleskX/Api/Operator/Webspace.php index 0b20b9be..e7766e53 100644 --- a/src/PleskX/Api/Operator/Webspace.php +++ b/src/PleskX/Api/Operator/Webspace.php @@ -28,9 +28,10 @@ public function getPhysicalHostingDescriptor() /** * @param array $properties * @param array|null $hostingProperties + * @param $planName * @return Struct\Info */ - public function create(array $properties, array $hostingProperties = null) + public function create(array $properties, array $hostingProperties = null, $planName = null) { $packet = $this->_client->getPacket(); $info = $packet->addChild($this->_wrapperTag)->addChild('add'); @@ -53,6 +54,10 @@ public function create(array $properties, array $hostingProperties = null) } } + if ($planName) { + $info->addChild('plan-name', $planName); + } + $response = $this->_client->request($packet); return new Struct\Info($response); } From 115e700f27bee560ebd1456ebbfe460ebf7adf0f Mon Sep 17 00:00:00 2001 From: dpfaffenbauer Date: Thu, 6 Jul 2017 14:19:47 +0200 Subject: [PATCH 035/243] implement SiteAlias Operator and struct --- src/PleskX/Api/Operator/SiteAlias.php | 26 ++++++++++++++++++++++++ src/PleskX/Api/Struct/SiteAlias/Info.php | 21 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/PleskX/Api/Struct/SiteAlias/Info.php diff --git a/src/PleskX/Api/Operator/SiteAlias.php b/src/PleskX/Api/Operator/SiteAlias.php index 79aea83a..b465c4ee 100644 --- a/src/PleskX/Api/Operator/SiteAlias.php +++ b/src/PleskX/Api/Operator/SiteAlias.php @@ -3,7 +3,33 @@ namespace PleskX\Api\Operator; +use PleskX\Api\Struct\SiteAlias as Struct; + class SiteAlias extends \PleskX\Api\Operator { + /** + * @param array $properties + * @param array $preferences + * @return Struct\Info + */ + public function create(array $properties, array $preferences = []) + { + $packet = $this->_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('create'); + + if (count($preferences) > 0) { + $prefs = $info->addChild('pref'); + + foreach ($preferences as $key => $value) { + $prefs->addChild($key, is_bool($value) ? ($value ? 1 : 0) : $value); + } + } + + $info->addChild('site-id', $properties['site-id']); + $info->addChild('name', $properties['name']); + + $response = $this->_client->request($packet); + return new Struct\Info($response); + } } diff --git a/src/PleskX/Api/Struct/SiteAlias/Info.php b/src/PleskX/Api/Struct/SiteAlias/Info.php new file mode 100644 index 00000000..911d66b9 --- /dev/null +++ b/src/PleskX/Api/Struct/SiteAlias/Info.php @@ -0,0 +1,21 @@ +_initScalarProperties($apiResponse, [ + 'id', + 'status', + ]); + } +} \ No newline at end of file From 14bb8bbd528dda43e6003a846b80e7c49c2dbe87 Mon Sep 17 00:00:00 2001 From: Vladislav Baranovskiy Date: Fri, 7 Jul 2017 19:17:38 +0700 Subject: [PATCH 036/243] Add possibility to specify custom response verifier --- src/PleskX/Api/Client.php | 20 +++++++++++++++++++- tests/ApiClientTest.php | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index 8942572b..1f161fd3 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -25,6 +25,11 @@ class Client protected $_operatorsCache = []; + /** + * @var callable + */ + protected $_verifyResponseCallback; + /** * Create client * @@ -71,6 +76,16 @@ public function setVersion($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 + * + * @param callable|null $function + */ + public function setVerifyResponse(callable $function = null) + { + $this->_verifyResponseCallback = $function; + } + /** * Retrieve host used for communication * @@ -143,7 +158,10 @@ public function request($request, $mode = self::RESPONSE_SHORT) } else { $xml = $this->_performHttpRequest($request); } - $this->_verifyResponse($xml); + + $this->_verifyResponseCallback + ? call_user_func($this->_verifyResponseCallback, $xml) + : $this->_verifyResponse($xml); return (self::RESPONSE_FULL == $mode) ? $xml : $xml->xpath('//result')[0]; } diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 8d794681..ca8e1a33 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,6 @@ assertEquals('http', $client->getProtocol()); } + public function testSetVerifyResponse() + { + static::$_client->setVerifyResponse(function ($xml) { + if ($xml->xpath('//proto')) { + throw new Exception('proto'); + } + }); + try { + static::$_client->server()->getProtos(); + } catch (Exception $e) { + $this->assertEquals('proto', $e->getMessage()); + } finally { + static::$_client->setVerifyResponse(); + } + } } From fbf97aee9fd8d27c33b745a26c8c75400b93ea32 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Fri, 10 Nov 2017 16:29:53 +0700 Subject: [PATCH 037/243] BUGFIX EXTCERT-862 Proper parsing of response in case if there is no subdomains. --- src/PleskX/Api/Operator/Subdomain.php | 3 +++ tests/SubdomainTest.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/PleskX/Api/Operator/Subdomain.php b/src/PleskX/Api/Operator/Subdomain.php index db5fb473..bff91390 100644 --- a/src/PleskX/Api/Operator/Subdomain.php +++ b/src/PleskX/Api/Operator/Subdomain.php @@ -71,6 +71,9 @@ public function getAll($field = null, $value = null) $items = []; foreach ($response->xpath('//result') as $xmlResult) { + if (empty($xmlResult->data)) { + continue; + } $item = new Struct\Info($xmlResult->data); $item->id = (int)$xmlResult->id; $items[] = $item; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index e9f23745..28cdc3ef 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -82,5 +82,8 @@ public function testGetAll() static::$_client->subdomain()->delete('id', $subdomain->id); static::$_client->subdomain()->delete('id', $subdomain2->id); + + $subdomainsInfo = static::$_client->subdomain()->getAll(); + $this->assertEmpty($subdomainsInfo); } } From 50028167a23002230cbac979026b6e677c42629f Mon Sep 17 00:00:00 2001 From: Nikita Rybalov Date: Wed, 20 Dec 2017 14:16:45 +0700 Subject: [PATCH 038/243] Add determining of arrays with duplicate key values --- src/PleskX/Api/Client.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index 1f161fd3..e00c8a56 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -339,21 +339,32 @@ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) * * @param array $array * @param SimpleXMLElement $xml + * @param string $parentEl * @return SimpleXMLElement */ - protected function _arrayToXml(array $array, SimpleXMLElement $xml) + protected 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, $xml->addChild($key)); + $this->_arrayToXml($value, $this->_isAssocArray($value) ? $xml->addChild($el) : $xml, $el); } else { - $xml->addChild($key, $value); + $xml->addChild($el, $value); } } return $xml; } + /** + * @param array $array + * @return bool + */ + protected function _isAssocArray(array $array) + { + return $array && array_keys($array) !== range(0, count($array) - 1); + } + /** * @param string $name * @return \PleskX\Api\Operator From b191a42dbaac76d622d4448e92d2b8658c0b13d1 Mon Sep 17 00:00:00 2001 From: Nikita Rybalov Date: Wed, 20 Dec 2017 15:05:05 +0700 Subject: [PATCH 039/243] Add test for determining arrays with duplicate key values in requests --- tests/WebspaceTest.php | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 569c5047..8cad7eaf 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -61,6 +61,78 @@ public function testCreateWebspace() static::$_client->webspace()->delete('id', $webspace->id); } + public function testRequestCreateWebspace() + { + $webspace = static::$_client->webspace()->request([ + 'add' => [ + 'gen_setup' => [ + 'name' => 'example-second-test.dom', + 'htype' => 'vrt_hst', + 'status' => '0', + 'ip_address' => [static::_getIpAddress()], + ], + 'hosting' => [ + 'vrt_hst' => [ + 'property' => [ + [ + 'name' => 'php_handler_id', + 'value' => 'fastcgi', + ], + [ + 'name' => 'ftp_login', + 'value' => 'ftp-login-test-1', + ], + [ + 'name' => 'ftp_password', + 'value' => 'ftp-password-test-1', + ], + ], + 'ip_address' => static::_getIpAddress(), + ], + ], + 'limits' => [ + 'overuse' => 'block', + 'limit' => [ + [ + 'name' => 'mbox_quota', + 'value' => 100, + ], + ], + ], + 'prefs' => [ + 'www' => 'false', + 'stat_ttl' => 6, + ], + 'performance' => [ + 'bandwidth' => 120, + 'max_connections' => 10000, + ], + 'permissions' => [ + 'permission' => [ + [ + 'name' => 'manage_sh_access', + 'value' => 'true', + ], + ], + ], + 'php-settings' => [ + 'setting' => [ + [ + 'name' => 'memory_limit', + 'value' => '128M', + ], + [ + 'name' => 'safe_mode', + 'value' => 'false', + ], + ], + ], + 'plan-name' => 'Unlimited', + ], + ]); + static::$_client->webspace()->delete('id', $webspace->id); + } + public function testDelete() { $domain = $this->_createDomain(); From 019341b6cf0b42dde5baa9410535d0cb486291d8 Mon Sep 17 00:00:00 2001 From: Ekaterina Spitsyna Date: Tue, 9 Jan 2018 16:19:38 +0700 Subject: [PATCH 040/243] Drop unpopular API operators --- src/PleskX/Api/Client.php | 137 ------------------ src/PleskX/Api/Operator/BackupManager.php | 9 -- .../Api/Operator/BusinessLogicUpgrade.php | 9 -- src/PleskX/Api/Operator/FtpUser.php | 9 -- src/PleskX/Api/Operator/IpBan.php | 9 -- src/PleskX/Api/Operator/MailList.php | 9 -- src/PleskX/Api/Operator/Migration.php | 9 -- src/PleskX/Api/Operator/PlanItem.php | 9 -- src/PleskX/Api/Operator/Role.php | 9 -- src/PleskX/Api/Operator/ServiceNode.php | 9 -- src/PleskX/Api/Operator/Sitebuilder.php | 9 -- src/PleskX/Api/Operator/SpamFilter.php | 9 -- src/PleskX/Api/Operator/Sso.php | 9 -- src/PleskX/Api/Operator/Updater.php | 9 -- src/PleskX/Api/Operator/User.php | 56 ------- src/PleskX/Api/Operator/WebUser.php | 9 -- src/PleskX/Api/Operator/Webmail.php | 9 -- src/PleskX/Api/Operator/WpInstance.php | 9 -- src/PleskX/Api/Struct/User/GeneralInfo.php | 34 ----- src/PleskX/Api/Struct/User/Info.php | 21 --- tests/UserTest.php | 62 -------- 21 files changed, 454 deletions(-) delete mode 100644 src/PleskX/Api/Operator/BackupManager.php delete mode 100644 src/PleskX/Api/Operator/BusinessLogicUpgrade.php delete mode 100644 src/PleskX/Api/Operator/FtpUser.php delete mode 100644 src/PleskX/Api/Operator/IpBan.php delete mode 100644 src/PleskX/Api/Operator/MailList.php delete mode 100644 src/PleskX/Api/Operator/Migration.php delete mode 100644 src/PleskX/Api/Operator/PlanItem.php delete mode 100644 src/PleskX/Api/Operator/Role.php delete mode 100644 src/PleskX/Api/Operator/ServiceNode.php delete mode 100644 src/PleskX/Api/Operator/Sitebuilder.php delete mode 100644 src/PleskX/Api/Operator/SpamFilter.php delete mode 100644 src/PleskX/Api/Operator/Sso.php delete mode 100644 src/PleskX/Api/Operator/Updater.php delete mode 100644 src/PleskX/Api/Operator/User.php delete mode 100644 src/PleskX/Api/Operator/WebUser.php delete mode 100644 src/PleskX/Api/Operator/Webmail.php delete mode 100644 src/PleskX/Api/Operator/WpInstance.php delete mode 100644 src/PleskX/Api/Struct/User/GeneralInfo.php delete mode 100644 src/PleskX/Api/Struct/User/Info.php delete mode 100644 tests/UserTest.php diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index e00c8a56..e98929c9 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -435,14 +435,6 @@ public function mail() return $this->_getOperator('Mail'); } - /** - * @return Operator\Migration - */ - public function migration() - { - return $this->_getOperator('Migration'); - } - /** * @return Operator\Certificate */ @@ -475,14 +467,6 @@ public function eventLog() return $this->_getOperator('EventLog'); } - /** - * @return Operator\SpamFilter - */ - public function spamFilter() - { - return $this->_getOperator('SpamFilter'); - } - /** * @return Operator\SecretKey */ @@ -507,22 +491,6 @@ public function servicePlan() return $this->_getOperator('ServicePlan'); } - /** - * @return Operator\WebUser - */ - public function webUser() - { - return $this->_getOperator('WebUser'); - } - - /** - * @return Operator\MailList - */ - public function mailList() - { - return $this->_getOperator('MailList'); - } - /** * @return Operator\VirtualDirectory */ @@ -539,14 +507,6 @@ public function database() return $this->_getOperator('Database'); } - /** - * @return Operator\FtpUser - */ - public function ftpUser() - { - return $this->_getOperator('FtpUser'); - } - /** * @return Operator\Session */ @@ -555,14 +515,6 @@ public function session() return $this->_getOperator('Session'); } - /** - * @return Operator\Updater - */ - public function updater() - { - return $this->_getOperator('Updater'); - } - /** * @return Operator\Locale */ @@ -579,22 +531,6 @@ public function logRotation() return $this->_getOperator('LogRotation'); } - /** - * @return Operator\BackupManager - */ - public function backupManager() - { - return $this->_getOperator('BackupManager'); - } - - /** - * @return Operator\Sso - */ - public function sso() - { - return $this->_getOperator('Sso'); - } - /** * @return Operator\ProtectedDirectory */ @@ -642,77 +578,4 @@ public function site() { return $this->_getOperator('Site'); } - - /** - * @return Operator\User - */ - public function user() - { - return $this->_getOperator('User'); - } - - /** - * @return Operator\Role - */ - public function role() - { - return $this->_getOperator('Role'); - } - - /** - * @return Operator\BusinessLogicUpgrade - */ - public function businessLogicUpgrade() - { - return $this->_getOperator('BusinessLogicUpgrade'); - } - - /** - * @return Operator\Webmail - */ - public function webmail() - { - return $this->_getOperator('Webmail'); - } - - /** - * @return Operator\PlanItem - */ - public function planItem() - { - return $this->_getOperator('PlanItem'); - } - - /** - * @return Operator\Sitebuilder - */ - public function sitebuilder() - { - return $this->_getOperator('Sitebuilder'); - } - - /** - * @return Operator\ServiceNode - */ - public function serviceNode() - { - return $this->_getOperator('ServiceNode'); - } - - /** - * @return Operator\IpBan - */ - public function ipBan() - { - return $this->_getOperator('IpBan'); - } - - /** - * @return Operator\WpInstance - */ - public function wpInstance() - { - return $this->_getOperator('WpInstance'); - } - } diff --git a/src/PleskX/Api/Operator/BackupManager.php b/src/PleskX/Api/Operator/BackupManager.php deleted file mode 100644 index 2c94100c..00000000 --- a/src/PleskX/Api/Operator/BackupManager.php +++ /dev/null @@ -1,9 +0,0 @@ -_client->getPacket(); - $addNode = $packet->addChild($this->_wrapperTag)->addChild('add'); - $info = $addNode->addChild('gen-info'); - - foreach ($properties as $name => $value) { - $info->addChild($name, $value); - } - - $addNode->addChild('roles')->addChild('name', $role); - - $response = $this->_client->request($packet); - return new Struct\Info($response); - } - - /** - * @param string $field - * @param integer|string $value - * @return bool - */ - public function delete($field, $value) - { - return $this->_delete($field, $value); - } - - /** - * @param string $field - * @param integer|string $value - * @return Struct\GeneralInfo - */ - public function get($field, $value) - { - $packet = $this->_client->getPacket(); - $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); - $getTag->addChild('filter')->addChild($field, $value); - $getTag->addChild('dataset')->addChild('gen-info'); - $response = $this->_client->request($packet); - return new Struct\GeneralInfo($response->data->{'gen-info'}); - } - -} diff --git a/src/PleskX/Api/Operator/WebUser.php b/src/PleskX/Api/Operator/WebUser.php deleted file mode 100644 index 82637e94..00000000 --- a/src/PleskX/Api/Operator/WebUser.php +++ /dev/null @@ -1,9 +0,0 @@ -_initScalarProperties($apiResponse, [ - 'login', - 'name', - 'email', - 'owner-guid', - 'guid', - ]); - } -} \ No newline at end of file diff --git a/src/PleskX/Api/Struct/User/Info.php b/src/PleskX/Api/Struct/User/Info.php deleted file mode 100644 index 4e311d9d..00000000 --- a/src/PleskX/Api/Struct/User/Info.php +++ /dev/null @@ -1,21 +0,0 @@ -_initScalarProperties($apiResponse, [ - 'id', - 'guid', - ]); - } -} \ No newline at end of file diff --git a/tests/UserTest.php b/tests/UserTest.php deleted file mode 100644 index b0deb1f1..00000000 --- a/tests/UserTest.php +++ /dev/null @@ -1,62 +0,0 @@ - 'mike-test', - 'passwd' => 'simple-password', - 'owner-guid' => null, - 'name' => 'Mike Black', - 'email' => 'mike@example.com', - ]; - - protected function setUp() - { - parent::setUp(); - - $this->_customer = static::$_client->customer()->create([ - 'pname' => 'John Smith', - 'login' => 'john-unit-test', - 'passwd' => 'simple-password', - ]); - $this->_userProperties['owner-guid'] = $this->_customer->guid; - } - - protected function tearDown() - { - static::$_client->customer()->delete('id', $this->_customer->id); - } - - public function testCreate() - { - $user = static::$_client->user()->create('Application User', $this->_userProperties); - $this->assertInternalType('integer', $user->id); - $this->assertGreaterThan(0, $user->id); - - static::$_client->user()->delete('guid', $user->guid); - } - - public function testDelete() - { - $user = static::$_client->user()->create('Application User', $this->_userProperties); - $result = static::$_client->user()->delete('guid', $user->guid); - $this->assertTrue($result); - } - - public function testGet() - { - $user = static::$_client->user()->create('Application User', $this->_userProperties); - $userInfo = static::$_client->user()->get('guid', $user->guid); - $this->assertEquals('mike-test', $userInfo->login); - $this->assertEquals('Mike Black', $userInfo->name); - $this->assertEquals('mike@example.com', $userInfo->email); - $this->assertEquals($user->guid, $userInfo->guid); - - static::$_client->user()->delete('guid', $user->guid); - } - -} From 6fbccc88e52ab8157880581543b1052f4852311b Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Tue, 12 Jun 2018 15:21:43 +0200 Subject: [PATCH 041/243] Add DNS template manipulations as a separate operator --- src/PleskX/Api/Client.php | 8 +++ src/PleskX/Api/Operator/DnsTemplate.php | 79 +++++++++++++++++++++ tests/DnsTemplateTest.php | 92 +++++++++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 src/PleskX/Api/Operator/DnsTemplate.php create mode 100644 tests/DnsTemplateTest.php diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index e98929c9..40b70726 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -419,6 +419,14 @@ public function dns() return $this->_getOperator('Dns'); } + /** + * @return Operator\DnsTemplate + */ + public function dnsTemplate() + { + return $this->_getOperator('DnsTemplate'); + } + /** * @return Operator\DatabaseServer */ diff --git a/src/PleskX/Api/Operator/DnsTemplate.php b/src/PleskX/Api/Operator/DnsTemplate.php new file mode 100644 index 00000000..8b5189c5 --- /dev/null +++ b/src/PleskX/Api/Operator/DnsTemplate.php @@ -0,0 +1,79 @@ +_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); + + unset($properties['site-id'], $properties['site-alias-id']); + foreach ($properties as $name => $value) { + $info->addChild($name, $value); + } + + return new Struct\Info($this->_client->request($packet)); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info|null + */ + public function get($field, $value) + { + $items = $this->getAll($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info[] + */ + public function getAll($field = null, $value = null) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_rec'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + $getTag->addChild('template'); + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $item = new Struct\Info($xmlResult->data); + $item->id = (int)$xmlResult->id; + $items[] = $item; + } + return $items; + } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function delete($field, $value) + { + $packet = $this->_client->getPacket(); + $delTag = $packet->addChild($this->_wrapperTag)->addChild('del_rec'); + $delTag->addChild('filter')->addChild($field, $value); + $delTag->addChild('template'); + + $response = $this->_client->request($packet); + return 'ok' === (string)$response->status; + } +} diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php new file mode 100644 index 00000000..39aded8b --- /dev/null +++ b/tests/DnsTemplateTest.php @@ -0,0 +1,92 @@ +server()->getServiceStates(); + static::$_isDnsSupported = $serviceStates['dns'] && ('running' == $serviceStates['dns']['state']); + } + + protected function setUp() + { + parent::setUp(); + + if (!static::$_isDnsSupported) { + $this->markTestSkipped('DNS system is not supported.'); + } + } + + public function testCreate() + { + $dns = static::$_client->dnsTemplate()->create([ + 'type' => 'TXT', + 'host' => 'test.create', + 'value' => 'value', + ]); + $this->assertInternalType('integer', $dns->id); + $this->assertGreaterThan(0, $dns->id); + $this->assertEquals(0, $dns->siteId); + $this->assertEquals(0, $dns->siteAliasId); + static::$_client->dnsTemplate()->delete('id', $dns->id); + } + + public function testGetById() + { + $dns = static::$_client->dnsTemplate()->create([ + 'type' => 'TXT', + 'host' => 'test.get.by.id', + 'value' => 'value', + ]); + + $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); + } + + public function testGetAll() + { + $dns = static::$_client->dnsTemplate()->create([ + 'type' => 'TXT', + 'host' => 'test.get.all', + 'value' => 'value', + ]); + $dns2 = static::$_client->dnsTemplate()->create([ + 'type' => 'TXT', + 'host' => 'test.get.all', + 'value' => 'value2', + ]); + $dnsInfo = static::$_client->dnsTemplate()->getAll(); + $dsRecords = []; + foreach ($dnsInfo as $dnsRec) { + if ('TXT' === $dnsRec->type && 0 === strpos($dnsRec->host, 'test.get.all')) { + $dsRecords[] = $dnsRec; + } + } + $this->assertCount(2, $dsRecords); + + static::$_client->dnsTemplate()->delete('id', $dns->id); + static::$_client->dnsTemplate()->delete('id', $dns2->id); + } + + public function testDelete() + { + $dns = static::$_client->dnsTemplate()->create([ + 'type' => 'TXT', + 'host' => 'test.delete', + 'value' => 'value', + ]); + $result = static::$_client->dnsTemplate()->delete('id', $dns->id); + $this->assertTrue($result); + } +} From fb1a4696c911890d5a8c4a33196c15887a9a90ef Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Tue, 12 Jun 2018 15:23:39 +0200 Subject: [PATCH 042/243] Upgrade PHPUnit 7.x, PHP 7.2 and Plesk 17.8 --- Dockerfile | 2 +- composer.json | 10 +- composer.lock | 757 +++++++++++++++++++------------------- docker-compose.yml | 4 +- phpunit.xml.dist | 4 +- src/PleskX/Api/Client.php | 31 -- tests/ApiClientTest.php | 6 +- tests/TestCase.php | 2 +- tests/WebspaceTest.php | 2 + tests/autoload.php | 21 -- 10 files changed, 392 insertions(+), 447 deletions(-) delete mode 100644 tests/autoload.php diff --git a/Dockerfile b/Dockerfile index 2d127c45..dd406277 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:5.6-cli +FROM php:7.2-cli RUN mkdir /opt/api-php-lib RUN docker-php-ext-install pcntl \ diff --git a/composer.json b/composer.json index c651082e..8900441d 100644 --- a/composer.json +++ b/composer.json @@ -10,13 +10,10 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.6.0" + "php": "^5.6|^7.1" }, "require-dev": { - "phpunit/phpunit": "5.7.*", - "phpunit/php-invoker": "*", - "phpunit/dbunit": ">=1.2", - "sebastian/environment": "^2.0" + "phpunit/phpunit": "^7" }, "config": { "process-timeout": 0 @@ -29,6 +26,9 @@ "PleskX\\": "src/PleskX/" } }, + "autoload-dev": { + "classmap": ["tests/"] + }, "extra": { "branch-alias": { "dev-master": "0.1.x-dev" diff --git a/composer.lock b/composer.lock index c3feeca5..96ca313b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "fbc1f466b0f53331ec17c695470701dd", - "content-hash": "ba2fb56608e462276a5906cda2aa30cb", + "content-hash": "895e402901f2287f9656ba2489dc3965", "packages": [], "packages-dev": [ { @@ -14,28 +13,29 @@ "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5" + "reference": "870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5", - "reference": "5acd2bd8c2b600ad5cc4c9180ebf0a930604d6a5", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d", + "reference": "870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^4.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-shim": "^0.9.2", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -60,7 +60,7 @@ "constructor", "instantiate" ], - "time": "2017-02-16 16:15:51" + "time": "2018-03-05T09:41:42+00:00" }, { "name": "myclabs/deep-copy", @@ -68,33 +68,39 @@ "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" - } + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -102,7 +108,109 @@ "object", "object graph" ], - "time": "2017-04-12 18:52:22" + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "014feadb268809af7c8e2f7ccd396b8494901f58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/014feadb268809af7c8e2f7ccd396b8494901f58", + "reference": "014feadb268809af7c8e2f7ccd396b8494901f58", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-04-07T07:07:10+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -110,16 +218,16 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "a046af61c36e9162372f205de091a1cab7340f1c" + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/a046af61c36e9162372f205de091a1cab7340f1c", - "reference": "a046af61c36e9162372f205de091a1cab7340f1c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^4.6" @@ -156,33 +264,39 @@ "reflection", "static analysis" ], - "time": "2017-04-30 11:58:12" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -201,24 +315,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2.1", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -248,7 +362,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", @@ -256,24 +370,24 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "79db5dd907ee977039f77ac8471a739497463429" + "reference": "6471ce6aa91ec03e9fdf3ca188e277104d8a7d1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/79db5dd907ee977039f77ac8471a739497463429", - "reference": "79db5dd907ee977039f77ac8471a739497463429", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6471ce6aa91ec03e9fdf3ca188e277104d8a7d1c", + "reference": "6471ce6aa91ec03e9fdf3ca188e277104d8a7d1c", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { @@ -311,99 +425,44 @@ "spy", "stub" ], - "time": "2017-05-31 16:22:32" - }, - { - "name": "phpunit/dbunit", - "version": "2.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/dbunit.git", - "reference": "4de41a2191690e8e1ad4d5197964f21cf1f975ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/4de41a2191690e8e1ad4d5197964f21cf1f975ba", - "reference": "4de41a2191690e8e1ad4d5197964f21cf1f975ba", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "ext-simplexml": "*", - "php": "^5.4 || ^7.0", - "phpunit/phpunit": "^4.0 || ^5.0", - "symfony/yaml": "^2.1 || ^3.0" - }, - "bin": [ - "dbunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "DbUnit port for PHP/PHPUnit to support database interaction testing.", - "homepage": "https://github.com/sebastianbergmann/dbunit/", - "keywords": [ - "database", - "testing", - "xunit" - ], - "time": "2017-01-04 08:08:01" + "time": "2018-05-09T14:00:54+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", - "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", + "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.1" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -418,7 +477,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -429,7 +488,7 @@ "testing", "xunit" ], - "time": "2017-04-02 07:44:40" + "time": "2018-06-01T07:51:50+00:00" }, { "name": "phpunit/php-file-iterator", @@ -437,21 +496,21 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", + "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -466,7 +525,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -476,53 +535,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" - }, - { - "name": "phpunit/php-invoker", - "version": "1.1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "86074bf0fc2caf02ec8819a93f65a37cd0b44c8e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/86074bf0fc2caf02ec8819a93f65a37cd0b44c8e", - "reference": "86074bf0fc2caf02ec8819a93f65a37cd0b44c8e", - "shasum": "" - }, - "require": { - "ext-pcntl": "*", - "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.6" - }, - "require-dev": { - "phpunit/phpunit": "~4" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for invoking callables with a timeout.", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "time": "2015-06-21 13:32:55" + "time": "2018-06-11T11:44:00+00:00" }, { "name": "phpunit/php-text-template", @@ -563,7 +576,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -571,24 +584,24 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "d107f347d368dd8a384601398280c7c608390ab7" + "reference": "9ef9968ba27999219d76ae3cef97aa0fa87bd90f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/d107f347d368dd8a384601398280c7c608390ab7", - "reference": "d107f347d368dd8a384601398280c7c608390ab7", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/9ef9968ba27999219d76ae3cef97aa0fa87bd90f", + "reference": "9ef9968ba27999219d76ae3cef97aa0fa87bd90f", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -603,7 +616,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -612,7 +625,7 @@ "keywords": [ "timer" ], - "time": "2017-03-07 15:42:04" + "time": "2018-06-04T07:17:52+00:00" }, { "name": "phpunit/php-token-stream", @@ -620,25 +633,25 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9ddb181faa4a3841fe131c357fd01de75cbb4da9" + "reference": "711ca0c13c66f6b66c2ecb586e56415815034330" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9ddb181faa4a3841fe131c357fd01de75cbb4da9", - "reference": "9ddb181faa4a3841fe131c357fd01de75cbb4da9", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/711ca0c13c66f6b66c2ecb586e56415815034330", + "reference": "711ca0c13c66f6b66c2ecb586e56415815034330", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^5.6 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -661,55 +674,57 @@ "keywords": [ "tokenizer" ], - "time": "2017-03-07 07:36:57" + "time": "2018-06-06T10:32:05+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c0c61c97be37e1c77ab61ad73448e9208c05aade" + "reference": "ac4eee55bc3fef9b10d173dda97a3b3bebbd96d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c0c61c97be37e1c77ab61ad73448e9208c05aade", - "reference": "c0c61c97be37e1c77ab61ad73448e9208c05aade", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ac4eee55bc3fef9b10d173dda97a3b3bebbd96d7", + "reference": "ac4eee55bc3fef9b10d173dda97a3b3bebbd96d7", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "^1.4.3", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" + "phpunit/phpunit-mock-objects": "*" }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -717,7 +732,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7.x-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -743,66 +758,7 @@ "testing", "xunit" ], - "time": "2017-06-23 12:45:27" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.4.x-dev", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "4001a301f86fc006c32f532a741ab613f2bd8990" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/4001a301f86fc006c32f532a741ab613f2bd8990", - "reference": "4001a301f86fc006c32f532a741ab613f2bd8990", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2017-03-07 08:47:31" + "time": "2018-06-11T12:00:12+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -810,12 +766,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88" + "reference": "22f5f5ff892d51035dd1fb4cd6b224a640ffb206" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/3488be0a7b346cd6e5361510ed07e88f9bea2e88", - "reference": "3488be0a7b346cd6e5361510ed07e88f9bea2e88", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/22f5f5ff892d51035dd1fb4cd6b224a640ffb206", + "reference": "22f5f5ff892d51035dd1fb4cd6b224a640ffb206", "shasum": "" }, "require": { @@ -847,34 +803,34 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04 10:23:55" + "time": "2018-05-15T05:52:48+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "18a5d97c25f408f48acaf6d1b9f4079314c5996a" + "reference": "71d4a9394b5a0d4e98a35493c81dbd2cba657a7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/18a5d97c25f408f48acaf6d1b9f4079314c5996a", - "reference": "18a5d97c25f408f48acaf6d1b9f4079314c5996a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/71d4a9394b5a0d4e98a35493c81dbd2cba657a7b", + "reference": "71d4a9394b5a0d4e98a35493c81dbd2cba657a7b", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -905,38 +861,39 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-03-07 10:34:43" + "time": "2018-05-23T07:33:54+00:00" }, { "name": "sebastian/diff", - "version": "1.4.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "366541b989927187c4ca70490a35615d3fef2dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", + "reference": "366541b989927187c4ca70490a35615d3fef2dce", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -961,34 +918,37 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-05-22 07:24:03" + "time": "2018-06-10T07:54:39+00:00" }, { "name": "sebastian/environment", - "version": "2.0.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + "reference": "32c5cba90f7db47b1c10a777b36eccfd44ef8bd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/32c5cba90f7db47b1c10a777b36eccfd44ef8bd7", + "reference": "32c5cba90f7db47b1c10a777b36eccfd44ef8bd7", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1013,34 +973,34 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2018-05-15T05:48:40+00:00" }, { "name": "sebastian/exporter", - "version": "2.0.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "5e8e30670c3f36481e75211dbbcfd029a41ebf07" + "reference": "20962714658cf74b1d293a98a30ec108e2e81ca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/5e8e30670c3f36481e75211dbbcfd029a41ebf07", - "reference": "5e8e30670c3f36481e75211dbbcfd029a41ebf07", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/20962714658cf74b1d293a98a30ec108e2e81ca9", + "reference": "20962714658cf74b1d293a98a30ec108e2e81ca9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", - "sebastian/recursion-context": "^2.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1080,27 +1040,27 @@ "export", "exporter" ], - "time": "2017-03-07 10:36:49" + "time": "2018-05-15T05:51:07+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "cea85a84b00f2795341ebbbca4fa396347f2494e" + "reference": "30367ea06c5cc3bf684457ac793fb2b863d783c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/cea85a84b00f2795341ebbbca4fa396347f2494e", - "reference": "cea85a84b00f2795341ebbbca4fa396347f2494e", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/30367ea06c5cc3bf684457ac793fb2b863d783c6", + "reference": "30367ea06c5cc3bf684457ac793fb2b863d783c6", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2|~5.0" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1108,7 +1068,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1131,33 +1091,34 @@ "keywords": [ "global state" ], - "time": "2017-02-23 14:11:06" + "time": "2018-05-15T05:52:33+00:00" }, { "name": "sebastian/object-enumerator", - "version": "2.0.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "c956fe7a68318639f694fc6bba0c89b7cdf1b08c" + "reference": "06d95dc84f06fc6cc246b8bf48facebcf0fe8069" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/c956fe7a68318639f694fc6bba0c89b7cdf1b08c", - "reference": "c956fe7a68318639f694fc6bba0c89b7cdf1b08c", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/06d95dc84f06fc6cc246b8bf48facebcf0fe8069", + "reference": "06d95dc84f06fc6cc246b8bf48facebcf0fe8069", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "sebastian/recursion-context": "^2.0" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1177,32 +1138,77 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-03-07 10:37:45" + "time": "2018-05-15T05:52:18+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "7707193304715e3caddf28fc73c02c12ed6f350c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7707193304715e3caddf28fc73c02c12ed6f350c", + "reference": "7707193304715e3caddf28fc73c02c12ed6f350c", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2018-05-15T05:50:44+00:00" }, { "name": "sebastian/recursion-context", - "version": "2.0.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "7e4d7c56f6e65d215f71ad913a5256e5439aca1c" + "reference": "dbe1869c13935c6080c834fc61424834b9ad5907" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/7e4d7c56f6e65d215f71ad913a5256e5439aca1c", - "reference": "7e4d7c56f6e65d215f71ad913a5256e5439aca1c", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/dbe1869c13935c6080c834fc61424834b9ad5907", + "reference": "dbe1869c13935c6080c834fc61424834b9ad5907", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1230,7 +1236,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-08 08:21:15" + "time": "2018-05-15T05:52:05+00:00" }, { "name": "sebastian/resource-operations", @@ -1238,12 +1244,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "fadc83f7c41fb2924e542635fea47ae546816ece" + "reference": "0f9911fea026d9737c9b357ddda0916ea3beaf1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/fadc83f7c41fb2924e542635fea47ae546816ece", - "reference": "fadc83f7c41fb2924e542635fea47ae546816ece", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f9911fea026d9737c9b357ddda0916ea3beaf1d", + "reference": "0f9911fea026d9737c9b357ddda0916ea3beaf1d", "shasum": "" }, "require": { @@ -1272,7 +1278,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2016-10-03 07:43:09" + "time": "2018-05-15T05:53:02+00:00" }, { "name": "sebastian/version", @@ -1289,7 +1295,7 @@ "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^7.1" }, "type": "library", "extra": { @@ -1315,62 +1321,47 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { - "name": "symfony/yaml", - "version": "3.4.x-dev", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "1faeaf2aa8180967d80329213f77c1bcb75fe4fa" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/1faeaf2aa8180967d80329213f77c1bcb75fe4fa", - "reference": "1faeaf2aa8180967d80329213f77c1bcb75fe4fa", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com/", - "time": "2017-06-24 09:47:31" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", @@ -1378,12 +1369,12 @@ "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "4a8bf11547e139e77b651365113fc12850c43d9a" + "reference": "53927dddf3afa2088b355188e143bba42159bf5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/4a8bf11547e139e77b651365113fc12850c43d9a", - "reference": "4a8bf11547e139e77b651365113fc12850c43d9a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/53927dddf3afa2088b355188e143bba42159bf5d", + "reference": "53927dddf3afa2088b355188e143bba42159bf5d", "shasum": "" }, "require": { @@ -1420,7 +1411,7 @@ "check", "validate" ], - "time": "2016-11-23 20:04:41" + "time": "2018-05-29T14:25:02+00:00" } ], "aliases": [], @@ -1429,7 +1420,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.6.0" + "php": "^5.6|^7.1" }, "platform-dev": [] } diff --git a/docker-compose.yml b/docker-compose.yml index 7b909b68..9510d39f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,11 @@ version: '2' services: plesk: - image: plesk/plesk:17.0 + image: plesk/plesk:17.8 logging: driver: none + ports: + ["8443:8443"] tests: build: . environment: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a63df1a5..0dea5ffa 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,8 @@ - + - + tests/ diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index e98929c9..4b7db119 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -20,9 +20,6 @@ class Client protected $_secretKey; protected $_version = ''; - protected static $_isExecutionsLogEnabled = false; - protected static $_executionLog = []; - protected $_operatorsCache = []; /** @@ -191,14 +188,6 @@ private function _performHttpRequest($request) throw new Client\Exception(curl_error($curl), curl_errno($curl)); } - if (self::$_isExecutionsLogEnabled) { - self::$_executionLog[] = [ - 'trace' => debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), - 'request' => $request, - 'response' => $result, - ]; - } - curl_close($curl); $xml = new XmlResponse($result); @@ -275,26 +264,6 @@ protected function _getHeaders() return $headers; } - /** - * Enable or disable execution log - * - * @param bool $enable - */ - public static function enableExecutionLog($enable = true) - { - self::$_isExecutionsLogEnabled = $enable; - } - - /** - * Retrieve execution log - * - * @return array - */ - public static function getExecutionLog() - { - return self::$_executionLog; - } - /** * Verify that response does not contain errors * diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index ca8e1a33..a456f44d 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -72,14 +72,16 @@ public function testLatestMajorProtocol() { $packet = static::$_client->getPacket('1.6'); $packet->addChild('server')->addChild('get_protos'); - 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->addChild('server')->addChild('get_protos'); - static::$_client->request($packet); + $result = static::$_client->request($packet); + $this->assertEquals('ok', $result->status); } public function testRequestShortSyntax() diff --git a/tests/TestCase.php b/tests/TestCase.php index 2363f507..4cb52692 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,7 +1,7 @@ 'test-login', 'ftp_password' => 'test-password', ]); + $this->assertGreaterThan(0, $webspace->id); static::$_client->webspace()->delete('id', $webspace->id); } @@ -130,6 +131,7 @@ public function testRequestCreateWebspace() 'plan-name' => 'Unlimited', ], ]); + $this->assertGreaterThan(0, $webspace->id); static::$_client->webspace()->delete('id', $webspace->id); } diff --git a/tests/autoload.php b/tests/autoload.php deleted file mode 100644 index ac075d33..00000000 --- a/tests/autoload.php +++ /dev/null @@ -1,21 +0,0 @@ - Date: Wed, 25 Jul 2018 17:29:28 +0700 Subject: [PATCH 043/243] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8900441d..46046a5e 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "minimum-stability": "dev", "require": { - "php": "^5.6|^7.1" + "php": "^5.6|^7.1|^7.0" }, "require-dev": { "phpunit/phpunit": "^7" From 9902d6fe47a6067d1f9ccc2776cad0f0edfcc8e4 Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Wed, 25 Jul 2018 14:08:32 +0200 Subject: [PATCH 044/243] Update composer.lock --- composer.lock | 68 +++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/composer.lock b/composer.lock index 96ca313b..71d7add3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "895e402901f2287f9656ba2489dc3965", + "content-hash": "8b48fc103ecc94eab8e0518d886935ad", "packages": [], "packages-dev": [ { @@ -116,18 +116,18 @@ "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "014feadb268809af7c8e2f7ccd396b8494901f58" + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/014feadb268809af7c8e2f7ccd396b8494901f58", - "reference": "014feadb268809af7c8e2f7ccd396b8494901f58", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, "type": "library", @@ -163,20 +163,20 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-04-07T07:07:10+00:00" + "time": "2018-07-08T19:23:20+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { @@ -210,7 +210,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-07-08T19:19:57+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -370,12 +370,12 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "6471ce6aa91ec03e9fdf3ca188e277104d8a7d1c" + "reference": "dcf425ffc656e958ebf9780b796072e3daf44614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6471ce6aa91ec03e9fdf3ca188e277104d8a7d1c", - "reference": "6471ce6aa91ec03e9fdf3ca188e277104d8a7d1c", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dcf425ffc656e958ebf9780b796072e3daf44614", + "reference": "dcf425ffc656e958ebf9780b796072e3daf44614", "shasum": "" }, "require": { @@ -425,7 +425,7 @@ "spy", "stub" ], - "time": "2018-05-09T14:00:54+00:00" + "time": "2018-07-18T09:55:46+00:00" }, { "name": "phpunit/php-code-coverage", @@ -433,12 +433,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a" + "reference": "f4181f5c0a2af0180dadaeb576c6a1a7548b54bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/865662550c384bc1db7e51d29aeda1c2c161d69a", - "reference": "865662550c384bc1db7e51d29aeda1c2c161d69a", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f4181f5c0a2af0180dadaeb576c6a1a7548b54bf", + "reference": "f4181f5c0a2af0180dadaeb576c6a1a7548b54bf", "shasum": "" }, "require": { @@ -488,7 +488,7 @@ "testing", "xunit" ], - "time": "2018-06-01T07:51:50+00:00" + "time": "2018-07-18T03:54:23+00:00" }, { "name": "phpunit/php-file-iterator", @@ -682,12 +682,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ac4eee55bc3fef9b10d173dda97a3b3bebbd96d7" + "reference": "1ad62f2c20d24a0139e0ab196feda2433fe4c004" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ac4eee55bc3fef9b10d173dda97a3b3bebbd96d7", - "reference": "ac4eee55bc3fef9b10d173dda97a3b3bebbd96d7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ad62f2c20d24a0139e0ab196feda2433fe4c004", + "reference": "1ad62f2c20d24a0139e0ab196feda2433fe4c004", "shasum": "" }, "require": { @@ -698,8 +698,8 @@ "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", "php": "^7.1", "phpspec/prophecy": "^1.7", "phpunit/php-code-coverage": "^6.0.7", @@ -758,7 +758,7 @@ "testing", "xunit" ], - "time": "2018-06-11T12:00:12+00:00" + "time": "2018-07-21T15:11:49+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -811,12 +811,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "71d4a9394b5a0d4e98a35493c81dbd2cba657a7b" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/71d4a9394b5a0d4e98a35493c81dbd2cba657a7b", - "reference": "71d4a9394b5a0d4e98a35493c81dbd2cba657a7b", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { @@ -867,7 +867,7 @@ "compare", "equality" ], - "time": "2018-05-23T07:33:54+00:00" + "time": "2018-07-12T15:12:46+00:00" }, { "name": "sebastian/diff", @@ -981,12 +981,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "20962714658cf74b1d293a98a30ec108e2e81ca9" + "reference": "c8c4f196e32858e4448bc285e542b61a4c40d9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/20962714658cf74b1d293a98a30ec108e2e81ca9", - "reference": "20962714658cf74b1d293a98a30ec108e2e81ca9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c8c4f196e32858e4448bc285e542b61a4c40d9dc", + "reference": "c8c4f196e32858e4448bc285e542b61a4c40d9dc", "shasum": "" }, "require": { @@ -1040,7 +1040,7 @@ "export", "exporter" ], - "time": "2018-05-15T05:51:07+00:00" + "time": "2018-06-28T14:22:04+00:00" }, { "name": "sebastian/global-state", @@ -1420,7 +1420,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.6|^7.1" + "php": "^5.6|^7.1|^7.0" }, "platform-dev": [] } From 8e6201e005653dd46202e56cd36120ba309490de Mon Sep 17 00:00:00 2001 From: Lauris Binde Date: Wed, 12 Sep 2018 10:03:42 +0200 Subject: [PATCH 045/243] Add new operator: PhpHandler --- src/PleskX/Api/Client.php | 8 ++++ src/PleskX/Api/Operator/PhpHandler.php | 32 +++++++++++++ src/PleskX/Api/Struct/PhpHandler/Info.php | 55 +++++++++++++++++++++++ tests/PhpHandlerTest.php | 23 ++++++++++ 4 files changed, 118 insertions(+) create mode 100644 src/PleskX/Api/Operator/PhpHandler.php create mode 100644 src/PleskX/Api/Struct/PhpHandler/Info.php create mode 100644 tests/PhpHandlerTest.php diff --git a/src/PleskX/Api/Client.php b/src/PleskX/Api/Client.php index fd71e5f7..02f839c0 100644 --- a/src/PleskX/Api/Client.php +++ b/src/PleskX/Api/Client.php @@ -555,4 +555,12 @@ public function site() { return $this->_getOperator('Site'); } + + /** + * @return Operator\PhpHandler + */ + public function phpHandler() + { + return $this->_getOperator('PhpHandler'); + } } diff --git a/src/PleskX/Api/Operator/PhpHandler.php b/src/PleskX/Api/Operator/PhpHandler.php new file mode 100644 index 00000000..60c88778 --- /dev/null +++ b/src/PleskX/Api/Operator/PhpHandler.php @@ -0,0 +1,32 @@ +_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + $filterTag = $getTag->addChild('filter'); + + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, Client::RESPONSE_FULL); + $xmlResult = $response->xpath('//result')[0]; + + return new Info($xmlResult); + } +} diff --git a/src/PleskX/Api/Struct/PhpHandler/Info.php b/src/PleskX/Api/Struct/PhpHandler/Info.php new file mode 100644 index 00000000..36f4bade --- /dev/null +++ b/src/PleskX/Api/Struct/PhpHandler/Info.php @@ -0,0 +1,55 @@ +_initScalarProperties($apiResponse, [ + 'id', + 'display-name', + 'full-version', + 'version', + 'type', + 'path', + 'clipath', + 'phpini', + 'custom', + 'handler-status', + ]); + } +} diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php new file mode 100644 index 00000000..8fa836c6 --- /dev/null +++ b/tests/PhpHandlerTest.php @@ -0,0 +1,23 @@ +phpHandler()->get('id', self::PHP_HANDLER_ID); + + $this->assertSame(self::PHP_HANDLER_ID, $handler->id); + } + + /** + * @expectedException \PleskX\Api\Exception + * @expectedExceptionMessage Php handler does not exists + */ + public function testGetUnknownHandlerThrowsException() + { + static::$_client->phpHandler()->get('id', 'this-handler-does-not-exist'); + } +} From a2969484b66b24549dfacc1b7379bbdf29ee2767 Mon Sep 17 00:00:00 2001 From: Dmitry Barsukov Date: Mon, 26 Nov 2018 16:15:23 +0700 Subject: [PATCH 046/243] Update composer.json, removed composer.lock as not constructive for library --- .gitignore | 9 +- README.md | 2 +- composer.json | 14 +- composer.lock | 1426 ------------------------------------------------- 4 files changed, 18 insertions(+), 1433 deletions(-) delete mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index 17c52938..a250d38c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ -/php/tests/node_modules -/vendor + +# vendor +/composer.lock +/vendor/ + +# tests /phpunit.xml +/php/tests/node_modules/ diff --git a/README.md b/README.md index a45784e0..d007a0b2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ PHP object-oriented library for Plesk XML-RPC API. [Composer](https://getcomposer.org/) is a preferable way to install the library: -`composer require plesk/api-php-lib:@dev` +`composer require plesk/api-php-lib` ## Usage Examples diff --git a/composer.json b/composer.json index 46046a5e..4c186c75 100644 --- a/composer.json +++ b/composer.json @@ -1,19 +1,25 @@ { "name": "plesk/api-php-lib", + "type": "library", "description": "PHP object-oriented library for Plesk XML-RPC API", "license": "Apache-2.0", "authors": [ { "name": "Alexei Yuzhakov", "email": "sibprogrammer@gmail.com" + }, + { + "name": "Plesk", + "email": "plesk-dev-leads@plesk.com" } ], - "minimum-stability": "dev", "require": { - "php": "^5.6|^7.1|^7.0" + "php": "^5.6 | ^7.0", + "ext-curl": "*", + "ext-xml": "*" }, "require-dev": { - "phpunit/phpunit": "^7" + "phpunit/phpunit": "^7.0" }, "config": { "process-timeout": 0 @@ -31,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.1.x-dev" + "dev-master": "1.0.x-dev" } } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 71d7add3..00000000 --- a/composer.lock +++ /dev/null @@ -1,1426 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "8b48fc103ecc94eab8e0518d886935ad", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d", - "reference": "870a62d7b0d63d4e0ffa8f2ce3ab7c8a53d1846d", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "doctrine/coding-standard": "^4.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-shim": "^0.9.2", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2018-03-05T09:41:42+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "replace": { - "myclabs/deep-copy": "self.version" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, - "files": [ - "src/DeepCopy/deep_copy.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2018-06-11T23:09:50+00:00" - }, - { - "name": "phar-io/manifest", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" - }, - { - "name": "phar-io/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org/", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2015-12-27T11:43:31+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "dcf425ffc656e958ebf9780b796072e3daf44614" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dcf425ffc656e958ebf9780b796072e3daf44614", - "reference": "dcf425ffc656e958ebf9780b796072e3daf44614", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "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" - ], - "time": "2018-07-18T09:55:46+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f4181f5c0a2af0180dadaeb576c6a1a7548b54bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f4181f5c0a2af0180dadaeb576c6a1a7548b54bf", - "reference": "f4181f5c0a2af0180dadaeb576c6a1a7548b54bf", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-xdebug": "^2.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2018-07-18T03:54:23+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "reference": "cecbc684605bb0cc288828eb5d65d93d5c676d3c", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2018-06-11T11:44:00+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "9ef9968ba27999219d76ae3cef97aa0fa87bd90f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/9ef9968ba27999219d76ae3cef97aa0fa87bd90f", - "reference": "9ef9968ba27999219d76ae3cef97aa0fa87bd90f", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2018-06-04T07:17:52+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "711ca0c13c66f6b66c2ecb586e56415815034330" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/711ca0c13c66f6b66c2ecb586e56415815034330", - "reference": "711ca0c13c66f6b66c2ecb586e56415815034330", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2018-06-06T10:32:05+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1ad62f2c20d24a0139e0ab196feda2433fe4c004" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ad62f2c20d24a0139e0ab196feda2433fe4c004", - "reference": "1ad62f2c20d24a0139e0ab196feda2433fe4c004", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.0", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2018-07-21T15:11:49+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "22f5f5ff892d51035dd1fb4cd6b224a640ffb206" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/22f5f5ff892d51035dd1fb4cd6b224a640ffb206", - "reference": "22f5f5ff892d51035dd1fb4cd6b224a640ffb206", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2018-05-15T05:52:48+00:00" - }, - { - "name": "sebastian/comparator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "shasum": "" - }, - "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2018-07-12T15:12:46+00:00" - }, - { - "name": "sebastian/diff", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "366541b989927187c4ca70490a35615d3fef2dce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/366541b989927187c4ca70490a35615d3fef2dce", - "reference": "366541b989927187c4ca70490a35615d3fef2dce", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "time": "2018-06-10T07:54:39+00:00" - }, - { - "name": "sebastian/environment", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "32c5cba90f7db47b1c10a777b36eccfd44ef8bd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/32c5cba90f7db47b1c10a777b36eccfd44ef8bd7", - "reference": "32c5cba90f7db47b1c10a777b36eccfd44ef8bd7", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2018-05-15T05:48:40+00:00" - }, - { - "name": "sebastian/exporter", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c8c4f196e32858e4448bc285e542b61a4c40d9dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c8c4f196e32858e4448bc285e542b61a4c40d9dc", - "reference": "c8c4f196e32858e4448bc285e542b61a4c40d9dc", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2018-06-28T14:22:04+00:00" - }, - { - "name": "sebastian/global-state", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "30367ea06c5cc3bf684457ac793fb2b863d783c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/30367ea06c5cc3bf684457ac793fb2b863d783c6", - "reference": "30367ea06c5cc3bf684457ac793fb2b863d783c6", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2018-05-15T05:52:33+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "06d95dc84f06fc6cc246b8bf48facebcf0fe8069" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/06d95dc84f06fc6cc246b8bf48facebcf0fe8069", - "reference": "06d95dc84f06fc6cc246b8bf48facebcf0fe8069", - "shasum": "" - }, - "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2018-05-15T05:52:18+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "7707193304715e3caddf28fc73c02c12ed6f350c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7707193304715e3caddf28fc73c02c12ed6f350c", - "reference": "7707193304715e3caddf28fc73c02c12ed6f350c", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2018-05-15T05:50:44+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "dbe1869c13935c6080c834fc61424834b9ad5907" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/dbe1869c13935c6080c834fc61424834b9ad5907", - "reference": "dbe1869c13935c6080c834fc61424834b9ad5907", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2018-05-15T05:52:05+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f9911fea026d9737c9b357ddda0916ea3beaf1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f9911fea026d9737c9b357ddda0916ea3beaf1d", - "reference": "0f9911fea026d9737c9b357ddda0916ea3beaf1d", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-05-15T05:53:02+00:00" - }, - { - "name": "sebastian/version", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": "^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" - }, - { - "name": "webmozart/assert", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "53927dddf3afa2088b355188e143bba42159bf5d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/53927dddf3afa2088b355188e143bba42159bf5d", - "reference": "53927dddf3afa2088b355188e143bba42159bf5d", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-05-29T14:25:02+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": "^5.6|^7.1|^7.0" - }, - "platform-dev": [] -} From f2393d93183350e785f35e6648b942f619ebf0a5 Mon Sep 17 00:00:00 2001 From: Dmitry Barsukov Date: Wed, 26 Dec 2018 12:17:19 +0700 Subject: [PATCH 047/243] Happy New Year! --- Gruntfile.js | 2 +- LICENSE | 2 +- composer.json | 13 +++++++----- phpunit.xml.dist | 21 ++++++++++++++++--- src/{PleskX => }/Api/Client.php | 2 +- src/{PleskX => }/Api/Client/Exception.php | 4 ++-- src/{PleskX => }/Api/Exception.php | 4 ++-- src/{PleskX => }/Api/InternalClient.php | 2 +- src/{PleskX => }/Api/Operator.php | 2 +- src/{PleskX => }/Api/Operator/Aps.php | 2 +- src/{PleskX => }/Api/Operator/Certificate.php | 2 +- src/{PleskX => }/Api/Operator/Customer.php | 2 +- src/{PleskX => }/Api/Operator/Database.php | 2 +- .../Api/Operator/DatabaseServer.php | 2 +- src/{PleskX => }/Api/Operator/Dns.php | 2 +- src/{PleskX => }/Api/Operator/DnsTemplate.php | 2 +- src/{PleskX => }/Api/Operator/EventLog.php | 2 +- src/{PleskX => }/Api/Operator/Ip.php | 2 +- src/{PleskX => }/Api/Operator/Locale.php | 2 +- src/{PleskX => }/Api/Operator/LogRotation.php | 2 +- src/{PleskX => }/Api/Operator/Mail.php | 2 +- src/{PleskX => }/Api/Operator/PhpHandler.php | 2 +- .../Api/Operator/ProtectedDirectory.php | 2 +- src/{PleskX => }/Api/Operator/Reseller.php | 2 +- .../Api/Operator/ResellerPlan.php | 2 +- src/{PleskX => }/Api/Operator/SecretKey.php | 2 +- src/{PleskX => }/Api/Operator/Server.php | 2 +- src/{PleskX => }/Api/Operator/ServicePlan.php | 2 +- .../Api/Operator/ServicePlanAddon.php | 2 +- src/{PleskX => }/Api/Operator/Session.php | 2 +- src/{PleskX => }/Api/Operator/Site.php | 2 +- src/{PleskX => }/Api/Operator/SiteAlias.php | 2 +- src/{PleskX => }/Api/Operator/Subdomain.php | 2 +- src/{PleskX => }/Api/Operator/Ui.php | 2 +- .../Api/Operator/VirtualDirectory.php | 2 +- src/{PleskX => }/Api/Operator/Webspace.php | 2 +- src/{PleskX => }/Api/Struct.php | 4 ++-- .../Api/Struct/Certificate/Info.php | 4 ++-- .../Api/Struct/Customer/GeneralInfo.php | 2 +- src/{PleskX => }/Api/Struct/Customer/Info.php | 4 ++-- src/{PleskX => }/Api/Struct/Database/Info.php | 2 +- .../Api/Struct/Database/UserInfo.php | 2 +- .../Api/Struct/DatabaseServer/Info.php | 4 ++-- src/{PleskX => }/Api/Struct/Dns/Info.php | 2 +- .../Api/Struct/EventLog/DetailedEvent.php | 4 ++-- .../Api/Struct/EventLog/Event.php | 4 ++-- src/{PleskX => }/Api/Struct/Ip/Info.php | 4 ++-- src/{PleskX => }/Api/Struct/Locale/Info.php | 4 ++-- src/{PleskX => }/Api/Struct/Mail/Info.php | 4 ++-- .../Api/Struct/PhpHandler/Info.php | 2 +- .../Api/Struct/Reseller/GeneralInfo.php | 2 +- src/{PleskX => }/Api/Struct/Reseller/Info.php | 4 ++-- .../Api/Struct/SecretKey/Info.php | 4 ++-- src/{PleskX => }/Api/Struct/Server/Admin.php | 4 ++-- .../Api/Struct/Server/GeneralInfo.php | 4 ++-- .../Api/Struct/Server/Preferences.php | 4 ++-- .../Api/Struct/Server/SessionPreferences.php | 4 ++-- .../Api/Struct/Server/Statistics.php | 4 ++-- .../Api/Struct/Server/Statistics/Objects.php | 4 ++-- .../Api/Struct/Server/Statistics/Version.php | 4 ++-- .../Api/Struct/Server/UpdatesInfo.php | 4 ++-- .../Api/Struct/ServicePlan/Info.php | 4 ++-- src/{PleskX => }/Api/Struct/Session/Info.php | 4 ++-- .../Api/Struct/Site/GeneralInfo.php | 4 ++-- .../Api/Struct/Site/HostingInfo.php | 2 +- src/{PleskX => }/Api/Struct/Site/Info.php | 4 ++-- .../Api/Struct/SiteAlias/Info.php | 4 ++-- .../Api/Struct/Subdomain/Info.php | 2 +- .../Api/Struct/Ui/CustomButton.php | 4 ++-- .../Api/Struct/Webspace/GeneralInfo.php | 4 ++-- .../Struct/Webspace/HostingPropertyInfo.php | 4 ++-- src/{PleskX => }/Api/Struct/Webspace/Info.php | 4 ++-- .../Api/Struct/Webspace/LimitDescriptor.php | 4 ++-- .../Api/Struct/Webspace/LimitInfo.php | 4 ++-- .../Struct/Webspace/PermissionDescriptor.php | 4 ++-- .../Api/Struct/Webspace/PermissionInfo.php | 4 ++-- .../Webspace/PhysicalHostingDescriptor.php | 4 ++-- src/{PleskX => }/Api/XmlResponse.php | 4 ++-- tests/ApiClientTest.php | 9 ++++---- tests/CertificateTest.php | 5 ++--- tests/CustomerTest.php | 5 ++--- tests/DatabaseServerTest.php | 5 ++--- tests/DatabaseTest.php | 3 ++- tests/DnsTemplateTest.php | 3 ++- tests/DnsTest.php | 3 ++- tests/EventLogTest.php | 5 ++--- tests/IpTest.php | 5 ++--- tests/LocaleTest.php | 5 ++--- tests/MailTest.php | 5 ++--- tests/PhpHandlerTest.php | 3 ++- tests/ResellerTest.php | 5 ++--- tests/SecretKeyTest.php | 6 ++++-- tests/ServerTest.php | 5 ++--- tests/ServicePlanTest.php | 5 ++--- tests/SessionTest.php | 5 ++--- tests/SiteTest.php | 10 ++++----- tests/SubdomainTest.php | 4 ++-- tests/TestCase.php | 13 ++++++------ tests/UiTest.php | 5 ++--- tests/WebspaceTest.php | 5 ++--- 100 files changed, 194 insertions(+), 183 deletions(-) rename src/{PleskX => }/Api/Client.php (99%) rename src/{PleskX => }/Api/Client/Exception.php (67%) rename src/{PleskX => }/Api/Exception.php (67%) rename src/{PleskX => }/Api/InternalClient.php (88%) rename src/{PleskX => }/Api/Operator.php (98%) mode change 100755 => 100644 rename src/{PleskX => }/Api/Operator/Aps.php (61%) rename src/{PleskX => }/Api/Operator/Certificate.php (92%) rename src/{PleskX => }/Api/Operator/Customer.php (96%) rename src/{PleskX => }/Api/Operator/Database.php (98%) rename src/{PleskX => }/Api/Operator/DatabaseServer.php (96%) rename src/{PleskX => }/Api/Operator/Dns.php (97%) rename src/{PleskX => }/Api/Operator/DnsTemplate.php (97%) rename src/{PleskX => }/Api/Operator/EventLog.php (94%) rename src/{PleskX => }/Api/Operator/Ip.php (91%) rename src/{PleskX => }/Api/Operator/Locale.php (94%) rename src/{PleskX => }/Api/Operator/LogRotation.php (63%) rename src/{PleskX => }/Api/Operator/Mail.php (96%) rename src/{PleskX => }/Api/Operator/PhpHandler.php (93%) rename src/{PleskX => }/Api/Operator/ProtectedDirectory.php (73%) rename src/{PleskX => }/Api/Operator/Reseller.php (97%) rename src/{PleskX => }/Api/Operator/ResellerPlan.php (63%) rename src/{PleskX => }/Api/Operator/SecretKey.php (96%) rename src/{PleskX => }/Api/Operator/Server.php (98%) rename src/{PleskX => }/Api/Operator/ServicePlan.php (95%) rename src/{PleskX => }/Api/Operator/ServicePlanAddon.php (64%) rename src/{PleskX => }/Api/Operator/Session.php (93%) rename src/{PleskX => }/Api/Operator/Site.php (97%) mode change 100755 => 100644 rename src/{PleskX => }/Api/Operator/SiteAlias.php (94%) rename src/{PleskX => }/Api/Operator/Subdomain.php (97%) rename src/{PleskX => }/Api/Operator/Ui.php (96%) rename src/{PleskX => }/Api/Operator/VirtualDirectory.php (72%) rename src/{PleskX => }/Api/Operator/Webspace.php (98%) rename src/{PleskX => }/Api/Struct.php (97%) rename src/{PleskX => }/Api/Struct/Certificate/Info.php (87%) rename src/{PleskX => }/Api/Struct/Customer/GeneralInfo.php (95%) rename src/{PleskX => }/Api/Struct/Customer/Info.php (86%) rename src/{PleskX => }/Api/Struct/Database/Info.php (92%) rename src/{PleskX => }/Api/Struct/Database/UserInfo.php (88%) rename src/{PleskX => }/Api/Struct/DatabaseServer/Info.php (89%) rename src/{PleskX => }/Api/Struct/Dns/Info.php (92%) rename src/{PleskX => }/Api/Struct/EventLog/DetailedEvent.php (92%) rename src/{PleskX => }/Api/Struct/EventLog/Event.php (89%) rename src/{PleskX => }/Api/Struct/Ip/Info.php (90%) rename src/{PleskX => }/Api/Struct/Locale/Info.php (88%) rename src/{PleskX => }/Api/Struct/Mail/Info.php (86%) rename src/{PleskX => }/Api/Struct/PhpHandler/Info.php (94%) rename src/{PleskX => }/Api/Struct/Reseller/GeneralInfo.php (92%) rename src/{PleskX => }/Api/Struct/Reseller/Info.php (86%) rename src/{PleskX => }/Api/Struct/SecretKey/Info.php (90%) rename src/{PleskX => }/Api/Struct/Server/Admin.php (89%) rename src/{PleskX => }/Api/Struct/Server/GeneralInfo.php (88%) rename src/{PleskX => }/Api/Struct/Server/Preferences.php (89%) rename src/{PleskX => }/Api/Struct/Server/SessionPreferences.php (85%) rename src/{PleskX => }/Api/Struct/Server/Statistics.php (88%) rename src/{PleskX => }/Api/Struct/Server/Statistics/Objects.php (87%) rename src/{PleskX => }/Api/Struct/Server/Statistics/Version.php (88%) rename src/{PleskX => }/Api/Struct/Server/UpdatesInfo.php (88%) rename src/{PleskX => }/Api/Struct/ServicePlan/Info.php (89%) rename src/{PleskX => }/Api/Struct/Session/Info.php (91%) rename src/{PleskX => }/Api/Struct/Site/GeneralInfo.php (90%) rename src/{PleskX => }/Api/Struct/Site/HostingInfo.php (90%) mode change 100755 => 100644 rename src/{PleskX => }/Api/Struct/Site/Info.php (86%) rename src/{PleskX => }/Api/Struct/SiteAlias/Info.php (86%) rename src/{PleskX => }/Api/Struct/Subdomain/Info.php (92%) rename src/{PleskX => }/Api/Struct/Ui/CustomButton.php (93%) rename src/{PleskX => }/Api/Struct/Webspace/GeneralInfo.php (86%) rename src/{PleskX => }/Api/Struct/Webspace/HostingPropertyInfo.php (88%) rename src/{PleskX => }/Api/Struct/Webspace/Info.php (86%) rename src/{PleskX => }/Api/Struct/Webspace/LimitDescriptor.php (88%) rename src/{PleskX => }/Api/Struct/Webspace/LimitInfo.php (88%) rename src/{PleskX => }/Api/Struct/Webspace/PermissionDescriptor.php (88%) rename src/{PleskX => }/Api/Struct/Webspace/PermissionInfo.php (88%) rename src/{PleskX => }/Api/Struct/Webspace/PhysicalHostingDescriptor.php (88%) rename src/{PleskX => }/Api/XmlResponse.php (85%) diff --git a/Gruntfile.js b/Gruntfile.js index f4ec4e3d..39df1c43 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,4 @@ -// Copyright 1999-2016. Parallels IP Holdings GmbH. +// Copyright 1999-2019. Plesk International GmbH. module.exports = function(grunt) { grunt.initConfig({ diff --git a/LICENSE b/LICENSE index 368e39a8..af229880 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2016. Parallels IP Holdings GmbH. +Copyright 1999-2019. 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/composer.json b/composer.json index 4c186c75..5d9c444d 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,15 @@ "email": "sibprogrammer@gmail.com" }, { - "name": "Plesk", + "name": "Plesk International GmbH.", "email": "plesk-dev-leads@plesk.com" } ], "require": { - "php": "^5.6 | ^7.0", + "php": "^5.6 || ^7.0", "ext-curl": "*", - "ext-xml": "*" + "ext-xml": "*", + "ext-simplexml": "*" }, "require-dev": { "phpunit/phpunit": "^7.0" @@ -29,11 +30,13 @@ }, "autoload": { "psr-4": { - "PleskX\\": "src/PleskX/" + "PleskX\\": "src/" } }, "autoload-dev": { - "classmap": ["tests/"] + "psr-4": { + "PleskXTest\\": "tests/" + } }, "extra": { "branch-alias": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0dea5ffa..317a550f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,9 +1,24 @@ - - + + - tests/ + ./tests + + + + ./src + + + + + + + diff --git a/src/PleskX/Api/Client.php b/src/Api/Client.php similarity index 99% rename from src/PleskX/Api/Client.php rename to src/Api/Client.php index 02f839c0..e1e6439f 100644 --- a/src/PleskX/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ 'privateKey'], ]); } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php similarity index 95% rename from src/PleskX/Api/Struct/Customer/GeneralInfo.php rename to src/Api/Struct/Customer/GeneralInfo.php index b1196949..b72b55f9 100644 --- a/src/PleskX/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ 'email'], ]); } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php similarity index 88% rename from src/PleskX/Api/Struct/Server/GeneralInfo.php rename to src/Api/Struct/Server/GeneralInfo.php index 332332de..2cf0ccac 100644 --- a/src/PleskX/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ objects = new Statistics\Objects($apiResponse->objects); $this->version = new Statistics\Version($apiResponse->version); } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php similarity index 87% rename from src/PleskX/Api/Struct/Server/Statistics/Objects.php rename to src/Api/Struct/Server/Statistics/Objects.php index 6d518867..bb5d6ffd 100644 --- a/src/PleskX/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ 'version'], ]); } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/Struct/Server/UpdatesInfo.php b/src/Api/Struct/Server/UpdatesInfo.php similarity index 88% rename from src/PleskX/Api/Struct/Server/UpdatesInfo.php rename to src/Api/Struct/Server/UpdatesInfo.php index a29da158..d47c9433 100644 --- a/src/PleskX/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ limits[(string)$propertyInfo->name] = new LimitInfo($propertyInfo); } } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php similarity index 88% rename from src/PleskX/Api/Struct/Webspace/LimitInfo.php rename to src/Api/Struct/Webspace/LimitInfo.php index b7d73791..5fdb6bc1 100644 --- a/src/PleskX/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ permissions[(string)$propertyInfo->name] = new PermissionInfo($propertyInfo); } } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php similarity index 88% rename from src/PleskX/Api/Struct/Webspace/PermissionInfo.php rename to src/Api/Struct/Webspace/PermissionInfo.php index c40a496f..8d6ab1c4 100644 --- a/src/PleskX/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ properties[(string)$propertyInfo->name] = new HostingPropertyInfo($propertyInfo); } } -} \ No newline at end of file +} diff --git a/src/PleskX/Api/XmlResponse.php b/src/Api/XmlResponse.php similarity index 85% rename from src/PleskX/Api/XmlResponse.php rename to src/Api/XmlResponse.php index 8c3ce61c..aa3da799 100644 --- a/src/PleskX/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ xpath('//' . $node)[0]; } -} \ No newline at end of file +} diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index a456f44d..49a71fbd 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,10 +1,11 @@ getHost(); $port = static::$_client->getPort(); $protocol = static::$_client->getProtocol(); - $client = new PleskX\Api\Client($host, $port, $protocol); + $client = new \PleskX\Api\Client($host, $port, $protocol); $client->setCredentials('bad-login', 'bad-password'); $packet = static::$_client->getPacket(); $packet->addChild('server')->addChild('get_protos'); @@ -61,7 +62,7 @@ public function testInvalidSecretKey() $host = static::$_client->getHost(); $port = static::$_client->getPort(); $protocol = static::$_client->getProtocol(); - $client = new PleskX\Api\Client($host, $port, $protocol); + $client = new \PleskX\Api\Client($host, $port, $protocol); $client->setSecretKey('bad-key'); $packet = static::$_client->getPacket(); $packet->addChild('server')->addChild('get_protos'); diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 5ead19e9..233c879f 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,9 +1,9 @@ certificate()->generate([ @@ -20,5 +20,4 @@ public function testGenerate() $this->assertGreaterThan(0, strlen($certificate->privateKey)); $this->assertStringStartsWith('-----BEGIN PRIVATE KEY-----', $certificate->privateKey); } - } diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index a6ac291b..32f018a9 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,9 +1,9 @@ 'Plesk', 'pname' => 'John Smith', @@ -65,5 +65,4 @@ public function testGetAll() static::$_client->customer()->delete('login', 'customer-a'); static::$_client->customer()->delete('login', 'customer-b'); } - } diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 5ab1e372..5340c170 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,9 +1,9 @@ databaseServer()->getSupportedTypes(); @@ -25,5 +25,4 @@ public function testGetAll() $this->assertGreaterThan(0, count($dbServers)); $this->assertEquals('localhost', $dbServers[0]->host); } - } diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 2ab1e117..3e6286a4 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,6 @@ eventLog()->get(); @@ -28,5 +28,4 @@ public function testGetLastId() $lastId = static::$_client->eventLog()->getLastId(); $this->assertGreaterThan(0, $lastId); } - } diff --git a/tests/IpTest.php b/tests/IpTest.php index d9cab6bb..95033c34 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,9 +1,9 @@ ip()->get(); @@ -12,5 +12,4 @@ public function testGet() $ip = reset($ips); $this->assertRegExp('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $ip->ipAddress); } - } diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index 739217c8..5de8a10c 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,9 +1,9 @@ locale()->get(); @@ -18,5 +18,4 @@ public function testGetById() $locale = static::$_client->locale()->get('en-US'); $this->assertEquals('en-US', $locale->id); } - } diff --git a/tests/MailTest.php b/tests/MailTest.php index d4213fda..f0d5dc50 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,9 +1,9 @@ mail()->delete('name', $mailname->name, static::$_webspace->id); $this->assertTrue($result); } - } diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 8fa836c6..8c9313aa 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,6 @@ 'John Reseller', 'login' => 'reseller-unit-test', @@ -58,5 +58,4 @@ public function testGetAll() static::$_client->reseller()->delete('login', 'reseller-a'); static::$_client->reseller()->delete('login', 'reseller-b'); } - } diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index a6bef2ca..e48d45ca 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,9 +1,11 @@ secretKey()->create('192.168.0.1'); diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 19e40f51..41366365 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,9 +1,9 @@ server()->getProtos(); @@ -112,5 +112,4 @@ public function testGetUpdatesInfo() $updatesInfo = static::$_client->server()->getUpdatesInfo(); $this->assertInternalType('boolean', $updatesInfo->installUpdatesAutomatically); } - } diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 196eb280..a290b359 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,9 +1,9 @@ servicePlan()->get('name', 'Default Domain'); @@ -18,5 +18,4 @@ public function testGetAll() $this->assertGreaterThan(0, count($servicePlans)); $this->assertNotEmpty($servicePlans[0]->name); } - } diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 8aabab53..670fb43d 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,9 +1,9 @@ server()->createSession('admin', '127.0.0.1'); @@ -23,5 +23,4 @@ public function testTerminate() $sessions = static::$_client->session()->get(); $this->assertArrayNotHasKey($sessionId, $sessions); } - } diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 9205cf92..002f0a7d 100755 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,6 @@ [ - 'www_root' => 'addon.dom' - ] + 'www_root' => 'addon.dom', + ], ]; $site = $this->_createSite('addon.dom', $properties); @@ -96,5 +97,4 @@ public function testGetAll() 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 28cdc3ef..78e381b1 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,6 @@ setCredentials($login, $password); } @@ -45,8 +45,7 @@ protected static function _createWebspace($name) 'ip_address' => static::_getIpAddress(), ], [ 'ftp_login' => 'test-login', - 'ftp_password' => 'TEST-password', + 'ftp_password' => 'TEST1-password', ]); } - } diff --git a/tests/UiTest.php b/tests/UiTest.php index 59a0507b..7dabb7bb 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,9 +1,9 @@ 'admin', 'url' => 'http://example.com/', @@ -48,5 +48,4 @@ public function testDeleteCustomButton() $result = static::$_client->ui()->deleteCustomButton($buttonId); $this->assertTrue($result); } - } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index cc9536e6..cce86a3d 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,9 +1,9 @@ webspace()->delete('id', $domain->id); } - } From ce302db9aa40d413f9ba12efe35813da1df8f859 Mon Sep 17 00:00:00 2001 From: Dmitry Barsukov Date: Wed, 26 Dec 2018 12:34:20 +0700 Subject: [PATCH 048/243] Fix tests for running on Windows host --- tests/ServerTest.php | 45 ++++++++++++++++++++------------------------ tests/SiteTest.php | 4 ++-- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 41366365..0350e778 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -7,7 +7,7 @@ class ServerTest extends TestCase public function testGetProtos() { $protos = static::$_client->server()->getProtos(); - $this->assertInternalType('array', $protos); + $this->assertIsArray($protos); $this->assertContains('1.6.3.0', $protos); } @@ -15,14 +15,14 @@ public function testGetGenInfo() { $generalInfo = static::$_client->server()->getGeneralInfo(); $this->assertGreaterThan(0, strlen($generalInfo->serverName)); - $this->assertRegExp('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $generalInfo->serverGuid); + $this->assertRegExp('/^[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(); - $this->assertInternalType('integer', $preferences->statTtl); + $this->assertIsNumeric($preferences->statTtl); $this->assertGreaterThan(0, $preferences->statTtl); $this->assertEquals(0, $preferences->restartApacheInterval); } @@ -37,7 +37,7 @@ public function testGetAdmin() public function testGetKeyInfo() { $keyInfo = static::$_client->server()->getKeyInfo(); - $this->assertInternalType('array', $keyInfo); + $this->assertIsArray($keyInfo); $this->assertGreaterThan(0, count($keyInfo)); $this->assertArrayHasKey('plesk_key_id', $keyInfo); $this->assertArrayHasKey('lim_date', $keyInfo); @@ -46,63 +46,58 @@ public function testGetKeyInfo() public function testGetComponents() { $components = static::$_client->server()->getComponents(); - $this->assertInternalType('array', $components); + $this->assertIsArray($components); $this->assertGreaterThan(0, count($components)); $this->assertArrayHasKey('psa', $components); - $this->assertArrayHasKey('php', $components); } public function testGetServiceStates() { $serviceStates = static::$_client->server()->getServiceStates(); - $this->assertInternalType('array', $serviceStates); + + $this->assertIsArray($serviceStates); $this->assertGreaterThan(0, count($serviceStates)); - $this->assertArrayHasKey('web', $serviceStates); - - $webService = $serviceStates['web']; - $this->assertInternalType('array', $webService); - $this->assertArrayHasKey('id', $webService); - $this->assertArrayHasKey('title', $webService); - $this->assertArrayHasKey('state', $webService); - $this->assertEquals('running', $webService['state']); + + $service = current($serviceStates); + $this->assertIsArray($service); + $this->assertArrayHasKey('id', $service); + $this->assertArrayHasKey('title', $service); + $this->assertArrayHasKey('state', $service); } public function testGetSessionPreferences() { $preferences = static::$_client->server()->getSessionPreferences(); - $this->assertInternalType('integer', $preferences->loginTimeout); + $this->assertIsNumeric($preferences->loginTimeout); $this->assertGreaterThan(0, $preferences->loginTimeout); } public function testGetShells() { $shells = static::$_client->server()->getShells(); - $this->assertInternalType('array', $shells); - $this->assertGreaterThan(0, count($shells)); - $this->assertArrayHasKey('/bin/bash', $shells); - $bash = $shells['/bin/bash']; - $this->assertEquals('/bin/bash', $bash); + $this->assertIsArray($shells); + $this->assertGreaterThan(0, count($shells)); } public function testGetNetworkInterfaces() { $netInterfaces = static::$_client->server()->getNetworkInterfaces(); - $this->assertInternalType('array', $netInterfaces); + $this->assertIsArray($netInterfaces); $this->assertGreaterThan(0, count($netInterfaces)); } public function testGetStatistics() { $stats = static::$_client->server()->getStatistics(); - $this->assertInternalType('integer', $stats->objects->clients); + $this->assertIsNumeric($stats->objects->clients); $this->assertEquals('psa', $stats->version->internalName); } public function testGetSiteIsolationConfig() { $config = static::$_client->server()->getSiteIsolationConfig(); - $this->assertInternalType('array', $config); + $this->assertIsArray($config); $this->assertGreaterThan(0, count($config)); $this->assertArrayHasKey('php', $config); } @@ -110,6 +105,6 @@ public function testGetSiteIsolationConfig() public function testGetUpdatesInfo() { $updatesInfo = static::$_client->server()->getUpdatesInfo(); - $this->assertInternalType('boolean', $updatesInfo->installUpdatesAutomatically); + $this->assertIsBool($updatesInfo->installUpdatesAutomatically); } } diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 002f0a7d..9a63a88b 100755 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -34,7 +34,7 @@ public function testCreate() { $site = $this->_createSite('addon.dom'); - $this->assertInternalType('integer', $site->id); + $this->assertIsNumeric($site->id); $this->assertGreaterThan(0, $site->id); static::$_client->site()->delete('id', $site->id); @@ -79,7 +79,7 @@ public function testGetHostingWithHosting() $siteHosting = static::$_client->site()->getHosting('id', $site->id); $this->assertArrayHasKey('www_root', $siteHosting->properties); - $this->assertEquals('addon.dom', basename($siteHosting->properties['www_root'])); + $this->assertStringEndsWith('addon.dom', $siteHosting->properties['www_root']); static::$_client->site()->delete('id', $site->id); } From a2b82f23022b26665fb789d93854ce031196b59c Mon Sep 17 00:00:00 2001 From: Dmitry Barsukov Date: Wed, 26 Dec 2018 17:02:37 +0700 Subject: [PATCH 049/243] Fix tests for running on Windows host Part 2 --- phpunit.xml.dist | 1 + src/Api/Operator/PhpHandler.php | 25 +++++++++ tests/DatabaseTest.php | 72 ++++++++++++-------------- tests/DnsTest.php | 55 +++++++++----------- tests/MailTest.php | 32 +++++------- tests/PhpHandlerTest.php | 19 +++++-- tests/SiteTest.php | 16 ++---- tests/SubdomainTest.php | 25 ++++----- tests/TestCase.php | 37 +++++++++---- tests/WebspaceTest.php | 92 +++++++++++++++------------------ 10 files changed, 196 insertions(+), 178 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 317a550f..6784e9d9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,6 +18,7 @@ + diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index d68c7d86..15ee084f 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -29,4 +29,29 @@ public function get($field, $value) return new Info($xmlResult); } + + /** + * @param string|null $field + * @param integer|string $value + * @return Info[] + */ + public function getAll($field = null, $value = null) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $item = new Info($xmlResult); + $items[] = $item; + } + + return $items; + } } diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 3e6286a4..2980e624 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -4,30 +4,22 @@ class DatabaseTest extends TestCase { - /** - * @var \PleskX\Api\Struct\Webspace\Info - */ - private static $_webspace; + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; public static function setUpBeforeClass() { parent::setUpBeforeClass(); - static::$_webspace = static::_createWebspace('example.dom'); - } - - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - static::$_client->webspace()->delete('id', static::$_webspace->id); + static::$webspace = static::_createWebspace(); } public function testCreate() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); static::$_client->database()->delete('id', $database->id); } @@ -35,10 +27,10 @@ public function testCreate() public function testCreateUser() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $user = $this->_createUser([ 'db-id' => $database->id, @@ -52,10 +44,10 @@ public function testCreateUser() public function testUpdateUser() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $user = $this->_createUser([ 'db-id' => $database->id, @@ -65,7 +57,7 @@ public function testUpdateUser() $updatedUser = static::$_client->database()->updateUser([ 'id' => $user->id, 'login' => 'test_user2', - 'password' => 'setup2Q' + 'password' => 'setup2Q', ]); $this->assertEquals(true, $updatedUser); static::$_client->database()->deleteUser('id', $user->id); @@ -75,16 +67,16 @@ public function testUpdateUser() public function testGetById() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $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(static::$webspace->id, $db->webspaceId); $this->assertEquals(1, $db->dbServerId); static::$_client->database()->delete('id', $database->id); @@ -93,21 +85,21 @@ public function testGetById() public function testGetAllByWebspaceId() { $db1 = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $db2 = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test2', 'type' => 'mysql', - 'db-server-id' => 1 + '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(static::$webspace->id, $databases[0]->webspaceId); $this->assertEquals(1, $databases[1]->dbServerId); static::$_client->database()->delete('id', $db1->id); @@ -117,10 +109,10 @@ public function testGetAllByWebspaceId() public function testGetUserById() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $user = $this->_createUser([ @@ -140,16 +132,16 @@ public function testGetUserById() public function testGetAllUsersByDbId() { $db1 = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $db2 = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test2', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $user1 = $this->_createUser([ 'db-id' => $db1->id, @@ -184,10 +176,10 @@ public function testGetAllUsersByDbId() public function testDelete() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $result = static::$_client->database()->delete('id', $database->id); $this->assertTrue($result); @@ -196,10 +188,10 @@ public function testDelete() public function testDeleteUser() { $database = $this->_createDatabase([ - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, 'name' => 'test1', 'type' => 'mysql', - 'db-server-id' => 1 + 'db-server-id' => 1, ]); $user = $this->_createUser([ 'db-id' => $database->id, @@ -219,8 +211,9 @@ public function testDeleteUser() private function _createDatabase(array $params) { $database = static::$_client->database()->create($params); - $this->assertInternalType('integer', $database->id); + $this->assertIsInt($database->id); $this->assertGreaterThan(0, $database->id); + return $database; } @@ -231,8 +224,9 @@ private function _createDatabase(array $params) private function _createUser(array $params) { $user = static::$_client->database()->createUser($params); - $this->assertInternalType('integer', $user->id); + $this->assertIsInt($user->id); $this->assertGreaterThan(0, $user->id); + return $user; } } diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 280355e7..8ab24951 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -4,37 +4,28 @@ class DnsTest extends TestCase { - /** - * @var \PleskX\Api\Struct\Webspace\Info - */ - private static $_webspace; + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; - /** - * @var bool - */ - private static $_isDnsSupported; + private static $isDnsSupported; public static function setUpBeforeClass() { parent::setUpBeforeClass(); $serviceStates = static::$_client->server()->getServiceStates(); - static::$_isDnsSupported = $serviceStates['dns'] && ('running' == $serviceStates['dns']['state']); + static::$isDnsSupported = isset($serviceStates['dns']) && ('running' == $serviceStates['dns']['state']); - static::$_webspace = static::_createWebspace('example.dom'); - } - - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - static::$_client->webspace()->delete('id', static::$_webspace->id); + if (static::$isDnsSupported) { + static::$webspace = static::_createWebspace(); + } } protected function setUp() { parent::setUp(); - if (!static::$_isDnsSupported) { + if (!static::$isDnsSupported) { $this->markTestSkipped('DNS system is not supported.'); } } @@ -42,12 +33,12 @@ protected function setUp() public function testCreate() { $dns = static::$_client->dns()->create([ - 'site-id' => static::$_webspace->id, + 'site-id' => static::$webspace->id, 'type' => 'TXT', 'host' => 'host', - 'value' => 'value' + 'value' => 'value', ]); - $this->assertInternalType('integer', $dns->id); + $this->assertIsInt($dns->id); $this->assertGreaterThan(0, $dns->id); static::$_client->dns()->delete('id', $dns->id); } @@ -55,15 +46,15 @@ public function testCreate() public function testGetById() { $dns = static::$_client->dns()->create([ - 'site-id' => static::$_webspace->id, + 'site-id' => static::$webspace->id, 'type' => 'TXT', 'host' => '', - 'value' => 'value' + 'value' => 'value', ]); $dnsInfo = static::$_client->dns()->get('id', $dns->id); $this->assertEquals('TXT', $dnsInfo->type); - $this->assertEquals(static::$_webspace->id, $dnsInfo->siteId); + $this->assertEquals(static::$webspace->id, $dnsInfo->siteId); $this->assertEquals('value', $dnsInfo->value); static::$_client->dns()->delete('id', $dns->id); @@ -72,27 +63,27 @@ public function testGetById() public function testGetAllByWebspaceId() { $dns = static::$_client->dns()->create([ - 'site-id' => static::$_webspace->id, + 'site-id' => static::$webspace->id, 'type' => 'DS', 'host' => '', - 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292118' + 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292118', ]); $dns2 = static::$_client->dns()->create([ - 'site-id' => static::$_webspace->id, + 'site-id' => static::$webspace->id, 'type' => 'DS', 'host' => '', - 'value' => '60485 5 1 2BB183AF5F22588179A53B0A98631FAD1A292119' + '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 ) { + if ('DS' == $dnsRec->type) { $dsRecords[] = $dnsRec; } } $this->assertEquals(2, count($dsRecords)); foreach ($dsRecords as $dsRecord) { - $this->assertEquals(static::$_webspace->id, $dsRecord->siteId); + $this->assertEquals(static::$webspace->id, $dsRecord->siteId); } static::$_client->dns()->delete('id', $dns->id); @@ -102,10 +93,10 @@ public function testGetAllByWebspaceId() public function testDelete() { $dns = static::$_client->dns()->create([ - 'site-id' => static::$_webspace->id, + 'site-id' => static::$webspace->id, 'type' => 'TXT', 'host' => 'host', - 'value' => 'value' + 'value' => 'value', ]); $result = static::$_client->dns()->delete('id', $dns->id); $this->assertTrue($result); diff --git a/tests/MailTest.php b/tests/MailTest.php index f0d5dc50..b4490692 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -4,57 +4,51 @@ class MailTest extends TestCase { - /** - * @var \PleskX\Api\Struct\Webspace\Info - */ - private static $_webspace; + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; /** * @var bool */ - private static $_isMailSupported; + private static $isMailSupported; public static function setUpBeforeClass() { parent::setUpBeforeClass(); $serviceStates = static::$_client->server()->getServiceStates(); - static::$_isMailSupported = $serviceStates['smtp'] && ('running' == $serviceStates['smtp']['state']); - - static::$_webspace = static::_createWebspace('example.dom'); - } + static::$isMailSupported = isset($serviceStates['smtp']) && ('running' == $serviceStates['smtp']['state']); - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - static::$_client->webspace()->delete('id', static::$_webspace->id); + if (static::$isMailSupported) { + static::$webspace = static::_createWebspace(); + } } protected function setUp() { parent::setUp(); - if (!static::$_isMailSupported) { + if (!static::$isMailSupported) { $this->markTestSkipped('Mail system is not supported.'); } } public function testCreate() { - $mailname = static::$_client->mail()->create('test', static::$_webspace->id, true, 'secret'); + $mailname = static::$_client->mail()->create('test', static::$webspace->id, true, 'secret'); - $this->assertInternalType('integer', $mailname->id); + $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); } } diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 8c9313aa..3cf413ac 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -2,15 +2,26 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskX\Api\Struct\PhpHandler\Info; + class PhpHandlerTest extends TestCase { - const PHP_HANDLER_ID = 'fpm'; - public function testGet() { - $handler = static::$_client->phpHandler()->get('id', self::PHP_HANDLER_ID); + $handler = static::$_client->phpHandler()->get(null, null); + + $this->assertInstanceOf(Info::class, $handler); + } + + public function testGetAll() + { + $handlers = static::$_client->phpHandler()->getAll(); + + $this->assertIsArray($handlers); + $this->assertNotEmpty($handlers); - $this->assertSame(self::PHP_HANDLER_ID, $handler->id); + $handler = current($handlers); + $this->assertInstanceOf(Info::class, $handler); } /** diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 9a63a88b..db2e68de 100755 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -4,28 +4,20 @@ class SiteTest extends TestCase { - /** - * @var \PleskX\Api\Struct\Webspace\Info - */ - private static $_webspace; + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; public static function setUpBeforeClass() { parent::setUpBeforeClass(); - static::$_webspace = static::_createWebspace('example.dom'); - } - - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - static::$_client->webspace()->delete('id', static::$_webspace->id); + static::$webspace = static::_createWebspace(); } private function _createSite($name, array $properties = []) { $properties = array_merge([ 'name' => $name, - 'webspace-id' => static::$_webspace->id, + 'webspace-id' => static::$webspace->id, ], $properties); return static::$_client->site()->create($properties); } diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 78e381b1..8b006d93 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -4,21 +4,18 @@ class SubdomainTest extends TestCase { - /** - * @var \PleskX\Api\Struct\Webspace\Info - */ - private static $_webspace; + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; + + /** @var string */ + private static $webspaceName; public static function setUpBeforeClass() { parent::setUpBeforeClass(); - static::$_webspace = static::_createWebspace('example.dom'); - } - - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - static::$_client->webspace()->delete('id', static::$_webspace->id); + static::$webspace = static::_createWebspace(); + $webspaceInfo = static::$_client->webspace()->get('id', static::$webspace->id); + static::$webspaceName = $webspaceInfo->name; } /** @@ -28,11 +25,11 @@ public static function tearDownAfterClass() private function _createSubdomain($name) { return static::$_client->subdomain()->create([ - 'parent' => 'example.dom', + 'parent' => static::$webspaceName, 'name' => $name, 'property' => [ 'www_root' => $name, - ] + ], ]); } @@ -40,7 +37,7 @@ public function testCreate() { $subdomain = $this->_createSubdomain('sub'); - $this->assertInternalType('integer', $subdomain->id); + $this->assertIsInt($subdomain->id); $this->assertGreaterThan(0, $subdomain->id); static::$_client->subdomain()->delete('id', $subdomain->id); diff --git a/tests/TestCase.php b/tests/TestCase.php index d08ae9f9..3f5b46a5 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -7,6 +7,8 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase /** @var \PleskX\Api\Client */ protected static $_client; + private static $webspaces = []; + public static function setUpBeforeClass() { $login = getenv('REMOTE_LOGIN'); @@ -24,6 +26,16 @@ public static function setUpBeforeClass() static::$_client->setCredentials($login, $password); } + public static function tearDownAfterClass() + { + foreach (self::$webspaces as $webspace) { + try { + static::$_client->webspace()->delete('id', $webspace->id); + } catch (\Exception $e) { + } + } + } + /** * @return string */ @@ -35,17 +47,24 @@ protected static function _getIpAddress() } /** - * @param string $name * @return \PleskX\Api\Struct\Webspace\Info */ - protected static function _createWebspace($name) + protected static function _createWebspace() { - return static::$_client->webspace()->create([ - 'name' => $name, - 'ip_address' => static::_getIpAddress(), - ], [ - 'ftp_login' => 'test-login', - 'ftp_password' => 'TEST1-password', - ]); + $id = uniqid(); + $password = base64_encode(time()); + + $webspace = static::$_client->webspace()->create( + [ + 'name' => "test{$id}.test", + 'ip_address' => static::_getIpAddress(), + ], [ + 'ftp_login' => "u{$id}", + 'ftp_password' => $password, + ] + ); + self::$webspaces[] = $webspace; + + return $webspace; } } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index cce86a3d..04d69843 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -4,70 +4,58 @@ class WebspaceTest extends TestCase { - /** - * @return \PleskX\Api\Struct\Webspace\Info - */ - private function _createDomain() - { - return static::$_client->webspace()->create([ - 'name' => 'example-test.dom', - 'ip_address' => static::_getIpAddress(), - ]); - } - public function testGetPermissionDescriptor() { $descriptor = static::$_client->webspace()->getPermissionDescriptor(); - $this->assertInternalType('array', $descriptor->permissions); - $this->assertGreaterThan(0, count($descriptor->permissions)); + $this->assertIsArray($descriptor->permissions); + $this->assertNotEmpty($descriptor->permissions); } public function testGetLimitDescriptor() { $descriptor = static::$_client->webspace()->getLimitDescriptor(); - $this->assertInternalType('array', $descriptor->limits); - $this->assertGreaterThan(0, count($descriptor->limits)); + $this->assertIsArray($descriptor->limits); + $this->assertNotEmpty($descriptor->limits); } public function testGetPhysicalHostingDescriptor() { $descriptor = static::$_client->webspace()->getPhysicalHostingDescriptor(); - $this->assertInternalType('array', $descriptor->properties); - $this->assertGreaterThan(0, count($descriptor->properties)); + $this->assertIsArray($descriptor->properties); + $this->assertNotEmpty($descriptor->properties); $ftpLoginProperty = $descriptor->properties['ftp_login']; $this->assertEquals('ftp_login', $ftpLoginProperty->name); $this->assertEquals('string', $ftpLoginProperty->type); } - public function testCreate() + public function testCreateWebspace() { - $domain = $this->_createDomain(); - $this->assertInternalType('integer', $domain->id); - $this->assertGreaterThan(0, $domain->id); + $webspace = static::_createWebspace(); - static::$_client->webspace()->delete('id', $domain->id); + $this->assertGreaterThan(0, $webspace->id); } - public function testCreateWebspace() + public function testDelete() { - $webspace = static::$_client->webspace()->create([ - 'name' => 'example-test.dom', - 'ip_address' => static::_getIpAddress(), - ], [ - 'ftp_login' => 'test-login', - 'ftp_password' => 'test-password', - ]); - $this->assertGreaterThan(0, $webspace->id); - static::$_client->webspace()->delete('id', $webspace->id); + $webspace = static::_createWebspace(); + $result = static::$_client->webspace()->delete('id', $webspace->id); + + $this->assertTrue($result); } public function testRequestCreateWebspace() { - $webspace = static::$_client->webspace()->request([ + $id = uniqid(); + $password = base64_encode(time()); + $name = "d{$id}.test"; + + $handler = static::$_client->phpHandler()->get(null, null); + + $request = [ 'add' => [ 'gen_setup' => [ - 'name' => 'example-second-test.dom', + 'name' => $name, 'htype' => 'vrt_hst', 'status' => '0', 'ip_address' => [static::_getIpAddress()], @@ -77,15 +65,15 @@ public function testRequestCreateWebspace() 'property' => [ [ 'name' => 'php_handler_id', - 'value' => 'fastcgi', + 'value' => $handler->id, ], [ 'name' => 'ftp_login', - 'value' => 'ftp-login-test-1', + 'value' => "u{$id}", ], [ 'name' => 'ftp_password', - 'value' => 'ftp-password-test-1', + 'value' => $password, ], ], 'ip_address' => static::_getIpAddress(), @@ -130,24 +118,30 @@ public function testRequestCreateWebspace() ], 'plan-name' => 'Unlimited', ], - ]); + ]; + + try { + $webspace = static::$_client->webspace()->request($request); + } catch (\Exception $e) { + try { + $webspaceInfo = static::$_client->webspace()->get('name', $name); + static::$_client->webspace()->delete('guid', $webspaceInfo->guid); + } catch (\Exception $e) { + } + + $this->fail($e->getMessage()); + } + $this->assertGreaterThan(0, $webspace->id); - static::$_client->webspace()->delete('id', $webspace->id); - } - public function testDelete() - { - $domain = $this->_createDomain(); - $result = static::$_client->webspace()->delete('id', $domain->id); - $this->assertTrue($result); + static::$_client->webspace()->delete('id', $webspace->id); } public function testGet() { - $domain = $this->_createDomain(); - $domainInfo = static::$_client->webspace()->get('id', $domain->id); - $this->assertEquals('example-test.dom', $domainInfo->name); + $webspace = static::_createWebspace(); + $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); - static::$_client->webspace()->delete('id', $domain->id); + $this->assertInstanceOf(\PleskX\Api\Struct\Webspace\GeneralInfo::class, $webspaceInfo); } } From 9908ec485161a37a77e90493b1a2a0a64d10da0e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 22 Jan 2019 12:54:44 +0700 Subject: [PATCH 050/243] Expose information about disk space usage for webspace. --- src/Api/Struct/Webspace/GeneralInfo.php | 4 ++++ tests/WebspaceTest.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index afded1be..f425a23a 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -11,11 +11,15 @@ class GeneralInfo extends \PleskX\Api\Struct /** @var string */ public $guid; + /** @var integer */ + public $realSize; + public function __construct($apiResponse) { $this->_initScalarProperties($apiResponse, [ 'name', 'guid', + 'real_size', ]); } } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 04d69843..12c2f17d 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -142,6 +142,8 @@ public function testGet() $webspace = static::_createWebspace(); $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); - $this->assertInstanceOf(\PleskX\Api\Struct\Webspace\GeneralInfo::class, $webspaceInfo); + $this->assertNotEmpty($webspaceInfo->name); + $this->assertEquals(0, $webspaceInfo->realSize); + } } From 9cb9cafb3a5b807ef5236a2385efb655b7647eed Mon Sep 17 00:00:00 2001 From: Dmitry Barsukov Date: Wed, 23 Jan 2019 19:06:59 +0700 Subject: [PATCH 051/243] Fix test creating webspace with disabled PHP handler --- tests/CustomerTest.php | 9 ++++++--- tests/WebspaceTest.php | 31 +++++++++++-------------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 32f018a9..552e9b95 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -58,9 +58,12 @@ public function testGetAll() ]); $customersInfo = static::$_client->customer()->getAll(); - $this->assertCount(2, $customersInfo); - $this->assertEquals('John Smith', $customersInfo[0]->personalName); - $this->assertEquals('customer-a', $customersInfo[0]->login); + $this->assertIsArray($customersInfo); + + $customersCheck = array_filter($customersInfo, function ($value) { + return $value->personalName === 'John Smith' || $value->personalName === 'Mike Black'; + }); + $this->assertCount(2, $customersCheck); static::$_client->customer()->delete('login', 'customer-a'); static::$_client->customer()->delete('login', 'customer-b'); diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 12c2f17d..b2040b62 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -46,16 +46,17 @@ public function testDelete() public function testRequestCreateWebspace() { - $id = uniqid(); - $password = base64_encode(time()); - $name = "d{$id}.test"; - - $handler = static::$_client->phpHandler()->get(null, null); + $handlers = static::$_client->phpHandler()->getAll(); + $enabledHandlers = array_filter($handlers, function ($handler) { + return $handler->handlerStatus !== 'disabled'; + }); + $this->assertGreaterThan(0, count($enabledHandlers)); + $handler = current($enabledHandlers); $request = [ 'add' => [ 'gen_setup' => [ - 'name' => $name, + 'name' => 'webspace-test-full.test', 'htype' => 'vrt_hst', 'status' => '0', 'ip_address' => [static::_getIpAddress()], @@ -69,11 +70,11 @@ public function testRequestCreateWebspace() ], [ 'name' => 'ftp_login', - 'value' => "u{$id}", + 'value' => 'testuser', ], [ 'name' => 'ftp_password', - 'value' => $password, + 'value' => 'test-PWD*1', ], ], 'ip_address' => static::_getIpAddress(), @@ -120,17 +121,7 @@ public function testRequestCreateWebspace() ], ]; - try { - $webspace = static::$_client->webspace()->request($request); - } catch (\Exception $e) { - try { - $webspaceInfo = static::$_client->webspace()->get('name', $name); - static::$_client->webspace()->delete('guid', $webspaceInfo->guid); - } catch (\Exception $e) { - } - - $this->fail($e->getMessage()); - } + $webspace = static::$_client->webspace()->request($request); $this->assertGreaterThan(0, $webspace->id); @@ -142,8 +133,8 @@ public function testGet() $webspace = static::_createWebspace(); $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); + $this->assertInstanceOf(\PleskX\Api\Struct\Webspace\GeneralInfo::class, $webspaceInfo); $this->assertNotEmpty($webspaceInfo->name); $this->assertEquals(0, $webspaceInfo->realSize); - } } From e213e6402e65655163475aaaf54a0527b23a9a13 Mon Sep 17 00:00:00 2001 From: Dmitry Barsukov Date: Thu, 24 Jan 2019 13:17:17 +0700 Subject: [PATCH 052/243] Drop instanceof checks from tests --- tests/PhpHandlerTest.php | 9 +++++---- tests/WebspaceTest.php | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 3cf413ac..e2202bb5 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -2,15 +2,14 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; -use PleskX\Api\Struct\PhpHandler\Info; - class PhpHandlerTest extends TestCase { public function testGet() { $handler = static::$_client->phpHandler()->get(null, null); - $this->assertInstanceOf(Info::class, $handler); + $this->assertIsObject($handler); + $this->assertObjectHasAttribute('type', $handler); } public function testGetAll() @@ -21,7 +20,9 @@ public function testGetAll() $this->assertNotEmpty($handlers); $handler = current($handlers); - $this->assertInstanceOf(Info::class, $handler); + + $this->assertIsObject($handler); + $this->assertObjectHasAttribute('type', $handler); } /** diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index b2040b62..3546c804 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -133,7 +133,6 @@ public function testGet() $webspace = static::_createWebspace(); $webspaceInfo = static::$_client->webspace()->get('id', $webspace->id); - $this->assertInstanceOf(\PleskX\Api\Struct\Webspace\GeneralInfo::class, $webspaceInfo); $this->assertNotEmpty($webspaceInfo->name); $this->assertEquals(0, $webspaceInfo->realSize); } From 36c63608f3bf789253ed0d124f332375c6fa5fc2 Mon Sep 17 00:00:00 2001 From: Fred Date: Mon, 4 Mar 2019 06:48:53 +0100 Subject: [PATCH 053/243] Getting disk usage details (#54) Getting disk usage details functionality added --- src/Api/Operator/Webspace.php | 11 +++++ src/Api/Struct/Site/GeneralInfo.php | 4 ++ src/Api/Struct/Webspace/DiskUsage.php | 58 +++++++++++++++++++++++++++ tests/WebspaceTest.php | 8 ++++ 4 files changed, 81 insertions(+) create mode 100644 src/Api/Struct/Webspace/DiskUsage.php diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index f8ef7850..3c7909d2 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -91,4 +91,15 @@ public function getAll() return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } + /** + * @param string $field + * @param integer|string $value + * @return Struct\DiskUsage + */ + public function getDiskUsage($field, $value) + { + $items = $this->_getItems(Struct\DiskUsage::class, 'disk_usage', $field, $value); + return reset($items); + } + } diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 4da96d0e..11e22aba 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -14,6 +14,9 @@ class GeneralInfo extends \PleskX\Api\Struct /** @var string */ public $guid; + /** @var string */ + public $status; + /** @var string */ public $description; @@ -22,6 +25,7 @@ public function __construct($apiResponse) $this->_initScalarProperties($apiResponse, [ 'name', 'ascii-name', + 'status', 'guid', 'description', ]); diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php new file mode 100644 index 00000000..bf43db21 --- /dev/null +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -0,0 +1,58 @@ +_initScalarProperties($apiResponse, [ + 'httpdocs', + 'httpsdocs', + 'subdomains', + 'anonftp', + 'logs', + 'dbases', + 'mailboxes', + 'maillists', + 'domaindumps', + 'configs', + 'chroot', + ]); + } +} diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 3546c804..3cdc9e72 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -18,6 +18,14 @@ public function testGetLimitDescriptor() $this->assertNotEmpty($descriptor->limits); } + public function testGetDiskUsage() + { + $webspace = static::_createWebspace(); + $diskusage = static::$_client->webspace()->getDiskUsage('id', $webspace->id); + + $this->assertObjectHasAttribute('httpdocs', $diskusage); + } + public function testGetPhysicalHostingDescriptor() { $descriptor = static::$_client->webspace()->getPhysicalHostingDescriptor(); From 10fb37aa73fdb7bd59f4c4d5f2da573f17263656 Mon Sep 17 00:00:00 2001 From: Lauris Binde Date: Wed, 13 Mar 2019 11:00:34 +0100 Subject: [PATCH 054/243] Add PhpSettings to Webspace (#56) --- src/Api/Operator/Webspace.php | 18 ++++++++++++++++++ src/Api/Struct/Webspace/PhpSettings.php | 19 +++++++++++++++++++ tests/WebspaceTest.php | 8 ++++++++ 3 files changed, 45 insertions(+) create mode 100644 src/Api/Struct/Webspace/PhpSettings.php diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 3c7909d2..275a100c 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -25,6 +25,24 @@ public function getPhysicalHostingDescriptor() return new Struct\PhysicalHostingDescriptor($response); } + /** + * @param string $field + * @param integer|string $value + * @return Struct\PhpSettings + */ + public function getPhpSettings($field, $value) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + + $getTag->addChild('filter')->addChild($field, $value); + $getTag->addChild('dataset')->addChild('php-settings'); + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + + return new Struct\PhpSettings($response); + } + /** * @param array $properties * @param array|null $hostingProperties diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php new file mode 100644 index 00000000..716b57d5 --- /dev/null +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -0,0 +1,19 @@ +properties = []; + + foreach ($apiResponse->webspace->get->result->data->{'php-settings'}->setting as $setting) { + $this->properties[(string)$setting->name] = (string)$setting->value; + } + } +} diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 3cdc9e72..f2ceffd7 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -37,6 +37,14 @@ public function testGetPhysicalHostingDescriptor() $this->assertEquals('string', $ftpLoginProperty->type); } + public function testGetPhpSettings() + { + $webspace = static::_createWebspace(); + $info = static::$_client->webspace()->getPhpSettings('id', $webspace->id); + + $this->assertArrayHasKey('open_basedir', $info->properties); + } + public function testCreateWebspace() { $webspace = static::_createWebspace(); From 3e739aaec3f2d93163f12e1da4181a12f8acdff6 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Tue, 18 Jun 2019 23:50:21 +0700 Subject: [PATCH 055/243] Add protected directories management operations --- src/Api/Operator/ProtectedDirectory.php | 104 ++++++++++++++++++ .../Struct/ProtectedDirectory/DataInfo.php | 23 ++++ src/Api/Struct/ProtectedDirectory/Info.php | 19 ++++ .../Struct/ProtectedDirectory/UserInfo.php | 17 +++ tests/ProtectedDirectoryTest.php | 84 ++++++++++++++ 5 files changed, 247 insertions(+) create mode 100644 src/Api/Struct/ProtectedDirectory/DataInfo.php create mode 100644 src/Api/Struct/ProtectedDirectory/Info.php create mode 100644 src/Api/Struct/ProtectedDirectory/UserInfo.php create mode 100644 tests/ProtectedDirectoryTest.php diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 73a1c359..77980719 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -3,9 +3,113 @@ namespace PleskX\Api\Operator; +use PleskX\Api\Struct\ProtectedDirectory as Struct; + class ProtectedDirectory extends \PleskX\Api\Operator { protected $_wrapperTag = 'protected-dir'; + /** + * @param string $name + * @param integer $siteId + * @param string $header + * @return Struct\Info + */ + public function add($name, $siteId, $header = '') + { + $packet = $this->_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + + $info->addChild('site-id', $siteId); + $info->addChild('name', $name); + $info->addChild('header', $header); + + return new Struct\Info($this->_client->request($packet)); + } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function delete($field, $value) + { + return $this->_delete($field, $value, 'delete'); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info + */ + public function get($field, $value) + { + $items = $this->getAll($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info[] + */ + public function getAll($field, $value) + { + $response = $this->_get('get', $field, $value); + $items = []; + foreach ($response->xpath('//result/data') as $xmlResult) { + $items[] = new Struct\DataInfo($xmlResult); + } + return $items; + } + + /** + * @param Struct\Info $protectedDirectory + * @param string $login + * @param string $password + * @return Struct\UserInfo + */ + 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); + + return new Struct\UserInfo($this->_client->request($packet)); + } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function deleteUser($field, $value) + { + return $this->_delete($field, $value, 'delete-user'); + } + + /** + * @param $command + * @param $field + * @param $value + * @return \PleskX\Api\XmlResponse + */ + private function _get($command, $field, $value) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild($command); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + return $response; + } + } diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php new file mode 100644 index 00000000..8383f928 --- /dev/null +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -0,0 +1,23 @@ +_initScalarProperties($apiResponse, [ + 'name', + 'header', + ]); + } +} diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php new file mode 100644 index 00000000..9d0dd7df --- /dev/null +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -0,0 +1,19 @@ +_initScalarProperties($apiResponse, [ + 'id', + ]); + } +} diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php new file mode 100644 index 00000000..92eddb3c --- /dev/null +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -0,0 +1,17 @@ +_initScalarProperties($apiResponse, [ + 'id', + ]); + } +} diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php new file mode 100644 index 00000000..9b34cf07 --- /dev/null +++ b/tests/ProtectedDirectoryTest.php @@ -0,0 +1,84 @@ +protectedDirectory()->add('/', static::$webspace->id); + + $this->assertIsObject($protectedDirectory); + $this->assertGreaterThan(0, $protectedDirectory->id); + + static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); + } + + /** + * @expectedException \PleskX\Api\Exception + * @expectedExceptionCode 1019 + */ + public function testAddInvalidDirectory() + { + 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); + } + + /** + * @expectedException \PleskX\Api\Exception + * @expectedExceptionCode 1013 + */ + public function testGetUnknownDirectory() + { + $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', 'secret'); + $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', 'secret'); + $result = static::$_client->protectedDirectory()->deleteUser('id', $user->id); + $this->assertTrue($result); + + static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); + } + +} From 9e203ac5a8807c968b45f0efdf9c9a6cae3f842d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Wed, 19 Jun 2019 09:22:27 +0700 Subject: [PATCH 056/243] Fix types in doc blocks --- src/Api/Operator/ProtectedDirectory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 77980719..8a498faa 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -41,7 +41,7 @@ public function delete($field, $value) /** * @param string $field * @param integer|string $value - * @return Struct\Info + * @return Struct\DataInfo|false */ public function get($field, $value) { @@ -52,7 +52,7 @@ public function get($field, $value) /** * @param string $field * @param integer|string $value - * @return Struct\Info[] + * @return Struct\DataInfo[] */ public function getAll($field, $value) { From 9f7fb5e742bf685cb59a3371586b428eaa1ecbf8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Thu, 20 Jun 2019 00:02:24 +0700 Subject: [PATCH 057/243] Make tests to work with evaluation license --- tests/CustomerTest.php | 6 ++++++ tests/ResellerTest.php | 6 ++++++ tests/SiteTest.php | 11 +++++++++++ tests/WebspaceTest.php | 8 ++++++++ 4 files changed, 31 insertions(+) diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 552e9b95..286a7ead 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -46,6 +46,12 @@ public function testGet() public function testGetAll() { + $keyInfo = static::$_client->server()->getKeyInfo(); + + if ((int)$keyInfo['lim_cl'] < 2) { + $this->markTestSkipped('License does not allow to create more than 1 customer.'); + } + static::$_client->customer()->create([ 'pname' => 'John Smith', 'login' => 'customer-a', diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 468d7ffd..7606e3e7 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -39,6 +39,12 @@ public function testGet() public function testGetAll() { + $keyInfo = static::$_client->server()->getKeyInfo(); + + if ((int)$keyInfo['lim_cl'] < 2) { + $this->markTestSkipped('License does not allow to create more than 1 reseller.'); + } + static::$_client->reseller()->create([ 'pname' => 'John Reseller', 'login' => 'reseller-a', diff --git a/tests/SiteTest.php b/tests/SiteTest.php index db2e68de..51a64884 100755 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -13,6 +13,17 @@ public static function setUpBeforeClass() static::$webspace = static::_createWebspace(); } + protected function setUp() + { + parent::setUp(); + + $keyInfo = static::$_client->server()->getKeyInfo(); + + if ((int)$keyInfo['lim_dom'] < 2) { + $this->markTestSkipped('License does not allow to create more than 1 domain.'); + } + } + private function _createSite($name, array $properties = []) { $properties = array_merge([ diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index f2ceffd7..88decdcb 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -24,6 +24,8 @@ public function testGetDiskUsage() $diskusage = static::$_client->webspace()->getDiskUsage('id', $webspace->id); $this->assertObjectHasAttribute('httpdocs', $diskusage); + + static::$_client->webspace()->delete('id', $webspace->id); } public function testGetPhysicalHostingDescriptor() @@ -43,6 +45,8 @@ public function testGetPhpSettings() $info = static::$_client->webspace()->getPhpSettings('id', $webspace->id); $this->assertArrayHasKey('open_basedir', $info->properties); + + static::$_client->webspace()->delete('id', $webspace->id); } public function testCreateWebspace() @@ -50,6 +54,8 @@ public function testCreateWebspace() $webspace = static::_createWebspace(); $this->assertGreaterThan(0, $webspace->id); + + static::$_client->webspace()->delete('id', $webspace->id); } public function testDelete() @@ -151,5 +157,7 @@ public function testGet() $this->assertNotEmpty($webspaceInfo->name); $this->assertEquals(0, $webspaceInfo->realSize); + + static::$_client->webspace()->delete('id', $webspace->id); } } From cfeac716163c7c4397e96682e8db1ab86747b01f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 29 Jun 2019 21:49:12 +0700 Subject: [PATCH 058/243] Use dox as more convenient results renderer (line by line) --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9510d39f..3770f366 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: environment: REMOTE_URL: https://plesk:8443 REMOTE_PASSWORD: changeme - command: bash -c "cd /opt/api-php-lib && composer install && composer test" + command: bash -c "cd /opt/api-php-lib && composer install && composer test -- --testdox" depends_on: - plesk links: From 6007102edaa3f2fb21c4cbb1e4935751cc9b5f37 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 29 Jun 2019 22:02:23 +0700 Subject: [PATCH 059/243] Switch to latest PHP version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dd406277..ccc370b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2-cli +FROM php:7.3-cli RUN mkdir /opt/api-php-lib RUN docker-php-ext-install pcntl \ From 56bc67b579fefdfc5d4a3e9b7a309f6027b13291 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 29 Jun 2019 22:24:31 +0700 Subject: [PATCH 060/243] Add info about ability to run tests using Docker --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d007a0b2..0dfa26ad 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ To use custom port one can provide a URL (e.g. for Docker container): `REMOTE_URL=https://your-plesk-host.dom:port REMOTE_PASSWORD=password ./vendor/bin/phpunit` +One more way to run tests is to use Docker: + +`docker-compose run tests` + ## Using Grunt for Continuous Testing * Install Node.js From 9584ac31f8ba9e4e2a5b912b14da67f97dbf6242 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 29 Jun 2019 22:47:04 +0700 Subject: [PATCH 061/243] Remove unnecessary execution bit on test suite --- tests/SiteTest.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tests/SiteTest.php diff --git a/tests/SiteTest.php b/tests/SiteTest.php old mode 100755 new mode 100644 From a17666a48a09a2e8822c0e910f21c9790ce707bb Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 29 Jun 2019 22:51:39 +0700 Subject: [PATCH 062/243] Remove unnecessary instruction --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ccc370b7..51c4ec26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM php:7.3-cli -RUN mkdir /opt/api-php-lib RUN docker-php-ext-install pcntl \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer From c358e6aaf65e3bbc926fbb1e61ec242dee9e1e5c Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Sat, 29 Jun 2019 23:00:25 +0700 Subject: [PATCH 063/243] Wait for Plesk initialization before tests execution --- docker-compose.yml | 2 +- wait-for-plesk.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 wait-for-plesk.sh diff --git a/docker-compose.yml b/docker-compose.yml index 3770f366..5a461f79 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: environment: REMOTE_URL: https://plesk:8443 REMOTE_PASSWORD: changeme - command: bash -c "cd /opt/api-php-lib && composer install && composer test -- --testdox" + command: bash -c "cd /opt/api-php-lib && composer install && ./wait-for-plesk.sh && composer test -- --testdox" depends_on: - plesk links: diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh new file mode 100755 index 00000000..2a30fc3f --- /dev/null +++ b/wait-for-plesk.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +while : ; do + curl -ks https://plesk:8443/ | grep "Plesk" > /dev/null + [ $? -eq 0 ] && break + sleep 5 +done From 7ec1630abdeb6f4dfe39636a6a878c8aa59ce5a8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <sibprogrammer@gmail.com> Date: Mon, 2 Sep 2019 23:08:34 +0700 Subject: [PATCH 064/243] Repo is usefull as standalone project as well (speed up installation) --- .gitignore | 1 - composer.lock | 1494 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1494 insertions(+), 1 deletion(-) create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index a250d38c..c92c531e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # vendor -/composer.lock /vendor/ # tests diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..ae243b90 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1494 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "7824bced3acb79493fba08a0c520f5c0", + "packages": [], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "a2c590166b2133a4633738648b6b064edae0814a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-03-17T17:37:11+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2019-08-09T12:45:53+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "role": "Developer", + "email": "arne@blankerts.de" + }, + { + "name": "Sebastian Heuer", + "role": "Developer", + "email": "sebastian@phpeople.de" + }, + { + "name": "Sebastian Bergmann", + "role": "Developer", + "email": "sebastian@phpunit.de" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org/", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2019-04-30T17:48:53+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "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" + ], + "time": "2019-06-13T12:50:23+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1 || ^4.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-xdebug": "^2.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-10-31T16:06:48+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "050bedf145a257b1ff02746c31894800e5122946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2018-09-13T20:33:42+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2019-06-07T04:22:29+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2019-07-25T05:29:42+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.5.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "d79c053d972856b8b941bb233e39dc521a5093f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d79c053d972856b8b941bb233e39dc521a5093f0", + "reference": "d79c053d972856b8b941bb233e39dc521a5093f0", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2019-08-21T07:05:16+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "shasum": "" + }, + "require": { + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-07-12T15:12:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2019-02-04T06:01:07+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2019-05-05T09:05:15+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "06a9a5947f47b3029d76118eb5c22802e5869687" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687", + "reference": "06a9a5947f47b3029d76118eb5c22802e5869687", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2019-08-11T12:43:14+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "role": "Developer", + "email": "arne@blankerts.de" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2019-06-13T22:48:21+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2019-08-24T08:43:50+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^5.6 || ^7.0", + "ext-curl": "*", + "ext-xml": "*", + "ext-simplexml": "*" + }, + "platform-dev": [] +} From e230542b84fb166bec3b7a760256d7d4a3361254 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <sibprogrammer@gmail.com> Date: Tue, 3 Sep 2019 12:21:03 +0700 Subject: [PATCH 065/243] Travis CI experimental integration (run tests on each merge) --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e38b9d80 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +services: docker + +script: + - docker-compose run tests From c20af9c1a4c6704c68776bc938dbbb2aa03c4b72 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <sibprogrammer@gmail.com> Date: Tue, 3 Sep 2019 12:58:26 +0700 Subject: [PATCH 066/243] Fix deps installation from scratch --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 51c4ec26..66fbb3ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ FROM php:7.3-cli -RUN docker-php-ext-install pcntl \ +RUN apt-get update \ + && apt-get install -y unzip \ + && docker-php-ext-install pcntl \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer From 6941b2c78db42a9ffcb8f1aa13b1f5145de42d55 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <sibprogrammer@gmail.com> Date: Tue, 3 Sep 2019 13:10:22 +0700 Subject: [PATCH 067/243] Add info about build status --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dfa26ad..67e71419 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## PHP library for Plesk XML-RPC API -[![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) +[![Build Status](https://travis-ci.com/plesk/api-php-lib.svg?branch=master)](https://travis-ci.com/plesk/api-php-lib) [![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) PHP object-oriented library for Plesk XML-RPC API. From 1c2cace404bc1d5750137a925e7cbcc9ea8647b2 Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov <abashurov@plesk.com> Date: Wed, 4 Sep 2019 19:25:25 +0700 Subject: [PATCH 068/243] Fixed tests: Check the list of IP Addresses instead of the 1st element --- tests/SecretKeyTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index e48d45ca..a7f6bb75 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -33,7 +33,10 @@ public function testGetAll() $keys = static::$_client->secretKey()->getAll(); $this->assertGreaterThanOrEqual(2, count($keys)); - $this->assertEquals('192.168.0.1', $keys[0]->ipAddress); + + $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); From 25bcec8de6fc0c395a68418b517c3c928442220a Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov <abashurov@plesk.com> Date: Tue, 10 Sep 2019 11:57:00 +0700 Subject: [PATCH 069/243] Move out passwords into a separate class --- tests/Utility/PasswordProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/Utility/PasswordProvider.php diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php new file mode 100644 index 00000000..59dcab52 --- /dev/null +++ b/tests/Utility/PasswordProvider.php @@ -0,0 +1,8 @@ +<?php + +namespace PleskXTest\Utility; + +class PasswordProvider +{ + const STRONG_PASSWORD = 'test-PWD*1@42!13#'; +} From 5fd061d775db21968d212544004883325d1e2440 Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov <abashurov@plesk.com> Date: Tue, 10 Sep 2019 12:02:20 +0700 Subject: [PATCH 070/243] Replace passwords with the PasswordProvider constant --- tests/CustomerTest.php | 29 ++++++++++++++++++----------- tests/DatabaseTest.php | 18 ++++++++++-------- tests/MailTest.php | 4 +++- tests/ProtectedDirectoryTest.php | 6 ++++-- tests/ResellerTest.php | 21 ++++++++++++++------- tests/TestCase.php | 6 +++--- 6 files changed, 52 insertions(+), 32 deletions(-) diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 286a7ead..88b523b9 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -2,17 +2,24 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + class CustomerTest extends TestCase { - private $_customerProperties = [ - 'cname' => 'Plesk', - 'pname' => 'John Smith', - 'login' => 'john-unit-test', - 'passwd' => 'simple-password', - 'email' => 'john@smith.com', - 'external-id' => 'link:12345', - 'description' => 'Good guy', - ]; + private $_customerProperties; + + public function setUp() + { + $this->_customerProperties = [ + 'cname' => 'Plesk', + 'pname' => 'John Smith', + 'login' => 'john-unit-test', + 'passwd' => PasswordProvider::STRONG_PASSWORD, + 'email' => 'john@smith.com', + 'external-id' => 'link:12345', + 'description' => 'Good guy', + ]; + } public function testCreate() { @@ -55,12 +62,12 @@ public function testGetAll() static::$_client->customer()->create([ 'pname' => 'John Smith', 'login' => 'customer-a', - 'passwd' => 'simple-password', + 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); static::$_client->customer()->create([ 'pname' => 'Mike Black', 'login' => 'customer-b', - 'passwd' => 'simple-password', + 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); $customersInfo = static::$_client->customer()->getAll(); diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 2980e624..56b3338e 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -2,6 +2,8 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + class DatabaseTest extends TestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ @@ -35,7 +37,7 @@ public function testCreateUser() $user = $this->_createUser([ 'db-id' => $database->id, 'login' => 'test_user1', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); static::$_client->database()->deleteUser('id', $user->id); static::$_client->database()->delete('id', $database->id); @@ -52,12 +54,12 @@ public function testUpdateUser() $user = $this->_createUser([ 'db-id' => $database->id, 'login' => 'test_user1', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $updatedUser = static::$_client->database()->updateUser([ 'id' => $user->id, 'login' => 'test_user2', - 'password' => 'setup2Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $this->assertEquals(true, $updatedUser); static::$_client->database()->deleteUser('id', $user->id); @@ -118,7 +120,7 @@ public function testGetUserById() $user = $this->_createUser([ 'db-id' => $database->id, 'login' => 'test_user1', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $dbUser = static::$_client->database()->getUser('id', $user->id); @@ -146,19 +148,19 @@ public function testGetAllUsersByDbId() $user1 = $this->_createUser([ 'db-id' => $db1->id, 'login' => 'test_user1', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $user2 = $this->_createUser([ 'db-id' => $db1->id, 'login' => 'test_user2', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $user3 = $this->_createUser([ 'db-id' => $db2->id, 'login' => 'test_user3', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $dbUsers = static::$_client->database()->getAllUsers('db-id', $db1->id); @@ -196,7 +198,7 @@ public function testDeleteUser() $user = $this->_createUser([ 'db-id' => $database->id, 'login' => 'test_user1', - 'password' => 'setup1Q', + 'password' => PasswordProvider::STRONG_PASSWORD, ]); $result = static::$_client->database()->deleteUser('id', $user->id); diff --git a/tests/MailTest.php b/tests/MailTest.php index b4490692..0b682022 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -2,6 +2,8 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + class MailTest extends TestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ @@ -35,7 +37,7 @@ protected function setUp() public function testCreate() { - $mailname = static::$_client->mail()->create('test', static::$webspace->id, true, 'secret'); + $mailname = static::$_client->mail()->create('test', static::$webspace->id, true, PasswordProvider::STRONG_PASSWORD); $this->assertIsInt($mailname->id); $this->assertGreaterThan(0, $mailname->id); diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 9b34cf07..8d03750d 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -2,6 +2,8 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + class ProtectedDirectoryTest extends TestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ @@ -64,7 +66,7 @@ public function testAddUser() { $protectedDirectory = static::$_client->protectedDirectory()->add('/', static::$webspace->id); - $user = static::$_client->protectedDirectory()->addUser($protectedDirectory, 'john', 'secret'); + $user = static::$_client->protectedDirectory()->addUser($protectedDirectory, 'john', PasswordProvider::STRONG_PASSWORD); $this->assertGreaterThan(0, $user->id); static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); @@ -74,7 +76,7 @@ public function testDeleteUser() { $protectedDirectory = static::$_client->protectedDirectory()->add('/', static::$webspace->id); - $user = static::$_client->protectedDirectory()->addUser($protectedDirectory, 'john', 'secret'); + $user = static::$_client->protectedDirectory()->addUser($protectedDirectory, 'john', PasswordProvider::STRONG_PASSWORD); $result = static::$_client->protectedDirectory()->deleteUser('id', $user->id); $this->assertTrue($result); diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 7606e3e7..2d46be54 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -2,13 +2,20 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + class ResellerTest extends TestCase { - private $_resellerProperties = [ - 'pname' => 'John Reseller', - 'login' => 'reseller-unit-test', - 'passwd' => 'simple-password', - ]; + private $_resellerProperties; + + public function setUp() + { + $this->_resellerProperties = [ + 'pname' => 'John Reseller', + 'login' => 'reseller-unit-test', + 'passwd' => PasswordProvider::STRONG_PASSWORD, + ]; + } public function testCreate() { @@ -48,12 +55,12 @@ public function testGetAll() static::$_client->reseller()->create([ 'pname' => 'John Reseller', 'login' => 'reseller-a', - 'passwd' => 'simple-password', + 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); static::$_client->reseller()->create([ 'pname' => 'Mike Reseller', 'login' => 'reseller-b', - 'passwd' => 'simple-password', + 'passwd' => PasswordProvider::STRONG_PASSWORD, ]); $resellersInfo = static::$_client->reseller()->getAll(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 3f5b46a5..f3709b67 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,6 +2,8 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + abstract class TestCase extends \PHPUnit\Framework\TestCase { /** @var \PleskX\Api\Client */ @@ -52,15 +54,13 @@ protected static function _getIpAddress() protected static function _createWebspace() { $id = uniqid(); - $password = base64_encode(time()); - $webspace = static::$_client->webspace()->create( [ 'name' => "test{$id}.test", 'ip_address' => static::_getIpAddress(), ], [ 'ftp_login' => "u{$id}", - 'ftp_password' => $password, + 'ftp_password' => PasswordProvider::STRONG_PASSWORD, ] ); self::$webspaces[] = $webspace; From d8bcfadc30d7877dd3f68cfde6c83af7bce97f17 Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov <abashurov@plesk.com> Date: Tue, 10 Sep 2019 12:25:06 +0700 Subject: [PATCH 071/243] Move out license checks into a separate class --- tests/Utility/KeyLimitChecker.php | 43 +++++++++++++++++++++++++++++++ tests/WebspaceTest.php | 4 ++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 tests/Utility/KeyLimitChecker.php diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php new file mode 100644 index 00000000..bc55af04 --- /dev/null +++ b/tests/Utility/KeyLimitChecker.php @@ -0,0 +1,43 @@ +<?php + +namespace PleskXTest\Utility; + +class KeyLimitChecker +{ + const LIMIT_CLIENTS = 'limit_clients'; + const LIMIT_RESELLERS = 'limit_resellers'; + const LIMIT_DOMAINS = 'limit_domains'; + + /** + * Checks whether limit is within the required constraint + * + * @param (string|int)[] $keyInfo Structure returned by the getKeyInfo call + * @param string $type Type of the object that should be checked + * @param int $minimalRequirement Minimal value that should satisfy the limit + * @return bool if license satisfies set limits + */ + public static function checkByType(array $keyInfo, $type, $minimalRequirement) + { + $field = null; + switch ($type) { + case self::LIMIT_CLIENTS: + if (intval($keyInfo['can-manage-customers']) === 0) { + return false; + } + $field = 'lim_cl'; + break; + case self::LIMIT_RESELLERS: + if (intval($keyInfo['can-manage-resellers']) === 0) { + return false; + } + $field = 'lim_cl'; + break; + case self::LIMIT_DOMAINS: + $field = 'lim_dom'; + break; + default: + return false; + } + return intval($keyInfo[$field]) === -1 || intval($keyInfo[$field]) > $minimalRequirement; + } +} \ No newline at end of file diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 88decdcb..0129218b 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -2,6 +2,8 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\PasswordProvider; + class WebspaceTest extends TestCase { public function testGetPermissionDescriptor() @@ -96,7 +98,7 @@ public function testRequestCreateWebspace() ], [ 'name' => 'ftp_password', - 'value' => 'test-PWD*1', + 'value' => PasswordProvider::STRONG_PASSWORD, ], ], 'ip_address' => static::_getIpAddress(), From 30f5ea8ab90a88949425cc87251c9136cc4a6ba7 Mon Sep 17 00:00:00 2001 From: Alexandr Bashurov <abashurov@plesk.com> Date: Tue, 10 Sep 2019 12:41:39 +0700 Subject: [PATCH 072/243] Replace license checks with KeyLimitChecker invokation --- tests/CustomerTest.php | 3 ++- tests/ResellerTest.php | 3 ++- tests/SiteTest.php | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 88b523b9..7d3b955b 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -2,6 +2,7 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\KeyLimitChecker; use PleskXTest\Utility\PasswordProvider; class CustomerTest extends TestCase @@ -55,7 +56,7 @@ public function testGetAll() { $keyInfo = static::$_client->server()->getKeyInfo(); - if ((int)$keyInfo['lim_cl'] < 2) { + if (!KeyLimitChecker::checkByType($keyInfo, KeyLimitChecker::LIMIT_CLIENTS, 2)) { $this->markTestSkipped('License does not allow to create more than 1 customer.'); } diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 2d46be54..d3cd406d 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -2,6 +2,7 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\KeyLimitChecker; use PleskXTest\Utility\PasswordProvider; class ResellerTest extends TestCase @@ -48,7 +49,7 @@ public function testGetAll() { $keyInfo = static::$_client->server()->getKeyInfo(); - if ((int)$keyInfo['lim_cl'] < 2) { + if (!KeyLimitChecker::checkByType($keyInfo, KeyLimitChecker::LIMIT_RESELLERS, 2)) { $this->markTestSkipped('License does not allow to create more than 1 reseller.'); } diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 51a64884..7bc4368b 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -2,6 +2,8 @@ // Copyright 1999-2019. Plesk International GmbH. namespace PleskXTest; +use PleskXTest\Utility\KeyLimitChecker; + class SiteTest extends TestCase { /** @var \PleskX\Api\Struct\Webspace\Info */ @@ -19,7 +21,7 @@ protected function setUp() $keyInfo = static::$_client->server()->getKeyInfo(); - if ((int)$keyInfo['lim_dom'] < 2) { + if (!KeyLimitChecker::checkByType($keyInfo, KeyLimitChecker::LIMIT_DOMAINS, 2)) { $this->markTestSkipped('License does not allow to create more than 1 domain.'); } } From 6ea0f1168e8440f2a59af515450cfcb8914b6aff Mon Sep 17 00:00:00 2001 From: Sander van der Vlugt <svandervlugt@hostnet.nl> Date: Tue, 1 Oct 2019 15:10:17 +0200 Subject: [PATCH 073/243] Add Webspace getLimits --- src/Api/Operator/Webspace.php | 12 +++++++++++- src/Api/Struct/Webspace/Limit.php | 21 +++++++++++++++++++++ src/Api/Struct/Webspace/Limits.php | 23 +++++++++++++++++++++++ tests/WebspaceTest.php | 11 +++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 src/Api/Struct/Webspace/Limit.php create mode 100644 src/Api/Struct/Webspace/Limits.php diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 275a100c..9c938dbe 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -43,6 +43,17 @@ public function getPhpSettings($field, $value) return new Struct\PhpSettings($response); } + /** + * @param string $field + * @param integer|string $value + * @return Struct\Limits + */ + public function getLimits($field, $value) + { + $items = $this->_getItems(Struct\Limits::class, 'limits', $field, $value); + return reset($items); + } + /** * @param array $properties * @param array|null $hostingProperties @@ -119,5 +130,4 @@ public function getDiskUsage($field, $value) $items = $this->_getItems(Struct\DiskUsage::class, 'disk_usage', $field, $value); return reset($items); } - } diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php new file mode 100644 index 00000000..ea6d75bf --- /dev/null +++ b/src/Api/Struct/Webspace/Limit.php @@ -0,0 +1,21 @@ +<?php +// Copyright 1999-2019. Plesk International GmbH. + +namespace PleskX\Api\Struct\Webspace; + +class Limit extends \PleskX\Api\Struct +{ + /** @var string */ + public $name; + + /** @var string */ + public $value; + + public function __construct($apiResponse) + { + $this->_initScalarProperties($apiResponse, [ + 'name', + 'value', + ]); + } +} diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php new file mode 100644 index 00000000..d2965bc0 --- /dev/null +++ b/src/Api/Struct/Webspace/Limits.php @@ -0,0 +1,23 @@ +<?php +// Copyright 1999-2019. Plesk International GmbH. + +namespace PleskX\Api\Struct\Webspace; + +class Limits extends \PleskX\Api\Struct +{ + /** @var string */ + public $overuse; + + /** @var array */ + public $limits; + + public function __construct($apiResponse) + { + $this->_initScalarProperties($apiResponse, ['overuse']); + $this->limits = []; + + foreach ($apiResponse->limit as $limit) { + $this->limits[(string) $limit->name] = new Limit($limit); + } + } +} diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 0129218b..5ba720c7 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -51,6 +51,17 @@ public function testGetPhpSettings() static::$_client->webspace()->delete('id', $webspace->id); } + public function testGetLimits() + { + $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); + } + public function testCreateWebspace() { $webspace = static::_createWebspace(); From 7ea6669787913afe14b066eb5e1168b03a55913b Mon Sep 17 00:00:00 2001 From: Jean Weisbuch <jean@phpnet.org> Date: Wed, 16 Oct 2019 18:43:19 +0200 Subject: [PATCH 074/243] Adding get() and getAll() to SiteAlias --- src/Api/Operator/SiteAlias.php | 34 ++++++++++++++++++++++++ src/Api/Struct/SiteAlias/GeneralInfo.php | 25 +++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 src/Api/Struct/SiteAlias/GeneralInfo.php diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index fb935122..a60bc002 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -32,4 +32,38 @@ public function create(array $properties, array $preferences = []) return new Struct\Info($response); } + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info + */ + public function get($field, $value) + { + $items = $this->getAll($field, $value); + return reset($items); + } + + /** + * @param string $field + * @param integer|string $value + * @return Struct\Info[] + */ + public function getAll($field = null, $value = null) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get'); + + $filterTag = $getTag->addChild('filter'); + if (!is_null($field)) { + $filterTag->addChild($field, $value); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $item = new Struct\GeneralInfo($xmlResult->info); + $items[] = $item; + } + return $items; + } } diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php new file mode 100644 index 00000000..e6d0e16c --- /dev/null +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -0,0 +1,25 @@ +<?php +// Copyright 1999-2019. Plesk International GmbH. + +namespace PleskX\Api\Struct\SiteAlias; + +class GeneralInfo extends \PleskX\Api\Struct +{ + /** @var string */ + public $name; + + /** @var string */ + public $asciiName; + + /** @var string */ + public $status; + + public function __construct($apiResponse) + { + $this->_initScalarProperties($apiResponse, [ + 'name', + 'ascii-name', + 'status', + ]); + } +} From 826421624dab4463efd580001574b8625f91eb1e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 11 Dec 2019 21:50:37 +0700 Subject: [PATCH 075/243] Use latest 18.x for testing --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5a461f79..0862227d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: plesk: - image: plesk/plesk:17.8 + image: plesk/plesk logging: driver: none ports: From 68f39e596cb58874b0b851dfb664fef23b6d1d78 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 1 Jan 2020 17:38:25 +0700 Subject: [PATCH 076/243] Switch to latest PHPUnit 8 --- .gitignore | 1 + composer.json | 6 +- composer.lock | 305 ++++++++++++++++++------------- tests/ApiClientTest.php | 40 ++-- tests/CustomerTest.php | 4 +- tests/DatabaseServerTest.php | 2 +- tests/DatabaseTest.php | 2 +- tests/DnsTemplateTest.php | 4 +- tests/DnsTest.php | 4 +- tests/MailTest.php | 4 +- tests/PhpHandlerTest.php | 7 +- tests/ProtectedDirectoryTest.php | 16 +- tests/ResellerTest.php | 4 +- tests/ServerTest.php | 2 +- tests/ServicePlanTest.php | 2 +- tests/SiteTest.php | 4 +- tests/SubdomainTest.php | 2 +- tests/TestCase.php | 4 +- tests/UiTest.php | 2 +- 19 files changed, 226 insertions(+), 189 deletions(-) diff --git a/.gitignore b/.gitignore index c92c531e..d6016d2e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ # tests /phpunit.xml +/.phpunit.result.cache /php/tests/node_modules/ diff --git a/composer.json b/composer.json index 5d9c444d..ecba871b 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,13 @@ } ], "require": { - "php": "^5.6 || ^7.0", + "php": "^7.3", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8" }, "config": { "process-timeout": 0 @@ -40,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } } } diff --git a/composer.lock b/composer.lock index ae243b90..52ac4150 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": "7824bced3acb79493fba08a0c520f5c0", + "content-hash": "723a80d53fe4bfc6bc77b58d6d9d25cd", "packages": [], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", "shasum": "" }, "require": { @@ -61,20 +61,20 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "time": "2019-10-21T16:45:58+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", + "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", "shasum": "" }, "require": { @@ -109,7 +109,7 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "time": "2019-12-15T19:12:40+00:00" }, { "name": "phar-io/manifest", @@ -215,35 +215,33 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "~6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -265,31 +263,32 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2018-08-07T13:53:10+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.1", + "version": "4.3.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", "shasum": "" }, "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", "webmozart/assert": "^1.0" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", + "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", "phpunit/phpunit": "^6.4" }, "type": "library", @@ -316,41 +315,40 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-04-30T17:48:53+00:00" + "time": "2019-12-28T18:55:12+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -363,37 +361,38 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14T14:27:02+00:00" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22T18:11:29+00:00" }, { "name": "phpspec/prophecy", - "version": "1.8.1", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -426,44 +425,44 @@ "spy", "stub" ], - "time": "2019-06-13T12:50:23+00:00" + "time": "2019-12-22T21:05:45+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.1.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -489,7 +488,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -633,16 +632,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", "shasum": "" }, "require": { @@ -678,57 +677,56 @@ "keywords": [ "tokenizer" ], - "time": "2019-07-25T05:29:42+00:00" + "time": "2019-09-17T06:23:10+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.15", + "version": "8.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d79c053d972856b8b941bb233e39dc521a5093f0" + "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d79c053d972856b8b941bb233e39dc521a5093f0", - "reference": "d79c053d972856b8b941bb233e39dc521a5093f0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7870c78da3c5e4883eaef36ae47853ebb3cb86f2", + "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^7.0.7", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.1", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -736,7 +734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -762,7 +760,7 @@ "testing", "xunit" ], - "time": "2019-08-21T07:05:16+00:00" + "time": "2019-12-25T14:49:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -931,16 +929,16 @@ }, { "name": "sebastian/environment", - "version": "4.2.2", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", "shasum": "" }, "require": { @@ -980,20 +978,20 @@ "environment", "hhvm" ], - "time": "2019-05-05T09:05:15+00:00" + "time": "2019-11-20T08:46:58+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.1", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687" + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", "shasum": "" }, "require": { @@ -1047,27 +1045,30 @@ "export", "exporter" ], - "time": "2019-08-11T12:43:14+00:00" + "time": "2019-09-14T09:02:43+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -1075,7 +1076,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1098,7 +1099,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -1287,6 +1288,52 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2018-10-04T04:07:39+00:00" }, + { + "name": "sebastian/type", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-07-02T08:10:15+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", @@ -1332,16 +1379,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", "shasum": "" }, "require": { @@ -1353,7 +1400,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.13-dev" } }, "autoload": { @@ -1386,7 +1433,7 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2019-11-27T13:56:44+00:00" }, { "name": "theseer/tokenizer", @@ -1430,31 +1477,29 @@ }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -1476,7 +1521,7 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "time": "2019-11-24T13:36:37+00:00" } ], "aliases": [], @@ -1485,7 +1530,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^5.6 || ^7.0", + "php": "^7.3", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 49a71fbd..05590998 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -6,43 +6,39 @@ class ApiClientTest extends TestCase { - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 1005 - */ public function testWrongProtocol() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1005); + $packet = static::$_client->getPacket('100.0.0'); $packet->addChild('server')->addChild('get_protos'); static::$_client->request($packet); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 1014 - */ public function testUnknownOperator() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1014); + $packet = static::$_client->getPacket(); $packet->addChild('unknown'); static::$_client->request($packet); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 1014 - */ public function testInvalidXmlRequest() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1014); + static::$_client->request('<packet><wrongly formatted xml</packet>'); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 1001 - */ public function testInvalidCredentials() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1001); + $host = static::$_client->getHost(); $port = static::$_client->getPort(); $protocol = static::$_client->getProtocol(); @@ -53,12 +49,11 @@ public function testInvalidCredentials() $client->request($packet); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 11003 - */ public function testInvalidSecretKey() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(11003); + $host = static::$_client->getHost(); $port = static::$_client->getPort(); $protocol = static::$_client->getProtocol(); @@ -132,11 +127,10 @@ public function testMultiRequest() $this->assertGreaterThan(0, strlen($generalInfo->gen_info->server_name)); } - /** - * @expectedException \PleskX\Api\Client\Exception - */ public function testConnectionError() { + $this->expectException(\PleskX\Api\Client\Exception::class); + $client = new \PleskX\Api\Client('invalid-host.dom'); $client->server()->getProtos(); } diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 7d3b955b..21378a2e 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -9,7 +9,7 @@ class CustomerTest extends TestCase { private $_customerProperties; - public function setUp() + public function setUp(): void { $this->_customerProperties = [ 'cname' => 'Plesk', @@ -25,7 +25,7 @@ public function setUp() public function testCreate() { $customer = static::$_client->customer()->create($this->_customerProperties); - $this->assertInternalType('integer', $customer->id); + $this->assertIsInt($customer->id); $this->assertGreaterThan(0, $customer->id); static::$_client->customer()->delete('id', $customer->id); diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 5340c170..fdb6b425 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -21,7 +21,7 @@ public function testGet() public function testGetAll() { $dbServers = static::$_client->databaseServer()->getAll(); - $this->assertInternalType('array', $dbServers); + $this->assertIsArray($dbServers); $this->assertGreaterThan(0, count($dbServers)); $this->assertEquals('localhost', $dbServers[0]->host); } diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 56b3338e..5878dcd7 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -9,7 +9,7 @@ class DatabaseTest extends TestCase /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::$webspace = static::_createWebspace(); diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 1991d1ce..375c7acd 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -9,7 +9,7 @@ class DnsTemplateTest extends TestCase */ private static $_isDnsSupported; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); @@ -17,7 +17,7 @@ public static function setUpBeforeClass() static::$_isDnsSupported = $serviceStates['dns'] && ('running' == $serviceStates['dns']['state']); } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 8ab24951..7329b577 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -9,7 +9,7 @@ class DnsTest extends TestCase private static $isDnsSupported; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); @@ -21,7 +21,7 @@ public static function setUpBeforeClass() } } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/MailTest.php b/tests/MailTest.php index 0b682022..ad39f745 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -14,7 +14,7 @@ class MailTest extends TestCase */ private static $isMailSupported; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); @@ -26,7 +26,7 @@ public static function setUpBeforeClass() } } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index e2202bb5..9da8e004 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -25,12 +25,11 @@ public function testGetAll() $this->assertObjectHasAttribute('type', $handler); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionMessage Php handler does not exists - */ 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'); } } diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 8d03750d..2bf11974 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -9,7 +9,7 @@ class ProtectedDirectoryTest extends TestCase /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::$webspace = static::_createWebspace(); @@ -25,12 +25,11 @@ public function testAdd() static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 1019 - */ public function testAddInvalidDirectory() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1019); + static::$_client->protectedDirectory()->add('', static::$webspace->id); } @@ -52,12 +51,11 @@ public function testGetById() static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); } - /** - * @expectedException \PleskX\Api\Exception - * @expectedExceptionCode 1013 - */ public function testGetUnknownDirectory() { + $this->expectException(\PleskX\Api\Exception::class); + $this->expectExceptionCode(1013); + $nonExistentDirectoryId = 99999999; static::$_client->protectedDirectory()->get('id', $nonExistentDirectoryId); } diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index d3cd406d..f94428c5 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -9,7 +9,7 @@ class ResellerTest extends TestCase { private $_resellerProperties; - public function setUp() + public function setUp(): void { $this->_resellerProperties = [ 'pname' => 'John Reseller', @@ -21,7 +21,7 @@ public function setUp() public function testCreate() { $reseller = static::$_client->reseller()->create($this->_resellerProperties); - $this->assertInternalType('integer', $reseller->id); + $this->assertIsInt($reseller->id); $this->assertGreaterThan(0, $reseller->id); static::$_client->reseller()->delete('id', $reseller->id); diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 0350e778..56df95a0 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -31,7 +31,7 @@ public function testGetAdmin() { $admin = static::$_client->server()->getAdmin(); $this->assertGreaterThan(0, strlen($admin->name)); - $this->assertContains('@', $admin->email); + $this->assertStringContainsString('@', $admin->email); } public function testGetKeyInfo() diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index a290b359..030d4536 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -14,7 +14,7 @@ public function testGet() public function testGetAll() { $servicePlans = static::$_client->servicePlan()->getAll(); - $this->assertInternalType('array', $servicePlans); + $this->assertIsArray($servicePlans); $this->assertGreaterThan(0, count($servicePlans)); $this->assertNotEmpty($servicePlans[0]->name); } diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 7bc4368b..a64860eb 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -9,13 +9,13 @@ class SiteTest extends TestCase /** @var \PleskX\Api\Struct\Webspace\Info */ private static $webspace; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::$webspace = static::_createWebspace(); } - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 8b006d93..a2cfb7ec 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -10,7 +10,7 @@ class SubdomainTest extends TestCase /** @var string */ private static $webspaceName; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); static::$webspace = static::_createWebspace(); diff --git a/tests/TestCase.php b/tests/TestCase.php index f3709b67..b92aad19 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -11,7 +11,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase private static $webspaces = []; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { $login = getenv('REMOTE_LOGIN'); $password = getenv('REMOTE_PASSWORD'); @@ -28,7 +28,7 @@ public static function setUpBeforeClass() static::$_client->setCredentials($login, $password); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { foreach (self::$webspaces as $webspace) { try { diff --git a/tests/UiTest.php b/tests/UiTest.php index 7dabb7bb..aed28b61 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -13,7 +13,7 @@ class UiTest extends TestCase public function testGetNavigation() { $navigation = static::$_client->ui()->getNavigation(); - $this->assertInternalType('array', $navigation); + $this->assertIsArray($navigation); $this->assertGreaterThan(0, count($navigation)); $this->assertArrayHasKey('general', $navigation); $this->assertArrayHasKey('hosting', $navigation); From 706b7dc23587a422f8e3eff9e8cbd162f3bf29de Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 1 Jan 2020 17:43:11 +0700 Subject: [PATCH 077/243] Sync composer.lock (whitespaces problem) --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 52ac4150..3bf5fc97 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": "723a80d53fe4bfc6bc77b58d6d9d25cd", + "content-hash": "4d013c6b87f8767e6cd636eda3c1eac5", "packages": [], "packages-dev": [ { From 62f8685d20472a5119ebf63fa40f5161576d8e28 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 1 Jan 2020 17:47:31 +0700 Subject: [PATCH 078/243] Promote tests execution via composer --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 67e71419..363e2f2b 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ One the possible ways to become familiar with the library is to check the unit t To run the unit tests use the following command: -`REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password ./vendor/bin/phpunit` +`REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password composer test` To use custom port one can provide a URL (e.g. for Docker container): -`REMOTE_URL=https://your-plesk-host.dom:port REMOTE_PASSWORD=password ./vendor/bin/phpunit` +`REMOTE_URL=https://your-plesk-host.dom:port REMOTE_PASSWORD=password composer test` One more way to run tests is to use Docker: From d6d8d7855b1a1ee918cfe1dd1e05ba3f1813a7d7 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 1 Jan 2020 19:19:27 +0700 Subject: [PATCH 079/243] Replace grunt with phpunit-watcher for continuous testing --- Gruntfile.js | 20 - README.md | 8 +- composer.json | 12 +- composer.lock | 989 ++++++++++++++++++++++++++++++++++++++++++-- package.json | 9 - phpunit-watcher.yml | 3 + 6 files changed, 978 insertions(+), 63 deletions(-) delete mode 100644 Gruntfile.js delete mode 100644 package.json create mode 100644 phpunit-watcher.yml diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 39df1c43..00000000 --- a/Gruntfile.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 1999-2019. Plesk International GmbH. - -module.exports = function(grunt) { - grunt.initConfig({ - phpunit: { - classes: {}, - options: {} - }, - watch: { - test: { - files: ['tests/*Test.php', 'src/**/*.*'], - tasks: ['phpunit'] - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-phpunit'); - grunt.registerTask('default', ['phpunit']); -}; diff --git a/README.md b/README.md index 363e2f2b..013b8030 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,8 @@ One more way to run tests is to use Docker: `docker-compose run tests` -## Using Grunt for Continuous Testing +## Continuous Testing -* Install Node.js -* Install dependencies via `npm install` command -* Run `REMOTE_HOST=your-plesk-host.dom REMOTE_PASSWORD=password grunt watch:test` +During active development it could be more convenient to run tests in continuous manner. Here is the way how to achieve it: + +`REMOTE_URL=https://your-plesk-host.dom:port REMOTE_PASSWORD=password composer test:watch` diff --git a/composer.json b/composer.json index ecba871b..df47edd0 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,12 @@ "email": "plesk-dev-leads@plesk.com" } ], + "repositories": [ + { + "url": "https://github.com/sibprogrammer/phpunit-watcher.git", + "type": "git" + } + ], "require": { "php": "^7.3", "ext-curl": "*", @@ -20,13 +26,15 @@ "ext-simplexml": "*" }, "require-dev": { - "phpunit/phpunit": "^8" + "phpunit/phpunit": "^8", + "spatie/phpunit-watcher": "dev-master" }, "config": { "process-timeout": 0 }, "scripts": { - "test": "phpunit" + "test": "phpunit", + "test:watch": "phpunit-watcher watch" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 3bf5fc97..4591a22e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,179 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4d013c6b87f8767e6cd636eda3c1eac5", + "content-hash": "9a50f6928d9289d618a90841f0f481c0", "packages": [], "packages-dev": [ + { + "name": "clue/stdio-react", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-stdio.git", + "reference": "5f42a3a5a29f52432f0f68b57890353e8ca65069" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/5f42a3a5a29f52432f0f68b57890353e8ca65069", + "reference": "5f42a3a5a29f52432f0f68b57890353e8ca65069", + "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" + }, + "require-dev": { + "clue/arguments": "^2.0", + "clue/commander": "^1.2", + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + }, + "suggest": { + "ext-mbstring": "Using ext-mbstring should provide slightly better performance for handling I/O" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Stdio\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "Async, event-driven console input & output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP", + "homepage": "https://github.com/clue/reactphp-stdio", + "keywords": [ + "async", + "autocomplete", + "autocompletion", + "cli", + "history", + "interactive", + "reactphp", + "readline", + "stdin", + "stdio", + "stdout" + ], + "time": "2019-08-28T12:01:30+00:00" + }, + { + "name": "clue/term-react", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-term.git", + "reference": "3cec1164073455a85a3f2b3c3fe6db2170d21c2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-term/zipball/3cec1164073455a85a3f2b3c3fe6db2170d21c2a", + "reference": "3cec1164073455a85a3f2b3c3fe6db2170d21c2a", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.0 || ^0.7" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8", + "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Term\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "Streaming terminal emulator, built on top of ReactPHP", + "homepage": "https://github.com/clue/reactphp-term", + "keywords": [ + "C0", + "CSI", + "ansi", + "apc", + "ascii", + "c1", + "control codes", + "dps", + "osc", + "pm", + "reactphp", + "streaming", + "terminal", + "vt100", + "xterm" + ], + "time": "2018-07-09T08:20:33+00:00" + }, + { + "name": "clue/utf8-react", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/clue/php-utf8-react.git", + "reference": "c6111a22e1056627c119233ff5effe00f5d3cc1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/php-utf8-react/zipball/c6111a22e1056627c119233ff5effe00f5d3cc1d", + "reference": "c6111a22e1056627c119233ff5effe00f5d3cc1d", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8", + "react/stream": "^1.0 || ^0.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\Utf8\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "Streaming UTF-8 parser, built on top of ReactPHP", + "homepage": "https://github.com/clue/php-utf8-react", + "keywords": [ + "reactphp", + "streaming", + "unicode", + "utf-8", + "utf8" + ], + "time": "2017-07-06T07:43:22+00:00" + }, { "name": "doctrine/instantiator", "version": "1.3.0", @@ -63,6 +233,105 @@ ], "time": "2019-10-21T16:45:58+00:00" }, + { + "name": "evenement/evenement", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Evenement": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "time": "2017-07-23T21:35:13+00:00" + }, + { + "name": "jolicode/jolinotif", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/jolicode/JoliNotif.git", + "reference": "0b5f786c5f181b3916df616ca191892713257662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/0b5f786c5f181b3916df616ca191892713257662", + "reference": "0b5f786c5f181b3916df616ca191892713257662", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "symfony/process": "~3.3|~4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.0", + "symfony/phpunit-bridge": "^3.3" + }, + "bin": [ + "jolinotif" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Joli\\JoliNotif\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Loïck Piera", + "email": "pyrech@gmail.com" + } + ], + "description": "Send desktop notifications on Windows, Linux, MacOS.", + "keywords": [ + "MAC", + "growl", + "linux", + "notification", + "windows" + ], + "time": "2019-02-26T18:10:50+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.9.4", @@ -149,18 +418,18 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" }, { "name": "Sebastian Heuer", - "role": "Developer", - "email": "sebastian@phpeople.de" + "email": "sebastian@phpeople.de", + "role": "Developer" }, { "name": "Sebastian Bergmann", - "role": "Developer", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", @@ -762,6 +1031,143 @@ ], "time": "2019-12-25T14:49:39+00:00" }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "react/event-loop", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", + "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + }, + "suggest": { + "ext-event": "~1.0 for ExtEventLoop", + "ext-pcntl": "For signal handling support when using the StreamSelectLoop", + "ext-uv": "* for ExtUvLoop" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "time": "2019-02-07T16:19:49+00:00" + }, + { + "name": "react/stream", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "50426855f7a77ddf43b9266c22320df5bf6c6ce6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/50426855f7a77ddf43b9266c22320df5bf6c6ce6", + "reference": "50426855f7a77ddf43b9266c22320df5bf6c6ce6", + "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" + }, + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Stream\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", + "keywords": [ + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" + ], + "time": "2019-01-01T16:15:09+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -1378,30 +1784,219 @@ "time": "2016-10-03T07:35:21+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "name": "spatie/phpunit-watcher", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "shasum": "" + "url": "https://github.com/sibprogrammer/phpunit-watcher.git", + "reference": "3c5e24bc373dfbf4f65c0cbe65b5bdae606fe6ef" }, "require": { - "php": ">=5.3.3" + "clue/stdio-react": "^2.0", + "jolicode/jolinotif": "^2.0", + "php": "^7.2", + "symfony/console": "^4.0|^5.0", + "symfony/process": "^4.0|^5.0", + "symfony/yaml": "^4.0|^5.0", + "yosymfony/resource-watcher": "^2.0" }, - "suggest": { - "ext-ctype": "For best performance" + "conflict": { + "yosymfony/resource-watcher": "<2.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.13-dev" - } + "require-dev": { + "phpunit/phpunit": "^8.0" + }, + "bin": [ + "phpunit-watcher" + ], + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\PhpUnitWatcher\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Spatie\\PhpUnitWatcher\\Test\\": "tests" + }, + "files": [ + "tests/helpers.php" + ] + }, + "scripts": { + "test": [ + "vendor/bin/phpunit" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be/", + "role": "Developer" + } + ], + "description": "Automatically rerun PHPUnit tests when source code changes", + "homepage": "https://github.com/spatie/phpunit-watcher", + "keywords": [ + "phpunit-watcher", + "spatie" + ], + "time": "2020-01-01T11:46:56+00:00" + }, + { + "name": "symfony/console", + "version": "v5.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/fe6e3cd889ca64172d7a742a2eb058541404ef47", + "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "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" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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": "Symfony Console Component", + "homepage": "https://symfony.com/", + "time": "2019-12-17T13:20:22+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.4.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "ce8743441da64c41e2a667b8eb66070444ed911e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e", + "reference": "ce8743441da64c41e2a667b8eb66070444ed911e", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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": "Symfony Finder Component", + "homepage": "https://symfony.com/", + "time": "2019-11-17T21:56:56+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.13.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } }, "autoload": { "psr-4": { @@ -1435,6 +2030,289 @@ ], "time": "2019-11-27T13:56:44+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.13.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", + "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2019-11-27T14:18:11+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.13.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", + "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "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" + ], + "time": "2019-11-27T16:25:15+00:00" + }, + { + "name": "symfony/process", + "version": "v4.4.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "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": "Symfony Process Component", + "homepage": "https://symfony.com/", + "time": "2019-12-06T10:06:46+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "144c5e51266b281231e947b51223ba14acf1a749" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", + "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com/", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-11-18T17:27:11+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "847661e77afa48d99ecfa508e8b60f0b029a19c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/847661e77afa48d99ecfa508e8b60f0b029a19c0", + "reference": "847661e77afa48d99ecfa508e8b60f0b029a19c0", + "shasum": "" + }, + "require": { + "php": "^7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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": "Symfony Yaml Component", + "homepage": "https://symfony.com/", + "time": "2019-12-10T11:06:55+00:00" + }, { "name": "theseer/tokenizer", "version": "1.1.3", @@ -1468,8 +2346,8 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", @@ -1522,11 +2400,66 @@ "validate" ], "time": "2019-11-24T13:36:37+00:00" + }, + { + "name": "yosymfony/resource-watcher", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/yosymfony/resource-watcher.git", + "reference": "937ec60269f9d6e092357a9e1948f97a738dc0dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/937ec60269f9d6e092357a9e1948f97a738dc0dc", + "reference": "937ec60269f9d6e092357a9e1948f97a738dc0dc", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "symfony/finder": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "symfony/filesystem": "^2.7|^3.0|^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Yosymfony\\ResourceWatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Victor Puertas", + "email": "vpgugr@gmail.com" + } + ], + "description": "A simple resource watcher using Symfony Finder", + "homepage": "http://yosymfony.com/", + "keywords": [ + "finder", + "resources", + "symfony", + "watcher" + ], + "time": "2018-05-12T22:34:25+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "spatie/phpunit-watcher": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/package.json b/package.json deleted file mode 100644 index 09527116..00000000 --- a/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "plesk-api-php-lib", - "version": "1.0.0", - "devDependencies": { - "grunt": "~0.4.5", - "grunt-contrib-watch": "~0.6.1", - "grunt-phpunit": "~0.3.5" - } -} diff --git a/phpunit-watcher.yml b/phpunit-watcher.yml new file mode 100644 index 00000000..8bae500e --- /dev/null +++ b/phpunit-watcher.yml @@ -0,0 +1,3 @@ +phpunit: + arguments: '--stop-on-failure' + timeout: 0 From 41ca3e0153dabb7987d3ab35076fd77e45aa3415 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 1 Jan 2020 19:35:16 +0700 Subject: [PATCH 080/243] Fix missed git binary to clone non-relesed dependency from master --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 66fbb3ef..8d028931 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM php:7.3-cli RUN apt-get update \ - && apt-get install -y unzip \ + && apt-get install -y unzip git \ && docker-php-ext-install pcntl \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer From 345ec8844fde3eecf189f2062db3aa96688e5cf4 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Wed, 1 Jan 2020 20:01:46 +0700 Subject: [PATCH 081/243] Update copyright year --- LICENSE | 2 +- phpunit.xml.dist | 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.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/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/Objects.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/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/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/TestCase.php | 2 +- tests/UiTest.php | 2 +- tests/Utility/KeyLimitChecker.php | 2 +- tests/Utility/PasswordProvider.php | 2 +- tests/WebspaceTest.php | 2 +- wait-for-plesk.sh | 1 + 110 files changed, 110 insertions(+), 109 deletions(-) diff --git a/LICENSE b/LICENSE index af229880..0176136a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2019. Plesk International GmbH. +Copyright 1999-2020. 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 6784e9d9..bd75a98d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2019. Plesk International GmbH. --> +<!-- Copyright 1999-2020. Plesk International GmbH. --> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" diff --git a/src/Api/Client.php b/src/Api/Client.php index e1e6439f..08c92f23 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; use SimpleXMLElement; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index c6c17d13..753cc624 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index 2136eb68..46d5f717 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index f37fc5d5..e88f5be2 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index 5bc442ce..ea618407 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index 25aac0f0..4e75303f 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index d366ba69..7427a52d 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Certificate as Struct; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 07859711..6f9fd42d 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Customer as Struct; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 23d90a1d..367900aa 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Database as Struct; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 945fac06..a7da1359 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\DatabaseServer as Struct; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 8059fc37..21859084 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Dns as Struct; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 6f8ffc60..4a76c95d 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Dns as Struct; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 376a53a3..07335bf1 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\EventLog as Struct; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 898ff9e7..79725d27 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Ip as Struct; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 996f6f2f..6bca4886 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Locale as Struct; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index 43990a65..9113efb8 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index b8e17ed9..fab2b27e 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Mail as Struct; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 15ee084f..273b2dba 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 8a498faa..dfaeaca6 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 4aec9400..4cd5185e 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Reseller as Struct; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 29fcbaf3..6173c9a1 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 7d5e7856..0664a7df 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\SecretKey as Struct; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index e588a2f7..8b3c3710 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Server as Struct; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 6fcd36ac..e6b2380c 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\ServicePlan as Struct; diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 8e9823e8..708053fe 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index d4354800..5e2a6f48 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Session as Struct; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 23116f21..bb6cf19d 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Site as Struct; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index a60bc002..d2e27764 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index f41dd8e2..9361630e 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Subdomain as Struct; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 0fb2ae50..b586c18d 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Ui as Struct; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index c228d6a0..6d1f6e69 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 9c938dbe..70c01968 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; use PleskX\Api\Struct\Webspace as Struct; diff --git a/src/Api/Struct.php b/src/Api/Struct.php index 1d0ea87e..85bbb900 100644 --- a/src/Api/Struct.php +++ b/src/Api/Struct.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index ea4bfd81..4fff03ea 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Certificate; diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index b72b55f9..b5bc28d2 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 969b9227..f83afd20 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 1e638b78..50c49b02 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index 5c828631..8e7a2d74 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 066e849d..5d38c438 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\DatabaseServer; diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index e821868b..b9dcefe4 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Dns; diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 51dc11c3..2bcc319d 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 1de391a2..8f3f2395 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index fc9b1b54..d681fc92 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Ip; diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 7e3bd5a3..38c4c19c 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Locale; diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 7afa313a..f7aad051 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index c1b8a143..8cc0c4aa 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\PhpHandler; diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 8383f928..7ca83d93 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 9d0dd7df..1dbf35e9 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 92eddb3c..7e5fc0b7 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 65c8affb..9f184a5b 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index f1e5fc3e..89595407 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index a50aaf5a..32a7ba49 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\SecretKey; diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 3076ab15..53760331 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 2cf0ccac..fb74f435 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index 1ca5e9c2..e2178afa 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index b1c7826e..6d0159dd 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 3a84e847..86edb000 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index bb5d6ffd..d7ae1ce4 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk 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 621e6d64..5a70ddbe 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk 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 d47c9433..8bf08587 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 183d8506..4b8bfa9f 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlan; diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index fed615b9..cbb4d964 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Session; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 11e22aba..1a31fbdd 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index be15439d..547de494 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index 25d824b0..7ffe6091 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index e6d0e16c..732fb088 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index a25f14be..40dfb2ed 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 640971d7..acf40299 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Subdomain; diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index 62eca38c..dd8c32b8 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Ui; diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index bf43db21..ece4d231 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. // Author: Frederic Leclercq namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index f425a23a..c763aad1 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index 38e57b96..a663546c 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index 9cb6f55a..a0a78791 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index ea6d75bf..5cc064ab 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 7bcb823e..e8193046 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index 5fdb6bc1..718f221a 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index d2965bc0..36564826 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index f655f0b7..161f7344 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 8d6ab1c4..8ea83ddd 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 716b57d5..54daad5f 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Parallels IP Holdings GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 0a414e64..65a3077e 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index aa3da799..24a276a7 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 05590998..8cd65dc7 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use \PleskX\Api\Client\Exception; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 233c879f..c3a4d47e 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class CertificateTest extends TestCase diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 21378a2e..babb65be 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\KeyLimitChecker; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index fdb6b425..52bbb238 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class DatabaseServerTest extends TestCase diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 5878dcd7..6a7d0f40 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 375c7acd..6e30ea72 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class DnsTemplateTest extends TestCase diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 7329b577..b770954c 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class DnsTest extends TestCase diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index ee154ce5..64d4448e 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class EventLogTest extends TestCase diff --git a/tests/IpTest.php b/tests/IpTest.php index 95033c34..c4a449c0 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class IpTest extends TestCase diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index 5de8a10c..e9cf9839 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class LocaleTest extends TestCase diff --git a/tests/MailTest.php b/tests/MailTest.php index ad39f745..c9d9bb5c 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 9da8e004..59478869 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class PhpHandlerTest extends TestCase diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 2bf11974..479a4f74 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index f94428c5..78093a45 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\KeyLimitChecker; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index a7f6bb75..9a8bb734 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskX\Api\Exception; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 56df95a0..461c8eda 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class ServerTest extends TestCase diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 030d4536..01ade4c0 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class ServicePlanTest extends TestCase diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 670fb43d..555fd449 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class SessionTest extends TestCase diff --git a/tests/SiteTest.php b/tests/SiteTest.php index a64860eb..6d21d3cd 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\KeyLimitChecker; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index a2cfb7ec..0882cacd 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class SubdomainTest extends TestCase diff --git a/tests/TestCase.php b/tests/TestCase.php index b92aad19..99626ecd 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; diff --git a/tests/UiTest.php b/tests/UiTest.php index aed28b61..4374c364 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; class UiTest extends TestCase diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index bc55af04..b4c08027 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php - +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest\Utility; class KeyLimitChecker diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 59dcab52..3877e35f 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php - +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest\Utility; class PasswordProvider diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 5ba720c7..8590c1ab 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2019. Plesk International GmbH. +// Copyright 1999-2020. Plesk International GmbH. namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 2a30fc3f..98c90dd8 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,4 +1,5 @@ #!/bin/bash +### Copyright 1999-2020. Plesk International GmbH. while : ; do curl -ks https://plesk:8443/ | grep "<title>Plesk" > /dev/null From e1f4d49874c5fb09fe3a783b3748f8a4695f2ce8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 5 Jan 2020 07:17:41 +0700 Subject: [PATCH 082/243] Switch back to original phpunit-watch as far as pull request with timeouts has been merged --- Dockerfile | 2 +- composer.json | 8 +----- composer.lock | 72 +++++++++++++++++++++++---------------------------- 3 files changed, 34 insertions(+), 48 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8d028931..66fbb3ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM php:7.3-cli RUN apt-get update \ - && apt-get install -y unzip git \ + && apt-get install -y unzip \ && docker-php-ext-install pcntl \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer diff --git a/composer.json b/composer.json index df47edd0..9e5857eb 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,6 @@ "email": "plesk-dev-leads@plesk.com" } ], - "repositories": [ - { - "url": "https://github.com/sibprogrammer/phpunit-watcher.git", - "type": "git" - } - ], "require": { "php": "^7.3", "ext-curl": "*", @@ -27,7 +21,7 @@ }, "require-dev": { "phpunit/phpunit": "^8", - "spatie/phpunit-watcher": "dev-master" + "spatie/phpunit-watcher": "^1.22" }, "config": { "process-timeout": 0 diff --git a/composer.lock b/composer.lock index 4591a22e..392b946c 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": "9a50f6928d9289d618a90841f0f481c0", + "content-hash": "91bba94ac759a4ec871837c6636d457c", "packages": [], "packages-dev": [ { @@ -1082,16 +1082,16 @@ }, { "name": "react/event-loop", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d" + "reference": "6d24de090cd59cfc830263cfba965be77b563c13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", - "reference": "a0ecac955c67b57c40fe4a1b88a7cca1b58c982d", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6d24de090cd59cfc830263cfba965be77b563c13", + "reference": "6d24de090cd59cfc830263cfba965be77b563c13", "shasum": "" }, "require": { @@ -1120,7 +1120,7 @@ "asynchronous", "event-loop" ], - "time": "2019-02-07T16:19:49+00:00" + "time": "2020-01-01T18:39:52+00:00" }, { "name": "react/stream", @@ -1785,11 +1785,17 @@ }, { "name": "spatie/phpunit-watcher", - "version": "dev-master", + "version": "1.22.0", "source": { "type": "git", - "url": "https://github.com/sibprogrammer/phpunit-watcher.git", - "reference": "3c5e24bc373dfbf4f65c0cbe65b5bdae606fe6ef" + "url": "https://github.com/spatie/phpunit-watcher.git", + "reference": "dee58ae54d3bc4eccc2b3d7006444f535a693f18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/dee58ae54d3bc4eccc2b3d7006444f535a693f18", + "reference": "dee58ae54d3bc4eccc2b3d7006444f535a693f18", + "shasum": "" }, "require": { "clue/stdio-react": "^2.0", @@ -1815,19 +1821,7 @@ "Spatie\\PhpUnitWatcher\\": "src" } }, - "autoload-dev": { - "psr-4": { - "Spatie\\PhpUnitWatcher\\Test\\": "tests" - }, - "files": [ - "tests/helpers.php" - ] - }, - "scripts": { - "test": [ - "vendor/bin/phpunit" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1845,7 +1839,7 @@ "phpunit-watcher", "spatie" ], - "time": "2020-01-01T11:46:56+00:00" + "time": "2020-01-04T22:46:42+00:00" }, { "name": "symfony/console", @@ -1925,25 +1919,25 @@ }, { "name": "symfony/finder", - "version": "v4.4.2", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e" + "reference": "17874dd8ab9a19422028ad56172fb294287a701b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ce8743441da64c41e2a667b8eb66070444ed911e", - "reference": "ce8743441da64c41e2a667b8eb66070444ed911e", + "url": "https://api.github.com/repos/symfony/finder/zipball/17874dd8ab9a19422028ad56172fb294287a701b", + "reference": "17874dd8ab9a19422028ad56172fb294287a701b", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1970,7 +1964,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com/", - "time": "2019-11-17T21:56:56+00:00" + "time": "2019-11-18T17:27:11+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2403,25 +2397,25 @@ }, { "name": "yosymfony/resource-watcher", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/yosymfony/resource-watcher.git", - "reference": "937ec60269f9d6e092357a9e1948f97a738dc0dc" + "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/937ec60269f9d6e092357a9e1948f97a738dc0dc", - "reference": "937ec60269f9d6e092357a9e1948f97a738dc0dc", + "url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", + "reference": "a8c34f704e6bd4f786c97f3c0ba65bd86cb2bd73", "shasum": "" }, "require": { "php": ">=5.6", - "symfony/finder": "^2.7|^3.0|^4.0" + "symfony/finder": "^2.7|^3.0|^4.0|^5.0" }, "require-dev": { "phpunit/phpunit": "^5.7", - "symfony/filesystem": "^2.7|^3.0|^4.0" + "symfony/filesystem": "^2.7|^3.0|^4.0|^5.0" }, "type": "library", "extra": { @@ -2452,14 +2446,12 @@ "symfony", "watcher" ], - "time": "2018-05-12T22:34:25+00:00" + "time": "2020-01-04T15:36:55+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "spatie/phpunit-watcher": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From 7a016ebfde30ff30ddbf2fe71d54629245551d78 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 5 Jan 2020 08:12:09 +0700 Subject: [PATCH 083/243] Validate code style using StyleCI --- .styleci.yml | 6 ++++++ README.md | 1 + 2 files changed, 7 insertions(+) create mode 100644 .styleci.yml diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 00000000..d8d75419 --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,6 @@ +preset: recommended + +disabled: + - align_double_arrow + - phpdoc_align + - phpdoc_annotation_without_dot diff --git a/README.md b/README.md index 013b8030..f730abdd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ## 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) [![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) PHP object-oriented library for Plesk XML-RPC API. From b406035f536d5af62c30e61dba08255d1af315b4 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 5 Jan 2020 08:23:40 +0700 Subject: [PATCH 084/243] phpdoc_annotation_without_dot cannot be disabled due to strange reason --- .styleci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.styleci.yml b/.styleci.yml index d8d75419..d23fa271 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -3,4 +3,3 @@ preset: recommended disabled: - align_double_arrow - phpdoc_align - - phpdoc_annotation_without_dot From 38a7cd1eb7324aef17f55e781dbad9153b87b60f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 5 Jan 2020 08:34:12 +0700 Subject: [PATCH 085/243] Prevent StyleCI from fixing of copyright line --- .styleci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.styleci.yml b/.styleci.yml index d23fa271..518d094f 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -3,3 +3,4 @@ preset: recommended disabled: - align_double_arrow - phpdoc_align + - blank_line_after_opening_tag From 8c827d6b1612db6e191702f020be64ed056aefed Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <sibprogrammer@gmail.com> Date: Sun, 5 Jan 2020 01:36:12 +0000 Subject: [PATCH 086/243] Apply fixes from StyleCI --- src/Api/Client.php | 80 +++++++++++-------- src/Api/Client/Exception.php | 2 +- src/Api/Exception.php | 2 +- src/Api/InternalClient.php | 4 +- src/Api/Operator.php | 16 ++-- src/Api/Operator/Aps.php | 1 - src/Api/Operator/Certificate.php | 5 +- src/Api/Operator/Customer.php | 12 ++- src/Api/Operator/Database.php | 32 ++++++-- src/Api/Operator/DatabaseServer.php | 16 ++-- src/Api/Operator/Dns.php | 16 +++- src/Api/Operator/DnsTemplate.php | 19 +++-- src/Api/Operator/EventLog.php | 5 +- src/Api/Operator/Ip.php | 3 +- src/Api/Operator/Locale.php | 6 +- src/Api/Operator/LogRotation.php | 1 - src/Api/Operator/Mail.php | 17 ++-- src/Api/Operator/PhpHandler.php | 6 +- src/Api/Operator/ProtectedDirectory.php | 22 +++-- src/Api/Operator/Reseller.php | 20 ++--- src/Api/Operator/ResellerPlan.php | 1 - src/Api/Operator/SecretKey.php | 11 ++- src/Api/Operator/Server.php | 28 ++++--- src/Api/Operator/ServicePlan.php | 11 +-- src/Api/Operator/ServicePlanAddon.php | 1 - src/Api/Operator/Session.php | 9 ++- src/Api/Operator/Site.php | 15 +++- src/Api/Operator/SiteAlias.php | 10 ++- src/Api/Operator/Subdomain.php | 15 +++- src/Api/Operator/Ui.php | 11 ++- src/Api/Operator/VirtualDirectory.php | 2 - src/Api/Operator/Webspace.php | 27 +++++-- src/Api/Struct.php | 21 ++--- src/Api/Struct/Customer/Info.php | 2 +- src/Api/Struct/Database/Info.php | 8 +- src/Api/Struct/Database/UserInfo.php | 4 +- src/Api/Struct/DatabaseServer/Info.php | 4 +- src/Api/Struct/Dns/Info.php | 6 +- src/Api/Struct/EventLog/DetailedEvent.php | 4 +- src/Api/Struct/EventLog/Event.php | 2 +- src/Api/Struct/Locale/Info.php | 2 +- src/Api/Struct/Mail/Info.php | 2 +- src/Api/Struct/ProtectedDirectory/Info.php | 2 +- .../Struct/ProtectedDirectory/UserInfo.php | 2 +- src/Api/Struct/Reseller/GeneralInfo.php | 2 +- src/Api/Struct/Reseller/Info.php | 2 +- src/Api/Struct/Server/Preferences.php | 6 +- src/Api/Struct/Server/SessionPreferences.php | 2 +- src/Api/Struct/Server/Statistics.php | 1 - src/Api/Struct/Server/Statistics/Objects.php | 5 +- src/Api/Struct/Server/Statistics/Version.php | 1 - src/Api/Struct/Server/UpdatesInfo.php | 2 +- src/Api/Struct/ServicePlan/Info.php | 2 +- src/Api/Struct/Site/HostingInfo.php | 2 +- src/Api/Struct/Site/Info.php | 2 +- src/Api/Struct/SiteAlias/Info.php | 2 +- src/Api/Struct/Subdomain/Info.php | 6 +- src/Api/Struct/Ui/CustomButton.php | 8 +- src/Api/Struct/Webspace/DiskUsage.php | 22 ++--- src/Api/Struct/Webspace/GeneralInfo.php | 2 +- src/Api/Struct/Webspace/Info.php | 2 +- src/Api/Struct/Webspace/LimitDescriptor.php | 2 +- .../Struct/Webspace/PermissionDescriptor.php | 2 +- src/Api/Struct/Webspace/PhpSettings.php | 2 +- .../Webspace/PhysicalHostingDescriptor.php | 2 +- src/Api/XmlResponse.php | 9 +-- tests/ApiClientTest.php | 6 +- tests/CertificateTest.php | 3 +- tests/CustomerTest.php | 1 + tests/DatabaseServerTest.php | 1 + tests/DatabaseTest.php | 3 + tests/DnsTemplateTest.php | 1 + tests/DnsTest.php | 1 + tests/EventLogTest.php | 1 + tests/IpTest.php | 1 + tests/LocaleTest.php | 1 + tests/MailTest.php | 1 + tests/PhpHandlerTest.php | 1 + tests/ProtectedDirectoryTest.php | 2 +- tests/ResellerTest.php | 1 + tests/SecretKeyTest.php | 5 +- tests/ServerTest.php | 1 + tests/ServicePlanTest.php | 1 + tests/SessionTest.php | 1 + tests/SiteTest.php | 2 + tests/SubdomainTest.php | 8 +- tests/TestCase.php | 2 + tests/UiTest.php | 1 + tests/Utility/KeyLimitChecker.php | 7 +- tests/Utility/PasswordProvider.php | 1 + tests/WebspaceTest.php | 1 + 91 files changed, 384 insertions(+), 241 deletions(-) diff --git a/src/Api/Client.php b/src/Api/Client.php index 08c92f23..2c456553 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -2,10 +2,11 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api; + use SimpleXMLElement; /** - * Client for Plesk XML-RPC API + * Client for Plesk XML-RPC API. */ class Client { @@ -28,7 +29,7 @@ class Client protected $_verifyResponseCallback; /** - * Create client + * Create client. * * @param string $host * @param int $port @@ -42,7 +43,7 @@ public function __construct($host, $port = 8443, $protocol = 'https') } /** - * Setup credentials for authentication + * Setup credentials for authentication. * * @param string $login * @param string $password @@ -54,7 +55,7 @@ public function setCredentials($login, $password) } /** - * Define secret key for alternative authentication + * Define secret key for alternative authentication. * * @param string $secretKey */ @@ -64,7 +65,7 @@ public function setSecretKey($secretKey) } /** - * Set default version for requests + * Set default version for requests. * * @param string $version */ @@ -74,7 +75,7 @@ public function setVersion($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 */ @@ -84,7 +85,7 @@ public function setVerifyResponse(callable $function = null) } /** - * Retrieve host used for communication + * Retrieve host used for communication. * * @return string */ @@ -94,7 +95,7 @@ public function getHost() } /** - * Retrieve port used for communication + * Retrieve port used for communication. * * @return int */ @@ -104,7 +105,7 @@ public function getPort() } /** - * Retrieve name of the protocol (http or https) used for communication + * Retrieve name of the protocol (http or https) used for communication. * * @return string */ @@ -114,24 +115,27 @@ public function getProtocol() } /** - * Retrieve XML template for packet + * Retrieve XML template for packet. * * @param string|null $version + * * @return SimpleXMLElement */ public function getPacket($version = null) { $protocolVersion = !is_null($version) ? $version : $this->_version; $content = "<?xml version='1.0' encoding='UTF-8' ?>"; - $content .= "<packet" . ("" === $protocolVersion ? "" : " version='$protocolVersion'") . "/>"; + $content .= '<packet'.('' === $protocolVersion ? '' : " version='$protocolVersion'").'/>'; + return new SimpleXMLElement($content); } /** - * Perform API request + * Perform API request. * * @param string|array|SimpleXMLElement $request * @param int $mode + * * @return XmlResponse */ public function request($request, $mode = self::RESPONSE_SHORT) @@ -143,14 +147,14 @@ public function request($request, $mode = self::RESPONSE_SHORT) if (is_array($request)) { $request = $this->_arrayToXml($request, $xml)->asXML(); - } else if (preg_match('/^[a-z]/', $request)) { + } elseif (preg_match('/^[a-z]/', $request)) { $request = $this->_expandRequestShortSyntax($request, $xml); } } if ('sdk' == $this->_protocol) { $version = ('' == $this->_version) ? null : $this->_version; - $requestXml = new SimpleXMLElement((string)$request); + $requestXml = new SimpleXMLElement((string) $request); $xml = \pm_ApiRpc::getService($version)->call($requestXml->children()[0]->asXml(), $this->_login); } else { $xml = $this->_performHttpRequest($request); @@ -164,11 +168,13 @@ public function request($request, $mode = self::RESPONSE_SHORT) } /** - * Perform HTTP request to end-point + * Perform HTTP request to end-point. * * @param string $request - * @return XmlResponse + * * @throws Client\Exception + * + * @return XmlResponse */ private function _performHttpRequest($request) { @@ -191,20 +197,22 @@ private function _performHttpRequest($request) curl_close($curl); $xml = new XmlResponse($result); + return $xml; } /** - * Perform multiple API requests using single HTTP request + * Perform multiple API requests using single HTTP request. * * @param $requests * @param int $mode - * @return array + * * @throws Client\Exception + * + * @return array */ public function multiRequest($requests, $mode = self::RESPONSE_SHORT) { - $requestXml = $this->getPacket(); foreach ($requests as $request) { @@ -213,7 +221,7 @@ public function multiRequest($requests, $mode = self::RESPONSE_SHORT) } else { if (is_array($request)) { $request = $this->_arrayToXml($request, $requestXml)->asXML(); - } else if (preg_match('/^[a-z]/', $request)) { + } elseif (preg_match('/^[a-z]/', $request)) { $this->_expandRequestShortSyntax($request, $requestXml); } } @@ -243,16 +251,16 @@ public function multiRequest($requests, $mode = self::RESPONSE_SHORT) } /** - * Retrieve list of headers needed for request + * Retrieve list of headers needed for request. * * @return array */ protected function _getHeaders() { - $headers = array( - "Content-Type: text/xml", - "HTTP_PRETTY_PRINT: TRUE", - ); + $headers = [ + 'Content-Type: text/xml', + 'HTTP_PRETTY_PRINT: TRUE', + ]; if ($this->_secretKey) { $headers[] = "KEY: $this->_secretKey"; @@ -265,29 +273,32 @@ protected function _getHeaders() } /** - * Verify that response does not contain errors + * Verify that response does not contain errors. * * @param XmlResponse $xml + * * @throws Exception */ protected function _verifyResponse($xml) { - if ($xml->system && $xml->system->status && 'error' == (string)$xml->system->status) { - throw new Exception((string)$xml->system->errtext, (int)$xml->system->errcode); + if ($xml->system && $xml->system->status && 'error' == (string) $xml->system->status) { + throw new Exception((string) $xml->system->errtext, (int) $xml->system->errcode); } 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')[0]; + $errorMessage = (string) $xml->xpath('//errtext')[0]; + throw new Exception($errorMessage, $errorCode); } } /** - * Expand short syntax (some.method.call) into full XML representation + * Expand short syntax (some.method.call) into full XML representation. * * @param string $request * @param SimpleXMLElement $xml + * * @return string */ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) @@ -304,11 +315,12 @@ protected function _expandRequestShortSyntax($request, SimpleXMLElement $xml) } /** - * Convert array to XML representation + * Convert array to XML representation. * * @param array $array * @param SimpleXMLElement $xml * @param string $parentEl + * * @return SimpleXMLElement */ protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = null) @@ -327,6 +339,7 @@ protected function _arrayToXml(array $array, SimpleXMLElement $xml, $parentEl = /** * @param array $array + * * @return bool */ protected function _isAssocArray(array $array) @@ -336,12 +349,13 @@ protected function _isAssocArray(array $array) /** * @param string $name + * * @return \PleskX\Api\Operator */ protected function _getOperator($name) { if (!isset($this->_operatorsCache[$name])) { - $className = '\\PleskX\\Api\\Operator\\' . $name; + $className = '\\PleskX\\Api\\Operator\\'.$name; $this->_operatorsCache[$name] = new $className($this); } diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index 753cc624..a59475dd 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -4,7 +4,7 @@ namespace PleskX\Api\Client; /** - * Transport layer exception + * Transport layer exception. */ class Exception extends \Exception { diff --git a/src/Api/Exception.php b/src/Api/Exception.php index 46d5f717..e5f58986 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -4,7 +4,7 @@ namespace PleskX\Api; /** - * Exceptions for XML-RPC API client + * Exceptions for XML-RPC API client. */ class Exception extends \Exception { diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index e88f5be2..fb236c7f 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -4,7 +4,7 @@ namespace PleskX\Api; /** - * Internal client for Plesk XML-RPC API (via SDK) + * Internal client for Plesk XML-RPC API (via SDK). */ class InternalClient extends Client { @@ -14,7 +14,7 @@ public function __construct() } /** - * Setup login to execute requests under certain user + * Setup login to execute requests under certain user. * * @param $login */ diff --git a/src/Api/Operator.php b/src/Api/Operator.php index ea618407..427bd993 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -5,7 +5,6 @@ class Operator { - /** @var string|null */ protected $_wrapperTag = null; @@ -24,10 +23,11 @@ public function __construct($client) } /** - * Perform plain API request + * Perform plain API request. * * @param string|array $request * @param int $mode + * * @return XmlResponse */ public function request($request, $mode = Client::RESPONSE_SHORT) @@ -36,7 +36,7 @@ public function request($request, $mode = Client::RESPONSE_SHORT) if (is_array($request)) { $request = [$wrapperTag => $request]; - } else if (preg_match('/^[a-z]/', $request)) { + } elseif (preg_match('/^[a-z]/', $request)) { $request = "$wrapperTag.$request"; } else { $request = "<$wrapperTag>$request</$wrapperTag>"; @@ -47,22 +47,25 @@ public function request($request, $mode = Client::RESPONSE_SHORT) /** * @param string $field - * @param integer|string $value + * @param int|string $value * @param string $deleteMethodName + * * @return bool */ protected function _delete($field, $value, $deleteMethodName = 'del') { $response = $this->request("$deleteMethodName.filter.$field=$value"); - return 'ok' === (string)$response->status; + + return 'ok' === (string) $response->status; } /** * @param string $structClass * @param string $infoTag * @param string|null $field - * @param integer|string|null $value + * @param int|string|null $value * @param callable|null $filter + * * @return mixed */ protected function _getItems($structClass, $infoTag, $field = null, $value = null, callable $filter = null) @@ -89,5 +92,4 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul return $items; } - } diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index 4e75303f..145456fb 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -5,5 +5,4 @@ class Aps extends \PleskX\Api\Operator { - } diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 7427a52d..4946e1c6 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -2,13 +2,14 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Certificate as Struct; class Certificate extends \PleskX\Api\Operator { - /** * @param array $properties + * * @return Struct\Info */ public function generate($properties) @@ -21,7 +22,7 @@ public function generate($properties) } $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 6f9fd42d..8c54dc5d 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -2,13 +2,14 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Customer as Struct; class Customer extends \PleskX\Api\Operator { - /** * @param array $properties + * * @return Struct\Info */ public function create($properties) @@ -21,12 +22,14 @@ public function create($properties) } $response = $this->_client->request($packet); + return new Struct\Info($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -36,12 +39,14 @@ public function delete($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\GeneralInfo */ public function get($field, $value) { $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + return reset($items); } @@ -52,5 +57,4 @@ public function getAll() { return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } - } diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 367900aa..7a16a530 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -2,12 +2,14 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Database as Struct; class Database extends \PleskX\Api\Operator { /** * @param array $properties + * * @return Struct\Info */ public function create($properties) @@ -17,6 +19,7 @@ public function create($properties) /** * @param $properties + * * @return Struct\UserInfo */ public function createUser($properties) @@ -27,6 +30,7 @@ public function createUser($properties) /** * @param $command * @param array $properties + * * @return \PleskX\Api\XmlResponse */ private function _process($command, array $properties) @@ -47,39 +51,46 @@ private function _process($command, array $properties) /** * @param array $properties + * * @return bool */ public function updateUser(array $properties) { $response = $this->_process('set-db-user', $properties); - return 'ok' === (string)$response->status; + + return 'ok' === (string) $response->status; } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\UserInfo */ public function getUser($field, $value) { $items = $this->getAllUsers($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info[] */ public function getAll($field, $value) @@ -89,12 +100,14 @@ public function getAll($field, $value) foreach ($response->xpath('//result') as $xmlResult) { $items[] = new Struct\Info($xmlResult); } + return $items; } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\UserInfo[] */ public function getAllUsers($field, $value) @@ -104,6 +117,7 @@ public function getAllUsers($field, $value) foreach ($response->xpath('//result') as $xmlResult) { $items[] = new Struct\UserInfo($xmlResult); } + return $items; } @@ -111,6 +125,7 @@ public function getAllUsers($field, $value) * @param $command * @param $field * @param $value + * * @return \PleskX\Api\XmlResponse */ private function _get($command, $field, $value) @@ -124,12 +139,14 @@ private function _get($command, $field, $value) } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + return $response; } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -139,7 +156,8 @@ public function delete($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function deleteUser($field, $value) diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index a7da1359..f4856925 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -2,12 +2,11 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; -use PleskX\Api\Struct\DatabaseServer as Struct; +use PleskX\Api\Struct\DatabaseServer as Struct; class DatabaseServer extends \PleskX\Api\Operator { - protected $_wrapperTag = 'db_server'; /** @@ -16,17 +15,20 @@ class DatabaseServer extends \PleskX\Api\Operator public function getSupportedTypes() { $response = $this->request('get-supported-types'); - return (array)$response->type; + + return (array) $response->type; } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info */ public function get($field, $value) { $items = $this->_get($field, $value); + return reset($items); } @@ -40,7 +42,8 @@ public function getAll() /** * @param string|null $field - * @param integer|string|null $value + * @param int|string|null $value + * * @return Struct\Info|Struct\Info[] */ private function _get($field = null, $value = null) @@ -58,11 +61,10 @@ private function _get($field = null, $value = null) $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\Info($xmlResult->data); - $item->id = (int)$xmlResult->id; + $item->id = (int) $xmlResult->id; $items[] = $item; } return $items; } - } diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 21859084..8b7e3f04 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,12 +1,15 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Dns as Struct; class Dns extends \PleskX\Api\Operator { /** * @param array $properties + * * @return Struct\Info */ public function create($properties) @@ -23,18 +26,21 @@ public function create($properties) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info[] */ public function getAll($field, $value) @@ -51,15 +57,17 @@ public function getAll($field, $value) $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\Info($xmlResult->data); - $item->id = (int)$xmlResult->id; + $item->id = (int) $xmlResult->id; $items[] = $item; } + return $items; } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 4a76c95d..97a56bfb 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,6 +1,8 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Dns as Struct; class DnsTemplate extends \PleskX\Api\Operator @@ -9,6 +11,7 @@ class DnsTemplate extends \PleskX\Api\Operator /** * @param array $properties + * * @return Struct\Info */ public function create(array $properties) @@ -26,18 +29,21 @@ public function create(array $properties) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info|null */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info[] */ public function getAll($field = null, $value = null) @@ -55,15 +61,17 @@ public function getAll($field = null, $value = null) $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\Info($xmlResult->data); - $item->id = (int)$xmlResult->id; + $item->id = (int) $xmlResult->id; $items[] = $item; } + return $items; } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -74,6 +82,7 @@ public function delete($field, $value) $delTag->addChild('template'); $response = $this->_client->request($packet); - return 'ok' === (string)$response->status; + + return 'ok' === (string) $response->status; } } diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 07335bf1..c3a0d69d 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -2,11 +2,11 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\EventLog as Struct; class EventLog extends \PleskX\Api\Operator { - protected $_wrapperTag = 'event_log'; /** @@ -44,7 +44,6 @@ public function getDetailedLog() */ public function getLastId() { - return (int)$this->request('get-last-id')->getValue('id'); + return (int) $this->request('get-last-id')->getValue('id'); } - } diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 79725d27..8d8ddf17 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -2,11 +2,11 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Ip as Struct; class Ip extends \PleskX\Api\Operator { - /** * @return Struct\Info[] */ @@ -23,5 +23,4 @@ public function get() return $ips; } - } diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 6bca4886..66d1c51c 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -2,13 +2,14 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Locale as Struct; class Locale extends \PleskX\Api\Operator { - /** * @param string|null $id + * * @return Struct\Info|Struct\Info[] */ public function get($id = null) @@ -24,10 +25,9 @@ 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); + $locales[(string) $localeInfo->info->id] = new Struct\Info($localeInfo->info); } return !is_null($id) ? reset($locales) : $locales; } - } diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index 9113efb8..602e86a3 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -5,5 +5,4 @@ class LogRotation extends \PleskX\Api\Operator { - } diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index fab2b27e..2fcf7bbe 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -2,16 +2,17 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Mail as Struct; class Mail extends \PleskX\Api\Operator { - /** * @param string $name - * @param integer $siteId - * @param boolean $mailbox + * @param int $siteId + * @param bool $mailbox * @param string $password + * * @return Struct\Info */ public function create($name, $siteId, $mailbox = false, $password = '') @@ -31,13 +32,15 @@ public function create($name, $siteId, $mailbox = false, $password = '') } $response = $this->_client->request($packet); + return new Struct\Info($response->mailname); } /** * @param string $field - * @param integer|string $value - * @param integer $siteId + * @param int|string $value + * @param int $siteId + * * @return bool */ public function delete($field, $value, $siteId) @@ -47,7 +50,7 @@ public function delete($field, $value, $siteId) $filter->addChild('site-id', $siteId); $filter->addChild($field, $value); $response = $this->_client->request($packet); - return 'ok' === (string)$response->status; - } + return 'ok' === (string) $response->status; + } } diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 273b2dba..802c7366 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -11,7 +11,8 @@ class PhpHandler extends Operator { /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Info */ public function get($field, $value) @@ -32,7 +33,8 @@ public function get($field, $value) /** * @param string|null $field - * @param integer|string $value + * @param int|string $value + * * @return Info[] */ public function getAll($field = null, $value = null) diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index dfaeaca6..7630fa82 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -7,13 +7,13 @@ class ProtectedDirectory extends \PleskX\Api\Operator { - protected $_wrapperTag = 'protected-dir'; /** * @param string $name - * @param integer $siteId + * @param int $siteId * @param string $header + * * @return Struct\Info */ public function add($name, $siteId, $header = '') @@ -30,7 +30,8 @@ public function add($name, $siteId, $header = '') /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -40,18 +41,21 @@ public function delete($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\DataInfo|false */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\DataInfo[] */ public function getAll($field, $value) @@ -61,6 +65,7 @@ public function getAll($field, $value) foreach ($response->xpath('//result/data') as $xmlResult) { $items[] = new Struct\DataInfo($xmlResult); } + return $items; } @@ -68,6 +73,7 @@ public function getAll($field, $value) * @param Struct\Info $protectedDirectory * @param string $login * @param string $password + * * @return Struct\UserInfo */ public function addUser($protectedDirectory, $login, $password) @@ -84,7 +90,8 @@ public function addUser($protectedDirectory, $login, $password) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function deleteUser($field, $value) @@ -96,6 +103,7 @@ public function deleteUser($field, $value) * @param $command * @param $field * @param $value + * * @return \PleskX\Api\XmlResponse */ private function _get($command, $field, $value) @@ -109,7 +117,7 @@ private function _get($command, $field, $value) } $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + return $response; } - } diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 4cd5185e..baf51c66 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -2,13 +2,14 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Reseller as Struct; class Reseller extends \PleskX\Api\Operator { - /** * @param array $properties + * * @return Struct\Info */ public function create($properties) @@ -21,12 +22,14 @@ public function create($properties) } $response = $this->_client->request($packet); + return new Struct\Info($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -34,21 +37,23 @@ public function delete($field, $value) return $this->_delete($field, $value); } - /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\GeneralInfo */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\GeneralInfo[] */ public function getAll($field = null, $value = null) @@ -70,13 +75,10 @@ public function getAll($field = null, $value = null) $items = []; foreach ($response->xpath('//result') as $xmlResult) { $item = new Struct\GeneralInfo($xmlResult->data); - $item->id = (int)$xmlResult->id; + $item->id = (int) $xmlResult->id; $items[] = $item; } return $items; } - - - } diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 6173c9a1..54aeb069 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -5,5 +5,4 @@ class ResellerPlan extends \PleskX\Api\Operator { - } diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 0664a7df..8de034c3 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -2,15 +2,16 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\SecretKey as Struct; class SecretKey extends \PleskX\Api\Operator { - protected $_wrapperTag = 'secret_key'; /** * @param string $ipAddress + * * @return string */ public function create($ipAddress) @@ -18,11 +19,13 @@ public function create($ipAddress) $packet = $this->_client->getPacket(); $packet->addChild($this->_wrapperTag)->addChild('create')->addChild('ip_address', $ipAddress); $response = $this->_client->request($packet); - return (string)$response->key; + + return (string) $response->key; } /** * @param string $keyId + * * @return bool */ public function delete($keyId) @@ -32,11 +35,13 @@ public function delete($keyId) /** * @param string $keyId + * * @return Struct\Info */ public function get($keyId) { $items = $this->_get($keyId); + return reset($items); } @@ -50,6 +55,7 @@ public function getAll() /** * @param string|null $keyId + * * @return Struct\Info[] */ public function _get($keyId = null) @@ -71,5 +77,4 @@ public function _get($keyId = null) return $items; } - } diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 8b3c3710..68899da6 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -2,11 +2,11 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Server as Struct; class Server extends \PleskX\Api\Operator { - /** * @return array */ @@ -16,7 +16,7 @@ public function getProtos() $packet->addChild($this->_wrapperTag)->addChild('get_protos'); $response = $this->_client->request($packet); - return (array)$response->protos->proto; + return (array) $response->protos->proto; } public function getGeneralInfo() @@ -43,7 +43,7 @@ public function getKeyInfo() $keyInfoXml = $this->_getInfo('key'); foreach ($keyInfoXml->property as $property) { - $keyInfo[(string)$property->name] = (string)$property->value; + $keyInfo[(string) $property->name] = (string) $property->value; } return $keyInfo; @@ -58,7 +58,7 @@ public function getComponents() $componentsXml = $this->_getInfo('components'); foreach ($componentsXml->component as $component) { - $components[(string)$component->name] = (string)$component->version; + $components[(string) $component->name] = (string) $component->version; } return $components; @@ -73,10 +73,10 @@ public function getServiceStates() $statesXml = $this->_getInfo('services_state'); foreach ($statesXml->srv as $service) { - $states[(string)$service->id] = [ - 'id' => (string)$service->id, - 'title' => (string)$service->title, - 'state' => (string)$service->state, + $states[(string) $service->id] = [ + 'id' => (string) $service->id, + 'title' => (string) $service->title, + 'state' => (string) $service->state, ]; } @@ -97,7 +97,7 @@ public function getShells() $shellsXml = $this->_getInfo('shells'); foreach ($shellsXml->shell as $shell) { - $shells[(string)$shell->name] = (string)$shell->path; + $shells[(string) $shell->name] = (string) $shell->path; } return $shells; @@ -109,7 +109,8 @@ public function getShells() public function getNetworkInterfaces() { $interfacesXml = $this->_getInfo('interfaces'); - return (array)$interfacesXml->interface; + + return (array) $interfacesXml->interface; } public function getStatistics() @@ -126,7 +127,7 @@ public function getSiteIsolationConfig() $configXml = $this->_getInfo('site-isolation-config'); foreach ($configXml->property as $property) { - $config[(string)$property->name] = (string)$property->value; + $config[(string) $property->name] = (string) $property->value; } return $config; @@ -140,6 +141,7 @@ public function getUpdatesInfo() /** * @param string $login * @param string $clientIp + * * @return string */ public function createSession($login, $clientIp) @@ -152,11 +154,12 @@ public function createSession($login, $clientIp) $dataNode->addChild('source_server'); $response = $this->_client->request($packet); - return (string)$response->id; + return (string) $response->id; } /** * @param string $operation + * * @return \SimpleXMLElement */ private function _getInfo($operation) @@ -167,5 +170,4 @@ private function _getInfo($operation) return $response->$operation; } - } diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index e6b2380c..ad803e7d 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -2,20 +2,21 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; -use PleskX\Api\Struct\ServicePlan as Struct; +use PleskX\Api\Struct\ServicePlan as Struct; class ServicePlan extends \PleskX\Api\Operator { - /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info */ public function get($field, $value) { $items = $this->_get($field, $value); + return reset($items); } @@ -29,7 +30,8 @@ public function getAll() /** * @param string|null $field - * @param integer|string|null $value + * @param int|string|null $value + * * @return Struct\Info|Struct\Info[] */ private function _get($field = null, $value = null) @@ -51,5 +53,4 @@ private function _get($field = null, $value = null) return $items; } - } diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 708053fe..e92741cf 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -5,5 +5,4 @@ class ServicePlanAddon extends \PleskX\Api\Operator { - } diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index 5e2a6f48..0c1ec6c9 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -2,11 +2,11 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Session as Struct; class Session extends \PleskX\Api\Operator { - /** * @return Struct\Info[] */ @@ -16,7 +16,7 @@ public function get() $response = $this->request('get'); foreach ($response->session as $sessionInfo) { - $sessions[(string)$sessionInfo->id] = new Struct\Info($sessionInfo); + $sessions[(string) $sessionInfo->id] = new Struct\Info($sessionInfo); } return $sessions; @@ -24,12 +24,13 @@ public function get() /** * @param string $sessionId + * * @return bool */ public function terminate($sessionId) { $response = $this->request("terminate.session-id=$sessionId"); - return 'ok' === (string)$response->status; - } + return 'ok' === (string) $response->status; + } } diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index bb6cf19d..e1b45dbd 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -2,6 +2,7 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Site as Struct; class Site extends \PleskX\Api\Operator @@ -10,6 +11,7 @@ class Site extends \PleskX\Api\Operator /** * @param array $properties + * * @return Struct\Info */ public function create(array $properties) @@ -36,12 +38,14 @@ public function create(array $properties) } $response = $this->_client->request($packet); + return new Struct\Info($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -51,18 +55,21 @@ public function delete($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\GeneralInfo */ public function get($field, $value) { $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\HostingInfo|null */ public function getHosting($field, $value) @@ -70,6 +77,7 @@ public function getHosting($field, $value) $items = $this->_getItems(Struct\HostingInfo::class, 'hosting', $field, $value, function ($node) { return isset($node->vrt_hst); }); + return empty($items) ? null : reset($items); } @@ -80,5 +88,4 @@ public function getAll() { return $this->_getItems(Struct\GeneralInfo::class, 'gen_info'); } - } diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index d2e27764..caf5c808 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -10,6 +10,7 @@ class SiteAlias extends \PleskX\Api\Operator /** * @param array $properties * @param array $preferences + * * @return Struct\Info */ public function create(array $properties, array $preferences = []) @@ -29,23 +30,27 @@ public function create(array $properties, array $preferences = []) $info->addChild('name', $properties['name']); $response = $this->_client->request($packet); + return new Struct\Info($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info[] */ public function getAll($field = null, $value = null) @@ -64,6 +69,7 @@ public function getAll($field = null, $value = null) $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 9361630e..bc659ca5 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -2,12 +2,14 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Subdomain as Struct; class Subdomain extends \PleskX\Api\Operator { /** * @param array $properties + * * @return Struct\Info */ public function create($properties) @@ -28,12 +30,14 @@ public function create($properties) } $response = $this->_client->request($packet); + return new Struct\Info($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -43,18 +47,21 @@ public function delete($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info */ public function get($field, $value) { $items = $this->getAll($field, $value); + return reset($items); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Info[] */ public function getAll($field = null, $value = null) @@ -75,7 +82,7 @@ public function getAll($field = null, $value = null) continue; } $item = new Struct\Info($xmlResult->data); - $item->id = (int)$xmlResult->id; + $item->id = (int) $xmlResult->id; $items[] = $item; } diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index b586c18d..d963299b 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -2,23 +2,25 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Ui as Struct; class Ui extends \PleskX\Api\Operator { - /** * @return array */ public function getNavigation() { $response = $this->request('get-navigation'); + return unserialize(base64_decode($response->navigation)); } /** * @param string $owner * @param array $properties + * * @return int */ public function createCustomButton($owner, $properties) @@ -33,26 +35,29 @@ public function createCustomButton($owner, $properties) } $response = $this->_client->request($packet); - return (int)$response->id; + + return (int) $response->id; } /** * @param int $id + * * @return Struct\CustomButton */ public function getCustomButton($id) { $response = $this->request("get-custombutton.filter.custombutton-id=$id"); + return new Struct\CustomButton($response); } /** * @param int $id + * * @return bool */ public function deleteCustomButton($id) { return $this->_delete('custombutton-id', $id, 'delete-custombutton'); } - } diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 6d1f6e69..259e050a 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -5,7 +5,5 @@ class VirtualDirectory extends \PleskX\Api\Operator { - protected $_wrapperTag = 'virtdir'; - } diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 70c01968..b530b55b 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -2,32 +2,36 @@ // Copyright 1999-2020. Plesk International GmbH. namespace PleskX\Api\Operator; + use PleskX\Api\Struct\Webspace as Struct; class Webspace extends \PleskX\Api\Operator { - public function getPermissionDescriptor() { $response = $this->request('get-permission-descriptor.filter'); + return new Struct\PermissionDescriptor($response); } public function getLimitDescriptor() { $response = $this->request('get-limit-descriptor.filter'); + return new Struct\LimitDescriptor($response); } public function getPhysicalHostingDescriptor() { $response = $this->request('get-physical-hosting-descriptor.filter'); + return new Struct\PhysicalHostingDescriptor($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\PhpSettings */ public function getPhpSettings($field, $value) @@ -45,12 +49,14 @@ public function getPhpSettings($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\Limits */ public function getLimits($field, $value) { $items = $this->_getItems(Struct\Limits::class, 'limits', $field, $value); + return reset($items); } @@ -58,6 +64,7 @@ public function getLimits($field, $value) * @param array $properties * @param array|null $hostingProperties * @param $planName + * * @return Struct\Info */ public function create(array $properties, array $hostingProperties = null, $planName = null) @@ -79,7 +86,7 @@ public function create(array $properties, array $hostingProperties = null, $plan } if (isset($properties['ip_address'])) { - $infoHosting->addChild("ip_address", $properties['ip_address']); + $infoHosting->addChild('ip_address', $properties['ip_address']); } } @@ -88,12 +95,14 @@ public function create(array $properties, array $hostingProperties = null, $plan } $response = $this->_client->request($packet); + return new Struct\Info($response); } /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return bool */ public function delete($field, $value) @@ -103,12 +112,14 @@ public function delete($field, $value) /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\GeneralInfo */ public function get($field, $value) { $items = $this->_getItems(Struct\GeneralInfo::class, 'gen_info', $field, $value); + return reset($items); } @@ -122,12 +133,14 @@ public function getAll() /** * @param string $field - * @param integer|string $value + * @param int|string $value + * * @return Struct\DiskUsage */ public function getDiskUsage($field, $value) { $items = $this->_getItems(Struct\DiskUsage::class, 'disk_usage', $field, $value); + return reset($items); } } diff --git a/src/Api/Struct.php b/src/Api/Struct.php index 85bbb900..f0019216 100644 --- a/src/Api/Struct.php +++ b/src/Api/Struct.php @@ -5,17 +5,17 @@ abstract class Struct { - public function __set($property, $value) { throw new \Exception("Try to set an undeclared property '$property'."); } /** - * Initialize list of scalar properties by response + * Initialize list of scalar properties by response. * * @param \SimpleXMLElement $apiResponse * @param array $properties + * * @throws \Exception */ protected function _initScalarProperties($apiResponse, array $properties) @@ -34,11 +34,11 @@ protected function _initScalarProperties($apiResponse, array $properties) $propertyType = preg_replace('/^.+ @var ([a-z]+) .+$/', '\1', $docBlock); if ('string' == $propertyType) { - $value = (string)$value; - } else if ('integer' == $propertyType) { - $value = (int)$value; - } else if ('boolean' == $propertyType) { - $value = in_array((string)$value, ['true', 'on', 'enabled']); + $value = (string) $value; + } elseif ('integer' == $propertyType) { + $value = (int) $value; + } elseif ('boolean' == $propertyType) { + $value = in_array((string) $value, ['true', 'on', 'enabled']); } else { throw new \Exception("Unknown property type '$propertyType'."); } @@ -48,15 +48,16 @@ protected function _initScalarProperties($apiResponse, array $properties) } /** - * Convert underscore separated words into camel case + * Convert underscore separated words into camel case. * * @param string $under + * * @return string */ private function _underToCamel($under) { - $under = '_' . str_replace('_', ' ', strtolower($under)); + $under = '_'.str_replace('_', ' ', strtolower($under)); + return ltrim(str_replace(' ', '', ucwords($under)), '_'); } - } diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index f83afd20..6374cf00 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 50c49b02..0126393e 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ @@ -14,13 +14,13 @@ class Info extends \PleskX\Api\Struct /** @var string */ public $type; - /** @var integer */ + /** @var int */ public $webspaceId; - /** @var integer */ + /** @var int */ public $dbServerId; - /** @var integer */ + /** @var int */ public $defaultUserId; public function __construct($apiResponse) diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index 8e7a2d74..9f8f0c00 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -5,13 +5,13 @@ class UserInfo extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ public $login; - /** @var integer */ + /** @var int */ public $dbId; public function __construct($apiResponse) diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 5d38c438..3186fb2b 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -5,13 +5,13 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ public $host; - /** @var integer */ + /** @var int */ public $port; /** @var string */ diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index b9dcefe4..76486278 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -5,13 +5,13 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; - /** @var integer */ + /** @var int */ public $siteId; - /** @var integer */ + /** @var int */ public $siteAliasId; /** @var string */ diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 2bcc319d..7a61f0be 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -5,13 +5,13 @@ class DetailedEvent extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ public $type; - /** @var integer */ + /** @var int */ public $time; /** @var string */ diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 8f3f2395..a9469e6a 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -8,7 +8,7 @@ class Event extends \PleskX\Api\Struct /** @var string */ public $type; - /** @var integer */ + /** @var int */ public $time; /** @var string */ diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 38c4c19c..44a35f13 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -19,7 +19,7 @@ public function __construct($apiResponse) $this->_initScalarProperties($apiResponse, [ 'id', ['lang' => 'language'], - 'country' + 'country', ]); } } diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index f7aad051..3396369b 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 1dbf35e9..0152b16a 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -7,7 +7,7 @@ class Info extends Struct { - /** @var integer */ + /** @var int */ public $id; public function __construct($apiResponse) diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 7e5fc0b7..da93c296 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -5,7 +5,7 @@ class UserInfo extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; public function __construct($apiResponse) diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 9f184a5b..e7db41c2 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -26,7 +26,7 @@ public function __construct($apiResponse) $this->permissions = []; foreach ($apiResponse->permissions->permission as $permissionInfo) { - $this->permissions[(string)$permissionInfo->name] = (string)$permissionInfo->value; + $this->permissions[(string) $permissionInfo->name] = (string) $permissionInfo->value; } } } diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index 89595407..3a0addc9 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index e2178afa..9f8535e6 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -5,13 +5,13 @@ class Preferences extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $statTtl; - /** @var integer */ + /** @var int */ public $trafficAccounting; - /** @var integer */ + /** @var int */ public $restartApacheInterval; public function __construct($apiResponse) diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index 6d0159dd..44e23b56 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -5,7 +5,7 @@ class SessionPreferences extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $loginTimeout; public function __construct($apiResponse) diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 86edb000..26c0f60d 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -5,7 +5,6 @@ class Statistics extends \PleskX\Api\Struct { - /** @var Statistics\Objects */ public $objects; diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index d7ae1ce4..8ef48022 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -5,11 +5,10 @@ class Objects extends \PleskX\Api\Struct { - - /** @var integer */ + /** @var int */ public $clients; - /** @var integer */ + /** @var int */ public $domains; public function __construct($apiResponse) diff --git a/src/Api/Struct/Server/Statistics/Version.php b/src/Api/Struct/Server/Statistics/Version.php index 5a70ddbe..56675743 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -5,7 +5,6 @@ class Version extends \PleskX\Api\Struct { - /** @var string */ public $internalName; diff --git a/src/Api/Struct/Server/UpdatesInfo.php b/src/Api/Struct/Server/UpdatesInfo.php index 8bf08587..79f899c0 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -8,7 +8,7 @@ class UpdatesInfo extends \PleskX\Api\Struct /** @var string */ public $lastInstalledUpdate; - /** @var boolean */ + /** @var bool */ public $installUpdatesAutomatically; public function __construct($apiResponse) diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 4b8bfa9f..3b3edd23 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index 547de494..cc981a02 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -14,7 +14,7 @@ class HostingInfo extends \PleskX\Api\Struct public function __construct($apiResponse) { foreach ($apiResponse->vrt_hst->property as $property) { - $this->properties[(string)$property->name] = (string)$property->value; + $this->properties[(string) $property->name] = (string) $property->value; } $this->_initScalarProperties($apiResponse->vrt_hst, [ 'ip_address', diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index 7ffe6091..a2b74107 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 40dfb2ed..133cb0ed 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -8,7 +8,7 @@ class Info extends \PleskX\Api\Struct /** @var string */ public $status; - /** @var integer */ + /** @var int */ public $id; public function __construct($apiResponse) diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index acf40299..672c1e6d 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ @@ -23,10 +23,10 @@ public function __construct($apiResponse) $this->_initScalarProperties($apiResponse, [ 'id', 'parent', - 'name' + 'name', ]); foreach ($apiResponse->property as $propertyInfo) { - $this->properties[(string)$propertyInfo->name] = (string)$propertyInfo->value; + $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 dd8c32b8..ece61a32 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -8,16 +8,16 @@ class CustomButton extends \PleskX\Api\Struct /** @var string */ public $id; - /** @var integer */ + /** @var int */ public $sortKey; - /** @var boolean */ + /** @var bool */ public $public; - /** @var boolean */ + /** @var bool */ public $internal; - /** @var boolean */ + /** @var bool */ public $noFrame; /** @var string */ diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index ece4d231..80d7f257 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -6,37 +6,37 @@ class DiskUsage extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $httpdocs; - /** @var integer */ + /** @var int */ public $httpsdocs; - /** @var integer */ + /** @var int */ public $subdomains; - /** @var integer */ + /** @var int */ public $anonftp; - /** @var integer */ + /** @var int */ public $logs; - /** @var integer */ + /** @var int */ public $dbases; - /** @var integer */ + /** @var int */ public $mailboxes; - /** @var integer */ + /** @var int */ public $maillists; - /** @var integer */ + /** @var int */ public $domaindumps; - /** @var integer */ + /** @var int */ public $configs; - /** @var integer */ + /** @var int */ public $chroot; public function __construct($apiResponse) diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index c763aad1..d9be8f1a 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -11,7 +11,7 @@ class GeneralInfo extends \PleskX\Api\Struct /** @var string */ public $guid; - /** @var integer */ + /** @var int */ public $realSize; public function __construct($apiResponse) diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index a0a78791..a39d709a 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -5,7 +5,7 @@ class Info extends \PleskX\Api\Struct { - /** @var integer */ + /** @var int */ public $id; /** @var string */ diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index e8193046..36b32d12 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -13,7 +13,7 @@ public function __construct($apiResponse) $this->limits = []; foreach ($apiResponse->descriptor->property as $propertyInfo) { - $this->limits[(string)$propertyInfo->name] = new LimitInfo($propertyInfo); + $this->limits[(string) $propertyInfo->name] = new LimitInfo($propertyInfo); } } } diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 161f7344..959afb0e 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -13,7 +13,7 @@ public function __construct($apiResponse) $this->permissions = []; foreach ($apiResponse->descriptor->property as $propertyInfo) { - $this->permissions[(string)$propertyInfo->name] = new PermissionInfo($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 54daad5f..f16f16ee 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -13,7 +13,7 @@ public function __construct($apiResponse) $this->properties = []; foreach ($apiResponse->webspace->get->result->data->{'php-settings'}->setting as $setting) { - $this->properties[(string)$setting->name] = (string)$setting->value; + $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 65a3077e..acf032b0 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -13,7 +13,7 @@ public function __construct($apiResponse) $this->properties = []; foreach ($apiResponse->descriptor->property as $propertyInfo) { - $this->properties[(string)$propertyInfo->name] = new HostingPropertyInfo($propertyInfo); + $this->properties[(string) $propertyInfo->name] = new HostingPropertyInfo($propertyInfo); } } } diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 24a276a7..5b11ef49 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -4,20 +4,19 @@ namespace PleskX\Api; /** - * XML wrapper for responses + * XML wrapper for responses. */ class XmlResponse extends \SimpleXMLElement { - /** - * Retrieve value by node name + * Retrieve value by node name. * * @param string $node + * * @return string */ public function getValue($node) { - return (string)$this->xpath('//' . $node)[0]; + return (string) $this->xpath('//'.$node)[0]; } - } diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 8cd65dc7..eb9f8133 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,8 +1,9 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; -use \PleskX\Api\Client\Exception; +use PleskX\Api\Client\Exception; class ApiClientTest extends TestCase { @@ -120,7 +121,7 @@ public function testMultiRequest() $this->assertCount(2, $responses); - $protos = (array)$responses[0]->protos->proto; + $protos = (array) $responses[0]->protos->proto; $generalInfo = $responses[1]; $this->assertContains('1.6.6.0', $protos); @@ -160,6 +161,7 @@ public function testSetVerifyResponse() throw new Exception('proto'); } }); + try { static::$_client->server()->getProtos(); } catch (Exception $e) { diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index c3a4d47e..4b2e79cf 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class CertificateTest extends TestCase @@ -13,7 +14,7 @@ public function testGenerate() 'location' => 'Novosibirsk', 'company' => 'Plesk', 'email' => 'info@plesk.com', - 'name' => 'plesk.com' + 'name' => 'plesk.com', ]); $this->assertGreaterThan(0, strlen($certificate->request)); $this->assertStringStartsWith('-----BEGIN CERTIFICATE REQUEST-----', $certificate->request); diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index babb65be..961f1153 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\KeyLimitChecker; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 52bbb238..1f6eeef4 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class DatabaseServerTest extends TestCase diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 6a7d0f40..2e63b809 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; @@ -208,6 +209,7 @@ public function testDeleteUser() /** * @param array $params + * * @return \PleskX\Api\Struct\Database\Info */ private function _createDatabase(array $params) @@ -221,6 +223,7 @@ private function _createDatabase(array $params) /** * @param array $params + * * @return \PleskX\Api\Struct\Database\UserInfo */ private function _createUser(array $params) diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 6e30ea72..7eafebff 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class DnsTemplateTest extends TestCase diff --git a/tests/DnsTest.php b/tests/DnsTest.php index b770954c..5feadcac 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class DnsTest extends TestCase diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index 64d4448e..92347133 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class EventLogTest extends TestCase diff --git a/tests/IpTest.php b/tests/IpTest.php index c4a449c0..683aa5f1 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class IpTest extends TestCase diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index e9cf9839..f450d722 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class LocaleTest extends TestCase diff --git a/tests/MailTest.php b/tests/MailTest.php index c9d9bb5c..f2bb6d49 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 59478869..5b8f753a 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class PhpHandlerTest extends TestCase diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 479a4f74..80dfd3c7 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; @@ -80,5 +81,4 @@ public function testDeleteUser() static::$_client->protectedDirectory()->delete('id', $protectedDirectory->id); } - } diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 78093a45..50a96b24 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\KeyLimitChecker; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 9a8bb734..7ac6a313 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskX\Api\Exception; @@ -34,7 +35,9 @@ public function testGetAll() $keys = static::$_client->secretKey()->getAll(); $this->assertGreaterThanOrEqual(2, count($keys)); - $keyIpAddresses = array_map(function($key) { return $key->ipAddress; }, $keys); + $keyIpAddresses = array_map(function ($key) { + return $key->ipAddress; + }, $keys); $this->assertContains('192.168.0.1', $keyIpAddresses); $this->assertContains('192.168.0.2', $keyIpAddresses); diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 461c8eda..419002ae 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class ServerTest extends TestCase diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 01ade4c0..6a29c09b 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class ServicePlanTest extends TestCase diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 555fd449..acebe286 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class SessionTest extends TestCase diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 6d21d3cd..9cb3c960 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\KeyLimitChecker; @@ -32,6 +33,7 @@ private function _createSite($name, array $properties = []) 'name' => $name, 'webspace-id' => static::$webspace->id, ], $properties); + return static::$_client->site()->create($properties); } diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 0882cacd..c5d77367 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class SubdomainTest extends TestCase @@ -20,6 +21,7 @@ public static function setUpBeforeClass(): void /** * @param string $name + * * @return \PleskX\Api\Struct\Subdomain\Info */ private function _createSubdomain($name) @@ -57,7 +59,7 @@ public function testGet() $subdomain = $this->_createSubdomain($name); $subdomainInfo = static::$_client->subdomain()->get('id', $subdomain->id); - $this->assertEquals($name . '.' . $subdomainInfo->parent, $subdomainInfo->name); + $this->assertEquals($name.'.'.$subdomainInfo->parent, $subdomainInfo->name); $this->assertTrue(false !== strpos($subdomainInfo->properties['www_root'], $name)); static::$_client->subdomain()->delete('id', $subdomain->id); @@ -72,9 +74,9 @@ public function testGetAll() $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); diff --git a/tests/TestCase.php b/tests/TestCase.php index 99626ecd..c5c855e4 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; @@ -45,6 +46,7 @@ protected static function _getIpAddress() { $ips = static::$_client->ip()->get(); $ipInfo = reset($ips); + return $ipInfo->ipAddress; } diff --git a/tests/UiTest.php b/tests/UiTest.php index 4374c364..717b5a23 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; class UiTest extends TestCase diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index b4c08027..0fff84d4 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest\Utility; class KeyLimitChecker @@ -9,11 +10,12 @@ class KeyLimitChecker const LIMIT_DOMAINS = 'limit_domains'; /** - * Checks whether limit is within the required constraint + * Checks whether limit is within the required constraint. * * @param (string|int)[] $keyInfo Structure returned by the getKeyInfo call * @param string $type Type of the object that should be checked * @param int $minimalRequirement Minimal value that should satisfy the limit + * * @return bool if license satisfies set limits */ public static function checkByType(array $keyInfo, $type, $minimalRequirement) @@ -38,6 +40,7 @@ public static function checkByType(array $keyInfo, $type, $minimalRequirement) default: return false; } + return intval($keyInfo[$field]) === -1 || intval($keyInfo[$field]) > $minimalRequirement; } -} \ No newline at end of file +} diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 3877e35f..fc60b9c3 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest\Utility; class PasswordProvider diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 8590c1ab..3cc18759 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,6 @@ <?php // Copyright 1999-2020. Plesk International GmbH. + namespace PleskXTest; use PleskXTest\Utility\PasswordProvider; From ae2469bdda4e245e7b17b06c0851f7e8b4245b8b Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 5 Jan 2020 08:54:42 +0700 Subject: [PATCH 087/243] Fix doc blocks introspection --- src/Api/Struct.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Struct.php b/src/Api/Struct.php index f0019216..aa5a1377 100644 --- a/src/Api/Struct.php +++ b/src/Api/Struct.php @@ -35,9 +35,9 @@ protected function _initScalarProperties($apiResponse, array $properties) if ('string' == $propertyType) { $value = (string) $value; - } elseif ('integer' == $propertyType) { + } elseif ('int' == $propertyType) { $value = (int) $value; - } elseif ('boolean' == $propertyType) { + } elseif ('bool' == $propertyType) { $value = in_array((string) $value, ['true', 'on', 'enabled']); } else { throw new \Exception("Unknown property type '$propertyType'."); From 22eb44dc3995388ac5a00a954034e4dadc48402b Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 5 Jan 2020 09:08:20 +0700 Subject: [PATCH 088/243] Fix missed types in doc blocks --- src/Api/Operator/Database.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 7a16a530..4f9d8318 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -18,7 +18,7 @@ public function create($properties) } /** - * @param $properties + * @param array $properties * * @return Struct\UserInfo */ @@ -28,7 +28,7 @@ public function createUser($properties) } /** - * @param $command + * @param string $command * @param array $properties * * @return \PleskX\Api\XmlResponse @@ -122,9 +122,9 @@ public function getAllUsers($field, $value) } /** - * @param $command - * @param $field - * @param $value + * @param string $command + * @param string $field + * @param int|string $value * * @return \PleskX\Api\XmlResponse */ From e7dfe193646f56c91a4b1283dc2e252a7540ca15 Mon Sep 17 00:00:00 2001 From: Evgeniy Kovrizhnikov <ekovrizhnikov@plesk.com> Date: Thu, 30 Apr 2020 15:53:38 +0700 Subject: [PATCH 089/243] Update test to respect logs with empty user --- tests/EventLogTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index 92347133..d0e4c7d4 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -21,7 +21,6 @@ public function testGetDetailedLog() $event = reset($events); $this->assertGreaterThan(0, $event->time); - $this->assertGreaterThan(0, strlen($event->user)); } public function testGetLastId() From b98ecc702495ba404e85234c539a9dc16b1f120e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Thu, 30 Jul 2020 19:25:40 +0700 Subject: [PATCH 090/243] Use new default password for integration testing --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0862227d..c13b384f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: build: . environment: REMOTE_URL: https://plesk:8443 - REMOTE_PASSWORD: changeme + REMOTE_PASSWORD: changeme1Q** command: bash -c "cd /opt/api-php-lib && composer install && ./wait-for-plesk.sh && composer test -- --testdox" depends_on: - plesk From 3428abccacf3c895eb52fc235b971336b1be7868 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Thu, 30 Jul 2020 21:23:08 +0700 Subject: [PATCH 091/243] Fix redirect handling in case of latest Plesk --- wait-for-plesk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 98c90dd8..beaa48d6 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -2,7 +2,7 @@ ### Copyright 1999-2020. Plesk International GmbH. while : ; do - curl -ks https://plesk:8443/ | grep "<title>Plesk" > /dev/null + curl -ksL https://plesk:8443/ | grep "<title>Plesk" > /dev/null [ $? -eq 0 ] && break sleep 5 done From 47f5f2e7b03bd088f35c84c6c10187bcc4698bcc Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Thu, 30 Jul 2020 21:34:11 +0700 Subject: [PATCH 092/243] Make StyleCI a little bit happier --- tests/TestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index c5c855e4..ac1378e3 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -60,7 +60,8 @@ protected static function _createWebspace() [ 'name' => "test{$id}.test", 'ip_address' => static::_getIpAddress(), - ], [ + ], + [ 'ftp_login' => "u{$id}", 'ftp_password' => PasswordProvider::STRONG_PASSWORD, ] From 3285435cd86d57f8a0996806439812627cec619f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Thu, 30 Jul 2020 19:14:35 +0700 Subject: [PATCH 093/243] Switch to PHPUnit 9 --- composer.json | 2 +- composer.lock | 1115 +++++++++++++++++++++++++++------------ tests/IpTest.php | 2 +- tests/SecretKeyTest.php | 2 +- tests/ServerTest.php | 2 +- 5 files changed, 789 insertions(+), 334 deletions(-) diff --git a/composer.json b/composer.json index 9e5857eb..9ca7bacc 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "ext-simplexml": "*" }, "require-dev": { - "phpunit/phpunit": "^8", + "phpunit/phpunit": "^9", "spatie/phpunit-watcher": "^1.22" }, "config": { diff --git a/composer.lock b/composer.lock index 392b946c..f5f3cb85 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": "91bba94ac759a4ec871837c6636d457c", + "content-hash": "554cb70d6a29bd690fd9e966b98003d0", "packages": [], "packages-dev": [ { @@ -179,20 +179,20 @@ }, { "name": "doctrine/instantiator", - "version": "1.3.0", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", - "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", + "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -231,7 +231,7 @@ "constructor", "instantiate" ], - "time": "2019-10-21T16:45:58+00:00" + "time": "2020-05-29T17:27:14+00:00" }, { "name": "evenement/evenement", @@ -278,25 +278,26 @@ }, { "name": "jolicode/jolinotif", - "version": "v2.0.2", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/jolicode/JoliNotif.git", - "reference": "0b5f786c5f181b3916df616ca191892713257662" + "reference": "52f5b98f964f6009b8ec4c0e951edcd0862e2ac7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/0b5f786c5f181b3916df616ca191892713257662", - "reference": "0b5f786c5f181b3916df616ca191892713257662", + "url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/52f5b98f964f6009b8ec4c0e951edcd0862e2ac7", + "reference": "52f5b98f964f6009b8ec4c0e951edcd0862e2ac7", "shasum": "" }, "require": { "php": ">=7.0", - "symfony/process": "~3.3|~4.0" + "symfony/process": "^3.3|^4.0|^5.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "symfony/phpunit-bridge": "^3.3" + "friendsofphp/php-cs-fixer": "^2.0", + "symfony/finder": "^3.3|^4.0|^5.0", + "symfony/phpunit-bridge": "^3.4.26|^4.0|^5.0" }, "bin": [ "jolinotif" @@ -304,7 +305,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -330,24 +331,24 @@ "notification", "windows" ], - "time": "2019-02-26T18:10:50+00:00" + "time": "2020-06-17T08:25:38+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.4", + "version": "1.10.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7" + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/579bb7356d91f9456ccd505f24ca8b667966a0a7", - "reference": "579bb7356d91f9456ccd505f24ca8b667966a0a7", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -378,7 +379,7 @@ "object", "object graph" ], - "time": "2019-12-15T19:12:40+00:00" + "time": "2020-06-29T13:22:24+00:00" }, { "name": "phar-io/manifest", @@ -484,28 +485,25 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -532,45 +530,41 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "3170448f5769fe19f456173d833734e0ff1b84df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/3170448f5769fe19f456173d833734e0ff1b84df", + "reference": "3170448f5769fe19f456173d833734e0ff1b84df", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -581,38 +575,40 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@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.", - "time": "2019-12-28T18:55:12+00:00" + "time": "2020-07-20T20:05:34+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", + "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -631,37 +627,37 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2019-08-22T18:11:29+00:00" + "time": "2020-06-27T10:12:23+00:00" }, { "name": "phpspec/prophecy", - "version": "1.10.1", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc" + "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/cbe1df668b3fe136bcc909126a0f529a78d4cbbc", - "reference": "cbe1df668b3fe136bcc909126a0f529a78d4cbbc", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", + "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2", + "phpdocumentor/reflection-docblock": "^5.0", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -694,44 +690,45 @@ "spy", "stub" ], - "time": "2019-12-22T21:05:45+00:00" + "time": "2020-07-08T12:44:21+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", + "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", + "php": "^7.3", + "phpunit/php-file-iterator": "^3.0", + "phpunit/php-text-template": "^2.0", + "phpunit/php-token-stream": "^4.0", + "sebastian/code-unit-reverse-lookup": "^2.0", + "sebastian/environment": "^5.0", + "sebastian/version": "^3.0", "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.0" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "8.0-dev" } }, "autoload": { @@ -757,32 +754,32 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "time": "2020-05-23T08:02:54+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/25fefc5b19835ca653877fe081644a3f8c1d915e", + "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -807,26 +804,87 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "time": "2020-07-11T05:18:21+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f6eedfed1085dd1f4c599629459a0277d25f9a66", + "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "time": "2020-06-26T11:53:53+00:00" }, { "name": "phpunit/php-text-template", - "version": "1.2.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/6ff9c8ea4d3212b88fcf74e25e516e2c51c99324", + "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -848,32 +906,32 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2020-06-26T11:55:37+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "cc49734779cbb302bf51a44297dab8c4bbf941e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/cc49734779cbb302bf51a44297dab8c4bbf941e7", + "reference": "cc49734779cbb302bf51a44297dab8c4bbf941e7", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -897,33 +955,33 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" + "time": "2020-06-26T11:58:13+00:00" }, { "name": "phpunit/php-token-stream", - "version": "3.1.1", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5672711b6b07b14d5ab694e700c62eeb82fcf374", + "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -946,56 +1004,58 @@ "keywords": [ "tokenizer" ], - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-06-27T06:36:25+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.1", + "version": "9.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2" + "reference": "1c6a9e4312e209e659f1fce3ce88dd197c2448f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7870c78da3c5e4883eaef36ae47853ebb3cb86f2", - "reference": "7870c78da3c5e4883eaef36ae47853ebb3cb86f2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c6a9e4312e209e659f1fce3ce88dd197c2448f6", + "reference": "1c6a9e4312e209e659f1fce3ce88dd197c2448f6", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", + "myclabs/deep-copy": "^1.9.5", "phar-io/manifest": "^1.0.3", "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "php": "^7.3", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^8.0.2", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-invoker": "^3.0.2", + "phpunit/php-text-template": "^2.0.2", + "phpunit/php-timer": "^5.0.1", + "sebastian/code-unit": "^1.0.5", + "sebastian/comparator": "^4.0.3", + "sebastian/diff": "^4.0.1", + "sebastian/environment": "^5.1.2", + "sebastian/exporter": "^4.0.2", + "sebastian/global-state": "^4.0", + "sebastian/object-enumerator": "^4.0.2", + "sebastian/resource-operations": "^3.0.2", + "sebastian/type": "^2.1.1", + "sebastian/version": "^3.0.1" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -1003,12 +1063,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.2-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1029,7 +1092,7 @@ "testing", "xunit" ], - "time": "2019-12-25T14:49:39+00:00" + "time": "2020-07-13T17:55:55+00:00" }, { "name": "psr/container", @@ -1124,16 +1187,16 @@ }, { "name": "react/stream", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "50426855f7a77ddf43b9266c22320df5bf6c6ce6" + "reference": "7c02b510ee3f582c810aeccd3a197b9c2f52ff1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/50426855f7a77ddf43b9266c22320df5bf6c6ce6", - "reference": "50426855f7a77ddf43b9266c22320df5bf6c6ce6", + "url": "https://api.github.com/repos/reactphp/stream/zipball/7c02b510ee3f582c810aeccd3a197b9c2f52ff1a", + "reference": "7c02b510ee3f582c810aeccd3a197b9c2f52ff1a", "shasum": "" }, "require": { @@ -1143,7 +1206,7 @@ }, "require-dev": { "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { @@ -1166,32 +1229,78 @@ "stream", "writable" ], - "time": "2019-01-01T16:15:09+00:00" + "time": "2020-05-04T10:17:57+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "c1e2df332c905079980b119c4db103117e5e5c90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/c1e2df332c905079980b119c4db103117e5e5c90", + "reference": "c1e2df332c905079980b119c4db103117e5e5c90", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "time": "2020-06-26T12:50:45+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ee51f9bb0c6d8a43337055db3120829fa14da819", + "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1211,34 +1320,34 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "time": "2020-06-26T12:04:00+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f", + "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": "^7.3 || ^8.0", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1251,6 +1360,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1262,10 +1375,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -1275,33 +1384,33 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "time": "2020-06-26T12:05:46+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113", + "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.0", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1314,13 +1423,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -1331,27 +1440,27 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "time": "2020-06-30T04:46:02+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2", + "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.0" }, "suggest": { "ext-posix": "*" @@ -1359,7 +1468,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1384,34 +1493,34 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "time": "2020-06-26T12:07:24+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "571d721db4aec847a0e59690b954af33ebf9f023" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/571d721db4aec847a0e59690b954af33ebf9f023", + "reference": "571d721db4aec847a0e59690b954af33ebf9f023", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": "^7.3 || ^8.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1451,30 +1560,30 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "time": "2020-06-26T12:08:55+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bdb1e7c79e592b8c82cb1699be3c8743119b8a72", + "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72", "shasum": "" }, "require": { - "php": "^7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": "^7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.0" }, "suggest": { "ext-uopz": "*" @@ -1482,7 +1591,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1505,34 +1614,34 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "time": "2020-02-07T06:11:37+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/074fed2d0a6d08e1677dd8ce9d32aecb384917b8", + "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": "^7.3 || ^8.0", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1552,32 +1661,32 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "time": "2020-06-26T12:11:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "127a46f6b057441b201253526f81d5406d6c7840" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/127a46f6b057441b201253526f81d5406d6c7840", + "reference": "127a46f6b057441b201253526f81d5406d6c7840", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1597,32 +1706,32 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "time": "2020-06-26T12:12:55+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/062231bf61d2b9448c4fa5a7643b5e1829c11d63", + "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1635,14 +1744,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1650,29 +1759,32 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "time": "2020-06-26T12:14:17+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "0653718a5a629b065e91f774595267f8dc32e213" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0653718a5a629b065e91f774595267f8dc32e213", + "reference": "0653718a5a629b065e91f774595267f8dc32e213", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1692,32 +1804,32 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "time": "2020-06-26T12:16:22+00:00" }, { "name": "sebastian/type", - "version": "1.1.3", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/86991e2b33446cd96e648c18bcdb1e95afb2c05a", + "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -1738,29 +1850,29 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "time": "2020-07-05T08:31:53+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "626586115d0ed31cb71483be55beb759b5af5a3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/626586115d0ed31cb71483be55beb759b5af5a3c", + "reference": "626586115d0ed31cb71483be55beb759b5af5a3c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^7.3 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1781,7 +1893,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "time": "2020-06-26T12:18:43+00:00" }, { "name": "spatie/phpunit-watcher", @@ -1843,26 +1955,29 @@ }, { "name": "symfony/console", - "version": "v5.0.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47" + "reference": "2226c68009627934b8cfc01260b4d287eab070df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fe6e3cd889ca64172d7a742a2eb058541404ef47", - "reference": "fe6e3cd889ca64172d7a742a2eb058541404ef47", + "url": "https://api.github.com/repos/symfony/console/zipball/2226c68009627934b8cfc01260b4d287eab070df", + "reference": "2226c68009627934b8cfc01260b4d287eab070df", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1|^2" + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" }, "conflict": { "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", "symfony/process": "<4.4" @@ -1888,7 +2003,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1915,29 +2030,79 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com/", - "time": "2019-12-17T13:20:22+00:00" + "time": "2020-07-06T13:23:11+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.1.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com/", + "time": "2020-06-06T08:49:21+00:00" }, { "name": "symfony/finder", - "version": "v5.0.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "17874dd8ab9a19422028ad56172fb294287a701b" + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/17874dd8ab9a19422028ad56172fb294287a701b", - "reference": "17874dd8ab9a19422028ad56172fb294287a701b", + "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", + "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", "shasum": "" }, "require": { - "php": "^7.2.5" + "php": ">=7.2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1964,20 +2129,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com/", - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.18.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1989,7 +2154,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2022,20 +2191,151 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.18.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { @@ -2047,7 +2347,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2081,20 +2385,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.18.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { @@ -2103,7 +2407,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -2139,29 +2447,96 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com/", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/process", - "version": "v4.4.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b" + "reference": "1864216226af21eb76d9477f691e7cbf198e0402" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/b84501ad50adb72a94fb460a5b5c91f693e99c9b", - "reference": "b84501ad50adb72a94fb460a5b5c91f693e99c9b", + "url": "https://api.github.com/repos/symfony/process/zipball/1864216226af21eb76d9477f691e7cbf198e0402", + "reference": "1864216226af21eb76d9477f691e7cbf198e0402", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2188,24 +2563,24 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com/", - "time": "2019-12-06T10:06:46+00:00" + "time": "2020-07-23T08:36:24+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.0.1", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "144c5e51266b281231e947b51223ba14acf1a749" + "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749", - "reference": "144c5e51266b281231e947b51223ba14acf1a749", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442", + "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", "psr/container": "^1.0" }, "suggest": { @@ -2214,7 +2589,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2246,24 +2625,96 @@ "interoperability", "standards" ], - "time": "2019-11-18T17:27:11+00:00" + "time": "2020-07-06T13:23:11+00:00" + }, + { + "name": "symfony/string", + "version": "v5.1.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f629ba9b611c76224feb21fe2bcbf0b6f992300b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f629ba9b611c76224feb21fe2bcbf0b6f992300b", + "reference": "f629ba9b611c76224feb21fe2bcbf0b6f992300b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony String component", + "homepage": "https://symfony.com/", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "time": "2020-07-08T08:27:49+00:00" }, { "name": "symfony/yaml", - "version": "v5.0.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "847661e77afa48d99ecfa508e8b60f0b029a19c0" + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/847661e77afa48d99ecfa508e8b60f0b029a19c0", - "reference": "847661e77afa48d99ecfa508e8b60f0b029a19c0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23", + "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23", "shasum": "" }, "require": { - "php": "^7.2.5", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -2275,10 +2726,13 @@ "suggest": { "symfony/console": "For validating YAML files using the lint command" }, + "bin": [ + "Resources/bin/yaml-lint" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -2305,27 +2759,27 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2019-12-10T11:06:55+00:00" + "time": "2020-05-20T17:43:50+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "75a63c33a8577608444246075ea0af0d052e452a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -2345,28 +2799,29 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "time": "2020-07-12T23:59:07+00:00" }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^5.3.3 || ^7.0 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -2393,7 +2848,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-07-08T17:02:28+00:00" }, { "name": "yosymfony/resource-watcher", diff --git a/tests/IpTest.php b/tests/IpTest.php index 683aa5f1..28f4d996 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -11,6 +11,6 @@ public function testGet() $this->assertGreaterThan(0, count($ips)); $ip = reset($ips); - $this->assertRegExp('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $ip->ipAddress); + $this->assertMatchesRegularExpression('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $ip->ipAddress); } } diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 7ac6a313..e9c392a5 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -10,7 +10,7 @@ class SecretKeyTest extends TestCase public function testCreate() { $keyId = static::$_client->secretKey()->create('192.168.0.1'); - $this->assertRegExp('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $keyId); + $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); } diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 419002ae..1018fd97 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -16,7 +16,7 @@ public function testGetGenInfo() { $generalInfo = static::$_client->server()->getGeneralInfo(); $this->assertGreaterThan(0, strlen($generalInfo->serverName)); - $this->assertRegExp('/^[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); } From f8d6be57399212f6da837ba08ee95933e0ef05da Mon Sep 17 00:00:00 2001 From: Vladimir Selliakhov <vselliakhov@plesk.com> Date: Wed, 16 Dec 2020 17:18:02 +0700 Subject: [PATCH 094/243] Added method for a bulk create and delete DNS records --- src/Api/Operator/Dns.php | 53 ++++++++++++++++++++++++++++++++++++ tests/DnsTest.php | 58 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 8b7e3f04..a10449b6 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -24,6 +24,34 @@ public function create($properties) return new Struct\Info($this->_client->request($packet)); } + /** + * Send multiply records by one request. + * + * @param array $records + * + * @return \PleskX\Api\XmlResponse[] + */ + public function bulkCreate(array $records) + { + $packet = $this->_client->getPacket(); + + foreach ($records as $properties) { + $info = $packet->addChild($this->_wrapperTag)->addChild('add_rec'); + + foreach ($properties as $name => $value) { + $info->addChild($name, $value); + } + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $items[] = $xmlResult; + } + + return $items; + } + /** * @param string $field * @param int|string $value @@ -74,4 +102,29 @@ public function delete($field, $value) { return $this->_delete($field, $value, 'del_rec'); } + + /** + * Delete multiply records by one request. + * + * @param array $recordIds + * + * @return \PleskX\Api\XmlResponse[] + */ + public function bulkDelete(array $recordIds) + { + $packet = $this->_client->getPacket(); + + foreach ($recordIds as $recordId) { + $packet->addChild($this->_wrapperTag)->addChild('del_rec') + ->addChild('filter')->addChild('id', $recordId); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + $items[] = $xmlResult; + } + + return $items; + } } diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 5feadcac..633f50d7 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -44,6 +44,64 @@ public function testCreate() static::$_client->dns()->delete('id', $dns->id); } + /** + * @return \PleskX\Api\XmlResponse[] + */ + public function testBulkCreate() + { + $response = static::$_client->dns()->bulkCreate([ + [ + 'site-id' => static::$webspace->id, + 'type' => 'TXT', + 'host' => 'host', + 'value' => 'value', + ], + [ + 'site-id' => static::$webspace->id, + 'type' => 'A', + 'host' => 'host', + 'value' => '1.1.1.1', + ], + [ + 'site-id' => static::$webspace->id, + 'type' => 'MX', + 'host' => 'custom-mail', + 'value' => '1.1.1.1', + 'opt' => '10', + ], + ]); + + $this->assertCount(3, $response); + + foreach ($response as $xml) { + $this->assertEquals('ok', (string) $xml->status); + $this->assertGreaterThan(0, (int) $xml->id); + } + + return $response; + } + + /** + * @depends testBulkCreate + * + * @param \PleskX\Api\XmlResponse[] $createdRecords + */ + public function testBulkDelete(array $createdRecords) + { + $createdRecordIds = array_map(function ($record) { + return (int) $record->id; + }, $createdRecords); + + $response = static::$_client->dns()->bulkDelete($createdRecordIds); + + $this->assertCount(3, $response); + + foreach ($response as $xml) { + $this->assertEquals('ok', (string) $xml->status); + $this->assertGreaterThan(0, (int) $xml->id); + } + } + public function testGetById() { $dns = static::$_client->dns()->create([ From 1b2efa8717fc946e3af84f2678970418ed016b6d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Thu, 17 Dec 2020 12:10:56 +0700 Subject: [PATCH 095/243] Fix assertion after switching to PHPUnit 9 --- tests/DnsTemplateTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 7eafebff..1d579d7b 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -34,7 +34,7 @@ public function testCreate() 'host' => 'test.create', 'value' => 'value', ]); - $this->assertInternalType('integer', $dns->id); + $this->assertIsInt($dns->id); $this->assertGreaterThan(0, $dns->id); $this->assertEquals(0, $dns->siteId); $this->assertEquals(0, $dns->siteAliasId); From e86a2010a15c6866086707da96ed2ccdbfd7e8cc Mon Sep 17 00:00:00 2001 From: Vyacheslav Ovchinnikov <vovchinnikov@plesk.com> Date: Wed, 23 Dec 2020 13:12:37 +0700 Subject: [PATCH 096/243] New SecretKeys response format support --- tests/SecretKeyTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index e9c392a5..026683c4 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -19,7 +19,7 @@ public function testGet() $keyId = static::$_client->secretKey()->create('192.168.0.1'); $keyInfo = static::$_client->secretKey()->get($keyId); - $this->assertEquals($keyId, $keyInfo->key); + $this->assertNotEmpty($keyInfo->key); $this->assertEquals('192.168.0.1', $keyInfo->ipAddress); $this->assertEquals('admin', $keyInfo->login); From 7626f9c7fa6e318a6c5fae743b49683546f843af Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sat, 9 Jan 2021 19:39:40 +0700 Subject: [PATCH 097/243] Fix incorrect XML creation for delete requests --- src/Api/Operator.php | 8 +++++++- src/Api/Operator/Webspace.php | 2 +- src/Api/Struct/Webspace/Info.php | 6 +++++- tests/WebspaceTest.php | 8 ++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/Api/Operator.php b/src/Api/Operator.php index 427bd993..fc83d66c 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -54,7 +54,13 @@ public function request($request, $mode = Client::RESPONSE_SHORT) */ protected function _delete($field, $value, $deleteMethodName = 'del') { - $response = $this->request("$deleteMethodName.filter.$field=$value"); + $response = $this->request([ + $deleteMethodName => [ + 'filter' => [ + $field => $value, + ], + ], + ]); return 'ok' === (string) $response->status; } diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index b530b55b..132bee72 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -96,7 +96,7 @@ public function create(array $properties, array $hostingProperties = null, $plan $response = $this->_client->request($packet); - return new Struct\Info($response); + return new Struct\Info($response, $properties['name'] ?? ''); } /** diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index a39d709a..c33f8a4a 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -11,11 +11,15 @@ class Info extends \PleskX\Api\Struct /** @var string */ public $guid; - public function __construct($apiResponse) + /** @var string */ + public $name; + + public function __construct($apiResponse, $name = '') { $this->_initScalarProperties($apiResponse, [ 'id', 'guid', ]); + $this->name = $name; } } diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 3cc18759..0e388b89 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -80,6 +80,14 @@ public function testDelete() $this->assertTrue($result); } + public function testDeleteByName() + { + $webspace = static::_createWebspace(); + $result = static::$_client->webspace()->delete('name', $webspace->name); + + $this->assertTrue($result); + } + public function testRequestCreateWebspace() { $handlers = static::$_client->phpHandler()->getAll(); From b0eecee352af55f9436c1602ef771f24acd7932f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sat, 9 Jan 2021 21:24:23 +0700 Subject: [PATCH 098/243] Add an ability to use proxy server --- src/Api/Client.php | 15 +++++++++++++++ tests/TestCase.php | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/src/Api/Client.php b/src/Api/Client.php index 2c456553..c74cd91d 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -18,6 +18,7 @@ class Client protected $_protocol; protected $_login; protected $_password; + protected $_proxy = ''; protected $_secretKey; protected $_version = ''; @@ -64,6 +65,16 @@ public function setSecretKey($secretKey) $this->_secretKey = $secretKey; } + /** + * Set proxy server for requests + * + * @param string $proxy + */ + public function setProxy($proxy) + { + $this->_proxy = $proxy; + } + /** * Set default version for requests. * @@ -188,6 +199,10 @@ private function _performHttpRequest($request) curl_setopt($curl, CURLOPT_HTTPHEADER, $this->_getHeaders()); curl_setopt($curl, CURLOPT_POSTFIELDS, $request); + if ('' !== $this->_proxy) { + curl_setopt($curl, CURLOPT_PROXY, $this->_proxy); + } + $result = curl_exec($curl); if (false === $result) { diff --git a/tests/TestCase.php b/tests/TestCase.php index ac1378e3..b17f15f3 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -27,6 +27,10 @@ public static function setUpBeforeClass(): void static::$_client = new \PleskX\Api\Client($host, $port, $scheme); static::$_client->setCredentials($login, $password); + + if ($proxy = getenv('REMOTE_PROXY')) { + static::$_client->setProxy($proxy); + } } public static function tearDownAfterClass(): void From a1bbe188f9b64b7f46048695d05ba1d26216596b Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sat, 9 Jan 2021 21:25:58 +0700 Subject: [PATCH 099/243] Fix doc style --- 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 c74cd91d..c467d083 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -66,7 +66,7 @@ public function setSecretKey($secretKey) } /** - * Set proxy server for requests + * Set proxy server for requests. * * @param string $proxy */ From e634b7830cd4789b106465334dcb54367cd9afe8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sat, 9 Jan 2021 21:57:08 +0700 Subject: [PATCH 100/243] Use Docker access token for TravisCI --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e38b9d80..d7ea2e8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ services: docker script: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker-compose run tests From 1e06f0cbd94ac3da022cfc836dbf543234e9136f Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 13:51:25 +0700 Subject: [PATCH 101/243] Use a special image for tests --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c13b384f..501c85a2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: plesk: - image: plesk/plesk + image: plesk/plesk:tests logging: driver: none ports: From a484fc923970c7cec7233dbbb2faf31c1a212df1 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 14:00:06 +0700 Subject: [PATCH 102/243] Update copyright year --- LICENSE | 2 +- phpunit.xml.dist | 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.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/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/Objects.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/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/SiteTest.php | 2 +- tests/SubdomainTest.php | 2 +- tests/TestCase.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 +- 110 files changed, 110 insertions(+), 110 deletions(-) diff --git a/LICENSE b/LICENSE index 0176136a..8113e2a4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 1999-2020. Plesk International GmbH. +Copyright 1999-2021. 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 bd75a98d..d77e92d9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2020. Plesk International GmbH. --> +<!-- Copyright 1999-2021. Plesk International GmbH. --> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" diff --git a/src/Api/Client.php b/src/Api/Client.php index c467d083..3f79d3f1 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index a59475dd..0d26d30b 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index e5f58986..a7ba9663 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index fb236c7f..6ec687f2 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index fc83d66c..f355c2ef 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index 145456fb..9f4bde31 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 4946e1c6..d82969a6 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 8c54dc5d..6fcaec0d 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 4f9d8318..30e1458a 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index f4856925..482d1d81 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index a10449b6..0c64980e 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 97a56bfb..4b79df77 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index c3a0d69d..6b7325a7 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 8d8ddf17..4bc87f77 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 66d1c51c..89991052 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index 602e86a3..ef0b60e1 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 2fcf7bbe..bf9be11f 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 802c7366..66f1ec1d 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 7630fa82..af643b0a 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index baf51c66..9ee8af0c 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 54aeb069..17d533fa 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 8de034c3..677de824 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 68899da6..65cbae61 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index ad803e7d..63408f52 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index e92741cf..0b9e873c 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index 0c1ec6c9..eb2970bd 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index e1b45dbd..170f7e32 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index caf5c808..65f48c76 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index bc659ca5..ece56e4b 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index d963299b..b2ac6576 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 259e050a..1c2ae8b5 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index 132bee72..e389c576 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Struct.php b/src/Api/Struct.php index aa5a1377..11d509f0 100644 --- a/src/Api/Struct.php +++ b/src/Api/Struct.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 4fff03ea..7689bcbd 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Certificate; diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index b5bc28d2..efa1f411 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 6374cf00..167b2097 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 0126393e..0066e4a9 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index 9f8f0c00..f5cb166d 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 3186fb2b..57facc61 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\DatabaseServer; diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 76486278..930c7201 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Dns; diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 7a61f0be..d009c08f 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index a9469e6a..67fdff88 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index d681fc92..ed79a6dc 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Ip; diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 44a35f13..619e7a6a 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Locale; diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 3396369b..566d00bc 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index 8cc0c4aa..5a14de6b 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\PhpHandler; diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 7ca83d93..5dfe5dd6 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 0152b16a..af3c755c 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index da93c296..61f6040f 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index e7db41c2..6c5ebd63 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index 3a0addc9..a1b6bf80 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 32a7ba49..14d110f9 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\SecretKey; diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 53760331..dfd0d7ac 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index fb74f435..15fee92b 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index 9f8535e6..905656c0 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index 44e23b56..654958fa 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 26c0f60d..e15b5c22 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics/Objects.php b/src/Api/Struct/Server/Statistics/Objects.php index 8ef48022..7428b1ae 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk 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 56675743..198495c1 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk 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 79f899c0..bdd2e7c7 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 3b3edd23..dd53595a 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlan; diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index cbb4d964..51024cbc 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Session; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 1a31fbdd..481ea626 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index cc981a02..c473d7b8 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index a2b74107..ea69dd94 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index 732fb088..256b5ca0 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 133cb0ed..b60fce71 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 672c1e6d..9e43dafc 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Subdomain; diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index ece61a32..ed7a712f 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Ui; diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 80d7f257..320f105a 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. // Author: Frederic Leclercq namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index d9be8f1a..f5736538 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index a663546c..7922d18c 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index c33f8a4a..d71cef6d 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 5cc064ab..9faf882e 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 36b32d12..e1d383ba 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index 718f221a..b8af3b67 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index 36564826..e6313ea1 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 959afb0e..bc333ba0 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 8ea83ddd..9414a31a 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index f16f16ee..464b2012 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index acf032b0..1aff2f7a 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 5b11ef49..687b6d8a 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskX\Api; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index eb9f8133..41547416 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 4b2e79cf..cd6cda3b 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 961f1153..f33c9241 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 1f6eeef4..ab716a46 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 2e63b809..ddbdf5aa 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 1d579d7b..e53202c0 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 633f50d7..69867418 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index d0e4c7d4..c402fbc9 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/IpTest.php b/tests/IpTest.php index 28f4d996..1e4625a2 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index f450d722..003cb019 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/MailTest.php b/tests/MailTest.php index f2bb6d49..90f8bd91 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 5b8f753a..e622cfeb 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 80dfd3c7..aa368fcf 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 50a96b24..d27d9893 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 026683c4..6d56293f 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 1018fd97..9f0c2a23 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 6a29c09b..44cef16b 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SessionTest.php b/tests/SessionTest.php index acebe286..8c97c5b9 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 9cb3c960..56c9282d 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index c5d77367..c6624919 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/TestCase.php b/tests/TestCase.php index b17f15f3..af2efcff 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/UiTest.php b/tests/UiTest.php index 717b5a23..6b997653 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index 0fff84d4..46951147 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index fc60b9c3..2083642d 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 0e388b89..b8444537 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2020. Plesk International GmbH. +// Copyright 1999-2021. Plesk International GmbH. namespace PleskXTest; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index beaa48d6..2daeb0f2 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,5 +1,5 @@ #!/bin/bash -### Copyright 1999-2020. Plesk International GmbH. +### Copyright 1999-2021. Plesk International GmbH. while : ; do curl -ksL https://plesk:8443/ | grep "<title>Plesk" > /dev/null From d2853a37e4c8cf9a6eae51cd392ac0a1533ab98b Mon Sep 17 00:00:00 2001 From: Sander van der Vlugt <svandervlugt@hostnet.nl> Date: Mon, 28 Oct 2019 16:34:50 +0100 Subject: [PATCH 103/243] Add servicePlan create and delete --- src/Api/Operator/ServicePlan.php | 24 +++++++++++ tests/ServicePlanTest.php | 68 ++++++++++++++++++++++++++++++-- tests/TestCase.php | 18 +++++++++ 3 files changed, 106 insertions(+), 4 deletions(-) diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 63408f52..3b27908f 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -28,6 +28,30 @@ public function getAll() return $this->_get(); } + /** + * @param string $planName + * @return Struct\Info + */ + public function create($planName) + { + $packet = $this->_client->getPacket(); + $info = $packet->addChild($this->_wrapperTag)->addChild('add'); + $info->addChild('name', $planName); + + $response = $this->_client->request($packet); + return new Struct\Info($response); + } + + /** + * @param string $field + * @param integer|string $value + * @return bool + */ + public function delete($field, $value) + { + return $this->_delete($field, $value); + } + /** * @param string|null $field * @param int|string|null $value diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 44cef16b..259088ab 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -7,16 +7,76 @@ class ServicePlanTest extends TestCase { public function testGet() { - $servicePlan = static::$_client->servicePlan()->get('name', 'Default Domain'); - $this->assertEquals('Default Domain', $servicePlan->name); - $this->assertGreaterThan(0, $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); } public function testGetAll() { + static::_createServicePlan(); + static::_createServicePlan(); + static::_createServicePlan(); + $servicePlans = static::$_client->servicePlan()->getAll(); $this->assertIsArray($servicePlans); - $this->assertGreaterThan(0, count($servicePlans)); + $this->assertGreaterThan(2, count($servicePlans)); $this->assertNotEmpty($servicePlans[0]->name); } + + public function testCreateServicePlan() + { + $servicePlan = static::_createServicePlan(); + $this->assertGreaterThan(0, $servicePlan->id); + + static::$_client->servicePlan()->delete('id', $servicePlan->id); + } + + public function testDelete() + { + $servicePlan = static::_createServicePlan(); + $result = static::$_client->servicePlan()->delete('id', $servicePlan->id); + + $this->assertTrue($result); + } + + public function testRequestCreateServicePlan() + { + $request = [ + 'add' => [ + 'name' => 'Service Plan Full Test', + 'limits' => [ + 'overuse' => 'block', + ], + 'preferences' => [ + 'stat' => 6, + 'maillists' => 'true', + ], + 'hosting' => [ + 'property' => [ + [ + 'name' => 'ftp_quota', + 'value' => '-1', + ], + [ + 'name' => 'ssl', + 'value' => 'true', + ], + ], + ], + 'performance' => [ + 'bandwidth' => 1000, + 'max_connections' => 20, + ], + ], + ]; + + $servicePlan = static::$_client->servicePlan()->request($request); + $this->assertGreaterThan(0, $servicePlan->id); + + static::$_client->servicePlan()->delete('id', $servicePlan->id); + } } diff --git a/tests/TestCase.php b/tests/TestCase.php index af2efcff..ea7a3f6e 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -11,6 +11,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase protected static $_client; private static $webspaces = []; + private static $servicePlans = []; public static function setUpBeforeClass(): void { @@ -41,6 +42,13 @@ public static function tearDownAfterClass(): void } catch (\Exception $e) { } } + + foreach (self::$servicePlans as $servicePlan) { + try { + static::$_client->servicePlan()->delete('id', $servicePlan->id); + } catch (\Exception $e) { + } + } } /** @@ -74,4 +82,14 @@ protected static function _createWebspace() return $webspace; } + + protected static function _createServicePlan() + { + $id = uniqid(); + $servicePlan = static::$_client->servicePlan()->create("test{$id}plan"); + + self::$servicePlans[] = $servicePlan; + + return $servicePlan; + } } From 80b5aa954e511387d9f35293e7672a32404e3a8e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 15:16:56 +0700 Subject: [PATCH 104/243] Fix doc block --- src/Api/Operator/ServicePlan.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 3b27908f..c81ee522 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -44,7 +44,7 @@ public function create($planName) /** * @param string $field - * @param integer|string $value + * @param int|string $value * @return bool */ public function delete($field, $value) From f6c144d0a9ec9dbc2df1ec132f9b422097ed7ac8 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 15:42:53 +0700 Subject: [PATCH 105/243] Unify service plan creation interface with other operators --- src/Api/Operator/ServicePlan.php | 40 ++++++++++++-------------- tests/ServicePlanTest.php | 48 +++++++++++++++----------------- tests/TestCase.php | 2 +- 3 files changed, 42 insertions(+), 48 deletions(-) diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index c81ee522..d73bdf75 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -8,48 +8,44 @@ class ServicePlan extends \PleskX\Api\Operator { /** - * @param string $field - * @param int|string $value - * + * @param array $properties * @return Struct\Info */ - public function get($field, $value) + public function create($properties) { - $items = $this->_get($field, $value); - - return reset($items); + $response = $this->request(['add' => $properties]); + return new Struct\Info($response); } /** - * @return Struct\Info[] + * @param string $field + * @param int|string $value + * @return bool */ - public function getAll() + public function delete($field, $value) { - return $this->_get(); + return $this->_delete($field, $value); } /** - * @param string $planName + * @param string $field + * @param int|string $value + * * @return Struct\Info */ - public function create($planName) + public function get($field, $value) { - $packet = $this->_client->getPacket(); - $info = $packet->addChild($this->_wrapperTag)->addChild('add'); - $info->addChild('name', $planName); + $items = $this->_get($field, $value); - $response = $this->_client->request($packet); - return new Struct\Info($response); + return reset($items); } /** - * @param string $field - * @param int|string $value - * @return bool + * @return Struct\Info[] */ - public function delete($field, $value) + public function getAll() { - return $this->_delete($field, $value); + return $this->_get(); } /** diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 259088ab..2189ae9c 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -43,38 +43,36 @@ public function testDelete() $this->assertTrue($result); } - public function testRequestCreateServicePlan() + public function testCreateComplexServicePlan() { - $request = [ - 'add' => [ - 'name' => 'Service Plan Full Test', - 'limits' => [ - 'overuse' => 'block', + $properties = [ + 'name' => 'Complex Service Plan', + 'limits' => [ + 'overuse' => 'block', + 'limit' => [ + 'name' => 'disk_space', + 'value' => 1024*1024*1024, // 1 GB ], - 'preferences' => [ - 'stat' => 6, - 'maillists' => 'true', - ], - 'hosting' => [ - 'property' => [ - [ - 'name' => 'ftp_quota', - 'value' => '-1', - ], - [ - 'name' => 'ssl', - 'value' => 'true', - ], + ], + 'preferences' => [ + 'stat' => 6, + 'maillists' => 'true', + ], + 'hosting' => [ + 'property' => [ + [ + 'name' => 'ftp_quota', + 'value' => '-1', + ], + [ + 'name' => 'ssl', + 'value' => 'true', ], - ], - 'performance' => [ - 'bandwidth' => 1000, - 'max_connections' => 20, ], ], ]; - $servicePlan = static::$_client->servicePlan()->request($request); + $servicePlan = static::$_client->servicePlan()->create($properties); $this->assertGreaterThan(0, $servicePlan->id); static::$_client->servicePlan()->delete('id', $servicePlan->id); diff --git a/tests/TestCase.php b/tests/TestCase.php index ea7a3f6e..259537ab 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -86,7 +86,7 @@ protected static function _createWebspace() protected static function _createServicePlan() { $id = uniqid(); - $servicePlan = static::$_client->servicePlan()->create("test{$id}plan"); + $servicePlan = static::$_client->servicePlan()->create(['name' => "test{$id}plan"]); self::$servicePlans[] = $servicePlan; From d631ec1699a249fca2f5c94569ecf7b03f972f45 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 15:52:06 +0700 Subject: [PATCH 106/243] Fix StyleCI issues --- src/Api/Operator/ServicePlan.php | 2 ++ tests/ServicePlanTest.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index d73bdf75..71391b60 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -9,6 +9,7 @@ class ServicePlan extends \PleskX\Api\Operator { /** * @param array $properties + * * @return Struct\Info */ public function create($properties) @@ -20,6 +21,7 @@ public function create($properties) /** * @param string $field * @param int|string $value + * * @return bool */ public function delete($field, $value) diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 2189ae9c..5d759800 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -51,7 +51,7 @@ public function testCreateComplexServicePlan() 'overuse' => 'block', 'limit' => [ 'name' => 'disk_space', - 'value' => 1024*1024*1024, // 1 GB + 'value' => 1024 * 1024 * 1024, // 1 GB ], ], 'preferences' => [ From 965dc514ead2e67c4ff50ba037e69e759219287d Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 15:54:29 +0700 Subject: [PATCH 107/243] Newline should be present before the return statement --- src/Api/Operator/ServicePlan.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 71391b60..41fa075e 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -15,6 +15,7 @@ class ServicePlan extends \PleskX\Api\Operator public function create($properties) { $response = $this->request(['add' => $properties]); + return new Struct\Info($response); } From 9d3e0e780fe6b0978a99647ced5e88b3feb261a5 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 16:41:44 +0700 Subject: [PATCH 108/243] Remove outdated reference --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index d6016d2e..1a494ee8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ - # vendor /vendor/ # tests /phpunit.xml /.phpunit.result.cache -/php/tests/node_modules/ From d41c16027b7946e341222b7f168443f136993b8e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 16:52:44 +0700 Subject: [PATCH 109/243] Introduce an integration with code coverage tracking service --- .gitignore | 1 + .travis.yml | 3 +++ Dockerfile | 3 +++ phpunit.xml.dist | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 1a494ee8..73ee258c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ # tests /phpunit.xml /.phpunit.result.cache +/coverage.xml \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index d7ea2e8f..e866c8b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,6 @@ services: docker script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker-compose run tests + +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 66fbb3ef..6d754473 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,7 @@ FROM php:7.3-cli RUN apt-get update \ && apt-get install -y unzip \ && docker-php-ext-install pcntl \ + && pecl install xdebug \ + && echo "zend_extension=xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini \ + && echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/xdebug.ini \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d77e92d9..98149616 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,4 +22,8 @@ <env name="REMOTE_URL" value=""/> <env name="REMOTE_PASSWORD" value=""/> </php> + + <logging> + <log type="coverage-clover" target="coverage.xml"/> + </logging> </phpunit> From 0af60ab572efae29ffc527f8410389ce2b3c1d7e Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 10 Jan 2021 17:14:05 +0700 Subject: [PATCH 110/243] Add information about the code coverage --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f730abdd..a5fcac86 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ ## 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) [![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) +[![Build Status](https://travis-ci.com/plesk/api-php-lib.svg?branch=master)](https://travis-ci.com/plesk/api-php-lib) +[![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. From 7c79952e013f98c0a4739a36ca512544ccd342b6 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Tue, 12 Jan 2021 21:34:29 +0700 Subject: [PATCH 111/243] Add tests for site aliases --- src/Api/Operator/SiteAlias.php | 15 ++++++- tests/SiteAliasTest.php | 71 ++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 tests/SiteAliasTest.php diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 65f48c76..be8f735c 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -38,7 +38,18 @@ public function create(array $properties, array $preferences = []) * @param string $field * @param int|string $value * - * @return Struct\Info + * @return bool + */ + public function delete($field, $value) + { + return $this->_delete($field, $value, 'delete'); + } + + /** + * @param string $field + * @param int|string $value + * + * @return Struct\GeneralInfo */ public function get($field, $value) { @@ -51,7 +62,7 @@ public function get($field, $value) * @param string $field * @param int|string $value * - * @return Struct\Info[] + * @return Struct\GeneralInfo[] */ public function getAll($field = null, $value = null) { diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php new file mode 100644 index 00000000..645fc861 --- /dev/null +++ b/tests/SiteAliasTest.php @@ -0,0 +1,71 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskXTest; + +class SiteAliasTest extends TestCase +{ + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; + + public static function setUpBeforeClass(): void + { + parent::setUpBeforeClass(); + static::$webspace = static::_createWebspace(); + } + + private function _createSiteAlias($name, array $properties = []) + { + $properties = array_merge([ + 'name' => $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); + } +} From 2188d010651b5ec9466e022d8f9b5daee58b3801 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 17 Jan 2021 16:44:37 +0700 Subject: [PATCH 112/243] Issue #82: fix the wrapping if dataset is empty --- src/Api/Operator.php | 3 +++ tests/SiteTest.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/Api/Operator.php b/src/Api/Operator.php index f355c2ef..bab9b2b3 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -93,6 +93,9 @@ protected function _getItems($structClass, $infoTag, $field = null, $value = nul if (!is_null($filter) && !$filter($xmlResult->data->$infoTag)) { continue; } + if (!isset($xmlResult->data) || !isset($xmlResult->data->$infoTag)) { + continue; + } $items[] = new $structClass($xmlResult->data->$infoTag); } diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 56c9282d..80c84138 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -104,4 +104,10 @@ public function testGetAll() static::$_client->site()->delete('id', $site->id); static::$_client->site()->delete('id', $site2->id); } + + public function testGetAllWithoutSites() + { + $sitesInfo = static::$_client->site()->getAll(); + $this->assertEmpty($sitesInfo); + } } From a5e0adc10347108c1c6508212cebabbecf6031a7 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 17 Jan 2021 17:51:34 +0700 Subject: [PATCH 113/243] Issue #11: implement mailnames fetching operations --- src/Api/Operator/Mail.php | 43 +++++++++++++++++++++++++++++ src/Api/Struct/Mail/GeneralInfo.php | 25 +++++++++++++++++ tests/MailTest.php | 27 ++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 src/Api/Struct/Mail/GeneralInfo.php diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index bf9be11f..5d5b7fb4 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -53,4 +53,47 @@ public function delete($field, $value, $siteId) return 'ok' === (string) $response->status; } + + /** + * @param string $name + * @param int $siteId + * + * @return Struct\GeneralInfo + */ + public function get($name, $siteId) + { + $items = $this->getAll($siteId, $name); + + return reset($items); + } + + /** + * @param int $siteId + * @param string|null $name + * + * @return Struct\GeneralInfo[] + */ + public function getAll($siteId, $name = null) + { + $packet = $this->_client->getPacket(); + $getTag = $packet->addChild($this->_wrapperTag)->addChild('get_info'); + + $filterTag = $getTag->addChild('filter'); + $filterTag->addChild('site-id', $siteId); + if (!is_null($name)) { + $filterTag->addChild('name', $name); + } + + $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL); + $items = []; + foreach ($response->xpath('//result') as $xmlResult) { + if (!isset($xmlResult->mailname)) { + continue; + } + $item = new Struct\GeneralInfo($xmlResult->mailname); + $items[] = $item; + } + + return $items; + } } diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php new file mode 100644 index 00000000..798aca95 --- /dev/null +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -0,0 +1,25 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskX\Api\Struct\Mail; + +class GeneralInfo extends \PleskX\Api\Struct +{ + /** @var int */ + public $id; + + /** @var string */ + public $name; + + /** @var string */ + public $description; + + public function __construct($apiResponse) + { + $this->_initScalarProperties($apiResponse, [ + 'id', + 'name', + 'description', + ]); + } +} diff --git a/tests/MailTest.php b/tests/MailTest.php index 90f8bd91..54f5804a 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -54,4 +54,31 @@ public function testDelete() $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); + + $mailnameInfo = static::$_client->mail()->get('test', static::$webspace->id); + $this->assertEquals('test', $mailnameInfo->name); + + static::$_client->mail()->delete('name', $mailname->name, static::$webspace->id); + } + + public function testGetAll() + { + $mailname = static::$_client->mail()->create('test', 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); + } + + public function testGetAllWithoutMailnames() + { + $mailnamesInfo = static::$_client->mail()->getAll(static::$webspace->id); + $this->assertCount(0, $mailnamesInfo); + } } From 92a2b6e4301e79078b86259cec1d627f689f2674 Mon Sep 17 00:00:00 2001 From: rene-gates <development@lazybox.de> Date: Sun, 31 Jan 2021 01:03:17 +0100 Subject: [PATCH 114/243] Make additional parameters available as property of class --- src/Api/Struct/Server/Statistics/Version.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Api/Struct/Server/Statistics/Version.php b/src/Api/Struct/Server/Statistics/Version.php index 198495c1..9fca7c0a 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -11,11 +11,27 @@ class Version extends \PleskX\Api\Struct /** @var string */ public $version; + /** @var string */ + public $build; + + /** @var string */ + public $osName; + + /** @var string */ + public $osVersion; + + /** @var string */ + public $osRelease; + public function __construct($apiResponse) { $this->_initScalarProperties($apiResponse, [ ['plesk_name' => 'internalName'], ['plesk_version' => 'version'], + ['plesk_build' => 'build'], + ['plesk_os' => 'osName'], + ['plesk_os_version' => 'osVersion'], + ['os_release' => 'osRelease'], ]); } } From caeb83cb1026581b6d2f2cecf189a2ac2060b3b3 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 31 Jan 2021 16:45:52 +0700 Subject: [PATCH 115/243] Add assertions for new properties --- tests/ServerTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 9f0c2a23..4408a948 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -93,6 +93,8 @@ public function testGetStatistics() $stats = static::$_client->server()->getStatistics(); $this->assertIsNumeric($stats->objects->clients); $this->assertEquals('psa', $stats->version->internalName); + $this->assertNotEmpty($stats->version->osName); + $this->assertNotEmpty($stats->version->osVersion); } public function testGetSiteIsolationConfig() From b07aa1755b0e5e3d0d5a76a9e497193c2da9f961 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 31 Jan 2021 18:56:26 +0700 Subject: [PATCH 116/243] Issue #89: compatibility with PHP 8 --- composer.json | 2 +- composer.lock | 1315 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 905 insertions(+), 412 deletions(-) diff --git a/composer.json b/composer.json index 9ca7bacc..3142565c 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" diff --git a/composer.lock b/composer.lock index f5f3cb85..1c6fbd7f 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": "554cb70d6a29bd690fd9e966b98003d0", + "content-hash": "330651d827abd67d78e7962e9cd539d5", "packages": [], "packages-dev": [ { "name": "clue/stdio-react", - "version": "v2.3.0", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-stdio.git", - "reference": "5f42a3a5a29f52432f0f68b57890353e8ca65069" + "reference": "5722686d3cc0cdf2ccedb6079bfd066220611f00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/5f42a3a5a29f52432f0f68b57890353e8ca65069", - "reference": "5f42a3a5a29f52432f0f68b57890353e8ca65069", + "url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/5722686d3cc0cdf2ccedb6079bfd066220611f00", + "reference": "5722686d3cc0cdf2ccedb6079bfd066220611f00", "shasum": "" }, "require": { @@ -31,7 +31,7 @@ "require-dev": { "clue/arguments": "^2.0", "clue/commander": "^1.2", - "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, "suggest": { "ext-mbstring": "Using ext-mbstring should provide slightly better performance for handling I/O" @@ -49,7 +49,7 @@ "authors": [ { "name": "Christian Lück", - "email": "christian@lueck.tv" + "email": "christian@clue.engineering" } ], "description": "Async, event-driven console input & output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP", @@ -67,20 +67,30 @@ "stdio", "stdout" ], - "time": "2019-08-28T12:01:30+00:00" + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2020-11-20T14:28:39+00:00" }, { "name": "clue/term-react", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/clue/reactphp-term.git", - "reference": "3cec1164073455a85a3f2b3c3fe6db2170d21c2a" + "reference": "eb6eb063eda04a714ef89f066586a2c49588f7ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-term/zipball/3cec1164073455a85a3f2b3c3fe6db2170d21c2a", - "reference": "3cec1164073455a85a3f2b3c3fe6db2170d21c2a", + "url": "https://api.github.com/repos/clue/reactphp-term/zipball/eb6eb063eda04a714ef89f066586a2c49588f7ca", + "reference": "eb6eb063eda04a714ef89f066586a2c49588f7ca", "shasum": "" }, "require": { @@ -88,7 +98,7 @@ "react/stream": "^1.0 || ^0.7" }, "require-dev": { - "phpunit/phpunit": "^5.0 || ^4.8", + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8", "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" }, "type": "library", @@ -104,10 +114,10 @@ "authors": [ { "name": "Christian Lück", - "email": "christian@lueck.tv" + "email": "christian@clue.engineering" } ], - "description": "Streaming terminal emulator, built on top of ReactPHP", + "description": "Streaming terminal emulator, built on top of ReactPHP.", "homepage": "https://github.com/clue/reactphp-term", "keywords": [ "C0", @@ -126,20 +136,30 @@ "vt100", "xterm" ], - "time": "2018-07-09T08:20:33+00:00" + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2020-11-06T11:50:12+00:00" }, { "name": "clue/utf8-react", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/clue/php-utf8-react.git", - "reference": "c6111a22e1056627c119233ff5effe00f5d3cc1d" + "url": "https://github.com/clue/reactphp-utf8.git", + "reference": "8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/php-utf8-react/zipball/c6111a22e1056627c119233ff5effe00f5d3cc1d", - "reference": "c6111a22e1056627c119233ff5effe00f5d3cc1d", + "url": "https://api.github.com/repos/clue/reactphp-utf8/zipball/8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96", + "reference": "8bc3f8c874cdf642c8f10f9ae93aadb8cd63da96", "shasum": "" }, "require": { @@ -147,7 +167,7 @@ "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3" }, "require-dev": { - "phpunit/phpunit": "^5.0 || ^4.8", + "phpunit/phpunit": "^9.3 ||^5.7 || ^4.8", "react/stream": "^1.0 || ^0.7" }, "type": "library", @@ -163,11 +183,11 @@ "authors": [ { "name": "Christian Lück", - "email": "christian@lueck.tv" + "email": "christian@clue.engineering" } ], - "description": "Streaming UTF-8 parser, built on top of ReactPHP", - "homepage": "https://github.com/clue/php-utf8-react", + "description": "Streaming UTF-8 parser, built on top of ReactPHP.", + "homepage": "https://github.com/clue/reactphp-utf8", "keywords": [ "reactphp", "streaming", @@ -175,40 +195,45 @@ "utf-8", "utf8" ], - "time": "2017-07-06T07:43:22+00:00" + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2020-11-06T11:48:09+00:00" }, { "name": "doctrine/instantiator", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea" + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea", - "reference": "f350df0268e904597e3bd9c4685c53e0e333feea", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "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" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -222,7 +247,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -231,7 +256,21 @@ "constructor", "instantiate" ], - "time": "2020-05-29T17:27:14+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" }, { "name": "evenement/evenement", @@ -335,16 +374,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.10.1", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", - "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { @@ -379,32 +418,91 @@ "object", "object graph" ], - "time": "2020-06-29T13:22:24+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2020-12-20T10:01:03+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -434,24 +532,24 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -481,7 +579,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "time": "2020-12-13T23:18:30+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -534,16 +632,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.0", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "3170448f5769fe19f456173d833734e0ff1b84df" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/3170448f5769fe19f456173d833734e0ff1b84df", - "reference": "3170448f5769fe19f456173d833734e0ff1b84df", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { @@ -582,20 +680,20 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-07-20T20:05:34+00:00" + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651", - "reference": "e878a14a65245fbe78f8080eba03b47c3b705651", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { @@ -627,32 +725,32 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-27T10:12:23+00:00" + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "1.11.1", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2", - "phpdocumentor/reflection-docblock": "^5.0", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -690,36 +788,39 @@ "spy", "stub" ], - "time": "2020-07-08T12:44:21+00:00" + "time": "2020-12-19T10:15:11+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "8.0.2", + "version": "9.2.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc" + "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc", - "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1", + "reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.3", - "phpunit/php-file-iterator": "^3.0", - "phpunit/php-text-template": "^2.0", - "phpunit/php-token-stream": "^4.0", - "sebastian/code-unit-reverse-lookup": "^2.0", - "sebastian/environment": "^5.0", - "sebastian/version": "^3.0", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-pcov": "*", @@ -728,7 +829,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -754,27 +855,33 @@ "testing", "xunit" ], - "time": "2020-05-23T08:02:54+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:44:49+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/25fefc5b19835ca653877fe081644a3f8c1d915e", - "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -804,28 +911,34 @@ "filesystem", "iterator" ], - "time": "2020-07-11T05:18:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.0.2", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66" + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f6eedfed1085dd1f4c599629459a0277d25f9a66", - "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-pcntl": "*" @@ -833,7 +946,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -857,27 +970,33 @@ "keywords": [ "process" ], - "time": "2020-06-26T11:53:53+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324" + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/6ff9c8ea4d3212b88fcf74e25e516e2c51c99324", - "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -906,27 +1025,33 @@ "keywords": [ "template" ], - "time": "2020-06-26T11:55:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "cc49734779cbb302bf51a44297dab8c4bbf941e7" + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/cc49734779cbb302bf51a44297dab8c4bbf941e7", - "reference": "cc49734779cbb302bf51a44297dab8c4bbf941e7", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -955,69 +1080,26 @@ "keywords": [ "timer" ], - "time": "2020-06-26T11:58:13+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "4.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5672711b6b07b14d5ab694e700c62eeb82fcf374", - "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2020-06-27T06:36:25+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "9.2.6", + "version": "9.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1c6a9e4312e209e659f1fce3ce88dd197c2448f6" + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c6a9e4312e209e659f1fce3ce88dd197c2448f6", - "reference": "1c6a9e4312e209e659f1fce3ce88dd197c2448f6", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", "shasum": "" }, "require": { @@ -1028,30 +1110,31 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.5", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.3", - "phpspec/prophecy": "^1.10.3", - "phpunit/php-code-coverage": "^8.0.2", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-invoker": "^3.0.2", - "phpunit/php-text-template": "^2.0.2", - "phpunit/php-timer": "^5.0.1", - "sebastian/code-unit": "^1.0.5", - "sebastian/comparator": "^4.0.3", - "sebastian/diff": "^4.0.1", - "sebastian/environment": "^5.1.2", - "sebastian/exporter": "^4.0.2", - "sebastian/global-state": "^4.0", - "sebastian/object-enumerator": "^4.0.2", - "sebastian/resource-operations": "^3.0.2", - "sebastian/type": "^2.1.1", - "sebastian/version": "^3.0.1" + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "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/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "sebastian/version": "^3.0.2" }, "require-dev": { "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0" + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", @@ -1063,7 +1146,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-master": "9.5-dev" } }, "autoload": { @@ -1092,7 +1175,17 @@ "testing", "xunit" ], - "time": "2020-07-13T17:55:55+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-01-17T07:42:25+00:00" }, { "name": "psr/container", @@ -1231,25 +1324,77 @@ ], "time": "2020-05-04T10:17:57+00:00" }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, { "name": "sebastian/code-unit", - "version": "1.0.5", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "c1e2df332c905079980b119c4db103117e5e5c90" + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/c1e2df332c905079980b119c4db103117e5e5c90", - "reference": "c1e2df332c905079980b119c4db103117e5e5c90", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1275,27 +1420,33 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", - "time": "2020-06-26T12:50:45+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ee51f9bb0c6d8a43337055db3120829fa14da819", - "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1320,29 +1471,35 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2020-06-26T12:04:00+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.3", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f" + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f", - "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0", + "php": ">=7.3", "sebastian/diff": "^4.0", "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1384,27 +1541,86 @@ "compare", "equality" ], - "time": "2020-06-26T12:05:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "4.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113", - "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0", + "phpunit/phpunit": "^9.3", "symfony/process": "^4.2 || ^5" }, "type": "library", @@ -1440,27 +1656,33 @@ "unidiff", "unified diff" ], - "time": "2020-06-30T04:46:02+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" }, { "name": "sebastian/environment", - "version": "5.1.2", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2", - "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -1468,7 +1690,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1493,29 +1715,35 @@ "environment", "hhvm" ], - "time": "2020-06-26T12:07:24+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "571d721db4aec847a0e59690b954af33ebf9f023" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/571d721db4aec847a0e59690b954af33ebf9f023", - "reference": "571d721db4aec847a0e59690b954af33ebf9f023", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0", + "php": ">=7.3", "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^9.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1560,30 +1788,36 @@ "export", "exporter" ], - "time": "2020-06-26T12:08:55+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "4.0.0", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72" + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bdb1e7c79e592b8c82cb1699be3c8743119b8a72", - "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", + "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", "shasum": "" }, "require": { - "php": "^7.3", + "php": ">=7.3", "sebastian/object-reflector": "^2.0", "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -1591,7 +1825,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1614,29 +1848,88 @@ "keywords": [ "global state" ], - "time": "2020-02-07T06:11:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:55:19+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/074fed2d0a6d08e1677dd8ce9d32aecb384917b8", - "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0", + "php": ">=7.3", "sebastian/object-reflector": "^2.0", "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1661,27 +1954,33 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2020-06-26T12:11:32+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "127a46f6b057441b201253526f81d5406d6c7840" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/127a46f6b057441b201253526f81d5406d6c7840", - "reference": "127a46f6b057441b201253526f81d5406d6c7840", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1706,27 +2005,33 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2020-06-26T12:12:55+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63" + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/062231bf61d2b9448c4fa5a7643b5e1829c11d63", - "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1759,24 +2064,30 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2020-06-26T12:14:17+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0653718a5a629b065e91f774595267f8dc32e213" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0653718a5a629b065e91f774595267f8dc32e213", - "reference": "0653718a5a629b065e91f774595267f8dc32e213", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { "phpunit/phpunit": "^9.0" @@ -1804,32 +2115,38 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2020-06-26T12:16:22+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" }, { "name": "sebastian/type", - "version": "2.2.1", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a" + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/86991e2b33446cd96e648c18bcdb1e95afb2c05a", - "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -1850,24 +2167,30 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2020-07-05T08:31:53+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:18:59+00:00" }, { "name": "sebastian/version", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "626586115d0ed31cb71483be55beb759b5af5a3c" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/626586115d0ed31cb71483be55beb759b5af5a3c", - "reference": "626586115d0ed31cb71483be55beb759b5af5a3c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "type": "library", "extra": { @@ -1893,36 +2216,42 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2020-06-26T12:18:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "spatie/phpunit-watcher", - "version": "1.22.0", + "version": "1.23.1", "source": { "type": "git", "url": "https://github.com/spatie/phpunit-watcher.git", - "reference": "dee58ae54d3bc4eccc2b3d7006444f535a693f18" + "reference": "0c70d569658a1cad9a6869716a4351d2ccfec4d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/dee58ae54d3bc4eccc2b3d7006444f535a693f18", - "reference": "dee58ae54d3bc4eccc2b3d7006444f535a693f18", + "url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/0c70d569658a1cad9a6869716a4351d2ccfec4d1", + "reference": "0c70d569658a1cad9a6869716a4351d2ccfec4d1", "shasum": "" }, "require": { "clue/stdio-react": "^2.0", "jolicode/jolinotif": "^2.0", - "php": "^7.2", - "symfony/console": "^4.0|^5.0", - "symfony/process": "^4.0|^5.0", - "symfony/yaml": "^4.0|^5.0", + "php": "^7.2 | ^8.0", + "symfony/console": "^5.0", + "symfony/process": "^5.0", + "symfony/yaml": "^5.0", "yosymfony/resource-watcher": "^2.0" }, "conflict": { "yosymfony/resource-watcher": "<2.0" }, "require-dev": { - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0 | ^9.0" }, "bin": [ "phpunit-watcher" @@ -1951,20 +2280,20 @@ "phpunit-watcher", "spatie" ], - "time": "2020-01-04T22:46:42+00:00" + "time": "2020-10-31T17:47:29+00:00" }, { "name": "symfony/console", - "version": "v5.1.3", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2226c68009627934b8cfc01260b4d287eab070df" + "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2226c68009627934b8cfc01260b4d287eab070df", - "reference": "2226c68009627934b8cfc01260b4d287eab070df", + "url": "https://api.github.com/repos/symfony/console/zipball/d62ec79478b55036f65e2602e282822b8eaaff0a", + "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a", "shasum": "" }, "require": { @@ -2001,11 +2330,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -2028,22 +2352,42 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com/", - "time": "2020-07-06T13:23:11+00:00" + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "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-01-27T10:15:41+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.1.3", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14" + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14", - "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", "shasum": "" }, "require": { @@ -2052,7 +2396,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" }, "thanks": { "name": "symfony/contracts", @@ -2080,31 +2424,40 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com/", - "time": "2020-06-06T08:49:21+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/finder", - "version": "v5.1.3", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187" + "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187", - "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187", + "url": "https://api.github.com/repos/symfony/finder/zipball/196f45723b5e618bf0e23b97e96d11652696ea9e", + "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e", "shasum": "" }, "require": { "php": ">=7.2.5" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -2127,26 +2480,40 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com/", - "time": "2020-05-20T17:43:50+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", - "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -2154,7 +2521,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2191,24 +2558,38 @@ "polyfill", "portable" ], - "time": "2020-07-14T12:35:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.18.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5" + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5", - "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -2216,7 +2597,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2255,24 +2636,38 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + "reference": "6e971c891537eb617a00bb07a43d182a6915faba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", - "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", + "reference": "6e971c891537eb617a00bb07a43d182a6915faba", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-intl": "For best performance" @@ -2280,7 +2675,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2322,24 +2717,38 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T17:09:11+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", - "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -2347,7 +2756,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2385,29 +2794,43 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.18.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", - "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2447,29 +2870,43 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.18.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.18-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2513,20 +2950,34 @@ "portable", "shim" ], - "time": "2020-07-14T12:35:20+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", - "version": "v5.1.3", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1864216226af21eb76d9477f691e7cbf198e0402" + "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1864216226af21eb76d9477f691e7cbf198e0402", - "reference": "1864216226af21eb76d9477f691e7cbf198e0402", + "url": "https://api.github.com/repos/symfony/process/zipball/313a38f09c77fbcdc1d223e57d368cea76a2fd2f", + "reference": "313a38f09c77fbcdc1d223e57d368cea76a2fd2f", "shasum": "" }, "require": { @@ -2534,11 +2985,6 @@ "symfony/polyfill-php80": "^1.15" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -2561,22 +3007,36 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com/", - "time": "2020-07-23T08:36:24+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:15:41+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.1.3", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442" + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442", - "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", "shasum": "" }, "require": { @@ -2589,7 +3049,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" }, "thanks": { "name": "symfony/contracts", @@ -2625,20 +3085,34 @@ "interoperability", "standards" ], - "time": "2020-07-06T13:23:11+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-09-07T11:33:47+00:00" }, { "name": "symfony/string", - "version": "v5.1.3", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f629ba9b611c76224feb21fe2bcbf0b6f992300b" + "reference": "c95468897f408dd0aca2ff582074423dd0455122" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f629ba9b611c76224feb21fe2bcbf0b6f992300b", - "reference": "f629ba9b611c76224feb21fe2bcbf0b6f992300b", + "url": "https://api.github.com/repos/symfony/string/zipball/c95468897f408dd0aca2ff582074423dd0455122", + "reference": "c95468897f408dd0aca2ff582074423dd0455122", "shasum": "" }, "require": { @@ -2656,11 +3130,6 @@ "symfony/var-exporter": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\String\\": "" @@ -2686,7 +3155,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony String component", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", "homepage": "https://symfony.com/", "keywords": [ "grapheme", @@ -2696,20 +3165,34 @@ "utf-8", "utf8" ], - "time": "2020-07-08T08:27:49+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-25T15:14:59+00:00" }, { "name": "symfony/yaml", - "version": "v5.1.3", + "version": "v5.2.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23" + "reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23", - "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23", + "url": "https://api.github.com/repos/symfony/yaml/zipball/6bb8b36c6dea8100268512bf46e858c8eb5c545e", + "reference": "6bb8b36c6dea8100268512bf46e858c8eb5c545e", "shasum": "" }, "require": { @@ -2730,11 +3213,6 @@ "Resources/bin/yaml-lint" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" @@ -2757,9 +3235,23 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com/", - "time": "2020-05-20T17:43:50+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" }, { "name": "theseer/tokenizer", @@ -2806,12 +3298,12 @@ "version": "1.9.1", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", + "url": "https://github.com/webmozarts/assert.git", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", "shasum": "" }, @@ -2910,10 +3402,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "ext-curl": "*", "ext-xml": "*", "ext-simplexml": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } From 40990d5b7c7e8d6c9132962f968e3713b3dbbea2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Sun, 31 Jan 2021 19:02:45 +0700 Subject: [PATCH 117/243] Use new format of XML configuration for PHPUnit --- phpunit.xml.dist | 46 ++++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 98149616..40244388 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,29 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 1999-2021. Plesk International GmbH. --> -<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" - bootstrap="vendor/autoload.php" - verbose="true" - colors="true"> - <testsuites> - <testsuite name="E2E"> - <directory>./tests</directory> - </testsuite> - </testsuites> - - <filter> - <whitelist processUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">./src</directory> - </whitelist> - </filter> - - <php> - <ini name="error_reporting" value="-1"/> - <env name="REMOTE_URL" value=""/> - <env name="REMOTE_PASSWORD" value=""/> - </php> - - <logging> - <log type="coverage-clover" target="coverage.xml"/> - </logging> +<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> + <directory suffix=".php">./src</directory> + </include> + <report> + <clover outputFile="coverage.xml"/> + </report> + </coverage> + <testsuites> + <testsuite name="E2E"> + <directory>./tests</directory> + </testsuite> + </testsuites> + <php> + <ini name="error_reporting" value="-1"/> + <env name="REMOTE_URL" value=""/> + <env name="REMOTE_PASSWORD" value=""/> + </php> + <logging/> </phpunit> From 9be3148b14307d48d397075b1a734215824a4b81 Mon Sep 17 00:00:00 2001 From: Simon Solutions <development@lazybox.de> Date: Sat, 20 Feb 2021 17:18:17 +0100 Subject: [PATCH 118/243] 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 <ayuzhakov@plesk.com> Date: Thu, 25 Feb 2021 11:26:57 +0700 Subject: [PATCH 119/243] 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 <ayuzhakov@plesk.com> Date: Thu, 25 Feb 2021 11:27:30 +0700 Subject: [PATCH 120/243] 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 <ayuzhakov@plesk.com> Date: Fri, 26 Feb 2021 22:00:29 +0700 Subject: [PATCH 121/243] Add missed stat details (based on rene-gates <development@lazybox.de> 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 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskX\Api\Struct\Server\Statistics; + +class DiskSpace extends \PleskX\Api\Struct +{ + /** @var int */ + public $total; + + /** @var int */ + public $used; + + /** @var int */ + public $free; + + public function __construct($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 new file mode 100644 index 00000000..266bde88 --- /dev/null +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -0,0 +1,23 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskX\Api\Struct\Server\Statistics; + +class LoadAverage extends \PleskX\Api\Struct +{ + /** @var float */ + public $load1min; + + /** @var float */ + public $load5min; + + /** @var float */ + public $load15min; + + public function __construct($apiResponse) + { + $this->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 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +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; + + /** @var int */ + public $buffer; + + /** @var int */ + public $cached; + + public function __construct($apiResponse) + { + $this->_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 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskX\Api\Struct\Server\Statistics; + +class Other extends \PleskX\Api\Struct +{ + /** @var string */ + public $cpu; + + /** @var int */ + public $uptime; + + /** @var bool */ + public $insideVz; + + public function __construct($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 new file mode 100644 index 00000000..8e03168f --- /dev/null +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -0,0 +1,25 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskX\Api\Struct\Server\Statistics; + +class Swap extends \PleskX\Api\Struct +{ + /** @var int */ + public $total; + + /** @var int */ + public $used; + + /** @var int */ + public $free; + + public function __construct($apiResponse) + { + $this->_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 <ayuzhakov@plesk.com> Date: Sun, 28 Mar 2021 17:39:44 +0700 Subject: [PATCH 122/243] 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 <nvizovitin@plesk.com> Date: Fri, 4 Jun 2021 17:18:40 +0700 Subject: [PATCH 123/243] 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 <development@lazybox.de> Date: Thu, 2 Sep 2021 10:08:51 +0200 Subject: [PATCH 124/243] 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 <ayuzhakov@plesk.com> Date: Mon, 13 Sep 2021 22:44:01 +0700 Subject: [PATCH 125/243] 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 <development@lazybox.de> Date: Wed, 8 Sep 2021 20:32:03 +0200 Subject: [PATCH 126/243] 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 <ayuzhakov@plesk.com> Date: Wed, 15 Sep 2021 16:55:42 +0700 Subject: [PATCH 127/243] 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 <ayuzhakov@plesk.com> Date: Wed, 15 Sep 2021 16:59:37 +0700 Subject: [PATCH 128/243] 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 <ayuzhakov@plesk.com> Date: Wed, 15 Sep 2021 17:51:31 +0700 Subject: [PATCH 129/243] 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 <ayuzhakov@plesk.com> Date: Wed, 15 Sep 2021 18:08:32 +0700 Subject: [PATCH 130/243] 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 <ayuzhakov@plesk.com> Date: Thu, 16 Sep 2021 11:12:56 +0700 Subject: [PATCH 131/243] 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 <ayuzhakov@plesk.com> Date: Thu, 16 Sep 2021 11:36:06 +0700 Subject: [PATCH 132/243] 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 <ayuzhakov@plesk.com> Date: Fri, 17 Sep 2021 22:53:04 +0700 Subject: [PATCH 133/243] 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 <ayuzhakov@plesk.com> Date: Fri, 1 Oct 2021 11:48:40 +0700 Subject: [PATCH 134/243] 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 <ayuzhakov@plesk.com> Date: Fri, 1 Oct 2021 12:11:17 +0700 Subject: [PATCH 135/243] 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 @@ +<?xml version="1.0"?> +<psalm + errorLevel="7" + resolveFromConfigFile="true" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="https://getpsalm.org/schema/config" + xsi:schemaLocation="https://getpsalm.org/schema/config%20vendor/vimeo/psalm/config.xsd" +> + <projectFiles> + <directory name="src" /> + <ignoreFiles> + <directory name="vendor" /> + </ignoreFiles> + </projectFiles> +</psalm> 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 <ayuzhakov@plesk.com> Date: Fri, 1 Oct 2021 13:20:14 +0700 Subject: [PATCH 136/243] 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 <ayuzhakov@plesk.com> Date: Fri, 1 Oct 2021 20:00:04 +0700 Subject: [PATCH 137/243] 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 @@ <directory name="vendor" /> </ignoreFiles> </projectFiles> + + <issueHandlers> + <PropertyNotSetInConstructor errorLevel="suppress" /> + <UndefinedPropertyFetch errorLevel="suppress" /> + </issueHandlers> </psalm> 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 = "<?xml version='1.0' encoding='UTF-8' ?>"; @@ -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 @@ <?php // Copyright 1999-2021. Plesk International GmbH. -// Author: Frederic Leclercq namespace PleskX\Api\Struct\Webspace; -class DiskUsage extends \PleskX\Api\Struct -{ - /** @var int */ - public $httpdocs; - - /** @var int */ - public $httpsdocs; - - /** @var int */ - public $subdomains; - - /** @var int */ - public $anonftp; - - /** @var int */ - public $logs; - - /** @var int */ - public $dbases; +use PleskX\Api\Struct; +use PleskX\Api\XmlResponse; - /** @var int */ - public $mailboxes; - - /** @var int */ - public $maillists; - - /** @var int */ - public $domaindumps; - - /** @var int */ - public $configs; - - /** @var int */ - public $chroot; - - public function __construct($apiResponse) +class DiskUsage extends Struct +{ + public int $httpdocs; + public int $httpsdocs; + public int $subdomains; + public int $anonftp; + public int $logs; + public int $dbases; + public int $mailboxes; + public int $maillists; + public int $domaindumps; + public int $configs; + public int $chroot; + + public function __construct(XmlResponse $apiResponse) { $this->_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 <vdiomidov@plesk.com> Date: Tue, 5 Oct 2021 14:11:33 +0300 Subject: [PATCH 138/243] 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 <ayuzhakov@plesk.com> Date: Thu, 7 Oct 2021 00:04:33 +0700 Subject: [PATCH 139/243] 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 @@ <?xml version="1.0"?> <psalm - errorLevel="7" + errorLevel="3" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" diff --git a/src/Api/Client.php b/src/Api/Client.php index 4132eaeb..a270b2f7 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -25,7 +25,7 @@ class Client protected array $_operatorsCache = []; /** - * @var callable + * @var callable|null */ protected $_verifyResponseCallback; @@ -169,7 +169,7 @@ public function request($request, $mode = self::RESPONSE_SHORT) /** @psalm-suppress UndefinedClass */ $xml = \pm_ApiRpc::getService($version)->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 <ayuzhakov@plesk.com> Date: Thu, 7 Oct 2021 11:13:58 +0700 Subject: [PATCH 140/243] 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 <ayuzhakov@plesk.com> Date: Thu, 7 Oct 2021 11:16:30 +0700 Subject: [PATCH 141/243] 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 <ayuzhakov@plesk.com> Date: Thu, 7 Oct 2021 12:08:48 +0700 Subject: [PATCH 142/243] 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 <ayuzhakov@plesk.com> Date: Wed, 13 Oct 2021 22:15:19 +0700 Subject: [PATCH 143/243] 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 <ayuzhakov@plesk.com> Date: Wed, 13 Oct 2021 23:09:36 +0700 Subject: [PATCH 144/243] 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 <ayuzhakov@plesk.com> Date: Wed, 13 Oct 2021 23:11:00 +0700 Subject: [PATCH 145/243] 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 <ayuzhakov@plesk.com> Date: Sun, 17 Oct 2021 19:51:34 +0700 Subject: [PATCH 146/243] 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 <ayuzhakov@plesk.com> Date: Sun, 17 Oct 2021 20:43:40 +0700 Subject: [PATCH 147/243] 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 <sibprogrammer@gmail.com> Date: Sun, 24 Oct 2021 13:21:57 +0700 Subject: [PATCH 148/243] 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 @@ +<?xml version="1.0"?> +<ruleset name="PHP library for Plesk XML-RPC API"> + <file>src</file> + <file>tests</file> + <rule ref="Generic"> + <exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/> + <exclude name="Generic.Files.EndFileNoNewline"/> + <exclude name="Generic.Files.LowercasedFilename.NotFound"/> + <exclude name="Generic.PHP.RequireStrictTypes"/> + <exclude name="Generic.PHP.ClosingPHPTag"/> + <exclude name="Generic.PHP.UpperCaseConstant"/> + <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> + <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"/> + <exclude name="Generic.ControlStructures.DisallowYodaConditions"/> + </rule> + <rule ref="PSR1"/> + <rule ref="PSR2"/> + <rule ref="PSR12"> + <exclude name="PSR12.Files.FileHeader"/> + </rule> +</ruleset> From 2c111ff13dd7d7e540cba57e9cadd45899104332 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <sibprogrammer@gmail.com> Date: Sun, 24 Oct 2021 14:33:19 +0700 Subject: [PATCH 149/243] 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 = "<?xml version='1.0' encoding='UTF-8' ?>"; - $content .= '<packet'.('' === $protocolVersion ? '' : " version='$protocolVersion'").'/>'; + $content .= '<packet' . ('' === $protocolVersion ? '' : " version='$protocolVersion'") . '/>'; 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</$wrapperTag>"; } - 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(https://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('<packet><wrongly formatted xml</packet>'); + static::$client->request('<packet><wrongly formatted xml</packet>'); } 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 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskXTest; + +use PleskXTest\Utility\PasswordProvider; + +class ProtectedDirectoryAbstractTest extends AbstractTestCase +{ + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; + + public static function setUpBeforeClass(): void + { + parent::setUpBeforeClass(); + static::$webspace = static::createWebspace(); + } + + public function testAdd() + { + $protectedDirectory = static::$client->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 @@ -<?php -// Copyright 1999-2021. Plesk International GmbH. - -namespace PleskXTest; - -use PleskXTest\Utility\PasswordProvider; - -class ProtectedDirectoryTest extends TestCase -{ - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; - - public static function setUpBeforeClass(): void - { - parent::setUpBeforeClass(); - static::$webspace = static::_createWebspace(); - } - - public function testAdd() - { - $protectedDirectory = static::$_client->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 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskXTest; + +use PleskX\Api\Exception; + +class SecretKeyAbstractTest extends AbstractTestCase +{ + public function testCreate() + { + $keyId = static::$client->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 @@ -<?php -// Copyright 1999-2021. Plesk International GmbH. - -namespace PleskXTest; - -use PleskX\Api\Exception; - -class SecretKeyTest extends TestCase -{ - public function testCreate() - { - $keyId = static::$_client->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 @@ +<?php +// Copyright 1999-2021. Plesk International GmbH. + +namespace PleskXTest; + +class SiteAliasAbstractTest extends AbstractTestCase +{ + /** @var \PleskX\Api\Struct\Webspace\Info */ + private static $webspace; + + public static function setUpBeforeClass(): void + { + parent::setUpBeforeClass(); + static::$webspace = static::createWebspace(); + } + + private function createSiteAlias($name, array $properties = []) + { + $properties = array_merge([ + 'name' => $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 @@ -<?php -// Copyright 1999-2021. Plesk International GmbH. - -namespace PleskXTest; - -class SiteAliasTest extends TestCase -{ - /** @var \PleskX\Api\Struct\Webspace\Info */ - private static $webspace; - - public static function setUpBeforeClass(): void - { - parent::setUpBeforeClass(); - static::$webspace = static::_createWebspace(); - } - - private function _createSiteAlias($name, array $properties = []) - { - $properties = array_merge([ - 'name' => $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 <sibprogrammer@gmail.com> Date: Tue, 26 Oct 2021 23:11:53 +0700 Subject: [PATCH 150/243] 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 <ayuzhakov@plesk.com> Date: Wed, 27 Oct 2021 10:42:48 +0700 Subject: [PATCH 151/243] 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 <ayuzhakov@plesk.com> Date: Wed, 27 Oct 2021 11:16:54 +0700 Subject: [PATCH 152/243] 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 <ayuzhakov@plesk.com> Date: Fri, 29 Oct 2021 12:45:40 +0700 Subject: [PATCH 153/243] 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 <ayuzhakov@plesk.com> Date: Sun, 28 Nov 2021 19:46:16 +0700 Subject: [PATCH 154/243] 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 <ayuzhakov@plesk.com> Date: Sun, 28 Nov 2021 21:12:19 +0700 Subject: [PATCH 155/243] 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 <ayuzhakov@plesk.com> Date: Wed, 19 Jan 2022 10:51:40 +0700 Subject: [PATCH 156/243] 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 <ayuzhakov@plesk.com> Date: Thu, 20 Jan 2022 11:06:13 +0700 Subject: [PATCH 157/243] 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2021. Plesk International GmbH. --> +<!-- Copyright 1999-2022. Plesk 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/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 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client.php b/src/Api/Client.php index f259569c..f622028f 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index 0d26d30b..4ddf0b42 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index a7ba9663..6d5d1633 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index 99044b1b..058d851c 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index 8cfb656e..778da474 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index 9f4bde31..e9f2ca41 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 25bc2b1f..b019bfc2 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index f927c594..e3ebdd28 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index b2b64ef7..e44dc101 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 6b8066a0..bf286435 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index ed3db23a..99b28421 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 7c2d014c..49cb0048 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 43adb05f..51881d3c 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 1c1667bd..9476cd04 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index efe45e1e..867ff3d9 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index ef0b60e1..f6ce2290 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index dadd0639..0a3343b5 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 1f54a689..4409d45f 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index a0dbb776..c4d2a7e0 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 147b468b..f0981d65 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 17d533fa..8c66f561 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index b2be4cd5..78fcfb8e 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 1a72d849..4a2ffb71 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index f9a1d887..8e0f38eb 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index 0b9e873c..7eee5799 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index b4713822..09d343c9 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 273757bb..96955ce5 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index fce9afc0..5b8281fa 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index 5158993b..d0eb7681 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 1577dec3..4fd3c608 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 504876a0..ab8677fc 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index af952da2..67fae267 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index b12b146a..195bc145 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Certificate; diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index 32b7bf7b..cd73d088 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 1a220589..3b20a16c 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 4eb9a93e..6072624f 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index 6419021b..ccc9de30 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 3793281a..ef887340 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\DatabaseServer; diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 5558d61f..0b4dd7a2 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Dns; diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 621412ce..9f545b16 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index e179a324..672130a7 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index 7c7ea68e..7d28e90c 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Ip; diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index f0323ac9..46f7528f 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Locale; diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index 878e0b0a..78429c10 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 58b22593..16c089ae 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index fc0ba8f7..567a525b 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\PhpHandler; diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index ec325630..41276be5 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index ddf2f9d1..91a17f0b 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 1f6a5106..922a9016 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 804dd372..4dc6a4f1 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index f196294d..25b84a28 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 32686499..17b1aca7 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\SecretKey; diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 7066ce53..49e8b1b7 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 73c7a724..5dbc40d3 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index de2b362f..277d8b61 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index bf363bde..ef68c0d9 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 65a5ee88..301b882f 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 35528474..b108a8cb 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 8c733233..31792ea9 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 48afaf58..771792cb 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 a6877666..881d230f 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 3230a7f1..96cf89b2 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 ee1acdf9..6f0322e6 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 d3f84f5b..559d0ab7 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk 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 57eea6c8..45d7c8b6 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 8b3fbf9d..0dbc916c 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlan; diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index 2ab3f401..5d86aaad 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Session; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 28e72f77..e36f97a8 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index cab0fe0e..4aa2a356 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index 0c2b6376..ee20cb69 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index b2581c6c..117caf64 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 646e155b..2f2e2a29 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 43e0595a..a468ec2c 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Subdomain; diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index 2a5edf3f..c4823730 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Ui; diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 23b2d489..039685cd 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 5a702758..8640a6fd 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index 3e1d3082..eb8c6633 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index 4e928c5b..fd375d79 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 655ea850..0d12fa14 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 9526cbff..78f823ae 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index 162c2fc2..3772a115 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index a8866f2f..098b1c60 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index fea5f1e8..4e9ea444 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 42e5dfbf..3fff014d 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 05a72810..5e597297 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 2331e48d..5df97da3 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 825ea671..95076354 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskX\Api; diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index f25f8b03..35b62afe 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 7931731b..05df53e7 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index fbb94a16..a65ee85a 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 5cffa152..3bd4f802 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 71b2e2f3..4dfa6ed7 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index f87ef721..19d963d5 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 69b06d0a..40e61ae2 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTest.php b/tests/DnsTest.php index b7f84fee..634cd681 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index bf2eb28b..7023dd43 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/IpTest.php b/tests/IpTest.php index a9bc70f4..15a2ef2c 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index a9a480a7..b86756bf 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/MailTest.php b/tests/MailTest.php index 4afd05ff..408d877a 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index 8c94c08e..ee632ccf 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 319c079b..6caa9875 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 025a77a7..89043192 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index be5dd1b7..9d6e92f0 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 217d2315..1fb06533 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 56bc96c0..04232dc0 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SessionTest.php b/tests/SessionTest.php index a0a42faf..a013ce25 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php index 4538d104..6cb4f0a0 100644 --- a/tests/SiteAliasTest.php +++ b/tests/SiteAliasTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteTest.php b/tests/SiteTest.php index f53f1f52..739aaded 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 8b5e1752..85bac57c 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/UiTest.php b/tests/UiTest.php index 03a3d44e..f0754aad 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index 851e577f..c34450fd 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 22bd737e..5b1431a3 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 01e63323..c271549b 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2021. Plesk International GmbH. +// Copyright 1999-2022. Plesk International GmbH. namespace PleskXTest; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 2daeb0f2..df4fa987 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,5 +1,5 @@ #!/bin/bash -### Copyright 1999-2021. Plesk International GmbH. +### Copyright 1999-2022. Plesk International GmbH. while : ; do curl -ksL https://plesk:8443/ | grep "<title>Plesk" > /dev/null From 4bef1cd7f8bda46899124f4efa3e08060a0c211b Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Thu, 10 Mar 2022 17:22:20 +0600 Subject: [PATCH 158/243] 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 <abashurov@plesk.com> Date: Mon, 28 Mar 2022 20:25:14 +0700 Subject: [PATCH 159/243] 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 <abashurov@plesk.com> Date: Mon, 28 Mar 2022 23:57:08 +0700 Subject: [PATCH 160/243] 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 <abashurov@plesk.com> Date: Tue, 29 Mar 2022 14:03:28 +0700 Subject: [PATCH 161/243] 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 <ayuzhakov@plesk.com> Date: Wed, 9 Nov 2022 18:02:44 +0200 Subject: [PATCH 162/243] 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 <ayuzhakov@plesk.com> Date: Wed, 15 Mar 2023 18:25:55 +0200 Subject: [PATCH 163/243] 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 <ayuzhakov@plesk.com> Date: Thu, 16 Mar 2023 21:49:53 +0200 Subject: [PATCH 164/243] 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 <ayuzhakov@plesk.com> Date: Thu, 16 Mar 2023 21:56:54 +0200 Subject: [PATCH 165/243] 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 <ayuzhakov@plesk.com> Date: Mon, 20 Mar 2023 18:15:45 +0200 Subject: [PATCH 166/243] 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 <ayuzhakov@plesk.com> Date: Wed, 22 Mar 2023 16:53:14 +0200 Subject: [PATCH 167/243] 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 168/243] 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 @@ +<?php +// Copyright 1999-2022. Plesk International GmbH. + +namespace PleskX\Api\Struct\ServicePlanAddon; + +use PleskX\Api\AbstractStruct; + +class Info extends AbstractStruct +{ + public int $id; + public string $name; + public string $guid; + public string $externalId; + + public function __construct(\SimpleXMLElement $apiResponse) + { + $this->initScalarProperties($apiResponse, [ + 'id', + 'name', + 'guid', + 'external-id', + ]); + } +} From a1f9fe7793e28fed89c62497a96a667efa040d31 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov <ayuzhakov@plesk.com> Date: Mon, 1 May 2023 18:36:49 +0300 Subject: [PATCH 169/243] 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 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; @@ -7,7 +7,6 @@ class ServicePlanAddon extends \PleskX\Api\Operator { - public function create(array $properties): Struct\Info { $response = $this->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 @@ +<?php +// Copyright 1999-2023. Plesk International GmbH. + +namespace PleskXTest; + +class ServicePlanAddonTest extends AbstractTestCase +{ + public function testGet() + { + $servicePlanAddon = static::createServicePlanAddon(); + $servicePlanAddonInfo = static::$client->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 <ayuzhakov@plesk.com> Date: Mon, 1 May 2023 18:43:42 +0300 Subject: [PATCH 170/243] 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 @@ <?xml version="1.0"?> +<!-- Copyright 1999-2023. Plesk 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 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2022. Plesk International GmbH. --> +<!-- Copyright 1999-2023. Plesk 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 43b6fdac..91d9afed 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,4 +1,5 @@ <?xml version="1.0"?> +<!-- Copyright 1999-2023. Plesk International GmbH. --> <psalm errorLevel="3" resolveFromConfigFile="true" diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index 042bd46c..5d63c073 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client.php b/src/Api/Client.php index 0562d73c..47b286a3 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index 4ddf0b42..4aa5516c 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index 6d5d1633..8530ad3f 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index 058d851c..5dd16c97 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index 778da474..835f1552 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index e9f2ca41..2a232be1 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 4e8c9df4..980dd2fc 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index e3ebdd28..aceb6c20 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index e44dc101..39614a10 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index bf286435..bc077674 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 99b28421..60f6e813 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index 49cb0048..bfea44b0 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 51881d3c..a059f98c 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 9476cd04..028ea1bb 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 867ff3d9..d5d360b2 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index f6ce2290..213c3d54 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 0a3343b5..0679fd95 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 4409d45f..3fdd15f8 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index c4d2a7e0..0292cc0e 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index bd918144..ff5678d7 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 8c66f561..0001e886 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 78fcfb8e..b8ef6c86 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 4a2ffb71..642b773a 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 8e0f38eb..e351738a 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index 09d343c9..b17c412d 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 324c9a97..0741576b 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 5b8281fa..d7ee2100 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index d0eb7681..baf7f643 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 4fd3c608..8512faa1 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index ab8677fc..72dfcfb8 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index a3f0563b..9635816a 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 195bc145..4b147e06 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Certificate; diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index cd73d088..d50c40a6 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 3b20a16c..7869ed38 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 6072624f..4014b5e4 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index ccc9de30..d9aa093b 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index ef887340..5f572eb4 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\DatabaseServer; diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 0b4dd7a2..4e074568 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Dns; diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 9f545b16..7409c1a1 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 672130a7..3314873e 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index 7d28e90c..20ce87ed 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Ip; diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 46f7528f..394a1ac4 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Locale; diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index 78429c10..671b0b72 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index 16c089ae..a4784706 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index 567a525b..07997386 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\PhpHandler; diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 41276be5..336fecba 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index 91a17f0b..cefbad80 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 922a9016..64e1726f 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 4dc6a4f1..214030e1 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index 25b84a28..d7589e37 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 17b1aca7..75da3e11 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\SecretKey; diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 49e8b1b7..5abefb5c 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index 5dbc40d3..ab1b10c2 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index 277d8b61..85757a07 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index ef68c0d9..2a8b2473 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 301b882f..8d679a63 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 b108a8cb..42c85695 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 31792ea9..94fc9a52 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 771792cb..696258f9 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 881d230f..8a591b21 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 96cf89b2..eeaac735 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 6f0322e6..3ecad141 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 559d0ab7..3bee9df7 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk 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 45d7c8b6..a1a8137c 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 0dbc916c..72d9639a 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlan; diff --git a/src/Api/Struct/ServicePlanAddon/Info.php b/src/Api/Struct/ServicePlanAddon/Info.php index 4ec2bd78..ae1fdc98 100644 --- a/src/Api/Struct/ServicePlanAddon/Info.php +++ b/src/Api/Struct/ServicePlanAddon/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlanAddon; diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index 5d86aaad..7c1a2d94 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Session; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index e36f97a8..1d91cf03 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index 4aa2a356..0fbcad54 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index ee20cb69..58f09730 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index 117caf64..f33d1e77 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 2f2e2a29..82603036 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index a468ec2c..14338af6 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Subdomain; diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index c4823730..1f06d3f7 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Ui; diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 039685cd..54ea0a33 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 8640a6fd..218798ff 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index eb8c6633..5eaededf 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index fd375d79..0d44920e 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 0d12fa14..0755c596 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 78f823ae..a6951555 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index 3772a115..9726777f 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index 098b1c60..62ddbfc5 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 4e9ea444..1eac939a 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index 3fff014d..aaa3c2fb 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index 5e597297..0dea670e 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 5df97da3..66578bc7 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 95076354..1d681c05 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskX\Api; diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 853488af..d840b55b 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 05df53e7..8582557c 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 77c85ffd..1ff3e311 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 760ee45a..715561c3 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 4dfa6ed7..0865d665 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 19d963d5..6fe19003 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 40e61ae2..d4be2cca 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 634cd681..4f6d2510 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index 7023dd43..f4b83824 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/IpTest.php b/tests/IpTest.php index 15a2ef2c..8e1b55a7 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index b86756bf..223c8907 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/MailTest.php b/tests/MailTest.php index 21505d99..94112fe5 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index ee632ccf..e1b068f8 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 6caa9875..c68e8baa 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 9c43f4db..0984fc74 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 9d6e92f0..62df20ed 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index 1fb06533..ad07dc00 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 04232dc0..58221141 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SessionTest.php b/tests/SessionTest.php index a013ce25..8b4db9b1 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php index 6cb4f0a0..fae57c7b 100644 --- a/tests/SiteAliasTest.php +++ b/tests/SiteAliasTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 550f98c5..1eb64220 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 85bac57c..9384f8c5 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/UiTest.php b/tests/UiTest.php index f0754aad..ed421d79 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index c34450fd..b57b090a 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 5b1431a3..8fe256dc 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 09c863ed..fabe82fb 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2022. Plesk International GmbH. +// Copyright 1999-2023. Plesk International GmbH. namespace PleskXTest; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index df4fa987..df2c3da9 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,5 +1,5 @@ #!/bin/bash -### Copyright 1999-2022. Plesk International GmbH. +### Copyright 1999-2023. Plesk International GmbH. while : ; do curl -ksL https://plesk:8443/ | grep "<title>Plesk" > /dev/null From 95803579ca90f8aa6367d2dd933690143b84e046 Mon Sep 17 00:00:00 2001 From: Stanislav Matukevich <smatukevich@plesk.com> Date: Tue, 2 May 2023 17:03:28 +0300 Subject: [PATCH 171/243] 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 <ayuzhakov@plesk.com> Date: Tue, 9 May 2023 18:08:59 +0300 Subject: [PATCH 172/243] 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 <ayuzhakov@plesk.com> Date: Tue, 9 May 2023 18:12:57 +0300 Subject: [PATCH 173/243] 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 <ayuzhakov@plesk.com> Date: Tue, 9 May 2023 18:13:40 +0300 Subject: [PATCH 174/243] 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 <ayuzhakov@plesk.com> Date: Wed, 10 May 2023 09:28:32 +0300 Subject: [PATCH 175/243] 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 <ayuzhakov@plesk.com> Date: Wed, 10 May 2023 12:48:36 +0300 Subject: [PATCH 176/243] 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 <ayuzhakov@plesk.com> Date: Tue, 11 Jul 2023 13:18:58 +0300 Subject: [PATCH 177/243] 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 178/243] 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] <support@github.com> --- 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 179/243] 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] <support@github.com> --- 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 <ayuzhakov@plesk.com> Date: Thu, 13 Jul 2023 23:13:41 +0300 Subject: [PATCH 180/243] 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 @@ <psalm errorLevel="3" resolveFromConfigFile="true" + findUnusedBaselineEntry="true" + findUnusedCode="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config%20vendor/vimeo/psalm/config.xsd" diff --git a/src/Api/Client.php b/src/Api/Client.php index e9c31469..9450a870 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -167,10 +167,7 @@ public function request($request, int $mode = self::RESPONSE_SHORT): XmlResponse } 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 = $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 <ayuzhakov@plesk.com> Date: Fri, 14 Jul 2023 18:24:46 +0300 Subject: [PATCH 181/243] 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 182/243] 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] <support@github.com> --- 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 <ayuzhakov@plesk.com> Date: Thu, 3 Aug 2023 15:02:20 +0300 Subject: [PATCH 183/243] 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 184/243] 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] <support@github.com> --- 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 185/243] 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] <support@github.com> --- 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 186/243] 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] <support@github.com> --- 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 <ayuzhakov@plesk.com> Date: Fri, 25 Aug 2023 18:02:09 +0300 Subject: [PATCH 187/243] 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 <ayuzhakov@plesk.com> Date: Tue, 29 Aug 2023 18:17:41 +0300 Subject: [PATCH 188/243] 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 189/243] 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] <support@github.com> --- 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 <eugene.kazakov@webpros.com> Date: Thu, 23 Nov 2023 16:39:47 +0100 Subject: [PATCH 190/243] 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 191/243] 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] <support@github.com> --- 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 192/243] 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] <support@github.com> --- 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 193/243] 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] <support@github.com> --- 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 194/243] 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] <support@github.com> --- 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 195/243] 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] <support@github.com> --- 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 <alexei.yuzhakov@webpros.com> Date: Tue, 2 Jan 2024 12:35:15 +0200 Subject: [PATCH 196/243] 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 @@ <?xml version="1.0"?> -<!-- Copyright 1999-2023. Plesk International GmbH. --> +<!-- Copyright 1999-2024. Plesk 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 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2023. Plesk International GmbH. --> +<!-- Copyright 1999-2024. Plesk 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 ee216500..2c875ca4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!-- Copyright 1999-2023. Plesk International GmbH. --> +<!-- Copyright 1999-2024. Plesk International GmbH. --> <psalm errorLevel="3" resolveFromConfigFile="true" diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index 303e806a..35f31ca3 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client.php b/src/Api/Client.php index d49727aa..e87711c7 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index 4aa5516c..cbb562a6 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index 8530ad3f..8dfc7a1a 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index 5dd16c97..3553bc8a 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index ee3fcb73..ef66c9d2 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index 2a232be1..ee937cbd 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 06f4371a..2fdb9bb9 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index aceb6c20..81ab200f 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index 803e454e..c2a753cf 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index e80e28b5..8bedb964 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 6087aa7c..81c09f4b 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index cf552886..e04f7f3d 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index b4adfcc1..4d6668eb 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 13b6b556..59389115 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 608e0746..2f8b7c5f 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index 213c3d54..1f645ca2 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 46718694..1d27a49b 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 68725b51..438c04c5 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 241d9ed2..94dbe42b 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index d5fe2965..8a18958c 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 0001e886..739f6209 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 4cf93a88..2bf8f4a2 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index ba088763..81dbe775 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 5e446cab..3d1c5bb6 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index f17cedf4..c71123e7 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index e2854ccd..844aa3f1 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index 20fbd971..ab031ae9 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 27874aef..304872d3 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index 65b2a979..d4369280 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 1b50fb6a..150c14d1 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index 72dfcfb8..c9313f7f 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index e6336d86..bb0e4182 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index 49b86c43..dcdfdeef 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Certificate; diff --git a/src/Api/Struct/Customer/GeneralInfo.php b/src/Api/Struct/Customer/GeneralInfo.php index d50c40a6..05f95bde 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Customer/Info.php b/src/Api/Struct/Customer/Info.php index 7869ed38..c500654c 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Customer; diff --git a/src/Api/Struct/Database/Info.php b/src/Api/Struct/Database/Info.php index 4014b5e4..68139750 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/Database/UserInfo.php b/src/Api/Struct/Database/UserInfo.php index d9aa093b..ff9023da 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Database; diff --git a/src/Api/Struct/DatabaseServer/Info.php b/src/Api/Struct/DatabaseServer/Info.php index 5f572eb4..fc2f9763 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\DatabaseServer; diff --git a/src/Api/Struct/Dns/Info.php b/src/Api/Struct/Dns/Info.php index 4e074568..17d81560 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Dns; diff --git a/src/Api/Struct/EventLog/DetailedEvent.php b/src/Api/Struct/EventLog/DetailedEvent.php index 7409c1a1..e032024a 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/EventLog/Event.php b/src/Api/Struct/EventLog/Event.php index 3314873e..f7e14d5b 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\EventLog; diff --git a/src/Api/Struct/Ip/Info.php b/src/Api/Struct/Ip/Info.php index 20ce87ed..bddad388 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Ip; diff --git a/src/Api/Struct/Locale/Info.php b/src/Api/Struct/Locale/Info.php index 394a1ac4..4ba54c5c 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Locale; diff --git a/src/Api/Struct/Mail/GeneralInfo.php b/src/Api/Struct/Mail/GeneralInfo.php index 671b0b72..9ab8a4e7 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/Mail/Info.php b/src/Api/Struct/Mail/Info.php index a4784706..19c1c286 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Mail; diff --git a/src/Api/Struct/PhpHandler/Info.php b/src/Api/Struct/PhpHandler/Info.php index 07997386..64e631f0 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\PhpHandler; diff --git a/src/Api/Struct/ProtectedDirectory/DataInfo.php b/src/Api/Struct/ProtectedDirectory/DataInfo.php index 336fecba..e2ffa9cf 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/Info.php b/src/Api/Struct/ProtectedDirectory/Info.php index cefbad80..346d25cd 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/ProtectedDirectory/UserInfo.php b/src/Api/Struct/ProtectedDirectory/UserInfo.php index 64e1726f..bc895f35 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\ProtectedDirectory; diff --git a/src/Api/Struct/Reseller/GeneralInfo.php b/src/Api/Struct/Reseller/GeneralInfo.php index 5b863083..2924cd64 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/Reseller/Info.php b/src/Api/Struct/Reseller/Info.php index d7589e37..487cbda5 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Reseller; diff --git a/src/Api/Struct/SecretKey/Info.php b/src/Api/Struct/SecretKey/Info.php index 75da3e11..dde79826 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\SecretKey; diff --git a/src/Api/Struct/Server/Admin.php b/src/Api/Struct/Server/Admin.php index 5abefb5c..c50d3b05 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/GeneralInfo.php b/src/Api/Struct/Server/GeneralInfo.php index ab1b10c2..d785415b 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Preferences.php b/src/Api/Struct/Server/Preferences.php index 85757a07..5e667d75 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/SessionPreferences.php b/src/Api/Struct/Server/SessionPreferences.php index 2a8b2473..a62ad803 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/Server/Statistics.php b/src/Api/Struct/Server/Statistics.php index 68c489f5..d963f4fa 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 42c85695..e1be9750 100644 --- a/src/Api/Struct/Server/Statistics/DiskSpace.php +++ b/src/Api/Struct/Server/Statistics/DiskSpace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 0d3eed45..3ed0e081 100644 --- a/src/Api/Struct/Server/Statistics/LoadAverage.php +++ b/src/Api/Struct/Server/Statistics/LoadAverage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 696258f9..d4d303ac 100644 --- a/src/Api/Struct/Server/Statistics/Memory.php +++ b/src/Api/Struct/Server/Statistics/Memory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 8a591b21..40213901 100644 --- a/src/Api/Struct/Server/Statistics/Objects.php +++ b/src/Api/Struct/Server/Statistics/Objects.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 eeaac735..e07a55bd 100644 --- a/src/Api/Struct/Server/Statistics/Other.php +++ b/src/Api/Struct/Server/Statistics/Other.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 3ecad141..2a6e6062 100644 --- a/src/Api/Struct/Server/Statistics/Swap.php +++ b/src/Api/Struct/Server/Statistics/Swap.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 3bee9df7..a449d62f 100644 --- a/src/Api/Struct/Server/Statistics/Version.php +++ b/src/Api/Struct/Server/Statistics/Version.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk 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 a1a8137c..2116a138 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Server; diff --git a/src/Api/Struct/ServicePlan/Info.php b/src/Api/Struct/ServicePlan/Info.php index 72d9639a..d2bdd165 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlan; diff --git a/src/Api/Struct/ServicePlanAddon/Info.php b/src/Api/Struct/ServicePlanAddon/Info.php index ae1fdc98..08f34f39 100644 --- a/src/Api/Struct/ServicePlanAddon/Info.php +++ b/src/Api/Struct/ServicePlanAddon/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\ServicePlanAddon; diff --git a/src/Api/Struct/Session/Info.php b/src/Api/Struct/Session/Info.php index 7c1a2d94..a7261f7c 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Session; diff --git a/src/Api/Struct/Site/GeneralInfo.php b/src/Api/Struct/Site/GeneralInfo.php index 5344eea9..ad63d336 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/HostingInfo.php b/src/Api/Struct/Site/HostingInfo.php index fe750e04..607ed166 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/Site/Info.php b/src/Api/Struct/Site/Info.php index 58f09730..c7f393ed 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Site; diff --git a/src/Api/Struct/SiteAlias/GeneralInfo.php b/src/Api/Struct/SiteAlias/GeneralInfo.php index f33d1e77..afaad8f6 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/SiteAlias/Info.php b/src/Api/Struct/SiteAlias/Info.php index 82603036..ffe5654a 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\SiteAlias; diff --git a/src/Api/Struct/Subdomain/Info.php b/src/Api/Struct/Subdomain/Info.php index 77956018..a4aeacbe 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Subdomain; diff --git a/src/Api/Struct/Ui/CustomButton.php b/src/Api/Struct/Ui/CustomButton.php index aa7932b2..ffebf8c4 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Ui; diff --git a/src/Api/Struct/Webspace/DiskUsage.php b/src/Api/Struct/Webspace/DiskUsage.php index 54ea0a33..58b770ed 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/GeneralInfo.php b/src/Api/Struct/Webspace/GeneralInfo.php index 76c922fd..7922bcc5 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/HostingPropertyInfo.php b/src/Api/Struct/Webspace/HostingPropertyInfo.php index 5eaededf..0cc5da56 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Info.php b/src/Api/Struct/Webspace/Info.php index 0d44920e..4f52aa8e 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limit.php b/src/Api/Struct/Webspace/Limit.php index 0755c596..b43b2ea0 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitDescriptor.php b/src/Api/Struct/Webspace/LimitDescriptor.php index 2370f188..4df7a8cf 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/LimitInfo.php b/src/Api/Struct/Webspace/LimitInfo.php index 9726777f..1ac83f8b 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/Limits.php b/src/Api/Struct/Webspace/Limits.php index 56b8d551..4e625611 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionDescriptor.php b/src/Api/Struct/Webspace/PermissionDescriptor.php index 91747493..b7d6fdc7 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PermissionInfo.php b/src/Api/Struct/Webspace/PermissionInfo.php index aaa3c2fb..f6f5e0f2 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhpSettings.php b/src/Api/Struct/Webspace/PhpSettings.php index add953c3..02960c68 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php index 6470d180..5d3e4d54 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index a2aaab8f..38617dd9 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskX\Api; diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index d840b55b..9a8e4841 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index 8582557c..ef6a111e 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 6b0df6e7..8a671a6e 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 715561c3..23181073 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 61737252..75208585 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index bb4a2f78..70dda558 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index d4be2cca..4e484c47 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/DnsTest.php b/tests/DnsTest.php index 4f6d2510..cd9d367f 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index f4b83824..64d502e3 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/IpTest.php b/tests/IpTest.php index 8e1b55a7..5c95f313 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index 223c8907..fac2bb2b 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/MailTest.php b/tests/MailTest.php index 94112fe5..8abcc438 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index e4fb3090..a8815037 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index c68e8baa..0dd9ba10 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 0984fc74..242f1da7 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 62df20ed..4b382165 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index ad07dc00..f63fc08b 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanAddonTest.php b/tests/ServicePlanAddonTest.php index 5f5e6b20..984bbcb5 100644 --- a/tests/ServicePlanAddonTest.php +++ b/tests/ServicePlanAddonTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 58221141..2b515b72 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 8b4db9b1..3bbf0d79 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php index fae57c7b..799b08e2 100644 --- a/tests/SiteAliasTest.php +++ b/tests/SiteAliasTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 1eb64220..8dce8824 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index 9384f8c5..c5e74369 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/UiTest.php b/tests/UiTest.php index ed421d79..c18f0c02 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index b57b090a..7f7b3237 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 8fe256dc..2755c5be 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest\Utility; diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 92edeb9d..949effba 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2023. Plesk International GmbH. +// Copyright 1999-2024. Plesk International GmbH. namespace PleskXTest; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index df2c3da9..90179e08 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,5 +1,5 @@ #!/bin/bash -### Copyright 1999-2023. Plesk International GmbH. +### Copyright 1999-2024. Plesk International GmbH. while : ; do curl -ksL https://plesk:8443/ | grep "<title>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 197/243] 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] <support@github.com> --- 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 198/243] 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] <support@github.com> --- 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 <alexei.yuzhakov@webpros.com> Date: Fri, 19 Jan 2024 16:42:28 +0200 Subject: [PATCH 199/243] 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 @@ <?xml version="1.0"?> -<!-- Copyright 1999-2024. Plesk International GmbH. --> +<!-- Copyright 1999-2024. 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 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 1999-2024. Plesk International GmbH. --> +<!-- Copyright 1999-2024. 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 2c875ca4..da2678a1 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!-- Copyright 1999-2024. Plesk International GmbH. --> +<!-- Copyright 1999-2024. WebPros International GmbH. --> <psalm errorLevel="3" resolveFromConfigFile="true" diff --git a/src/Api/AbstractStruct.php b/src/Api/AbstractStruct.php index 35f31ca3..13952730 100644 --- a/src/Api/AbstractStruct.php +++ b/src/Api/AbstractStruct.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client.php b/src/Api/Client.php index e87711c7..7895ab0e 100644 --- a/src/Api/Client.php +++ b/src/Api/Client.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Client/Exception.php b/src/Api/Client/Exception.php index cbb562a6..fefda79f 100644 --- a/src/Api/Client/Exception.php +++ b/src/Api/Client/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Client; diff --git a/src/Api/Exception.php b/src/Api/Exception.php index 8dfc7a1a..f4058e75 100644 --- a/src/Api/Exception.php +++ b/src/Api/Exception.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/InternalClient.php b/src/Api/InternalClient.php index 3553bc8a..a2601f35 100644 --- a/src/Api/InternalClient.php +++ b/src/Api/InternalClient.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator.php b/src/Api/Operator.php index ef66c9d2..a694d105 100644 --- a/src/Api/Operator.php +++ b/src/Api/Operator.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api; diff --git a/src/Api/Operator/Aps.php b/src/Api/Operator/Aps.php index ee937cbd..b73e1c6a 100644 --- a/src/Api/Operator/Aps.php +++ b/src/Api/Operator/Aps.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Certificate.php b/src/Api/Operator/Certificate.php index 2fdb9bb9..d748daa6 100644 --- a/src/Api/Operator/Certificate.php +++ b/src/Api/Operator/Certificate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Customer.php b/src/Api/Operator/Customer.php index 81ab200f..9f997892 100644 --- a/src/Api/Operator/Customer.php +++ b/src/Api/Operator/Customer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Database.php b/src/Api/Operator/Database.php index c2a753cf..87c86ca4 100644 --- a/src/Api/Operator/Database.php +++ b/src/Api/Operator/Database.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DatabaseServer.php b/src/Api/Operator/DatabaseServer.php index 8bedb964..184fcced 100644 --- a/src/Api/Operator/DatabaseServer.php +++ b/src/Api/Operator/DatabaseServer.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Dns.php b/src/Api/Operator/Dns.php index 81c09f4b..36f9602c 100644 --- a/src/Api/Operator/Dns.php +++ b/src/Api/Operator/Dns.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/DnsTemplate.php b/src/Api/Operator/DnsTemplate.php index e04f7f3d..982f5e51 100644 --- a/src/Api/Operator/DnsTemplate.php +++ b/src/Api/Operator/DnsTemplate.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/EventLog.php b/src/Api/Operator/EventLog.php index 4d6668eb..8819fa52 100644 --- a/src/Api/Operator/EventLog.php +++ b/src/Api/Operator/EventLog.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ip.php b/src/Api/Operator/Ip.php index 59389115..eff9eea6 100644 --- a/src/Api/Operator/Ip.php +++ b/src/Api/Operator/Ip.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Locale.php b/src/Api/Operator/Locale.php index 2f8b7c5f..357b9036 100644 --- a/src/Api/Operator/Locale.php +++ b/src/Api/Operator/Locale.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/LogRotation.php b/src/Api/Operator/LogRotation.php index 1f645ca2..47b93168 100644 --- a/src/Api/Operator/LogRotation.php +++ b/src/Api/Operator/LogRotation.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Mail.php b/src/Api/Operator/Mail.php index 1d27a49b..7035e7c5 100644 --- a/src/Api/Operator/Mail.php +++ b/src/Api/Operator/Mail.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/PhpHandler.php b/src/Api/Operator/PhpHandler.php index 438c04c5..d069e44d 100644 --- a/src/Api/Operator/PhpHandler.php +++ b/src/Api/Operator/PhpHandler.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ProtectedDirectory.php b/src/Api/Operator/ProtectedDirectory.php index 94dbe42b..9d232cdb 100644 --- a/src/Api/Operator/ProtectedDirectory.php +++ b/src/Api/Operator/ProtectedDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Reseller.php b/src/Api/Operator/Reseller.php index 8a18958c..0d016698 100644 --- a/src/Api/Operator/Reseller.php +++ b/src/Api/Operator/Reseller.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ResellerPlan.php b/src/Api/Operator/ResellerPlan.php index 739f6209..f94574c1 100644 --- a/src/Api/Operator/ResellerPlan.php +++ b/src/Api/Operator/ResellerPlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SecretKey.php b/src/Api/Operator/SecretKey.php index 2bf8f4a2..92f709e3 100644 --- a/src/Api/Operator/SecretKey.php +++ b/src/Api/Operator/SecretKey.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Server.php b/src/Api/Operator/Server.php index 81dbe775..a7efb480 100644 --- a/src/Api/Operator/Server.php +++ b/src/Api/Operator/Server.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlan.php b/src/Api/Operator/ServicePlan.php index 3d1c5bb6..f594a637 100644 --- a/src/Api/Operator/ServicePlan.php +++ b/src/Api/Operator/ServicePlan.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/ServicePlanAddon.php b/src/Api/Operator/ServicePlanAddon.php index c71123e7..1aedffd4 100644 --- a/src/Api/Operator/ServicePlanAddon.php +++ b/src/Api/Operator/ServicePlanAddon.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Session.php b/src/Api/Operator/Session.php index 844aa3f1..d569d23c 100644 --- a/src/Api/Operator/Session.php +++ b/src/Api/Operator/Session.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Site.php b/src/Api/Operator/Site.php index ab031ae9..bb240b2b 100644 --- a/src/Api/Operator/Site.php +++ b/src/Api/Operator/Site.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/SiteAlias.php b/src/Api/Operator/SiteAlias.php index 304872d3..513b29a1 100644 --- a/src/Api/Operator/SiteAlias.php +++ b/src/Api/Operator/SiteAlias.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Subdomain.php b/src/Api/Operator/Subdomain.php index d4369280..928480ac 100644 --- a/src/Api/Operator/Subdomain.php +++ b/src/Api/Operator/Subdomain.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Ui.php b/src/Api/Operator/Ui.php index 150c14d1..d359416d 100644 --- a/src/Api/Operator/Ui.php +++ b/src/Api/Operator/Ui.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/VirtualDirectory.php b/src/Api/Operator/VirtualDirectory.php index c9313f7f..09da7637 100644 --- a/src/Api/Operator/VirtualDirectory.php +++ b/src/Api/Operator/VirtualDirectory.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Operator/Webspace.php b/src/Api/Operator/Webspace.php index bb0e4182..42d4e063 100644 --- a/src/Api/Operator/Webspace.php +++ b/src/Api/Operator/Webspace.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Operator; diff --git a/src/Api/Struct/Certificate/Info.php b/src/Api/Struct/Certificate/Info.php index dcdfdeef..bdfa71fb 100644 --- a/src/Api/Struct/Certificate/Info.php +++ b/src/Api/Struct/Certificate/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 05f95bde..2a38393d 100644 --- a/src/Api/Struct/Customer/GeneralInfo.php +++ b/src/Api/Struct/Customer/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 c500654c..961c61f8 100644 --- a/src/Api/Struct/Customer/Info.php +++ b/src/Api/Struct/Customer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 68139750..2becc7ae 100644 --- a/src/Api/Struct/Database/Info.php +++ b/src/Api/Struct/Database/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 ff9023da..09bac9ac 100644 --- a/src/Api/Struct/Database/UserInfo.php +++ b/src/Api/Struct/Database/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 fc2f9763..1f71679b 100644 --- a/src/Api/Struct/DatabaseServer/Info.php +++ b/src/Api/Struct/DatabaseServer/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 17d81560..3513450c 100644 --- a/src/Api/Struct/Dns/Info.php +++ b/src/Api/Struct/Dns/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 e032024a..20fd6b8f 100644 --- a/src/Api/Struct/EventLog/DetailedEvent.php +++ b/src/Api/Struct/EventLog/DetailedEvent.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 f7e14d5b..94993346 100644 --- a/src/Api/Struct/EventLog/Event.php +++ b/src/Api/Struct/EventLog/Event.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 bddad388..b349d64c 100644 --- a/src/Api/Struct/Ip/Info.php +++ b/src/Api/Struct/Ip/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 4ba54c5c..3cdf79f2 100644 --- a/src/Api/Struct/Locale/Info.php +++ b/src/Api/Struct/Locale/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 9ab8a4e7..f86c7be5 100644 --- a/src/Api/Struct/Mail/GeneralInfo.php +++ b/src/Api/Struct/Mail/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 19c1c286..f9e15b3c 100644 --- a/src/Api/Struct/Mail/Info.php +++ b/src/Api/Struct/Mail/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 64e631f0..f4a95632 100644 --- a/src/Api/Struct/PhpHandler/Info.php +++ b/src/Api/Struct/PhpHandler/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 e2ffa9cf..ab81a51d 100644 --- a/src/Api/Struct/ProtectedDirectory/DataInfo.php +++ b/src/Api/Struct/ProtectedDirectory/DataInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 346d25cd..5ee5f97b 100644 --- a/src/Api/Struct/ProtectedDirectory/Info.php +++ b/src/Api/Struct/ProtectedDirectory/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 bc895f35..67bc8b7f 100644 --- a/src/Api/Struct/ProtectedDirectory/UserInfo.php +++ b/src/Api/Struct/ProtectedDirectory/UserInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 2924cd64..0d2c79a0 100644 --- a/src/Api/Struct/Reseller/GeneralInfo.php +++ b/src/Api/Struct/Reseller/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 487cbda5..6f13cbb1 100644 --- a/src/Api/Struct/Reseller/Info.php +++ b/src/Api/Struct/Reseller/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 dde79826..702a9179 100644 --- a/src/Api/Struct/SecretKey/Info.php +++ b/src/Api/Struct/SecretKey/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 c50d3b05..f91446ac 100644 --- a/src/Api/Struct/Server/Admin.php +++ b/src/Api/Struct/Server/Admin.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 d785415b..99aea3a9 100644 --- a/src/Api/Struct/Server/GeneralInfo.php +++ b/src/Api/Struct/Server/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 5e667d75..efef6de5 100644 --- a/src/Api/Struct/Server/Preferences.php +++ b/src/Api/Struct/Server/Preferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 a62ad803..ceefb122 100644 --- a/src/Api/Struct/Server/SessionPreferences.php +++ b/src/Api/Struct/Server/SessionPreferences.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 d963f4fa..b8c94cef 100644 --- a/src/Api/Struct/Server/Statistics.php +++ b/src/Api/Struct/Server/Statistics.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 e1be9750..2b0c67f3 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. Plesk International GmbH. +// Copyright 1999-2024. 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 3ed0e081..5d7a4455 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. Plesk International GmbH. +// Copyright 1999-2024. 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 d4d303ac..0e5ac295 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. Plesk International GmbH. +// Copyright 1999-2024. 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 40213901..5975ccb5 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. Plesk International GmbH. +// Copyright 1999-2024. 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 e07a55bd..66dfd1ef 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. Plesk International GmbH. +// Copyright 1999-2024. 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 2a6e6062..f0beaa21 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. Plesk International GmbH. +// Copyright 1999-2024. 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 a449d62f..7cef08c4 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. Plesk International GmbH. +// Copyright 1999-2024. 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 2116a138..b64a26e7 100644 --- a/src/Api/Struct/Server/UpdatesInfo.php +++ b/src/Api/Struct/Server/UpdatesInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 d2bdd165..d92c8f4d 100644 --- a/src/Api/Struct/ServicePlan/Info.php +++ b/src/Api/Struct/ServicePlan/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 08f34f39..2221eb5b 100644 --- a/src/Api/Struct/ServicePlanAddon/Info.php +++ b/src/Api/Struct/ServicePlanAddon/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 a7261f7c..03b7d97f 100644 --- a/src/Api/Struct/Session/Info.php +++ b/src/Api/Struct/Session/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 ad63d336..ac1b6f6b 100644 --- a/src/Api/Struct/Site/GeneralInfo.php +++ b/src/Api/Struct/Site/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 607ed166..01f1f0bd 100644 --- a/src/Api/Struct/Site/HostingInfo.php +++ b/src/Api/Struct/Site/HostingInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 c7f393ed..8ef59c07 100644 --- a/src/Api/Struct/Site/Info.php +++ b/src/Api/Struct/Site/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 afaad8f6..89a67723 100644 --- a/src/Api/Struct/SiteAlias/GeneralInfo.php +++ b/src/Api/Struct/SiteAlias/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 ffe5654a..977d0b2a 100644 --- a/src/Api/Struct/SiteAlias/Info.php +++ b/src/Api/Struct/SiteAlias/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 a4aeacbe..569f0f0c 100644 --- a/src/Api/Struct/Subdomain/Info.php +++ b/src/Api/Struct/Subdomain/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 ffebf8c4..e66cc0e1 100644 --- a/src/Api/Struct/Ui/CustomButton.php +++ b/src/Api/Struct/Ui/CustomButton.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 58b770ed..834996cf 100644 --- a/src/Api/Struct/Webspace/DiskUsage.php +++ b/src/Api/Struct/Webspace/DiskUsage.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 7922bcc5..5ff38bdc 100644 --- a/src/Api/Struct/Webspace/GeneralInfo.php +++ b/src/Api/Struct/Webspace/GeneralInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 0cc5da56..04dd9ea3 100644 --- a/src/Api/Struct/Webspace/HostingPropertyInfo.php +++ b/src/Api/Struct/Webspace/HostingPropertyInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 4f52aa8e..38d65a69 100644 --- a/src/Api/Struct/Webspace/Info.php +++ b/src/Api/Struct/Webspace/Info.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 b43b2ea0..7c1bcdc0 100644 --- a/src/Api/Struct/Webspace/Limit.php +++ b/src/Api/Struct/Webspace/Limit.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 4df7a8cf..61fb8bb5 100644 --- a/src/Api/Struct/Webspace/LimitDescriptor.php +++ b/src/Api/Struct/Webspace/LimitDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 1ac83f8b..68a5fdb8 100644 --- a/src/Api/Struct/Webspace/LimitInfo.php +++ b/src/Api/Struct/Webspace/LimitInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 4e625611..2e0722ce 100644 --- a/src/Api/Struct/Webspace/Limits.php +++ b/src/Api/Struct/Webspace/Limits.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 b7d6fdc7..f5ef3cff 100644 --- a/src/Api/Struct/Webspace/PermissionDescriptor.php +++ b/src/Api/Struct/Webspace/PermissionDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 f6f5e0f2..5bb7dc83 100644 --- a/src/Api/Struct/Webspace/PermissionInfo.php +++ b/src/Api/Struct/Webspace/PermissionInfo.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 02960c68..02a1fadf 100644 --- a/src/Api/Struct/Webspace/PhpSettings.php +++ b/src/Api/Struct/Webspace/PhpSettings.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. 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 5d3e4d54..a27ef9f1 100644 --- a/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php +++ b/src/Api/Struct/Webspace/PhysicalHostingDescriptor.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api\Struct\Webspace; diff --git a/src/Api/XmlResponse.php b/src/Api/XmlResponse.php index 38617dd9..032c9395 100644 --- a/src/Api/XmlResponse.php +++ b/src/Api/XmlResponse.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskX\Api; diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 9a8e4841..7792ec17 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ApiClientTest.php b/tests/ApiClientTest.php index ef6a111e..9d20c98b 100644 --- a/tests/ApiClientTest.php +++ b/tests/ApiClientTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/CertificateTest.php b/tests/CertificateTest.php index 8a671a6e..7afcc5cc 100644 --- a/tests/CertificateTest.php +++ b/tests/CertificateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/CustomerTest.php b/tests/CustomerTest.php index 23181073..b05f224c 100644 --- a/tests/CustomerTest.php +++ b/tests/CustomerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseServerTest.php b/tests/DatabaseServerTest.php index 75208585..f309528a 100644 --- a/tests/DatabaseServerTest.php +++ b/tests/DatabaseServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 70dda558..9190744e 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DnsTemplateTest.php b/tests/DnsTemplateTest.php index 4e484c47..e756424b 100644 --- a/tests/DnsTemplateTest.php +++ b/tests/DnsTemplateTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/DnsTest.php b/tests/DnsTest.php index cd9d367f..37ad4c0f 100644 --- a/tests/DnsTest.php +++ b/tests/DnsTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/EventLogTest.php b/tests/EventLogTest.php index 64d502e3..2abd3349 100644 --- a/tests/EventLogTest.php +++ b/tests/EventLogTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/IpTest.php b/tests/IpTest.php index 5c95f313..c9abb14a 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/LocaleTest.php b/tests/LocaleTest.php index fac2bb2b..ef11ddb1 100644 --- a/tests/LocaleTest.php +++ b/tests/LocaleTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/MailTest.php b/tests/MailTest.php index 8abcc438..5752cdb7 100644 --- a/tests/MailTest.php +++ b/tests/MailTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/PhpHandlerTest.php b/tests/PhpHandlerTest.php index a8815037..a3c18221 100644 --- a/tests/PhpHandlerTest.php +++ b/tests/PhpHandlerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ProtectedDirectoryTest.php b/tests/ProtectedDirectoryTest.php index 0dd9ba10..04e6380a 100644 --- a/tests/ProtectedDirectoryTest.php +++ b/tests/ProtectedDirectoryTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ResellerTest.php b/tests/ResellerTest.php index 242f1da7..72a2b536 100644 --- a/tests/ResellerTest.php +++ b/tests/ResellerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SecretKeyTest.php b/tests/SecretKeyTest.php index 4b382165..39b257ba 100644 --- a/tests/SecretKeyTest.php +++ b/tests/SecretKeyTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ServerTest.php b/tests/ServerTest.php index f63fc08b..7e4113fa 100644 --- a/tests/ServerTest.php +++ b/tests/ServerTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanAddonTest.php b/tests/ServicePlanAddonTest.php index 984bbcb5..41e50c60 100644 --- a/tests/ServicePlanAddonTest.php +++ b/tests/ServicePlanAddonTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/ServicePlanTest.php b/tests/ServicePlanTest.php index 2b515b72..438b91a8 100644 --- a/tests/ServicePlanTest.php +++ b/tests/ServicePlanTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 3bbf0d79..f5a49373 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SiteAliasTest.php b/tests/SiteAliasTest.php index 799b08e2..a4967f9b 100644 --- a/tests/SiteAliasTest.php +++ b/tests/SiteAliasTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SiteTest.php b/tests/SiteTest.php index 8dce8824..fd37d257 100644 --- a/tests/SiteTest.php +++ b/tests/SiteTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/SubdomainTest.php b/tests/SubdomainTest.php index c5e74369..ebd54650 100644 --- a/tests/SubdomainTest.php +++ b/tests/SubdomainTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/UiTest.php b/tests/UiTest.php index c18f0c02..81d186a0 100644 --- a/tests/UiTest.php +++ b/tests/UiTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/tests/Utility/KeyLimitChecker.php b/tests/Utility/KeyLimitChecker.php index 7f7b3237..2f5b4bf0 100644 --- a/tests/Utility/KeyLimitChecker.php +++ b/tests/Utility/KeyLimitChecker.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest\Utility; diff --git a/tests/Utility/PasswordProvider.php b/tests/Utility/PasswordProvider.php index 2755c5be..6a809967 100644 --- a/tests/Utility/PasswordProvider.php +++ b/tests/Utility/PasswordProvider.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest\Utility; diff --git a/tests/WebspaceTest.php b/tests/WebspaceTest.php index 949effba..4a6ac728 100644 --- a/tests/WebspaceTest.php +++ b/tests/WebspaceTest.php @@ -1,5 +1,5 @@ <?php -// Copyright 1999-2024. Plesk International GmbH. +// Copyright 1999-2024. WebPros International GmbH. namespace PleskXTest; diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 90179e08..5f89d1de 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,5 +1,5 @@ #!/bin/bash -### Copyright 1999-2024. Plesk International GmbH. +### Copyright 1999-2024. WebPros International GmbH. while : ; do curl -ksL https://plesk:8443/ | grep "<title>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 200/243] 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] <support@github.com> --- 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 201/243] 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] <support@github.com> --- 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 202/243] 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] <support@github.com> --- 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 203/243] 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] <support@github.com> --- 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 204/243] 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] <support@github.com> --- 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 205/243] 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] <support@github.com> --- 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 206/243] 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] <support@github.com> --- 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 207/243] 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] <support@github.com> --- 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 208/243] 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] <support@github.com> --- 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 209/243] 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] <support@github.com> --- 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 210/243] 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] <support@github.com> --- 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 <denis.pushkarev@webpros.com> Date: Fri, 5 Apr 2024 16:55:36 +0300 Subject: [PATCH 211/243] 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 212/243] 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] <support@github.com> --- 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 <alexei.yuzhakov@webpros.com> Date: Wed, 10 Apr 2024 22:45:04 +0100 Subject: [PATCH 213/243] 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 <alexei.yuzhakov@webpros.com> Date: Wed, 10 Apr 2024 23:05:57 +0100 Subject: [PATCH 214/243] 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 215/243] 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] <support@github.com> --- 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 216/243] 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] <support@github.com> --- 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 217/243] 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 218/243] 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] <support@github.com> --- 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 <alexei.yuzhakov@webpros.com> Date: Mon, 8 Jul 2024 16:35:33 +0100 Subject: [PATCH 219/243] 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 "<title>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 220/243] 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 221/243] 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 222/243] 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 223/243] 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 224/243] 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 225/243] 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 226/243] 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 227/243] 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 228/243] 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 229/243] 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 230/243] 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 231/243] 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 232/243] 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 233/243] 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 234/243] 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 235/243] 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 236/243] 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 237/243] 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 238/243] 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 239/243] 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 240/243] 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 241/243] 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 242/243] 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 243/243] 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"/>