diff --git a/app/Console/Commands/Correction/CorrectDatabase.php b/app/Console/Commands/Correction/CorrectDatabase.php index 7fbc9ca843..d2e88f4725 100644 --- a/app/Console/Commands/Correction/CorrectDatabase.php +++ b/app/Console/Commands/Correction/CorrectDatabase.php @@ -83,8 +83,6 @@ class CorrectDatabase extends Command echo $result; } - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } } diff --git a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php index 549ce7c551..d4cca5e04e 100644 --- a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php +++ b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php @@ -77,8 +77,6 @@ class CorrectOpeningBalanceCurrencies extends Command $this->info('There was nothing to fix in the opening balance transactions.'); } - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Correction/CreateAccessTokens.php b/app/Console/Commands/Correction/CreateAccessTokens.php index 6bed48674a..9dd515c17a 100644 --- a/app/Console/Commands/Correction/CreateAccessTokens.php +++ b/app/Console/Commands/Correction/CreateAccessTokens.php @@ -78,8 +78,6 @@ class CreateAccessTokens extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verify access tokens in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } } diff --git a/app/Console/Commands/Correction/CreateLinkTypes.php b/app/Console/Commands/Correction/CreateLinkTypes.php index 20a70d033d..0bdf1d924d 100644 --- a/app/Console/Commands/Correction/CreateLinkTypes.php +++ b/app/Console/Commands/Correction/CreateLinkTypes.php @@ -79,8 +79,6 @@ class CreateLinkTypes extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified link types in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } } diff --git a/app/Console/Commands/Correction/DeleteEmptyGroups.php b/app/Console/Commands/Correction/DeleteEmptyGroups.php index 3204156c11..41e05013d3 100644 --- a/app/Console/Commands/Correction/DeleteEmptyGroups.php +++ b/app/Console/Commands/Correction/DeleteEmptyGroups.php @@ -76,8 +76,6 @@ class DeleteEmptyGroups extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified empty groups in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } } diff --git a/app/Console/Commands/Correction/DeleteEmptyJournals.php b/app/Console/Commands/Correction/DeleteEmptyJournals.php index a2f1e7bc23..93d77eb81e 100644 --- a/app/Console/Commands/Correction/DeleteEmptyJournals.php +++ b/app/Console/Commands/Correction/DeleteEmptyJournals.php @@ -58,8 +58,6 @@ class DeleteEmptyJournals extends Command $this->deleteUnevenJournals(); $this->deleteEmptyJournals(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php index fa47758318..c95007b60f 100644 --- a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php +++ b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php @@ -62,7 +62,6 @@ class DeleteOrphanedTransactions extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified orphans in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Correction/DeleteZeroAmount.php b/app/Console/Commands/Correction/DeleteZeroAmount.php index 71eb8907d6..f96b426eee 100644 --- a/app/Console/Commands/Correction/DeleteZeroAmount.php +++ b/app/Console/Commands/Correction/DeleteZeroAmount.php @@ -78,8 +78,6 @@ class DeleteZeroAmount extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified zero-amount integrity in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } } diff --git a/app/Console/Commands/Correction/EnableCurrencies.php b/app/Console/Commands/Correction/EnableCurrencies.php index 09d0729aed..502d1be977 100644 --- a/app/Console/Commands/Correction/EnableCurrencies.php +++ b/app/Console/Commands/Correction/EnableCurrencies.php @@ -101,8 +101,6 @@ class EnableCurrencies extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified currencies in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } } diff --git a/app/Console/Commands/Correction/FixAccountTypes.php b/app/Console/Commands/Correction/FixAccountTypes.php index 92d01fde71..8b6bd26d8e 100644 --- a/app/Console/Commands/Correction/FixAccountTypes.php +++ b/app/Console/Commands/Correction/FixAccountTypes.php @@ -106,7 +106,6 @@ class FixAccountTypes extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verifying account types took %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Correction/FixLongDescriptions.php b/app/Console/Commands/Correction/FixLongDescriptions.php index 5bc1177a8c..ec93912784 100644 --- a/app/Console/Commands/Correction/FixLongDescriptions.php +++ b/app/Console/Commands/Correction/FixLongDescriptions.php @@ -75,7 +75,6 @@ class FixLongDescriptions extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified all transaction group and journal title lengths in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } } diff --git a/app/Console/Commands/Correction/FixPiggies.php b/app/Console/Commands/Correction/FixPiggies.php index 01c2ef15c4..14243e1aa2 100644 --- a/app/Console/Commands/Correction/FixPiggies.php +++ b/app/Console/Commands/Correction/FixPiggies.php @@ -98,7 +98,6 @@ class FixPiggies extends Command $end = round(microtime(true) - $start, 2); $this->line(sprintf('Verified the content of %d piggy bank events in %s seconds.', $set->count(), $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } } diff --git a/app/Console/Commands/Correction/FixRecurringTransactions.php b/app/Console/Commands/Correction/FixRecurringTransactions.php index 45c45bbe1c..318fee0304 100644 --- a/app/Console/Commands/Correction/FixRecurringTransactions.php +++ b/app/Console/Commands/Correction/FixRecurringTransactions.php @@ -67,7 +67,6 @@ class FixRecurringTransactions extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Corrected recurring transactions %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Correction/FixUnevenAmount.php b/app/Console/Commands/Correction/FixUnevenAmount.php index 78c1978ff5..d545d2f11e 100644 --- a/app/Console/Commands/Correction/FixUnevenAmount.php +++ b/app/Console/Commands/Correction/FixUnevenAmount.php @@ -75,7 +75,6 @@ class FixUnevenAmount extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified amount integrity in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Correction/RemoveBills.php b/app/Console/Commands/Correction/RemoveBills.php index 5cc116a79b..4966c1887a 100644 --- a/app/Console/Commands/Correction/RemoveBills.php +++ b/app/Console/Commands/Correction/RemoveBills.php @@ -71,7 +71,6 @@ class RemoveBills extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified bills / journals in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } } diff --git a/app/Console/Commands/Correction/RenameMetaFields.php b/app/Console/Commands/Correction/RenameMetaFields.php index a7252c52fb..0b1adad4f5 100644 --- a/app/Console/Commands/Correction/RenameMetaFields.php +++ b/app/Console/Commands/Correction/RenameMetaFields.php @@ -83,7 +83,6 @@ class RenameMetaFields extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Renamed meta fields in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Correction/TransferBudgets.php b/app/Console/Commands/Correction/TransferBudgets.php index 33f46b501c..38b8a5684e 100644 --- a/app/Console/Commands/Correction/TransferBudgets.php +++ b/app/Console/Commands/Correction/TransferBudgets.php @@ -74,7 +74,6 @@ class TransferBudgets extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified budget/journals in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } } diff --git a/app/Console/Commands/DecryptDatabase.php b/app/Console/Commands/DecryptDatabase.php index 8c1ebe7bed..e1f48cc388 100644 --- a/app/Console/Commands/DecryptDatabase.php +++ b/app/Console/Commands/DecryptDatabase.php @@ -123,7 +123,6 @@ class DecryptDatabase extends Command } $this->info('Done!'); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Import/CreateCSVImport.php b/app/Console/Commands/Import/CreateCSVImport.php index ab717fe393..3da93f17d8 100644 --- a/app/Console/Commands/Import/CreateCSVImport.php +++ b/app/Console/Commands/Import/CreateCSVImport.php @@ -63,279 +63,14 @@ class CreateCSVImport extends Command {configuration? : The configuration file to use for the import.} {--user=1 : The user ID that the import should import for.} {--token= : The user\'s access token.}'; - /** @var ImportJob */ - private $importJob; - /** @var ImportJobRepositoryInterface */ - private $importRepository; - /** @var UserRepositoryInterface */ - private $userRepository; - /** * Run the command. */ public function handle(): int { - $this->stupidLaravel(); - // @codeCoverageIgnoreStart - if (!$this->verifyAccessToken()) { - $this->errorLine('Invalid access token.'); - - return 1; - } - - if (!$this->validArguments()) { - $this->errorLine('Invalid arguments.'); - - return 1; - } - // @codeCoverageIgnoreEnd - /** @var User $user */ - $user = $this->userRepository->findNull((int) $this->option('user')); - $file = (string) $this->argument('file'); - $configuration = (string) $this->argument('configuration'); - - $this->importRepository->setUser($user); - - $configurationData = json_decode(file_get_contents($configuration), true, 512, JSON_THROW_ON_ERROR); - $this->importJob = $this->importRepository->create('file'); - - - // inform user (and log it) - $this->infoLine(sprintf('Import file : %s', $file)); - $this->infoLine(sprintf('Configuration file : %s', $configuration)); - $this->infoLine(sprintf('User : #%d (%s)', $user->id, $user->email)); - $this->infoLine(sprintf('Job : %s', $this->importJob->key)); - - try { - $this->storeFile($file); - } catch (FireflyException $e) { - $this->errorLine($e->getMessage()); - - return 1; - } - - // job is ready to go - $this->importRepository->setConfiguration($this->importJob, $configurationData); - $this->importRepository->setStatus($this->importJob, 'ready_to_run'); - - $this->infoLine('The import routine has started. The process is not visible. Please wait.'); - Log::debug('Go for import!'); - - - // keep repeating this call until job lands on "provider_finished" - try { - $this->processFile(); - } catch (FireflyException $e) { - $this->errorLine($e->getMessage()); - - app('telemetry')->feature('system.command.errored', $this->signature); - return 1; - } - - // then store data: - try { - $this->storeData(); - } catch (FireflyException $e) { - $this->errorLine($e->getMessage()); - - app('telemetry')->feature('system.command.errored', $this->signature); - return 1; - } - - // give feedback: - $this->giveFeedback(); - - // clear cache for user: - app('preferences')->setForUser($user, 'lastActivity', microtime()); - - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; + $this->error('This command is disabled.'); + return 1; } - /** - * @param string $message - * @param array|null $data - * - * @codeCoverageIgnore - */ - private function errorLine(string $message, array $data = null): void - { - Log::error($message, $data ?? []); - $this->error($message); - } - - /** - * - */ - private function giveFeedback(): void - { - $this->infoLine('Job has finished.'); - - - if (null !== $this->importJob->tag) { - $this->infoLine(sprintf('%d transaction(s) have been imported.', $this->importJob->tag->transactionJournals->count())); - $this->infoLine(sprintf('You can find your transactions under tag "%s"', $this->importJob->tag->tag)); - } - - if (null === $this->importJob->tag) { - $this->errorLine('No transactions have been imported :(.'); - } - if (count($this->importJob->errors) > 0) { - $this->infoLine(sprintf('%d error(s) occurred:', count($this->importJob->errors))); - foreach ($this->importJob->errors as $err) { - $this->errorLine('- ' . $err); - } - } - } - - /** - * @param string $message - * @param array $data - * - * @codeCoverageIgnore - */ - private function infoLine(string $message, array $data = null): void - { - Log::info($message, $data ?? []); - $this->line($message); - } - - /** - * Keep repeating import call until job lands on "provider_finished". - * - * @throws FireflyException - */ - private function processFile(): void - { - $className = config('import.routine.file'); - $valid = ['provider_finished']; - $count = 0; - - while (!in_array($this->importJob->status, $valid, true) && $count < 6) { - Log::debug(sprintf('Now in loop #%d.', $count + 1)); - /** @var RoutineInterface $routine */ - $routine = app($className); - $routine->setImportJob($this->importJob); - try { - $routine->run(); - } catch (FireflyException|Exception $e) { - $message = 'The import routine crashed: ' . $e->getMessage(); - Log::error($message); - Log::error($e->getTraceAsString()); - - // set job errored out: - $this->importRepository->setStatus($this->importJob, 'error'); - throw new FireflyException($message); - } - $count++; - } - $this->importRepository->setStatus($this->importJob, 'provider_finished'); - $this->importJob->status = 'provider_finished'; - } - - /** - * - * @throws FireflyException - */ - private function storeData(): void - { - if ('provider_finished' === $this->importJob->status) { - $this->infoLine('Import has finished. Please wait for storage of data.'); - // set job to be storing data: - $this->importRepository->setStatus($this->importJob, 'storing_data'); - - /** @var ImportArrayStorage $storage */ - $storage = app(ImportArrayStorage::class); - $storage->setImportJob($this->importJob); - - try { - $storage->store(); - } catch (FireflyException|Exception $e) { - $message = 'The import routine crashed: ' . $e->getMessage(); - Log::error($message); - Log::error($e->getTraceAsString()); - - // set job errored out: - $this->importRepository->setStatus($this->importJob, 'error'); - throw new FireflyException($message); - - } - // set storage to be finished: - $this->importRepository->setStatus($this->importJob, 'storage_finished'); - } - } - - /** - * Store the supplied file as an attachment to this job. - * - * @param string $file - * - * @throws FireflyException - */ - private function storeFile(string $file): void - { - // store file as attachment. - if ('' !== $file) { - $messages = $this->importRepository->storeCLIUpload($this->importJob, 'import_file', $file); - if ($messages->count() > 0) { - throw new FireflyException($messages->first()); - } - } - } - - /** - * Laravel will execute ALL __construct() methods for ALL commands whenever a SINGLE command is - * executed. This leads to noticeable slow-downs and class calls. To prevent this, this method should - * be called from the handle method instead of using the constructor to initialize the command. - * - * @codeCoverageIgnore - */ - private function stupidLaravel(): void - { - $this->userRepository = app(UserRepositoryInterface::class); - $this->importRepository = app(ImportJobRepositoryInterface::class); - } - - /** - * Verify user inserts correct arguments. - * - * @noinspection MultipleReturnStatementsInspection - * @return bool - * @codeCoverageIgnore - */ - private function validArguments(): bool - { - $file = (string) $this->argument('file'); - $configuration = (string) $this->argument('configuration'); - $cwd = getcwd(); - $enabled = (bool) config('import.enabled.file'); - - if (false === $enabled) { - $this->errorLine('CSV Provider is not enabled.'); - - return false; - } - - if (!file_exists($file)) { - $this->errorLine(sprintf('Firefly III cannot find file "%s" (working directory: "%s").', $file, $cwd)); - - return false; - } - - if (!file_exists($configuration)) { - $this->errorLine(sprintf('Firefly III cannot find configuration file "%s" (working directory: "%s").', $configuration, $cwd)); - - return false; - } - - $configurationData = json_decode(file_get_contents($configuration), true, 512, JSON_THROW_ON_ERROR); - if (null === $configurationData) { - $this->errorLine(sprintf('Firefly III cannot read the contents of configuration file "%s" (working directory: "%s").', $configuration, $cwd)); - - return false; - } - - return true; - } } diff --git a/app/Console/Commands/Integrity/ReportEmptyObjects.php b/app/Console/Commands/Integrity/ReportEmptyObjects.php index e1c5387a42..4cca37288b 100644 --- a/app/Console/Commands/Integrity/ReportEmptyObjects.php +++ b/app/Console/Commands/Integrity/ReportEmptyObjects.php @@ -64,7 +64,6 @@ class ReportEmptyObjects extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Report on empty objects finished in %s seconds', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Integrity/ReportIntegrity.php b/app/Console/Commands/Integrity/ReportIntegrity.php index 8982fa77c6..62e45ed110 100644 --- a/app/Console/Commands/Integrity/ReportIntegrity.php +++ b/app/Console/Commands/Integrity/ReportIntegrity.php @@ -69,7 +69,6 @@ class ReportIntegrity extends Command echo $result; } - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } } diff --git a/app/Console/Commands/Integrity/ReportSum.php b/app/Console/Commands/Integrity/ReportSum.php index 3273db6d7c..2f24e1f00a 100644 --- a/app/Console/Commands/Integrity/ReportSum.php +++ b/app/Console/Commands/Integrity/ReportSum.php @@ -54,7 +54,6 @@ class ReportSum extends Command { $this->reportSum(); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Integrity/RestoreOAuthKeys.php b/app/Console/Commands/Integrity/RestoreOAuthKeys.php index 81b2858648..6efce94e4d 100644 --- a/app/Console/Commands/Integrity/RestoreOAuthKeys.php +++ b/app/Console/Commands/Integrity/RestoreOAuthKeys.php @@ -53,7 +53,6 @@ class RestoreOAuthKeys extends Command { $this->restoreOAuthKeys(); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php index fad3ae3606..f8bfc1410d 100644 --- a/app/Console/Commands/Upgrade/AccountCurrencies.php +++ b/app/Console/Commands/Upgrade/AccountCurrencies.php @@ -87,7 +87,6 @@ class AccountCurrencies extends Command $this->info(sprintf('Verified and fixed account currencies in %s seconds.', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/BackToJournals.php b/app/Console/Commands/Upgrade/BackToJournals.php index d251a1c5c7..bc6a2aead2 100644 --- a/app/Console/Commands/Upgrade/BackToJournals.php +++ b/app/Console/Commands/Upgrade/BackToJournals.php @@ -78,8 +78,6 @@ class BackToJournals extends Command $this->info(sprintf('Updated category and budget info for all transaction journals in %s seconds.', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php index cc2d16b875..990b02bbf8 100644 --- a/app/Console/Commands/Upgrade/BudgetLimitCurrency.php +++ b/app/Console/Commands/Upgrade/BudgetLimitCurrency.php @@ -92,8 +92,6 @@ class BudgetLimitCurrency extends Command $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/CCLiabilities.php b/app/Console/Commands/Upgrade/CCLiabilities.php index b65358f51c..e5904a7198 100644 --- a/app/Console/Commands/Upgrade/CCLiabilities.php +++ b/app/Console/Commands/Upgrade/CCLiabilities.php @@ -91,8 +91,6 @@ class CCLiabilities extends Command $this->info(sprintf('Verified credit card liabilities in %s seconds', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/MigrateAttachments.php b/app/Console/Commands/Upgrade/MigrateAttachments.php index 1f85089312..9e2270d7d2 100644 --- a/app/Console/Commands/Upgrade/MigrateAttachments.php +++ b/app/Console/Commands/Upgrade/MigrateAttachments.php @@ -101,8 +101,6 @@ class MigrateAttachments extends Command $this->info(sprintf('Migrated attachment notes in %s seconds.', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php index 65531ca217..a234c2948f 100644 --- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php +++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php @@ -100,8 +100,6 @@ class MigrateJournalNotes extends Command $this->info(sprintf('Migrated notes in %s seconds.', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php index f0d0b1f581..bad0d6f1a2 100644 --- a/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php +++ b/app/Console/Commands/Upgrade/MigrateRecurrenceMeta.php @@ -72,8 +72,6 @@ class MigrateRecurrenceMeta extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Migrated recurrence meta data in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/MigrateTagLocations.php b/app/Console/Commands/Upgrade/MigrateTagLocations.php index b490e10106..e5009a60a0 100644 --- a/app/Console/Commands/Upgrade/MigrateTagLocations.php +++ b/app/Console/Commands/Upgrade/MigrateTagLocations.php @@ -65,7 +65,6 @@ class MigrateTagLocations extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Migrated tag locations in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php index 21034ae085..29a922cad3 100644 --- a/app/Console/Commands/Upgrade/MigrateToGroups.php +++ b/app/Console/Commands/Upgrade/MigrateToGroups.php @@ -112,8 +112,6 @@ class MigrateToGroups extends Command $this->markAsMigrated(); - app('telemetry')->feature('system.command.executed', $this->signature); - return 0; } diff --git a/app/Console/Commands/Upgrade/MigrateToRules.php b/app/Console/Commands/Upgrade/MigrateToRules.php index 142c66bc0d..d751ffa7cd 100644 --- a/app/Console/Commands/Upgrade/MigrateToRules.php +++ b/app/Console/Commands/Upgrade/MigrateToRules.php @@ -99,7 +99,6 @@ class MigrateToRules extends Command $this->info(sprintf('Verified and fixed bills in %s seconds.', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php index f3ef6b17ae..d021e088ff 100644 --- a/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php @@ -90,7 +90,6 @@ class OtherCurrenciesCorrections extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified and fixed transaction currencies in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/RenameAccountMeta.php b/app/Console/Commands/Upgrade/RenameAccountMeta.php index d4e30e143d..6a6e369a8d 100644 --- a/app/Console/Commands/Upgrade/RenameAccountMeta.php +++ b/app/Console/Commands/Upgrade/RenameAccountMeta.php @@ -91,7 +91,6 @@ class RenameAccountMeta extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Fixed account meta data in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php index 8cf874f217..a60db0b924 100644 --- a/app/Console/Commands/Upgrade/TransactionIdentifier.php +++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php @@ -101,7 +101,6 @@ class TransactionIdentifier extends Command $this->info(sprintf('Verified and fixed transaction identifiers in %s seconds.', $end)); $this->markAsExecuted(); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php index 01125ef1f7..90023cbb92 100644 --- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php @@ -111,7 +111,6 @@ class TransferCurrenciesCorrections extends Command $end = round(microtime(true) - $start, 2); $this->info(sprintf('Verified and fixed currency information for transfers in %s seconds.', $end)); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/Upgrade/UpgradeDatabase.php b/app/Console/Commands/Upgrade/UpgradeDatabase.php index eb52285eaf..9c330c9554 100644 --- a/app/Console/Commands/Upgrade/UpgradeDatabase.php +++ b/app/Console/Commands/Upgrade/UpgradeDatabase.php @@ -117,7 +117,6 @@ class UpgradeDatabase extends Command // index will set FF3 version. app('fireflyconfig')->set('ff3_version', (string) config('firefly.version')); - app('telemetry')->feature('system.command.executed', $this->signature); return 0; } diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php index 6fe9f93148..639a36936f 100644 --- a/app/Console/Commands/UpgradeFireflyInstructions.php +++ b/app/Console/Commands/UpgradeFireflyInstructions.php @@ -58,9 +58,9 @@ class UpgradeFireflyInstructions extends Command } // collect system telemetry -// app('telemetry')->feature('system.php.version', PHP_VERSION); -// app('telemetry')->feature('system.os.version', PHP_OS); -// app('telemetry')->feature('system.command.executed', $this->signature); + app('telemetry')->feature('system.php.version', PHP_VERSION); + app('telemetry')->feature('system.os.version', PHP_OS); + app('telemetry')->feature('system.command.executed', $this->signature); return 0; }