Browse Source

Merge branch 'develop' of github.com:firefly-iii/data-importer into develop

pull/886/head
James Cole 4 months ago
parent
commit
3135d33815
  1. 12
      .ci/php-cs-fixer/composer.lock
  2. 6
      app/Console/AutoImports.php
  3. 2
      app/Handlers/Events/ImportedTransactionsEventHandler.php
  4. 4
      app/Http/Controllers/AutoImportController.php
  5. 2
      app/Http/Controllers/AutoUploadController.php
  6. 4
      app/Http/Controllers/Import/ConfigurationController.php
  7. 2
      app/Http/Controllers/Import/ConversionController.php
  8. 2
      app/Http/Controllers/Import/Nordigen/SelectionController.php
  9. 4
      app/Http/Controllers/Import/Spectre/ConnectionController.php
  10. 6
      app/Http/Controllers/TokenController.php
  11. 4
      app/Services/CSV/Configuration/ConfigFileProcessor.php
  12. 8
      app/Services/CSV/Conversion/Routine/CSVFileProcessor.php
  13. 2
      app/Services/CSV/Conversion/Routine/LineProcessor.php
  14. 4
      app/Services/CSV/Conversion/Routine/PseudoTransactionProcessor.php
  15. 2
      app/Services/CSV/Mapper/Bills.php
  16. 2
      app/Services/CSV/Mapper/Budgets.php
  17. 2
      app/Services/CSV/Mapper/Categories.php
  18. 2
      app/Services/CSV/Mapper/ExpenseRevenueAccounts.php
  19. 6
      app/Services/CSV/Mapper/GetAccounts.php
  20. 4
      app/Services/CSV/Mapper/MapperService.php
  21. 2
      app/Services/CSV/Mapper/TransactionCurrencies.php
  22. 6
      app/Services/CSV/Roles/RoleService.php
  23. 2
      app/Services/Camt/Conversion/RoutineManager.php
  24. 4
      app/Services/Nordigen/Conversion/Routine/GenerateTransactions.php
  25. 4
      app/Services/Nordigen/Conversion/RoutineManager.php
  26. 2
      app/Services/Nordigen/Request/PostNewTokenRequest.php
  27. 4
      app/Services/Nordigen/Services/AccountInformationCollector.php
  28. 22
      app/Services/Shared/Conversion/RoutineStatusManager.php
  29. 8
      app/Services/Shared/Import/Routine/ApiSubmitter.php
  30. 18
      app/Services/Shared/Import/Status/SubmissionStatusManager.php
  31. 2
      app/Services/Spectre/AuthenticationValidator.php
  32. 2
      app/Services/Spectre/Request/ListCustomersRequest.php
  33. 10
      app/Services/Spectre/Request/Request.php
  34. 37
      composer.lock
  35. 4
      config/importer.php

12
.ci/php-cs-fixer/composer.lock

