mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Do some code cleanup and call correct phpunit.
This commit is contained in:
parent
c3110a43da
commit
4b96558433
4
.github/workflows/laravel.yml
vendored
4
.github/workflows/laravel.yml
vendored
@ -82,10 +82,10 @@ jobs:
|
||||
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-suggest
|
||||
|
||||
- name: PHPUnit tests
|
||||
uses: php-actions/phpunit@v9
|
||||
uses: php-actions/phpunit@v1
|
||||
with:
|
||||
config: phpunit.xml
|
||||
memory: 2048M
|
||||
memory: 512M
|
||||
|
||||
coding-standards:
|
||||
|
||||
|
@ -48,6 +48,7 @@ class CorrectDatabase extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:correct-database';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
@ -76,7 +77,7 @@ class CorrectDatabase extends Command
|
||||
'firefly-iii:fix-long-descriptions',
|
||||
'firefly-iii:fix-recurring-transactions',
|
||||
'firefly-iii:restore-oauth-keys',
|
||||
'firefly-iii:fix-transaction-types'
|
||||
'firefly-iii:fix-transaction-types',
|
||||
];
|
||||
foreach ($commands as $command) {
|
||||
$this->line(sprintf('Now executing %s', $command));
|
||||
|
@ -52,6 +52,7 @@ class CorrectOpeningBalanceCurrencies extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:fix-ob-currencies';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace FireflyIII\Console\Commands\Correction;
|
||||
|
||||
use Exception;
|
||||
@ -47,6 +46,7 @@ class CreateAccessTokens extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:create-access-tokens';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -44,6 +44,7 @@ class CreateLinkTypes extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:create-link-types';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -46,6 +46,7 @@ class DeleteEmptyGroups extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:delete-empty-groups';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -48,6 +48,7 @@ class DeleteEmptyJournals extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:delete-empty-journals';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -48,6 +48,7 @@ class DeleteOrphanedTransactions extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:delete-orphaned-transactions';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class DeleteZeroAmount extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:delete-zero-amount';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ class EnableCurrencies extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:enable-currencies';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ class FixAccountOrder extends Command
|
||||
|
||||
private AccountRepositoryInterface $repository;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -58,6 +58,7 @@ class FixAccountTypes extends Command
|
||||
/** @var array */
|
||||
private $fixable;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ class FixGroupAccounts extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:unify-group-accounts';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class FixLongDescriptions extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:fix-long-descriptions';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
@ -68,7 +69,7 @@ class FixLongDescriptions extends Command
|
||||
$groups = TransactionGroup::get(['id', 'title']);
|
||||
/** @var TransactionGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
if (strlen((string)$group->title) > self::MAX_LENGTH) {
|
||||
if (strlen((string) $group->title) > self::MAX_LENGTH) {
|
||||
$group->title = substr($group->title, 0, self::MAX_LENGTH);
|
||||
$group->save();
|
||||
$this->line(sprintf('Truncated description of transaction group #%d', $group->id));
|
||||
|
@ -51,6 +51,7 @@ class FixPiggies extends Command
|
||||
/** @var int */
|
||||
private $count;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -54,6 +54,7 @@ class FixRecurringTransactions extends Command
|
||||
/** @var UserRepositoryInterface */
|
||||
private $userRepos;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -29,6 +29,7 @@ class FixTransactionTypes extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:fix-transaction-types';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class FixUnevenAmount extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:fix-uneven-amount';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -45,6 +45,7 @@ class RemoveBills extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:remove-bills';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class RenameMetaFields extends Command
|
||||
/** @var int */
|
||||
private $count;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -45,6 +45,7 @@ class TransferBudgets extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:fix-transfer-budgets';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class CreateDatabase extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:create-database';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -34,7 +34,6 @@ use JsonException;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
*
|
||||
* Class DecryptDatabase
|
||||
*/
|
||||
class DecryptDatabase extends Command
|
||||
@ -52,6 +51,7 @@ class DecryptDatabase extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:decrypt-all';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -81,6 +81,7 @@ class ExportData extends Command
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -48,6 +48,7 @@ class ReportEmptyObjects extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:report-empty-objects';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ class ReportIntegrity extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:report-integrity';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
|
@ -45,6 +45,7 @@ class ReportSum extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:report-sum';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -46,6 +46,7 @@ class RestoreOAuthKeys extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:restore-oauth-keys';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -54,6 +54,7 @@ class ScanAttachments extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:scan-attachments';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
|
@ -44,6 +44,7 @@ class SetLatestVersion extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:set-latest-version {--james-is-cool}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -89,6 +89,7 @@ class ApplyRules extends Command
|
||||
/** @var Carbon */
|
||||
private $startDate;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -57,6 +57,7 @@ class Cron extends Command
|
||||
{--date= : Set the date in YYYY-MM-DD to make Firefly III think that\'s the current date.}
|
||||
';
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@ -173,7 +174,7 @@ class Cron extends Command
|
||||
// if not configured to do anything with telemetry, do nothing.
|
||||
return;
|
||||
}
|
||||
$telemetry = new TelemetryCronJob;
|
||||
$telemetry = new TelemetryCronjob;
|
||||
$telemetry->setForce($force);
|
||||
|
||||
// set date in cron job:
|
||||
|
@ -59,6 +59,7 @@ class AccountCurrencies extends Command
|
||||
/** @var UserRepositoryInterface */
|
||||
private $userRepos;
|
||||
|
||||
|
||||
/**
|
||||
* Each (asset) account must have a reference to a preferred currency. If the account does not have one, it's forced upon the account.
|
||||
*
|
||||
|
@ -51,6 +51,7 @@ class BackToJournals extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:back-to-journals {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class BudgetLimitCurrency extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:bl-currency {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -50,6 +50,7 @@ class CCLiabilities extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:cc-liabilities {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -48,6 +48,7 @@ class MigrateAttachments extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:migrate-attachments {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ class MigrateJournalNotes extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:migrate-notes {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ class MigrateRecurrenceMeta extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:migrate-recurrence-meta {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -48,6 +48,7 @@ class MigrateTagLocations extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:migrate-tag-locations {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -69,6 +69,7 @@ class MigrateToGroups extends Command
|
||||
/** @var JournalDestroyService */
|
||||
private $service;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
@ -289,7 +290,6 @@ class MigrateToGroups extends Command
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
private function makeMultiGroup(TransactionJournal $journal): void
|
||||
{
|
||||
|
@ -63,6 +63,7 @@ class MigrateToRules extends Command
|
||||
/** @var UserRepositoryInterface */
|
||||
private $userRepository;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -66,6 +66,7 @@ class OtherCurrenciesCorrections extends Command
|
||||
/** @var JournalRepositoryInterface */
|
||||
private $journalRepos;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
@ -265,7 +266,6 @@ class OtherCurrenciesCorrections extends Command
|
||||
*
|
||||
* Both source and destination must match the respective currency preference of the related asset account.
|
||||
* So FF3 must verify all transactions.
|
||||
*
|
||||
*/
|
||||
private function updateOtherJournalsCurrencies(): void
|
||||
{
|
||||
|
@ -45,6 +45,7 @@ class RenameAccountMeta extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:rename-account-meta {--F|force : Force the execution of this command.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -57,6 +57,7 @@ class TransactionIdentifier extends Command
|
||||
/** @var JournalRepositoryInterface */
|
||||
private $journalRepository;
|
||||
|
||||
|
||||
/**
|
||||
* This method gives all transactions which are part of a split journal (so more than 2) a sort of "order" so they are easier
|
||||
* to easier to match to their counterpart. When a journal is split, it has two or three transactions: -3, -4 and -5 for example.
|
||||
|
@ -78,6 +78,7 @@ class TransferCurrenciesCorrections extends Command
|
||||
/** @var Transaction The source transaction of the current journal. */
|
||||
private $sourceTransaction;
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
@ -185,7 +186,6 @@ class TransferCurrenciesCorrections extends Command
|
||||
* If the destination account currency is the same as the source currency,
|
||||
* both foreign_amount and foreign_currency_id fields must be NULL
|
||||
* for both transactions (because foreign currency info would not make sense)
|
||||
*
|
||||
*/
|
||||
private function fixInvalidForeignCurrency(): void
|
||||
{
|
||||
|
@ -48,6 +48,7 @@ class UpgradeDatabase extends Command
|
||||
*/
|
||||
protected $signature = 'firefly-iii:upgrade-database {--F|force : Force all upgrades.}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
@ -49,6 +49,7 @@ class UpgradeFireflyInstructions extends Command
|
||||
*/
|
||||
protected $signature = 'firefly:instructions {task}';
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
@ -69,7 +70,7 @@ class UpgradeFireflyInstructions extends Command
|
||||
app('telemetry')->feature('system.database.driver', env('DB_CONNECTION', '(unknown)'));
|
||||
app('telemetry')->feature('system.os.is_docker', $isDocker);
|
||||
app('telemetry')->feature('system.command.executed', $this->signature);
|
||||
app('telemetry')->feature('system.users.count', (string)User::count());
|
||||
app('telemetry')->feature('system.users.count', (string) User::count());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user