From bb1285c35cdd4e43529ee2d2582e8bb3de9992bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 28 May 2023 01:32:04 +0200 Subject: [PATCH] Remove defaultDescription from commands, as this is now part of the annotation --- src/Command/Attachments/CleanAttachmentsCommand.php | 2 -- src/Command/CheckRequirementsCommand.php | 2 -- src/Command/Currencies/UpdateExchangeRatesCommand.php | 2 -- src/Command/Logs/ShowEventLogCommand.php | 1 - src/Command/Migrations/ConvertBBCodeCommand.php | 2 -- src/Command/Migrations/ImportPartKeeprCommand.php | 2 -- src/Command/User/ConvertToSAMLUserCommand.php | 2 -- src/Command/User/SetPasswordCommand.php | 2 -- src/Command/User/UserEnableCommand.php | 2 -- src/Command/User/UserListCommand.php | 2 -- src/Command/VersionCommand.php | 2 -- 11 files changed, 21 deletions(-) diff --git a/src/Command/Attachments/CleanAttachmentsCommand.php b/src/Command/Attachments/CleanAttachmentsCommand.php index 6004a3eb..aa1750df 100644 --- a/src/Command/Attachments/CleanAttachmentsCommand.php +++ b/src/Command/Attachments/CleanAttachmentsCommand.php @@ -43,8 +43,6 @@ use const DIRECTORY_SEPARATOR; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:attachments:clean-unused|app:clean-attachments', 'Lists (and deletes if wanted) attachments files that are not used anymore (abandoned files).')] class CleanAttachmentsCommand extends Command { - protected static $defaultDescription = 'Lists (and deletes if wanted) attachments files that are not used anymore (abandoned files).'; - protected AttachmentManager $attachment_helper; protected AttachmentReverseSearch $reverseSearch; protected MimeTypes $mimeTypeGuesser; diff --git a/src/Command/CheckRequirementsCommand.php b/src/Command/CheckRequirementsCommand.php index 8bc4c62d..3d7f3a72 100644 --- a/src/Command/CheckRequirementsCommand.php +++ b/src/Command/CheckRequirementsCommand.php @@ -30,8 +30,6 @@ use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:check-requirements', 'Checks if the requirements Part-DB needs or recommends are fulfilled.')] class CheckRequirementsCommand extends Command { - protected static $defaultDescription = 'Checks if the requirements Part-DB needs or recommends are fulfilled.'; - protected ContainerBagInterface $params; public function __construct(ContainerBagInterface $params) diff --git a/src/Command/Currencies/UpdateExchangeRatesCommand.php b/src/Command/Currencies/UpdateExchangeRatesCommand.php index 092121b8..13d2e2dc 100644 --- a/src/Command/Currencies/UpdateExchangeRatesCommand.php +++ b/src/Command/Currencies/UpdateExchangeRatesCommand.php @@ -38,8 +38,6 @@ use function strlen; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:currencies:update-exchange-rates|partdb:update-exchange-rates|app:update-exchange-rates', 'Updates the currency exchange rates.')] class UpdateExchangeRatesCommand extends Command { - protected static $defaultDescription = 'Updates the currency exchange rates.'; - protected string $base_current; protected EntityManagerInterface $em; protected ExchangeRateUpdater $exchangeRateUpdater; diff --git a/src/Command/Logs/ShowEventLogCommand.php b/src/Command/Logs/ShowEventLogCommand.php index 6f560738..cc02bfd1 100644 --- a/src/Command/Logs/ShowEventLogCommand.php +++ b/src/Command/Logs/ShowEventLogCommand.php @@ -39,7 +39,6 @@ use Symfony\Contracts\Translation\TranslatorInterface; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:logs:show|app:show-logs', 'List the last event log entries.')] class ShowEventLogCommand extends Command { - protected static $defaultDescription = 'List the last event log entries.'; protected EntityManagerInterface $entityManager; protected TranslatorInterface $translator; protected ElementTypeNameGenerator $elementTypeNameGenerator; diff --git a/src/Command/Migrations/ConvertBBCodeCommand.php b/src/Command/Migrations/ConvertBBCodeCommand.php index 4ea3c2c0..f4565805 100644 --- a/src/Command/Migrations/ConvertBBCodeCommand.php +++ b/src/Command/Migrations/ConvertBBCodeCommand.php @@ -59,8 +59,6 @@ class ConvertBBCodeCommand extends Command */ protected const BBCODE_REGEX = '/\\[.+\\].*\\[\\/.+\\]/'; - protected static $defaultDescription = 'Converts BBCode used in old Part-DB versions to newly used Markdown'; - protected EntityManagerInterface $em; protected PropertyAccessorInterface $propertyAccessor; protected BBCodeToMarkdownConverter $converter; diff --git a/src/Command/Migrations/ImportPartKeeprCommand.php b/src/Command/Migrations/ImportPartKeeprCommand.php index b325ca9e..d2c015b9 100644 --- a/src/Command/Migrations/ImportPartKeeprCommand.php +++ b/src/Command/Migrations/ImportPartKeeprCommand.php @@ -37,8 +37,6 @@ use Symfony\Component\Console\Style\SymfonyStyle; class ImportPartKeeprCommand extends Command { - protected static $defaultDescription = 'Import a PartKeepr database XML dump into Part-DB'; - protected EntityManagerInterface $em; protected MySQLDumpXMLConverter $xml_converter; protected PKDatastructureImporter $datastructureImporter; diff --git a/src/Command/User/ConvertToSAMLUserCommand.php b/src/Command/User/ConvertToSAMLUserCommand.php index 2144dc85..635c9eb3 100644 --- a/src/Command/User/ConvertToSAMLUserCommand.php +++ b/src/Command/User/ConvertToSAMLUserCommand.php @@ -33,8 +33,6 @@ use Symfony\Component\Console\Style\SymfonyStyle; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:user:convert-to-saml-user|partdb:users:convert-to-saml-user', 'Converts a local user to a SAML user (and vice versa)')] class ConvertToSAMLUserCommand extends Command { - protected static $defaultDescription = 'Converts a local user to a SAML user (and vice versa)'; - protected EntityManagerInterface $entityManager; protected bool $saml_enabled; diff --git a/src/Command/User/SetPasswordCommand.php b/src/Command/User/SetPasswordCommand.php index a1f3d0b9..4a7542e3 100644 --- a/src/Command/User/SetPasswordCommand.php +++ b/src/Command/User/SetPasswordCommand.php @@ -37,8 +37,6 @@ use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:users:set-password|app:set-password|users:set-password|partdb:user:set-password', 'Sets the password of a user')] class SetPasswordCommand extends Command { - protected static $defaultDescription = 'Sets the password of a user'; - protected EntityManagerInterface $entityManager; protected UserPasswordHasherInterface $encoder; protected EventDispatcherInterface $eventDispatcher; diff --git a/src/Command/User/UserEnableCommand.php b/src/Command/User/UserEnableCommand.php index daae874c..1a4063cd 100644 --- a/src/Command/User/UserEnableCommand.php +++ b/src/Command/User/UserEnableCommand.php @@ -32,8 +32,6 @@ use Symfony\Component\Console\Style\SymfonyStyle; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:users:enable|partdb:user:enable', 'Enables/Disable the login of one or more users')] class UserEnableCommand extends Command { - protected static $defaultDescription = 'Enables/Disable the login of one or more users'; - protected EntityManagerInterface $entityManager; public function __construct(EntityManagerInterface $entityManager, string $name = null) diff --git a/src/Command/User/UserListCommand.php b/src/Command/User/UserListCommand.php index ca8f5364..351c679d 100644 --- a/src/Command/User/UserListCommand.php +++ b/src/Command/User/UserListCommand.php @@ -31,8 +31,6 @@ use Symfony\Component\Console\Style\SymfonyStyle; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:users:list|users:list', 'Lists all users')] class UserListCommand extends Command { - protected static $defaultDescription = 'Lists all users'; - protected EntityManagerInterface $entityManager; public function __construct(EntityManagerInterface $entityManager) diff --git a/src/Command/VersionCommand.php b/src/Command/VersionCommand.php index 0e0408e7..d6a27ae2 100644 --- a/src/Command/VersionCommand.php +++ b/src/Command/VersionCommand.php @@ -30,8 +30,6 @@ use Symfony\Component\Console\Style\SymfonyStyle; #[\Symfony\Component\Console\Attribute\AsCommand('partdb:version|app:version', 'Shows the currently installed version of Part-DB.')] class VersionCommand extends Command { - protected static $defaultDescription = 'Shows the currently installed version of Part-DB.'; - protected VersionManagerInterface $versionManager; protected GitVersionInfo $gitVersionInfo;