@ -406,16 +406,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.82.1",
"version": "v3.82.2",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "240f67bbf812ab8ac097c3097e7e65d43f9a0079"
"reference": "684ed3ab41008a2a4848de8bde17eb168c596247"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/240f67bbf812ab8ac097c3097e7e65d43f9a0079",
"reference": "240f67bbf812ab8ac097c3097e7e65d43f9a0079",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/684ed3ab41008a2a4848de8bde17eb168c596247",
"reference": "684ed3ab41008a2a4848de8bde17eb168c596247",
"shasum": ""
},
"require": {
@ -499,7 +499,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.82.1"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.82.2"
},
"funding": [
{
@ -507,7 +507,7 @@
"type": "github"
}
],
"time": "2025-07-08T10:18:50+00:00"
"time": "2025-07-08T21:13:15+00:00"
},
{
"name": "psr/container",

6
app/Console/AutoImports.php

@ -180,7 +180,7 @@ trait AutoImports
$exitCodes[$importableFile] = $this->importFile($jsonFile, $importableFile);
} catch (ImporterErrorException $e) {
Log::error(sprintf('Could not complete import from file "%s".', $importableFile));
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$exitCodes[$importableFile] = 1;
}
// report has already been sent. Reset errors and continue.
@ -362,7 +362,7 @@ trait AutoImports
try {
$transactions = $manager->start();
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
RoutineStatusManager::setConversionStatus(ConversionStatus::CONVERSION_ERRORED, $this->identifier);
$this->conversionMessages = $manager->getAllMessages();
$this->conversionWarnings = $manager->getAllWarnings();
@ -490,7 +490,7 @@ trait AutoImports
try {
$routine->start();
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
SubmissionStatusManager::setSubmissionStatus(SubmissionStatus::SUBMISSION_ERRORED, $this->identifier);
SubmissionStatusManager::addError($this->identifier, 0, $e->getMessage());
$this->importMessages = $routine->getAllMessages();

2
app/Handlers/Events/ImportedTransactionsEventHandler.php

@ -73,7 +73,7 @@ class ImportedTransactionsEventHandler
Mail::to(config('mail.destination'))->send(new ImportReportMail($log));
} catch (TransportException $e) {
Log::error('Could not send mail. See error below');
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
Log::debug('If no error above this line, mail was sent!');
}

4
app/Http/Controllers/AutoImportController.php

@ -71,7 +71,7 @@ class AutoImportController extends Controller
}
// take code from auto importer.
Log::info(sprintf('[%s] Going to automatically import everything found in %s (%s)',config('importer.version'), $directory, $argument));
Log::info(sprintf('[%s] Going to automatically import everything found in %s (%s)', config('importer.version'), $directory, $argument));
$files = $this->getFiles($directory);
if (0 === count($files)) {
@ -82,7 +82,7 @@ class AutoImportController extends Controller
try {
$this->importFiles($directory, $files);
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException(sprintf('Import exception (see the logs): %s', $e->getMessage()), 0, $e);
}

2
app/Http/Controllers/AutoUploadController.php

@ -66,7 +66,7 @@ class AutoUploadController extends Controller
try {
$this->importUpload((string) $json?->getPathname(), $importablePath);
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$this->line(sprintf('Import exception (see the logs): %s', $e->getMessage()));
}

4
app/Http/Controllers/Import/ConfigurationController.php

@ -109,7 +109,7 @@ class ConfigurationController extends Controller
try {
$importerAccounts = $this->getNordigenAccounts($configuration);
} catch (AgreementExpiredException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// remove thing from configuration
$configuration->clearRequisitions();
@ -376,7 +376,7 @@ class ConfigurationController extends Controller
try {
$json = json_encode($configuration->toArray(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException($e->getMessage(), 0, $e);
}

2
app/Http/Controllers/Import/ConversionController.php

@ -294,7 +294,7 @@ class ConversionController extends Controller
try {
$transactions = $routine->start();
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
Log::error($e->getTraceAsString());
RoutineStatusManager::setConversionStatus(ConversionStatus::CONVERSION_ERRORED);

2
app/Http/Controllers/Import/Nordigen/SelectionController.php

@ -129,7 +129,7 @@ class SelectionController extends Controller
try {
$json = json_encode($configuration->toArray(), JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
StorageService::storeContent($json);

4
app/Http/Controllers/Import/Spectre/ConnectionController.php

@ -121,7 +121,7 @@ class ConnectionController extends Controller
try {
$json = json_encode($configuration->toArray(), JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
StorageService::storeContent($json);
@ -176,7 +176,7 @@ class ConnectionController extends Controller
try {
$json = json_encode($configuration->toArray(), JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
StorageService::storeContent($json);

6
app/Http/Controllers/TokenController.php

@ -183,18 +183,18 @@ class TokenController extends Controller
if (str_starts_with($result->version, 'develop')) {
// overrule compare, because the user is running a develop version
Log::warning(sprintf('[%s] You are connecting to a development version of Firefly III (%s). This may not work as expected.',config('importer.version'), $result->version));
Log::warning(sprintf('[%s] You are connecting to a development version of Firefly III (%s). This may not work as expected.', config('importer.version'), $result->version));
$compare = -1;
}
if (str_starts_with($result->version, 'branch')) {
// overrule compare, because the user is running a branch version
Log::warning(sprintf('[%s] You are connecting to a branch version of Firefly III (%s). This may not work as expected.',config('importer.version'), $result->version));
Log::warning(sprintf('[%s] You are connecting to a branch version of Firefly III (%s). This may not work as expected.', config('importer.version'), $result->version));
$compare = -1;
}
if (str_starts_with($result->version, 'branch')) {
// overrule compare, because the user is running a develop version
Log::warning(sprintf('[%s] You are connecting to a branch version of Firefly III (%s). This may not work as expected.',config('importer.version'), $result->version));
Log::warning(sprintf('[%s] You are connecting to a branch version of Firefly III (%s). This may not work as expected.', config('importer.version'), $result->version));
$compare = -1;
}

4
app/Services/CSV/Configuration/ConfigFileProcessor.php

@ -49,7 +49,7 @@ class ConfigFileProcessor
try {
$content = StorageService::getContent($fileName);
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException(sprintf('Could not find config file: %s', $e->getMessage()));
}
@ -57,7 +57,7 @@ class ConfigFileProcessor
try {
$json = json_decode($content, true, 512, JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException(sprintf('Invalid JSON configuration file: %s', $e->getMessage()));
}

8
app/Services/CSV/Conversion/Routine/CSVFileProcessor.php

@ -61,7 +61,7 @@ class CSVFileProcessor
try {
$this->reader->setDelimiter($this->delimiter);
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
$message = sprintf('[a106]: Could not set delimiter: %s', $e->getMessage());
$this->addError(0, $message);
@ -74,7 +74,7 @@ class CSVFileProcessor
$stmt = new Statement()->offset($offset);
$records = $stmt->process($this->reader);
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
$message = sprintf('[a107]: Could not read CSV: %s', $e->getMessage());
$this->addError(0, $message);
@ -85,7 +85,7 @@ class CSVFileProcessor
try {
return $this->processCSVLines($records);
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
$message = sprintf('[a108]: Could not parse CSV: %s', $e->getMessage());
$this->addError(0, $message);
@ -159,7 +159,7 @@ class CSVFileProcessor
try {
$hash = hash('sha256', json_encode($line, JSON_THROW_ON_ERROR));
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not decode JSON line #%d: %s', $index, $e->getMessage()));

2
app/Services/CSV/Conversion/Routine/LineProcessor.php

@ -74,7 +74,7 @@ class LineProcessor
try {
$processed[] = $this->process($line);
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
$this->addError(0, $e->getMessage());
}

4
app/Services/CSV/Conversion/Routine/PseudoTransactionProcessor.php

@ -89,7 +89,7 @@ class PseudoTransactionProcessor
try {
$result = $accountRequest->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException(sprintf('The default account in your configuration file (%d) does not exist.', $accountId));
}
@ -116,7 +116,7 @@ class PseudoTransactionProcessor
$result = $currencyRequest->get();
$this->defaultCurrency = $result->getCurrency();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException('The default currency could not be loaded.');
}

2
app/Services/CSV/Mapper/Bills.php

@ -55,7 +55,7 @@ class Bills implements MapperInterface
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download bills: %s', $e->getMessage()));

2
app/Services/CSV/Mapper/Budgets.php

@ -55,7 +55,7 @@ class Budgets implements MapperInterface
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download budgets: %s', $e->getMessage()));

2
app/Services/CSV/Mapper/Categories.php

@ -55,7 +55,7 @@ class Categories implements MapperInterface
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download categories: %s', $e->getMessage()));

2
app/Services/CSV/Mapper/ExpenseRevenueAccounts.php

@ -69,7 +69,7 @@ class ExpenseRevenueAccounts implements MapperInterface
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException(sprintf('Could not download accounts: %s', $e->getMessage()));
}

6
app/Services/CSV/Mapper/GetAccounts.php

@ -60,7 +60,7 @@ trait GetAccounts
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download accounts: %s', $e->getMessage()));
@ -112,7 +112,7 @@ trait GetAccounts
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download asset accounts: %s', $e->getMessage()));
@ -136,7 +136,7 @@ trait GetAccounts
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download liability accounts: %s', $e->getMessage()));

4
app/Services/CSV/Mapper/MapperService.php

@ -57,7 +57,7 @@ class MapperService
try {
$reader->setDelimiter($delimiter);
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not set delimiter: %s', $e->getMessage()));
@ -72,7 +72,7 @@ class MapperService
$stmt = new Statement()->offset($offset);
$records = $stmt->process($reader);
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterErrorException($e->getMessage());
}

2
app/Services/CSV/Mapper/TransactionCurrencies.php

@ -55,7 +55,7 @@ class TransactionCurrencies implements MapperInterface
try {
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
throw new ImporterErrorException(sprintf('Could not download currencies: %s', $e->getMessage()));

6
app/Services/CSV/Roles/RoleService.php

@ -85,7 +85,7 @@ class RoleService
$headers = $records->fetchOne();
// @codeCoverageIgnoreStart
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new InvalidArgumentException($e->getMessage());
}
@ -105,7 +105,7 @@ class RoleService
}
// @codeCoverageIgnoreStart
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new InvalidArgumentException($e->getMessage());
}
@ -150,7 +150,7 @@ class RoleService
$stmt = new Statement()->limit(self::EXAMPLE_COUNT)->offset($offset);
// @codeCoverageIgnoreStart
} catch (Exception $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new InvalidArgumentException($e->getMessage());
}

2
app/Services/Camt/Conversion/RoutineManager.php

@ -161,7 +161,7 @@ class RoutineManager implements RoutineManagerInterface
}
} catch (InvalidMessageException $e) {
Log::error('Conversion error in RoutineManager::getCamtMessage');
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$this->addError(0, sprintf('[a104]: Could not convert CAMT.053 file: %s', $e->getMessage()));
return null;

4
app/Services/Nordigen/Conversion/Routine/GenerateTransactions.php

@ -298,7 +298,7 @@ class GenerateTransactions
$transaction['type'] = $this->getTransactionType($mappedType, 'asset');
Log::debug(sprintf('Transaction type seems to be %s', $transaction['type']));
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
Log::info('Will not use mapped ID, Firefly III account is of the wrong type.');
unset($transaction['source_id']);
$transaction['source_name'] = $originalSourceName;
@ -531,7 +531,7 @@ class GenerateTransactions
$transaction['type'] = $this->getTransactionType('asset', $mappedType);
Log::debug(sprintf('Transaction type seems to be %s', $transaction['type']));
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
Log::info('Will not use mapped ID, Firefly III account is of the wrong type.');
unset($transaction['destination_id']);
$transaction['destination_name'] = $originalDestName;

4
app/Services/Nordigen/Conversion/RoutineManager.php

@ -249,7 +249,7 @@ class RoutineManager implements RoutineManagerInterface
$this->downloaded = $this->transactionProcessor->download();
} catch (ImporterErrorException $e) {
Log::error('Could not download transactions from GoCardless.');
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// add error to current error thing:
$this->addError(0, sprintf('[a109]: Could not download from GoCardless: %s', $e->getMessage()));
@ -353,7 +353,7 @@ class RoutineManager implements RoutineManagerInterface
$this->transactionGenerator->collectNordigenAccounts();
} catch (ImporterErrorException $e) {
Log::error('Could not collect info on all GoCardless accounts, but this info isn\'t used at the moment anyway.');
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
} catch (AgreementExpiredException $e) {
$this->addError(0, '[a112]: The connection between your bank and GoCardless has expired.');
$this->mergeMessages(1);

2
app/Services/Nordigen/Request/PostNewTokenRequest.php

@ -62,7 +62,7 @@ class PostNewTokenRequest extends Request
]
);
} catch (GuzzleException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterHttpException($e->getMessage(), 0, $e);
}

4
app/Services/Nordigen/Services/AccountInformationCollector.php

@ -60,7 +60,7 @@ class AccountInformationCollector
Log::debug('Get account details is ENABLED.');
$detailedAccount = self::getAccountDetails($detailedAccount);
} catch (ImporterErrorException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// ignore error otherwise for now.
$detailedAccount->setStatus('no-info');
$detailedAccount->setName('Unknown account');
@ -74,7 +74,7 @@ class AccountInformationCollector
try {
$detailedAccount = self::getBalanceDetails($detailedAccount);
} catch (ImporterErrorException|ImporterHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// ignore error otherwise for now.
$status = $detailedAccount->getStatus();
if ('no-info' === $status) {

22
app/Services/Shared/Conversion/RoutineStatusManager.php

@ -53,7 +53,7 @@ class RoutineStatusManager
try {
$status = ConversionStatus::fromArray(json_decode((string) $disk->get($identifier), true, 512, JSON_THROW_ON_ERROR));
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$status = new ConversionStatus();
}
$status->errors[$index] ??= [];
@ -61,7 +61,7 @@ class RoutineStatusManager
self::storeConversionStatus($identifier, $status);
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -77,7 +77,7 @@ class RoutineStatusManager
try {
$status = ConversionStatus::fromArray(json_decode((string) $disk->get($identifier), true, 512, JSON_THROW_ON_ERROR));
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$status = new ConversionStatus();
}
$status->rateLimits[$index] ??= [];
@ -85,7 +85,7 @@ class RoutineStatusManager
self::storeConversionStatus($identifier, $status);
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -99,7 +99,7 @@ class RoutineStatusManager
$disk->put($identifier, json_encode($status->toArray(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT));
} catch (JsonException $e) {
// do nothing
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -115,7 +115,7 @@ class RoutineStatusManager
try {
$status = ConversionStatus::fromArray(json_decode((string) $disk->get($identifier), true, 512, JSON_THROW_ON_ERROR));
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$status = new ConversionStatus();
}
$status->messages[$index] ??= [];
@ -123,7 +123,7 @@ class RoutineStatusManager
self::storeConversionStatus($identifier, $status);
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -139,7 +139,7 @@ class RoutineStatusManager
try {
$status = ConversionStatus::fromArray(json_decode((string) $disk->get($identifier), true, 512, JSON_THROW_ON_ERROR));
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$status = new ConversionStatus();
}
$status->warnings[$index] ??= [];
@ -147,7 +147,7 @@ class RoutineStatusManager
self::storeConversionStatus($identifier, $status);
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -185,7 +185,7 @@ class RoutineStatusManager
$array = json_decode((string) $disk->get($identifier), true, 512, JSON_THROW_ON_ERROR);
$status = ConversionStatus::fromArray($array);
} catch (FileNotFoundException|JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$status = new ConversionStatus();
}
Log::debug(sprintf('Conversion status is "%s"', $status->status));
@ -198,7 +198,7 @@ class RoutineStatusManager
try {
$disk->put($identifier, json_encode($status->toArray(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT));
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
Log::debug('Return status.', $status->toArray());

8
app/Services/Shared/Import/Routine/ApiSubmitter.php

@ -203,7 +203,7 @@ class ApiSubmitter
/** @var GetTransactionsResponse $response */
$response = $request->get();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
return 0;
}
@ -243,7 +243,7 @@ class ApiSubmitter
}
if (true === $isDeleted && false === config('importer.ignore_not_found_transactions')) {
$this->addWarning($index, 'The transaction was created, but deleted by a rule.');
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
return $return;
}
@ -253,7 +253,7 @@ class ApiSubmitter
return $return;
}
$message = sprintf('[a116]: Submission HTTP error: %s', e($e->getMessage()));
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$this->addError($index, $message);
return $return;
@ -457,7 +457,7 @@ class ApiSubmitter
try {
$request->put();
} catch (ApiHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// Log::error($e->getTraceAsString());
$this->addError(0, '[a120]: Could not store transaction: see the log files.');
}

18
app/Services/Shared/Import/Status/SubmissionStatusManager.php

@ -64,7 +64,7 @@ class SubmissionStatusManager
Log::error(sprintf('Could not find file for job %s.', $identifier));
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -78,7 +78,7 @@ class SubmissionStatusManager
$disk->put($identifier, json_encode($status->toArray(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT));
} catch (JsonException $e) {
// do nothing
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -104,7 +104,7 @@ class SubmissionStatusManager
Log::error(sprintf('Could not find file for job %s.', $identifier));
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -130,7 +130,7 @@ class SubmissionStatusManager
Log::error(sprintf('Could not find file for job %s.', $identifier));
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -158,7 +158,7 @@ class SubmissionStatusManager
Log::error(sprintf('Could not find file for job %s.', $identifier));
}
} catch (FileNotFoundException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
}
@ -168,7 +168,7 @@ class SubmissionStatusManager
try {
$identifier = session()->get(Constants::IMPORT_JOB_IDENTIFIER);
} catch (ContainerExceptionInterface|NotFoundExceptionInterface $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$identifier = 'error-setSubmissionStatus';
}
}
@ -197,7 +197,7 @@ class SubmissionStatusManager
$array = json_decode((string) $disk->get($identifier), true, 512, JSON_THROW_ON_ERROR);
$status = SubmissionStatus::fromArray($array);
} catch (FileNotFoundException|JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$status = new SubmissionStatus();
}
Log::debug(sprintf('Status: %s', $status->status));
@ -207,7 +207,7 @@ class SubmissionStatusManager
}
} catch (FileNotFoundException $e) {
Log::error('Could not find file, write a new one.');
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
Log::debug('File does not exist or error, create a new one.');
$status = new SubmissionStatus();
@ -215,7 +215,7 @@ class SubmissionStatusManager
try {
$json = json_encode($status->toArray(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
$json = '{}';
}
$disk->put($identifier, $json);

2
app/Services/Spectre/AuthenticationValidator.php

@ -59,7 +59,7 @@ class AuthenticationValidator implements AuthenticationValidatorInterface
try {
$response = $request->get();
} catch (ImporterHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
return AuthenticationStatus::ERROR;
}

2
app/Services/Spectre/Request/ListCustomersRequest.php

@ -57,7 +57,7 @@ class ListCustomersRequest extends Request
try {
$response = $this->authenticatedGet();
} catch (GuzzleException|ImporterErrorException|ImporterHttpException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
// JSON thing.
return new ErrorResponse($e->json ?? []);

10
app/Services/Spectre/Request/Request.php

@ -289,7 +289,7 @@ abstract class Request
try {
$body = json_encode($data, JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
if ('{}' !== (string) $body) {
$opts['body'] = $body;
@ -301,7 +301,7 @@ abstract class Request
$client = $this->getClient();
$res = $client->request('POST', $fullUrl, $opts);
} catch (Exception|GuzzleException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
throw new ImporterHttpException(sprintf('Guzzle Exception: %s', $e->getMessage()));
}
@ -344,7 +344,7 @@ abstract class Request
try {
$body = json_encode($data, JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
if ('{}' !== (string) $body) {
$opts['body'] = $body;
@ -366,14 +366,14 @@ abstract class Request
try {
$json = json_decode((string) $e->getResponse()->getBody(), true, 512, JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
}
$json['ResponseHeaders'] = $responseHeaders;
$json['ResponseStatusCode'] = $statusCode;
return $json;
}
Log::error(sprintf('[%s]: %s',config('importer.version'), $e->getMessage()));
Log::error(sprintf('[%s]: %s', config('importer.version'), $e->getMessage()));
if (null !== $response) {
Log::error((string) $e->getResponse()->getBody());
}

37
composer.lock

@ -8247,16 +8247,16 @@
},
{
"name": "phpunit/phpunit",
"version": "12.2.6",
"version": "12.2.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "638644c62a58f04974da115f98981c9b48564021"
"reference": "8b1348b254e5959acaf1539c6bd790515fb49414"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/638644c62a58f04974da115f98981c9b48564021",
"reference": "638644c62a58f04974da115f98981c9b48564021",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8b1348b254e5959acaf1539c6bd790515fb49414",
"reference": "8b1348b254e5959acaf1539c6bd790515fb49414",
"shasum": ""
},
"require": {
@ -8266,7 +8266,7 @@
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.13.1",
"myclabs/deep-copy": "^1.13.3",
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=8.3",
@ -8324,7 +8324,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.2.6"
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.2.7"
},
"funding": [
{
@ -8348,20 +8348,20 @@
"type": "tidelift"
}
],
"time": "2025-07-04T06:00:16+00:00"
"time": "2025-07-11T04:11:13+00:00"
},
{
"name": "rector/rector",
"version": "2.1.0",
"version": "2.1.1",
"source": {
"type": "git",
"url": "https://github.com/rectorphp/rector.git",
"reference": "d513dea45a94394b660e15c155d1fa27826f8e30"
"reference": "d0917c069bb0d9bb06ed111cf052510f609015a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/d513dea45a94394b660e15c155d1fa27826f8e30",
"reference": "d513dea45a94394b660e15c155d1fa27826f8e30",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/d0917c069bb0d9bb06ed111cf052510f609015a4",
"reference": "d0917c069bb0d9bb06ed111cf052510f609015a4",
"shasum": ""
},
"require": {
@ -8400,7 +8400,7 @@
],
"support": {
"issues": "https://github.com/rectorphp/rector/issues",
"source": "https://github.com/rectorphp/rector/tree/2.1.0"
"source": "https://github.com/rectorphp/rector/tree/2.1.1"
},
"funding": [
{
@ -8408,7 +8408,7 @@
"type": "github"
}
],
"time": "2025-06-24T20:26:57+00:00"
"time": "2025-07-10T11:31:31+00:00"
},
{
"name": "roave/security-advisories",
@ -8416,12 +8416,12 @@
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "a76f62e135c8b583602bd99df737b5c20f4d7200"
"reference": "b34bea5e19970433575063dd74b68e5e880e10ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/a76f62e135c8b583602bd99df737b5c20f4d7200",
"reference": "a76f62e135c8b583602bd99df737b5c20f4d7200",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/b34bea5e19970433575063dd74b68e5e880e10ee",
"reference": "b34bea5e19970433575063dd74b68e5e880e10ee",
"shasum": ""
},
"conflict": {
@ -8861,7 +8861,7 @@
"microsoft/microsoft-graph": ">=1.16,<1.109.1|>=2,<2.0.1",
"microsoft/microsoft-graph-beta": "<2.0.1",
"microsoft/microsoft-graph-core": "<2.0.2",
"microweber/microweber": "<=2.0.16",
"microweber/microweber": "<=2.0.19",
"mikehaertl/php-shellcommand": "<1.6.1",
"miniorange/miniorange-saml": "<1.4.3",
"mittwald/typo3_forum": "<1.2.1",
@ -9222,6 +9222,7 @@
"ua-parser/uap-php": "<3.8",
"uasoft-indonesia/badaso": "<=2.9.7",
"unisharp/laravel-filemanager": "<2.9.1",
"universal-omega/dynamic-page-list3": "<3.6.4",
"unopim/unopim": "<0.1.5",
"userfrosting/userfrosting": ">=0.3.1,<4.6.3",
"usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
@ -9362,7 +9363,7 @@
"type": "tidelift"
}
],
"time": "2025-07-04T13:13:44+00:00"
"time": "2025-07-10T13:15:28+00:00"
},
{
"name": "sebastian/cli-parser",

4
config/importer.php

@ -24,8 +24,8 @@
declare(strict_types=1);
return [
'version' => 'develop/2025-07-08',
'build_time' => 1751997344,
'version' => 'develop/2025-07-11',
'build_time' => 1752237036,
'flows' => ['nordigen', 'spectre', 'file', 'simplefin'],
'enabled_flows' => [
'nordigen' => true,

Loading…
Cancel
Save