Skip to content

Commit

Permalink
Merge pull request #29 from Xelon-AG/main
Browse files Browse the repository at this point in the history
main to dev
  • Loading branch information
tonkoshkurik committed Sep 29, 2023
2 parents bc7c85b + fa0f439 commit d0c2c2e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.3
uses: dependabot/fetch-metadata@v1.5.1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@0.1.0
uses: aglipanci/laravel-pint-action@1.0.0

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
}
],
"require": {
"php": "^7.4",
"php": "^7.4|^8.0|^8.1|^8.2",
"spatie/laravel-package-tools": "^1.9.2",
"illuminate/contracts": "^8.83.20",
"illuminate/contracts": "^8.0|^9.0|^10.0",
"guzzlehttp/guzzle": "^7.0.1",
"ext-soap": "*"
},
"require-dev": {
"nunomaduro/collision": "^5.0",
"nunomaduro/collision": "^6.1",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"phpstan/extension-installer": "^1.1",
Expand Down
8 changes: 4 additions & 4 deletions src/Requests/SoapRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function request(string $method, array $requestBody, bool $withXMLAttribu
'SOAP REQUEST SUCCESS:'.
"\nSOAP method: ".$method.
$this->soapClient->__getLastRequest()
? "\nSOAP request start***".$this->soapClient->__getLastRequest().'***SOAP request end'
? "\nSOAP request start***".preg_replace('#<password>.+</password>#', '<password>*****</password>', $this->soapClient->__getLastRequest()).'***SOAP request end'
: ''
);
}
Expand Down Expand Up @@ -73,10 +73,10 @@ public function request(string $method, array $requestBody, bool $withXMLAttribu
}

$message = "SOAP REQUEST FAILED:\nMessage: ".$exception->getMessage().
"\nSOAP method: ".$method.
(
"\nSOAP method: ".$method.
(
$this->soapClient->__getLastRequest()
? "\nSOAP request start***".$this->soapClient->__getLastRequest().'***SOAP request end'
? "\nSOAP request start***".preg_replace('#<password>.+</password>#', '<password>*****</password>', $this->soapClient->__getLastRequest()).'***SOAP request end'
: ''
).(
$this->soapClient->__getLastResponse()
Expand Down
14 changes: 7 additions & 7 deletions src/Traits/Soap/SoapImportApis.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function importVApp(string $resourcePoolId, $entityConfig, $instantiation
$extraConfig = [];
if (isset($configSpec->extraConfig)) {
// sometimes there is only one level of nesting
if (property_exists($configSpec->extraConfig, 'key')) {
if (!is_array($configSpec->extraConfig) && property_exists($configSpec->extraConfig, 'key')) {
$extraConfig['key'] = $configSpec->extraConfig->key;
$extraConfig['value:string'] = $configSpec->extraConfig->value->_value ?? '';
// but sometimes there are several
Expand Down Expand Up @@ -115,14 +115,14 @@ public function importVApp(string $resourcePoolId, $entityConfig, $instantiation
'version' => $configSpec->version ?? null,
'uuid' => $configSpec->uuid ?? null,
'guestId' => $configSpec->guestId ?? null,
'files' => $configSpec->files ? new VirtualMachineFileInfo([
'files' => isset($configSpec->files) ? new VirtualMachineFileInfo([
'vmPathName' => $configSpec->files->vmPathName ?? null,
'snapshotDirectory' => $configSpec->files->snapshotDirectory ?? null,
'suspendDirectory' => $configSpec->files->suspendDirectory ?? null,
'logDirectory' => $configSpec->files->logDirectory ?? null,
'ftMetadataDirectory' => $configSpec->files->ftMetadataDirectory ?? null,
]) : null,
'tools' => $configSpec->tools ? new ToolsConfigInfo([
'tools' => isset($configSpec->tools) ? new ToolsConfigInfo([
'toolsVersion' => $configSpec->tools->toolsVersion ?? null,
'toolsInstallType' => $configSpec->tools->toolsInstallType ?? null,
'afterPowerOn' => $configSpec->tools->afterPowerOn ?? null,
Expand All @@ -138,7 +138,7 @@ public function importVApp(string $resourcePoolId, $entityConfig, $instantiation
'lastInstallInfo' => $configSpec->tools->lastInstallInfo ?? null,

]) : null,
'flags' => $configSpec->flags ? new VirtualMachineFlagInfo([
'flags' => isset($configSpec->flags) ? new VirtualMachineFlagInfo([
'disableAcceleration' => $configSpec->flags->disableAcceleration ?? null,
'enableLogging' => $configSpec->flags->enableLogging ?? null,
'useToe' => $configSpec->flags->useToe ?? null,
Expand Down Expand Up @@ -176,7 +176,7 @@ public function importVApp(string $resourcePoolId, $entityConfig, $instantiation
] : null,
] : null,
'extraConfig' => \count($extraConfig) > 0 ? $extraConfig : null,
'bootOptions' => $configSpec->bootOptions ? [
'bootOptions' => isset($configSpec->bootOptions) ? [
'bootDelay' => $configSpec->bootOptions->bootDelay ?? null,
'enterBIOSSetup' => $configSpec->bootOptions->enterBIOSSetup ?? null,
'efiSecureBootEnabled' => $configSpec->bootOptions->efiSecureBootEnabled,
Expand All @@ -186,7 +186,7 @@ public function importVApp(string $resourcePoolId, $entityConfig, $instantiation
'networkBootProtocol' => $configSpec->bootOptions->networkBootProtocol ?? null,
] : null,
'vAppConfig' => [
'product' => $configSpec->vAppConfig->product ? [
'product' => isset($configSpec->vAppConfig->product) ? [
'operation' => $configSpec->vAppConfig->product->operation ?? null,
'info' => $configSpec->vAppConfig->product->info ? [
'key' => $configSpec->vAppConfig->product->info->key ?? null,
Expand All @@ -206,7 +206,7 @@ public function importVApp(string $resourcePoolId, $entityConfig, $instantiation
],
'firmware' => $configSpec->firmware ?? null,
'nestedHVEnabled' => $configSpec->nestedHVEnabled ?? null,
'sgxInfo' => $configSpec->sgxInfo ? [
'sgxInfo' => isset($configSpec->sgxInfo) ? [
'epcSize' => $configSpec->sgxInfo->epcSize ?? null,
'flcMode' => $configSpec->sgxInfo->flcMode ?? null,
'lePubKeyHash' => $configSpec->sgxInfo->lePubKeyHash ?? null,
Expand Down
8 changes: 8 additions & 0 deletions src/Types/VirtualFloppyRemoteDeviceBackingInfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Xelon\VmWareClient\Types;

class VirtualFloppyRemoteDeviceBackingInfo extends VirtualDeviceRemoteDeviceBackingInfo
{

}

0 comments on commit d0c2c2e

Please sign in to comment.