Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,5 @@ composer.lock

# Ignore testing stuff
/.Build
/Resources/Private/Php
/composer.json.orig
/composer.json.testing
4 changes: 2 additions & 2 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ fi
case ${TEST_SUITE} in
cgl)
if [ "${CGLCHECK_DRY_RUN}" -eq 1 ]; then
COMMAND="php -dxdebug.mode=off .Build/bin/php-cs-fixer fix -v --dry-run --diff --config=Build/cgl/.php-cs-fixer.dist.php --using-cache=no ."
COMMAND="php -dxdebug.mode=off .Build/bin/php-cs-fixer fix -v --dry-run --diff --config=Build/cgl/.php-cs-fixer.dist.php --using-cache=no"
else
COMMAND="php -dxdebug.mode=off .Build/bin/php-cs-fixer fix -v --config=Build/cgl/.php-cs-fixer.dist.php --using-cache=no ."
COMMAND="php -dxdebug.mode=off .Build/bin/php-cs-fixer fix -v --config=Build/cgl/.php-cs-fixer.dist.php --using-cache=no"
fi
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name cgl-${SUFFIX} -e COMPOSER_CACHE_DIR=.Build/.cache/composer -e COMPOSER_ROOT_VERSION=${COMPOSER_ROOT_VERSION} ${IMAGE_PHP} /bin/sh -c "${COMMAND}"
SUITE_EXIT_CODE=$?
Expand Down
2 changes: 2 additions & 0 deletions Build/cgl/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
->in([
__DIR__ . '/../..',
])
->exclude('Resources/Private/Php')
->exclude('Build')
)
->setRiskyAllowed(true)
->setRules($mergedRules);
6 changes: 3 additions & 3 deletions Classes/DataProvider/ServerDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public function getLoginLink(
$pleskClient->getPort(),
$pleskClient->server()->createSession(
$pleskServerRecord->get('username'),
$externalIpAddress
$externalIpAddress,
),
'/smb/web/view'
'/smb/web/view',
);
}

Expand All @@ -50,7 +50,7 @@ public function getLoginLink(
'%s://%s:%d',
$pleskClient->getProtocol() ?: 'https',
$pleskClient->getHost(),
$pleskClient->getPort()
$pleskClient->getPort(),
);
}
}
2 changes: 1 addition & 1 deletion Classes/Hook/DataHandlerHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function processDatamap_preProcessFieldArray(
array &$incomingFieldArray,
string $table,
int|string $id,
DataHandler $dataHandler
DataHandler $dataHandler,
): void {
if ($table !== self::TABLE || !isset($incomingFieldArray['password'])) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function validate(string $password, ?ContextData $contextData = null): bo
sprintf(
$lang->sL('plesk_widget.password_policy:error.maximumLength'),
self::MAX_PASSWORD_LENGTH,
)
),
);
$isValid = false;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Plesk/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getHosting(): ?Hosting

return new Hosting(
$response->data->hosting->vrt_hst->ip_address,
$response->data->hosting->vrt_hst->property
$response->data->hosting->vrt_hst->property,
);
}
}
12 changes: 6 additions & 6 deletions Classes/Widget/PhpWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
use TYPO3\CMS\Dashboard\Widgets\WidgetRendererInterface;
use TYPO3\CMS\Dashboard\Widgets\WidgetResult;

class PhpWidget implements WidgetRendererInterface
readonly class PhpWidget implements WidgetRendererInterface
{
public function __construct(
private readonly WidgetConfigurationInterface $configuration,
private readonly BackendViewFactory $backendViewFactory,
private readonly PleskServerRecordService $pleskServerRecordService,
private readonly PleskClientFactory $pleskClientFactory,
private readonly PleskSiteService $pleskSiteService,
private WidgetConfigurationInterface $configuration,
private BackendViewFactory $backendViewFactory,
private PleskServerRecordService $pleskServerRecordService,
private PleskClientFactory $pleskClientFactory,
private PleskSiteService $pleskSiteService,
) {}

public function getSettingsDefinitions(): array
Expand Down
16 changes: 8 additions & 8 deletions Classes/Widget/ServerWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
use TYPO3\CMS\Dashboard\Widgets\WidgetRendererInterface;
use TYPO3\CMS\Dashboard\Widgets\WidgetResult;

class ServerWidget implements WidgetRendererInterface
readonly class ServerWidget implements WidgetRendererInterface
{
public function __construct(
private readonly WidgetConfigurationInterface $configuration,
private readonly BackendViewFactory $backendViewFactory,
private readonly PleskServerRecordService $pleskServerRecordService,
private readonly ServerDataProvider $dataProvider,
private readonly PleskClientFactory $pleskClientFactory,
private readonly PleskSiteService $pleskSiteService,
private WidgetConfigurationInterface $configuration,
private BackendViewFactory $backendViewFactory,
private PleskServerRecordService $pleskServerRecordService,
private ServerDataProvider $dataProvider,
private PleskClientFactory $pleskClientFactory,
private PleskSiteService $pleskSiteService,
) {}

public function getSettingsDefinitions(): array
Expand Down Expand Up @@ -110,7 +110,7 @@ protected function getButtonProvider(
ButtonProvider::class,
'Login to Plesk',
$this->dataProvider->getLoginLink($pleskClient, $pleskServerRecord, $externalIpAddress),
'_blank'
'_blank',
);
}

Expand Down
5 changes: 0 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
"PleskX\\": "Resources/Private/Php/plesk/api-php-lib/src"
}
},
"autoload-dev": {
"psr-4": {
"StefanFroemken\\PleskWidget\\Tests\\": "Tests"
}
},
"config": {
"sort-packages": true,
"vendor-dir": ".Build/vendor",
Expand Down
6 changes: 3 additions & 3 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
'author_company' => '',
'state' => 'stable',
'clearCacheOnLoad' => 0,
'version' => '3.0.1',
'version' => '4.0.0',
'constraints' => [
'depends' => [
'typo3' => '14.1.0-14.4.99',
'dashboard' => '14.1.0-14.4.99',
'typo3' => '14.0.0-14.4.99',
'dashboard' => '14.0.0-14.4.99',
],
'conflicts' => [
],
Expand Down
Loading