From ca7745fc9ad36cbc4563af497b162d23e5f45f46 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:36:48 +0100 Subject: [PATCH 1/7] [TASK] Simplify PHP CS Fixer command by removing redundant trailing periods --- Build/Scripts/runTests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index e8f2f11..0c21e46 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -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=$? From 8eb8e371f7601bb23c9dda05247d953258260cf4 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:36:59 +0100 Subject: [PATCH 2/7] [TASK] Remove unnecessary Php directory entry from .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index b95bdcc..e47c8b1 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,5 @@ composer.lock # Ignore testing stuff /.Build -/Resources/Private/Php /composer.json.orig /composer.json.testing From ba901d041329a614b58cc5619dc49b7056836f40 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:37:06 +0100 Subject: [PATCH 3/7] [TASK] Exclude Resources/Private/Php and Build directories from PHP CS Fixer configuration --- Build/cgl/.php-cs-fixer.dist.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Build/cgl/.php-cs-fixer.dist.php b/Build/cgl/.php-cs-fixer.dist.php index ec64ba4..5afb6a4 100644 --- a/Build/cgl/.php-cs-fixer.dist.php +++ b/Build/cgl/.php-cs-fixer.dist.php @@ -179,6 +179,8 @@ ->in([ __DIR__ . '/../..', ]) + ->exclude('Resources/Private/Php') + ->exclude('Build') ) ->setRiskyAllowed(true) ->setRules($mergedRules); From b0ca34325201a62eca2a1328e041b3ef08bd8676 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:37:13 +0100 Subject: [PATCH 4/7] [TASK] Add trailing commas for multi-line arrays and methods --- Classes/DataProvider/ServerDataProvider.php | 6 +++--- Classes/Hook/DataHandlerHook.php | 2 +- Classes/PasswordPolicy/Validator/PleskPasswordValidator.php | 2 +- Classes/Plesk/Site.php | 2 +- Classes/Widget/ServerWidget.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/DataProvider/ServerDataProvider.php b/Classes/DataProvider/ServerDataProvider.php index ec682f9..18dffc0 100644 --- a/Classes/DataProvider/ServerDataProvider.php +++ b/Classes/DataProvider/ServerDataProvider.php @@ -39,9 +39,9 @@ public function getLoginLink( $pleskClient->getPort(), $pleskClient->server()->createSession( $pleskServerRecord->get('username'), - $externalIpAddress + $externalIpAddress, ), - '/smb/web/view' + '/smb/web/view', ); } @@ -50,7 +50,7 @@ public function getLoginLink( '%s://%s:%d', $pleskClient->getProtocol() ?: 'https', $pleskClient->getHost(), - $pleskClient->getPort() + $pleskClient->getPort(), ); } } diff --git a/Classes/Hook/DataHandlerHook.php b/Classes/Hook/DataHandlerHook.php index 140508f..d211804 100644 --- a/Classes/Hook/DataHandlerHook.php +++ b/Classes/Hook/DataHandlerHook.php @@ -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; diff --git a/Classes/PasswordPolicy/Validator/PleskPasswordValidator.php b/Classes/PasswordPolicy/Validator/PleskPasswordValidator.php index 55b1dfb..62eef44 100644 --- a/Classes/PasswordPolicy/Validator/PleskPasswordValidator.php +++ b/Classes/PasswordPolicy/Validator/PleskPasswordValidator.php @@ -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; } diff --git a/Classes/Plesk/Site.php b/Classes/Plesk/Site.php index b78cbe7..6b032fa 100644 --- a/Classes/Plesk/Site.php +++ b/Classes/Plesk/Site.php @@ -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, ); } } diff --git a/Classes/Widget/ServerWidget.php b/Classes/Widget/ServerWidget.php index 217f23b..691d14a 100644 --- a/Classes/Widget/ServerWidget.php +++ b/Classes/Widget/ServerWidget.php @@ -110,7 +110,7 @@ protected function getButtonProvider( ButtonProvider::class, 'Login to Plesk', $this->dataProvider->getLoginLink($pleskClient, $pleskServerRecord, $externalIpAddress), - '_blank' + '_blank', ); } From d30c942b190f47ae349ce5702996efe28922e4ba Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:39:50 +0100 Subject: [PATCH 5/7] [TASK] Remove autoload-dev configuration from composer.json --- composer.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/composer.json b/composer.json index aa8c873..5060e30 100644 --- a/composer.json +++ b/composer.json @@ -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", From 068c15897a57177542f10e41f346887ef4bc06ba Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:40:31 +0100 Subject: [PATCH 6/7] [TASK] Add `readonly` keyword to widget classes and remove redundant readonly properties --- Classes/Widget/PhpWidget.php | 12 ++++++------ Classes/Widget/ServerWidget.php | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Classes/Widget/PhpWidget.php b/Classes/Widget/PhpWidget.php index 510dbcf..3cea34a 100644 --- a/Classes/Widget/PhpWidget.php +++ b/Classes/Widget/PhpWidget.php @@ -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 diff --git a/Classes/Widget/ServerWidget.php b/Classes/Widget/ServerWidget.php index 691d14a..37cb1ed 100644 --- a/Classes/Widget/ServerWidget.php +++ b/Classes/Widget/ServerWidget.php @@ -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 From 98f317ac38f0f857aa4583c9420b3d55985da7e5 Mon Sep 17 00:00:00 2001 From: Stefan Froemken Date: Sat, 21 Mar 2026 21:41:43 +0100 Subject: [PATCH 7/7] [TASK] Release version 4.0.0 and update TYPO3 and dashboard dependency constraints --- ext_emconf.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext_emconf.php b/ext_emconf.php index a53fa38..16c1b52 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -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' => [ ],