diff --git a/.ci/php-cs-fixer/composer.lock b/.ci/php-cs-fixer/composer.lock index 8521120129..97ff2a4e90 100644 --- a/.ci/php-cs-fixer/composer.lock +++ b/.ci/php-cs-fixer/composer.lock @@ -677,16 +677,16 @@ }, { "name": "sebastian/diff", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f" + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/70dd1b20bc198da394ad542e988381b44e64e39f", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", "shasum": "" }, "require": { @@ -731,7 +731,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" }, "funding": [ { @@ -739,20 +740,20 @@ "type": "github" } ], - "time": "2023-02-03T07:00:31+00:00" + "time": "2023-03-23T05:12:41+00:00" }, { "name": "symfony/console", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45" + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45", - "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", "shasum": "" }, "require": { @@ -814,12 +815,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.7" + "source": "https://github.com/symfony/console/tree/v6.2.8" }, "funding": [ { @@ -835,7 +836,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T17:00:03+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "symfony/deprecation-contracts", @@ -906,16 +907,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "404b307de426c1c488e5afad64403e5f145e82a5" + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/404b307de426c1c488e5afad64403e5f145e82a5", - "reference": "404b307de426c1c488e5afad64403e5f145e82a5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/04046f35fd7d72f9646e721fc2ecb8f9c67d3339", + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339", "shasum": "" }, "require": { @@ -969,7 +970,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.7" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.8" }, "funding": [ { @@ -985,7 +986,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -1754,16 +1755,16 @@ }, { "name": "symfony/process", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902" + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902", - "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416", "shasum": "" }, "require": { @@ -1795,7 +1796,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.7" + "source": "https://github.com/symfony/process/tree/v6.2.8" }, "funding": [ { @@ -1811,7 +1812,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-09T16:20:02+00:00" }, { "name": "symfony/service-contracts", @@ -1962,16 +1963,16 @@ }, { "name": "symfony/string", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "67b8c1eec78296b85dc1c7d9743830160218993d" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d", - "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { @@ -2028,7 +2029,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.7" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -2044,7 +2045,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-20T16:06:02+00:00" } ], "packages-dev": [], diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 22e73f5bce..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Sonarcloud CI -on: - workflow_dispatch: -jobs: - sonarcloud: - name: SonarCloud - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/app/Api/V1/Controllers/Models/Account/UpdateController.php b/app/Api/V1/Controllers/Models/Account/UpdateController.php index 93df5e9444..f897d9d04b 100644 --- a/app/Api/V1/Controllers/Models/Account/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Account/UpdateController.php @@ -30,7 +30,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Transformers\AccountTransformer; use Illuminate\Http\JsonResponse; use League\Fractal\Resource\Item; -use Log; +use Illuminate\Support\Facades\Log; use Preferences; /** diff --git a/app/Api/V1/Controllers/Models/Attachment/StoreController.php b/app/Api/V1/Controllers/Models/Attachment/StoreController.php index ff509254ac..a1b8338449 100644 --- a/app/Api/V1/Controllers/Models/Attachment/StoreController.php +++ b/app/Api/V1/Controllers/Models/Attachment/StoreController.php @@ -35,7 +35,7 @@ use FireflyIII\User; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use League\Fractal\Resource\Item; -use Log; +use Illuminate\Support\Facades\Log; /** * Class StoreController diff --git a/app/Api/V1/Controllers/Models/Transaction/DestroyController.php b/app/Api/V1/Controllers/Models/Transaction/DestroyController.php index 3076ac2c7b..884c8e7e1c 100644 --- a/app/Api/V1/Controllers/Models/Transaction/DestroyController.php +++ b/app/Api/V1/Controllers/Models/Transaction/DestroyController.php @@ -33,7 +33,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepository; use FireflyIII\User; use Illuminate\Http\JsonResponse; -use Log; +use Illuminate\Support\Facades\Log; /** * Class DestroyController diff --git a/app/Api/V1/Controllers/Models/Transaction/StoreController.php b/app/Api/V1/Controllers/Models/Transaction/StoreController.php index 295ff6fe6c..fcf0c9a52e 100644 --- a/app/Api/V1/Controllers/Models/Transaction/StoreController.php +++ b/app/Api/V1/Controllers/Models/Transaction/StoreController.php @@ -37,7 +37,7 @@ use FireflyIII\User; use Illuminate\Http\JsonResponse; use Illuminate\Validation\ValidationException; use League\Fractal\Resource\Item; -use Log; +use Illuminate\Support\Facades\Log; use Validator; /** diff --git a/app/Api/V1/Controllers/Models/Transaction/UpdateController.php b/app/Api/V1/Controllers/Models/Transaction/UpdateController.php index 5b37799b90..d5d6720573 100644 --- a/app/Api/V1/Controllers/Models/Transaction/UpdateController.php +++ b/app/Api/V1/Controllers/Models/Transaction/UpdateController.php @@ -33,7 +33,7 @@ use FireflyIII\Transformers\TransactionGroupTransformer; use FireflyIII\User; use Illuminate\Http\JsonResponse; use League\Fractal\Resource\Item; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Api/V1/Controllers/Search/AccountController.php b/app/Api/V1/Controllers/Search/AccountController.php index 6db73f9a0e..ef636a3029 100644 --- a/app/Api/V1/Controllers/Search/AccountController.php +++ b/app/Api/V1/Controllers/Search/AccountController.php @@ -35,7 +35,7 @@ use Illuminate\Pagination\LengthAwarePaginator; use JsonException; use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Resource\Collection as FractalCollection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AccountController diff --git a/app/Api/V1/Controllers/System/ConfigurationController.php b/app/Api/V1/Controllers/System/ConfigurationController.php index 3d450f9cf3..daca5c4dbd 100644 --- a/app/Api/V1/Controllers/System/ConfigurationController.php +++ b/app/Api/V1/Controllers/System/ConfigurationController.php @@ -29,7 +29,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Support\Binder\EitherConfigKey; use Illuminate\Http\JsonResponse; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Validator; diff --git a/app/Api/V1/Controllers/System/CronController.php b/app/Api/V1/Controllers/System/CronController.php index 23e129ec81..e944a80c4e 100644 --- a/app/Api/V1/Controllers/System/CronController.php +++ b/app/Api/V1/Controllers/System/CronController.php @@ -27,7 +27,7 @@ use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Requests\System\CronRequest; use FireflyIII\Support\Http\Controllers\CronRunner; use Illuminate\Http\JsonResponse; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CronController diff --git a/app/Api/V1/Requests/Data/Bulk/TransactionRequest.php b/app/Api/V1/Requests/Data/Bulk/TransactionRequest.php index df540c26db..50599ab848 100644 --- a/app/Api/V1/Requests/Data/Bulk/TransactionRequest.php +++ b/app/Api/V1/Requests/Data/Bulk/TransactionRequest.php @@ -32,7 +32,7 @@ use FireflyIII\Validation\Api\Data\Bulk\ValidatesBulkTransactionQuery; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionRequest diff --git a/app/Api/V1/Requests/Models/Account/UpdateRequest.php b/app/Api/V1/Requests/Models/Account/UpdateRequest.php index 227e8adbfc..0341e52346 100644 --- a/app/Api/V1/Requests/Models/Account/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Account/UpdateRequest.php @@ -33,7 +33,7 @@ use FireflyIII\Support\Request\AppendsLocationData; use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; -use Log; +use Illuminate\Support\Facades\Log; /** * Class UpdateRequest diff --git a/app/Api/V1/Requests/Models/Bill/StoreRequest.php b/app/Api/V1/Requests/Models/Bill/StoreRequest.php index 15d6e401ac..61ce2be480 100644 --- a/app/Api/V1/Requests/Models/Bill/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Bill/StoreRequest.php @@ -29,7 +29,7 @@ use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; /** * Class StoreRequest diff --git a/app/Api/V1/Requests/Models/PiggyBank/UpdateRequest.php b/app/Api/V1/Requests/Models/PiggyBank/UpdateRequest.php index f5f2b6b096..fdbd8e8e47 100644 --- a/app/Api/V1/Requests/Models/PiggyBank/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/PiggyBank/UpdateRequest.php @@ -76,7 +76,7 @@ class UpdateRequest extends FormRequest return [ 'name' => 'between:1,255|uniquePiggyBankForUser:'.$piggyBank->id, 'current_amount' => ['numeric', 'gte:0', new LessThanPiggyTarget()], - 'target_amount' => 'numeric|gt:0', + 'target_amount' => 'numeric|gte:0', 'start_date' => 'date|nullable', 'target_date' => 'date|nullable|after:start_date', 'notes' => 'max:65000', diff --git a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php index 20d5e6de13..8f864dbf72 100644 --- a/app/Api/V1/Requests/Models/Transaction/StoreRequest.php +++ b/app/Api/V1/Requests/Models/Transaction/StoreRequest.php @@ -36,7 +36,7 @@ use FireflyIII\Validation\GroupValidation; use FireflyIII\Validation\TransactionValidation; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; /** * Class StoreRequest diff --git a/app/Api/V2/Controllers/Autocomplete/AccountController.php b/app/Api/V2/Controllers/Autocomplete/AccountController.php index eac0044f95..b05425a549 100644 --- a/app/Api/V2/Controllers/Autocomplete/AccountController.php +++ b/app/Api/V2/Controllers/Autocomplete/AccountController.php @@ -25,10 +25,105 @@ declare(strict_types=1); namespace FireflyIII\Api\V2\Controllers\Autocomplete; use FireflyIII\Api\V2\Controllers\Controller; +use FireflyIII\Api\V2\Request\Autocomplete\AutocompleteRequest; +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Models\Account; +use FireflyIII\Models\AccountType; +use FireflyIII\Repositories\Administration\Account\AccountRepositoryInterface as AdminAccountRepositoryInterface; +use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Support\Http\Api\AccountFilter; +use FireflyIII\User; +use Illuminate\Http\JsonResponse; +use JsonException; /** * Class AccountController */ class AccountController extends Controller { + use AccountFilter; + + private array $balanceTypes; + private AdminAccountRepositoryInterface $adminRepository; + private AccountRepositoryInterface $repository; + + /** + * AccountController constructor. + */ + public function __construct() + { + parent::__construct(); + $this->middleware( + function ($request, $next) { + /** @var User $user */ + $user = auth()->user(); + $this->repository = app(AccountRepositoryInterface::class); + $this->adminRepository = app(AdminAccountRepositoryInterface::class); + + return $next($request); + } + ); + $this->balanceTypes = [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE,]; + } + + /** + * Documentation for this endpoint: + * TODO endpoint is not documented. + * + * @param AutocompleteRequest $request + * + * @return JsonResponse + * @throws JsonException + * @throws FireflyException + * @throws FireflyException + */ + public function accounts(AutocompleteRequest $request): JsonResponse + { + $data = $request->getData(); + $types = $data['types']; + $query = $data['query']; + $date = $data['date'] ?? today(config('app.timezone')); + $this->adminRepository->setAdministrationId($data['administration_id']); + + $return = []; + $result = $this->adminRepository->searchAccount((string)$query, $types, $data['limit']); + $defaultCurrency = app('amount')->getDefaultCurrency(); + + /** @var Account $account */ + foreach ($result as $account) { + $nameWithBalance = $account->name; + $currency = $this->repository->getAccountCurrency($account) ?? $defaultCurrency; + + if (in_array($account->accountType->type, $this->balanceTypes, true)) { + $balance = app('steam')->balance($account, $date); + $nameWithBalance = sprintf('%s (%s)', $account->name, app('amount')->formatAnything($currency, $balance, false)); + } + + $return[] = [ + 'id' => (string)$account->id, + 'name' => $account->name, + 'name_with_balance' => $nameWithBalance, + 'type' => $account->accountType->type, + 'currency_id' => $currency->id, + 'currency_name' => $currency->name, + 'currency_code' => $currency->code, + 'currency_symbol' => $currency->symbol, + 'currency_decimal_places' => $currency->decimal_places, + ]; + } + + // custom order. + $order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE]; + usort( + $return, + function ($a, $b) use ($order) { + $pos_a = array_search($a['type'], $order, true); + $pos_b = array_search($b['type'], $order, true); + + return $pos_a - $pos_b; + } + ); + + return response()->json($return); + } } diff --git a/app/Api/V2/Controllers/Controller.php b/app/Api/V2/Controllers/Controller.php index d34d2c3c0b..e36a16f263 100644 --- a/app/Api/V2/Controllers/Controller.php +++ b/app/Api/V2/Controllers/Controller.php @@ -79,7 +79,7 @@ class Controller extends BaseController $page = 1; } - $integers = ['limit']; + $integers = ['limit', 'administration']; $dates = ['start', 'end', 'date']; if ($page < 1) { diff --git a/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php b/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php new file mode 100644 index 0000000000..8a382c6792 --- /dev/null +++ b/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php @@ -0,0 +1,98 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Api\V2\Request\Autocomplete; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Models\AccountType; +use FireflyIII\Models\UserRole; +use FireflyIII\Support\Request\ChecksLogin; +use FireflyIII\Support\Request\ConvertsDataTypes; +use FireflyIII\User; +use FireflyIII\Validation\Administration\ValidatesAdministrationAccess; +use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Validator; + +/** + * Class AutocompleteRequest + */ +class AutocompleteRequest extends FormRequest +{ + use ConvertsDataTypes; + use ChecksLogin; + use ValidatesAdministrationAccess; + + /** + * @return array + * @throws FireflyException + */ + public function getData(): array + { + $types = $this->convertString('types'); + $array = []; + if ('' !== $types) { + $array = explode(',', $types); + } + $limit = $this->convertInteger('limit'); + $limit = 0 === $limit ? 10 : $limit; + + // remove 'initial balance' and another from allowed types. its internal + $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]); + /** @var User $user */ + $user = auth()->user(); + return [ + 'types' => $array, + 'query' => $this->convertString('query'), + 'date' => $this->getCarbonDate('date'), + 'limit' => $limit, + 'administration_id' => (int)($this->get('administration_id', null) ?? $user->getAdministrationId()), + ]; + } + + /** + * @return array + */ + public function rules(): array + { + return [ + 'limit' => 'min:0|max:1337', + ]; + } + + /** + * Configure the validator instance with special rules for after the basic validation rules. + * + * @param Validator $validator + * + * @return void + */ + public function withValidator(Validator $validator): void + { + $validator->after( + function (Validator $validator) { + // validate if the account can access this administration + $this->validateAdministration($validator, [UserRole::CHANGE_TRANSACTIONS]); + } + ); + } +} diff --git a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php index d8fc818203..7685e71bf1 100644 --- a/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php +++ b/app/Console/Commands/Correction/CorrectOpeningBalanceCurrencies.php @@ -34,7 +34,7 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Console\Command; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CorrectOpeningBalanceCurrencies diff --git a/app/Console/Commands/Correction/DeleteEmptyGroups.php b/app/Console/Commands/Correction/DeleteEmptyGroups.php index 1b88164f6d..6d16b1766b 100644 --- a/app/Console/Commands/Correction/DeleteEmptyGroups.php +++ b/app/Console/Commands/Correction/DeleteEmptyGroups.php @@ -26,7 +26,7 @@ namespace FireflyIII\Console\Commands\Correction; use Exception; use FireflyIII\Models\TransactionGroup; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; /** * Class DeleteEmptyGroups diff --git a/app/Console/Commands/Correction/DeleteEmptyJournals.php b/app/Console/Commands/Correction/DeleteEmptyJournals.php index 5a1ff07926..45c3ce7aa7 100644 --- a/app/Console/Commands/Correction/DeleteEmptyJournals.php +++ b/app/Console/Commands/Correction/DeleteEmptyJournals.php @@ -28,7 +28,7 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Console\Command; use Illuminate\Database\QueryException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class DeleteEmptyJournals diff --git a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php index 2a21b39283..461dd0bda9 100644 --- a/app/Console/Commands/Correction/DeleteOrphanedTransactions.php +++ b/app/Console/Commands/Correction/DeleteOrphanedTransactions.php @@ -27,7 +27,7 @@ use Exception; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use stdClass; /** diff --git a/app/Console/Commands/Correction/EnableCurrencies.php b/app/Console/Commands/Correction/EnableCurrencies.php index 16957c4ff6..b037435a81 100644 --- a/app/Console/Commands/Correction/EnableCurrencies.php +++ b/app/Console/Commands/Correction/EnableCurrencies.php @@ -30,7 +30,7 @@ use FireflyIII\Models\TransactionCurrency; use FireflyIII\Models\TransactionJournal; use Illuminate\Console\Command; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class EnableCurrencies diff --git a/app/Console/Commands/Correction/FixAccountTypes.php b/app/Console/Commands/Correction/FixAccountTypes.php index 58ae566710..1dac4a558d 100644 --- a/app/Console/Commands/Correction/FixAccountTypes.php +++ b/app/Console/Commands/Correction/FixAccountTypes.php @@ -31,7 +31,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use Illuminate\Console\Command; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class FixAccountTypes diff --git a/app/Console/Commands/Correction/FixUnevenAmount.php b/app/Console/Commands/Correction/FixUnevenAmount.php index 7013a3fd4d..fdfc75ad8e 100644 --- a/app/Console/Commands/Correction/FixUnevenAmount.php +++ b/app/Console/Commands/Correction/FixUnevenAmount.php @@ -27,7 +27,7 @@ use DB; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use stdClass; /** diff --git a/app/Console/Commands/Correction/TransferBudgets.php b/app/Console/Commands/Correction/TransferBudgets.php index 173b010e1a..99848de290 100644 --- a/app/Console/Commands/Correction/TransferBudgets.php +++ b/app/Console/Commands/Correction/TransferBudgets.php @@ -26,7 +26,7 @@ namespace FireflyIII\Console\Commands\Correction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransferBudgets diff --git a/app/Console/Commands/DecryptDatabase.php b/app/Console/Commands/DecryptDatabase.php index 74b784debf..d933dc922c 100644 --- a/app/Console/Commands/DecryptDatabase.php +++ b/app/Console/Commands/DecryptDatabase.php @@ -31,7 +31,7 @@ use FireflyIII\Models\Preference; use Illuminate\Console\Command; use Illuminate\Contracts\Encryption\DecryptException; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use stdClass; diff --git a/app/Console/Commands/Export/ExportData.php b/app/Console/Commands/Export/ExportData.php index 6aac72da36..262768ae91 100644 --- a/app/Console/Commands/Export/ExportData.php +++ b/app/Console/Commands/Export/ExportData.php @@ -36,7 +36,7 @@ use FireflyIII\Support\Export\ExportDataGenerator; use Illuminate\Console\Command; use Illuminate\Support\Collection; use InvalidArgumentException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ExportData diff --git a/app/Console/Commands/Integrity/CreateGroupMemberships.php b/app/Console/Commands/Integrity/CreateGroupMemberships.php index 9bae7b062a..d83d8cfca7 100644 --- a/app/Console/Commands/Integrity/CreateGroupMemberships.php +++ b/app/Console/Commands/Integrity/CreateGroupMemberships.php @@ -30,7 +30,7 @@ use FireflyIII\Models\UserGroup; use FireflyIII\Models\UserRole; use FireflyIII\User; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CreateGroupMemberships @@ -79,17 +79,18 @@ class CreateGroupMemberships extends Command /** @var User $user */ foreach ($users as $user) { Log::debug(sprintf('Manage group memberships for user #%d', $user->id)); - $this->createGroupMembership($user); + self::createGroupMembership($user); Log::debug(sprintf('Done with user #%d', $user->id)); } } /** + * TODO move to helper. * @param User $user * * @throws FireflyException */ - private function createGroupMembership(User $user): void + public static function createGroupMembership(User $user): void { // check if membership exists $userGroup = UserGroup::where('title', $user->email)->first(); diff --git a/app/Console/Commands/Integrity/RestoreOAuthKeys.php b/app/Console/Commands/Integrity/RestoreOAuthKeys.php index 29104ed079..e92d6b827a 100644 --- a/app/Console/Commands/Integrity/RestoreOAuthKeys.php +++ b/app/Console/Commands/Integrity/RestoreOAuthKeys.php @@ -26,7 +26,7 @@ namespace FireflyIII\Console\Commands\Integrity; use FireflyIII\Support\System\OAuthKeys; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RestoreOAuthKeys diff --git a/app/Console/Commands/ScanAttachments.php b/app/Console/Commands/ScanAttachments.php index 4df28bf92b..747c25f0e3 100644 --- a/app/Console/Commands/ScanAttachments.php +++ b/app/Console/Commands/ScanAttachments.php @@ -27,7 +27,7 @@ use Crypt; use FireflyIII\Models\Attachment; use Illuminate\Console\Command; use Illuminate\Contracts\Encryption\DecryptException; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Console/Commands/Tools/ApplyRules.php b/app/Console/Commands/Tools/ApplyRules.php index 88e706daf3..fc1ef53f2b 100644 --- a/app/Console/Commands/Tools/ApplyRules.php +++ b/app/Console/Commands/Tools/ApplyRules.php @@ -36,7 +36,7 @@ use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\TransactionRules\Engine\RuleEngineInterface; use Illuminate\Console\Command; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ApplyRules diff --git a/app/Console/Commands/Tools/Cron.php b/app/Console/Commands/Tools/Cron.php index 5059e43ffa..83c00a8f59 100644 --- a/app/Console/Commands/Tools/Cron.php +++ b/app/Console/Commands/Tools/Cron.php @@ -32,7 +32,7 @@ use FireflyIII\Support\Cronjobs\ExchangeRatesCronjob; use FireflyIII\Support\Cronjobs\RecurringCronjob; use Illuminate\Console\Command; use InvalidArgumentException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/AccountCurrencies.php b/app/Console/Commands/Upgrade/AccountCurrencies.php index 5f6c2ecbfe..e53f934603 100644 --- a/app/Console/Commands/Upgrade/AccountCurrencies.php +++ b/app/Console/Commands/Upgrade/AccountCurrencies.php @@ -33,7 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php index e2f811c4b3..54aa905772 100644 --- a/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php +++ b/app/Console/Commands/Upgrade/AppendBudgetLimitPeriods.php @@ -26,7 +26,7 @@ namespace FireflyIII\Console\Commands\Upgrade; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\BudgetLimit; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/BackToJournals.php b/app/Console/Commands/Upgrade/BackToJournals.php index b0da223015..537a1d3966 100644 --- a/app/Console/Commands/Upgrade/BackToJournals.php +++ b/app/Console/Commands/Upgrade/BackToJournals.php @@ -31,7 +31,7 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Console\Command; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/MigrateAttachments.php b/app/Console/Commands/Upgrade/MigrateAttachments.php index ee81654dc9..7bcbc90d92 100644 --- a/app/Console/Commands/Upgrade/MigrateAttachments.php +++ b/app/Console/Commands/Upgrade/MigrateAttachments.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Attachment; use FireflyIII\Models\Note; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/MigrateJournalNotes.php b/app/Console/Commands/Upgrade/MigrateJournalNotes.php index 140f5f0222..125a06fd36 100644 --- a/app/Console/Commands/Upgrade/MigrateJournalNotes.php +++ b/app/Console/Commands/Upgrade/MigrateJournalNotes.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Note; use FireflyIII\Models\TransactionJournalMeta; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/MigrateToGroups.php b/app/Console/Commands/Upgrade/MigrateToGroups.php index 9a2e7cc288..e6ae2caf03 100644 --- a/app/Console/Commands/Upgrade/MigrateToGroups.php +++ b/app/Console/Commands/Upgrade/MigrateToGroups.php @@ -36,7 +36,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Services\Internal\Destroy\JournalDestroyService; use Illuminate\Console\Command; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/TransactionIdentifier.php b/app/Console/Commands/Upgrade/TransactionIdentifier.php index 3ce7f97a73..6500ec8170 100644 --- a/app/Console/Commands/Upgrade/TransactionIdentifier.php +++ b/app/Console/Commands/Upgrade/TransactionIdentifier.php @@ -29,7 +29,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use Illuminate\Console\Command; use Illuminate\Database\QueryException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Schema; diff --git a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php index 7c95bdc594..99331d9159 100644 --- a/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php +++ b/app/Console/Commands/Upgrade/TransferCurrenciesCorrections.php @@ -32,7 +32,7 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/Upgrade/UpgradeLiabilities.php b/app/Console/Commands/Upgrade/UpgradeLiabilities.php index d17f1c6394..2890298b92 100644 --- a/app/Console/Commands/Upgrade/UpgradeLiabilities.php +++ b/app/Console/Commands/Upgrade/UpgradeLiabilities.php @@ -33,7 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Support\CreditRecalculateService; use FireflyIII\User; use Illuminate\Console\Command; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Console/Commands/VerifiesAccessToken.php b/app/Console/Commands/VerifiesAccessToken.php index a9a302a30a..dfcc1ce2f2 100644 --- a/app/Console/Commands/VerifiesAccessToken.php +++ b/app/Console/Commands/VerifiesAccessToken.php @@ -26,7 +26,7 @@ namespace FireflyIII\Console\Commands; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait VerifiesAccessToken. diff --git a/app/Console/Commands/VerifySecurityAlerts.php b/app/Console/Commands/VerifySecurityAlerts.php index 2b18fcd82d..bbca6a8f54 100644 --- a/app/Console/Commands/VerifySecurityAlerts.php +++ b/app/Console/Commands/VerifySecurityAlerts.php @@ -27,7 +27,7 @@ namespace FireflyIII\Console\Commands; use Illuminate\Console\Command; use Illuminate\Database\QueryException; use League\Flysystem\FilesystemException; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index b0dda017fe..42c0151d67 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -26,7 +26,7 @@ namespace FireflyIII\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; -use Log; +use Illuminate\Support\Facades\Log; /** * File to make sure commands work. diff --git a/app/Events/AdminRequestedTestMessage.php b/app/Events/AdminRequestedTestMessage.php index b320518fc0..23e03750f4 100644 --- a/app/Events/AdminRequestedTestMessage.php +++ b/app/Events/AdminRequestedTestMessage.php @@ -26,7 +26,7 @@ namespace FireflyIII\Events; use FireflyIII\User; use Illuminate\Queue\SerializesModels; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AdminRequestedTestMessage. diff --git a/app/Events/RequestedReportOnJournals.php b/app/Events/RequestedReportOnJournals.php index 10e8af5af4..1ff2a620fc 100644 --- a/app/Events/RequestedReportOnJournals.php +++ b/app/Events/RequestedReportOnJournals.php @@ -29,7 +29,7 @@ use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RequestedReportOnJournals diff --git a/app/Exceptions/GracefulNotFoundHandler.php b/app/Exceptions/GracefulNotFoundHandler.php index 33bbf0cf17..3d2c97bbc9 100644 --- a/app/Exceptions/GracefulNotFoundHandler.php +++ b/app/Exceptions/GracefulNotFoundHandler.php @@ -36,7 +36,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpFoundation\Response; use Throwable; diff --git a/app/Factory/AccountFactory.php b/app/Factory/AccountFactory.php index 5959134cc7..63a12229de 100644 --- a/app/Factory/AccountFactory.php +++ b/app/Factory/AccountFactory.php @@ -34,7 +34,7 @@ use FireflyIII\Services\Internal\Support\LocationServiceTrait; use FireflyIII\Services\Internal\Update\AccountUpdateService; use FireflyIII\User; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Factory to create or return accounts. diff --git a/app/Factory/AccountMetaFactory.php b/app/Factory/AccountMetaFactory.php index 1a927edb24..82341b9050 100644 --- a/app/Factory/AccountMetaFactory.php +++ b/app/Factory/AccountMetaFactory.php @@ -26,7 +26,7 @@ namespace FireflyIII\Factory; use FireflyIII\Models\Account; use FireflyIII\Models\AccountMeta; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AccountMetaFactory diff --git a/app/Factory/BillFactory.php b/app/Factory/BillFactory.php index 2f1582db76..efc1f366a5 100644 --- a/app/Factory/BillFactory.php +++ b/app/Factory/BillFactory.php @@ -31,7 +31,7 @@ use FireflyIII\Services\Internal\Support\BillServiceTrait; use FireflyIII\User; use Illuminate\Database\QueryException; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class BillFactory diff --git a/app/Factory/CategoryFactory.php b/app/Factory/CategoryFactory.php index 3e4caf335a..d7c2b63bb0 100644 --- a/app/Factory/CategoryFactory.php +++ b/app/Factory/CategoryFactory.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Category; use FireflyIII\User; use Illuminate\Database\QueryException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CategoryFactory diff --git a/app/Factory/PiggyBankEventFactory.php b/app/Factory/PiggyBankEventFactory.php index 1dca07b8ab..3cfe576a91 100644 --- a/app/Factory/PiggyBankEventFactory.php +++ b/app/Factory/PiggyBankEventFactory.php @@ -27,7 +27,7 @@ use FireflyIII\Models\PiggyBank; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; -use Log; +use Illuminate\Support\Facades\Log; /** * Create piggy bank events. diff --git a/app/Factory/RecurrenceFactory.php b/app/Factory/RecurrenceFactory.php index 4a0afce717..981c9c78b3 100644 --- a/app/Factory/RecurrenceFactory.php +++ b/app/Factory/RecurrenceFactory.php @@ -31,7 +31,7 @@ use FireflyIII\Services\Internal\Support\TransactionTypeTrait; use FireflyIII\User; use Illuminate\Support\MessageBag; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RecurrenceFactory diff --git a/app/Factory/TagFactory.php b/app/Factory/TagFactory.php index b7dab2d4a3..a4e6a5d871 100644 --- a/app/Factory/TagFactory.php +++ b/app/Factory/TagFactory.php @@ -26,7 +26,7 @@ namespace FireflyIII\Factory; use FireflyIII\Models\Location; use FireflyIII\Models\Tag; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TagFactory diff --git a/app/Factory/TransactionCurrencyFactory.php b/app/Factory/TransactionCurrencyFactory.php index 9cc9c9f265..5a9b54d470 100644 --- a/app/Factory/TransactionCurrencyFactory.php +++ b/app/Factory/TransactionCurrencyFactory.php @@ -26,7 +26,7 @@ namespace FireflyIII\Factory; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\TransactionCurrency; use Illuminate\Database\QueryException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionCurrencyFactory diff --git a/app/Factory/TransactionFactory.php b/app/Factory/TransactionFactory.php index f2a2627795..d01c67aa6e 100644 --- a/app/Factory/TransactionFactory.php +++ b/app/Factory/TransactionFactory.php @@ -33,7 +33,7 @@ use FireflyIII\Rules\UniqueIban; use FireflyIII\Services\Internal\Update\AccountUpdateService; use FireflyIII\User; use Illuminate\Database\QueryException; -use Log; +use Illuminate\Support\Facades\Log; use Validator; /** diff --git a/app/Factory/TransactionGroupFactory.php b/app/Factory/TransactionGroupFactory.php index 45b366531e..7d04ba566c 100644 --- a/app/Factory/TransactionGroupFactory.php +++ b/app/Factory/TransactionGroupFactory.php @@ -28,7 +28,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\TransactionGroup; use FireflyIII\User; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionGroupFactory diff --git a/app/Factory/TransactionJournalFactory.php b/app/Factory/TransactionJournalFactory.php index 5293f2443d..d5eb723a6e 100644 --- a/app/Factory/TransactionJournalFactory.php +++ b/app/Factory/TransactionJournalFactory.php @@ -49,7 +49,7 @@ use FireflyIII\User; use FireflyIII\Validation\AccountValidator; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionJournalFactory diff --git a/app/Factory/TransactionJournalMetaFactory.php b/app/Factory/TransactionJournalMetaFactory.php index d84a7e0f44..9c4ca07d63 100644 --- a/app/Factory/TransactionJournalMetaFactory.php +++ b/app/Factory/TransactionJournalMetaFactory.php @@ -25,7 +25,7 @@ namespace FireflyIII\Factory; use Carbon\Carbon; use FireflyIII\Models\TransactionJournalMeta; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionJournalMetaFactory diff --git a/app/Generator/Report/Account/MonthReportGenerator.php b/app/Generator/Report/Account/MonthReportGenerator.php index e8a5ffdaa8..0973044a41 100644 --- a/app/Generator/Report/Account/MonthReportGenerator.php +++ b/app/Generator/Report/Account/MonthReportGenerator.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Report\ReportGeneratorInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index 5b9bb87ca8..fcfdc37cdc 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -32,7 +32,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Budget/MonthReportGenerator.php b/app/Generator/Report/Budget/MonthReportGenerator.php index 717e6b7a91..70479207ba 100644 --- a/app/Generator/Report/Budget/MonthReportGenerator.php +++ b/app/Generator/Report/Budget/MonthReportGenerator.php @@ -29,7 +29,7 @@ use FireflyIII\Generator\Report\ReportGeneratorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\TransactionType; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php index b1fc078873..f480dc913c 100644 --- a/app/Generator/Report/Category/MonthReportGenerator.php +++ b/app/Generator/Report/Category/MonthReportGenerator.php @@ -29,7 +29,7 @@ use FireflyIII\Generator\Report\ReportGeneratorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Models\TransactionType; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Standard/MonthReportGenerator.php b/app/Generator/Report/Standard/MonthReportGenerator.php index 4c4dbe914e..2b4d0cde41 100644 --- a/app/Generator/Report/Standard/MonthReportGenerator.php +++ b/app/Generator/Report/Standard/MonthReportGenerator.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Report\ReportGeneratorInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Standard/MultiYearReportGenerator.php b/app/Generator/Report/Standard/MultiYearReportGenerator.php index 6cac024b12..23430c0904 100644 --- a/app/Generator/Report/Standard/MultiYearReportGenerator.php +++ b/app/Generator/Report/Standard/MultiYearReportGenerator.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Report\ReportGeneratorInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Standard/YearReportGenerator.php b/app/Generator/Report/Standard/YearReportGenerator.php index 14d4d7ac65..9a6a22b59e 100644 --- a/app/Generator/Report/Standard/YearReportGenerator.php +++ b/app/Generator/Report/Standard/YearReportGenerator.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Report\ReportGeneratorInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Report/Tag/MonthReportGenerator.php b/app/Generator/Report/Tag/MonthReportGenerator.php index 72c057362d..201343e83e 100644 --- a/app/Generator/Report/Tag/MonthReportGenerator.php +++ b/app/Generator/Report/Tag/MonthReportGenerator.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Report\ReportGeneratorInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Generator/Webhook/StandardMessageGenerator.php b/app/Generator/Webhook/StandardMessageGenerator.php index a0e28589a6..35560f040f 100644 --- a/app/Generator/Webhook/StandardMessageGenerator.php +++ b/app/Generator/Webhook/StandardMessageGenerator.php @@ -38,7 +38,7 @@ use FireflyIII\User; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Ramsey\Uuid\Uuid; use Symfony\Component\HttpFoundation\ParameterBag; diff --git a/app/Handlers/Events/APIEventHandler.php b/app/Handlers/Events/APIEventHandler.php index 8dcef4bc8f..fe45a84574 100644 --- a/app/Handlers/Events/APIEventHandler.php +++ b/app/Handlers/Events/APIEventHandler.php @@ -28,7 +28,7 @@ use FireflyIII\Notifications\User\NewAccessToken; use FireflyIII\Repositories\User\UserRepositoryInterface; use Illuminate\Support\Facades\Notification; use Laravel\Passport\Events\AccessTokenCreated; -use Log; +use Illuminate\Support\Facades\Log; /** * Class APIEventHandler diff --git a/app/Handlers/Events/AutomationHandler.php b/app/Handlers/Events/AutomationHandler.php index 98b2b5f7b1..a8c4043b38 100644 --- a/app/Handlers/Events/AutomationHandler.php +++ b/app/Handlers/Events/AutomationHandler.php @@ -30,7 +30,7 @@ use FireflyIII\Notifications\User\TransactionCreation; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Transformers\TransactionGroupTransformer; use Illuminate\Support\Facades\Notification; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AutomationHandler diff --git a/app/Handlers/Events/DestroyedGroupEventHandler.php b/app/Handlers/Events/DestroyedGroupEventHandler.php index 093f3e48d8..fbcf786fce 100644 --- a/app/Handlers/Events/DestroyedGroupEventHandler.php +++ b/app/Handlers/Events/DestroyedGroupEventHandler.php @@ -28,7 +28,7 @@ use FireflyIII\Events\DestroyedTransactionGroup; use FireflyIII\Events\RequestedSendWebhookMessages; use FireflyIII\Generator\Webhook\MessageGeneratorInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class DestroyedGroupEventHandler diff --git a/app/Handlers/Events/StoredGroupEventHandler.php b/app/Handlers/Events/StoredGroupEventHandler.php index 4b6e549dc4..44de4c78da 100644 --- a/app/Handlers/Events/StoredGroupEventHandler.php +++ b/app/Handlers/Events/StoredGroupEventHandler.php @@ -32,7 +32,7 @@ use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Services\Internal\Support\CreditRecalculateService; use FireflyIII\TransactionRules\Engine\RuleEngineInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class StoredGroupEventHandler diff --git a/app/Handlers/Events/UpdatedGroupEventHandler.php b/app/Handlers/Events/UpdatedGroupEventHandler.php index af1882d7b0..99e0046079 100644 --- a/app/Handlers/Events/UpdatedGroupEventHandler.php +++ b/app/Handlers/Events/UpdatedGroupEventHandler.php @@ -35,7 +35,7 @@ use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Services\Internal\Support\CreditRecalculateService; use FireflyIII\TransactionRules\Engine\RuleEngineInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class UpdatedGroupEventHandler diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index 2d14a8dc30..005ffd4918 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -48,7 +48,7 @@ use FireflyIII\Support\Facades\FireflyConfig; use FireflyIII\User; use Illuminate\Auth\Events\Login; use Illuminate\Support\Facades\Notification; -use Log; +use Illuminate\Support\Facades\Log; use Mail; /** diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php index 55794f6e5a..923c1a1930 100644 --- a/app/Handlers/Events/VersionCheckEventHandler.php +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -28,7 +28,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Update\UpdateTrait; use FireflyIII\Models\Configuration; use FireflyIII\Repositories\User\UserRepositoryInterface; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Handlers/Events/WebhookEventHandler.php b/app/Handlers/Events/WebhookEventHandler.php index 54c1bfa48e..c678510606 100644 --- a/app/Handlers/Events/WebhookEventHandler.php +++ b/app/Handlers/Events/WebhookEventHandler.php @@ -25,7 +25,7 @@ namespace FireflyIII\Handlers\Events; use FireflyIII\Jobs\SendWebhookMessage; use FireflyIII\Models\WebhookMessage; -use Log; +use Illuminate\Support\Facades\Log; /** * Class WebhookEventHandler diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.php index 997028f8ab..7280be2037 100644 --- a/app/Helpers/Attachments/AttachmentHelper.php +++ b/app/Helpers/Attachments/AttachmentHelper.php @@ -34,7 +34,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Storage; use Illuminate\Support\MessageBag; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpFoundation\File\UploadedFile; /** diff --git a/app/Helpers/Collector/Extensions/AttachmentCollection.php b/app/Helpers/Collector/Extensions/AttachmentCollection.php index bc6b36f002..86386947f8 100644 --- a/app/Helpers/Collector/Extensions/AttachmentCollection.php +++ b/app/Helpers/Collector/Extensions/AttachmentCollection.php @@ -29,7 +29,7 @@ use FireflyIII\Models\Attachment; use FireflyIII\Models\TransactionJournal; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait AttachmentCollection diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php index bcd87724a5..8e4b83808d 100644 --- a/app/Helpers/Collector/GroupCollector.php +++ b/app/Helpers/Collector/GroupCollector.php @@ -43,7 +43,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Query\JoinClause; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class GroupCollector diff --git a/app/Helpers/Fiscal/FiscalHelper.php b/app/Helpers/Fiscal/FiscalHelper.php index 73874b7eeb..3275c83960 100644 --- a/app/Helpers/Fiscal/FiscalHelper.php +++ b/app/Helpers/Fiscal/FiscalHelper.php @@ -25,7 +25,7 @@ namespace FireflyIII\Helpers\Fiscal; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Helpers/Update/UpdateTrait.php b/app/Helpers/Update/UpdateTrait.php index bb20a06df6..b089a8e2f3 100644 --- a/app/Helpers/Update/UpdateTrait.php +++ b/app/Helpers/Update/UpdateTrait.php @@ -25,7 +25,7 @@ namespace FireflyIII\Helpers\Update; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Services\FireflyIIIOrg\Update\UpdateRequestInterface; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Helpers/Webhook/Sha3SignatureGenerator.php b/app/Helpers/Webhook/Sha3SignatureGenerator.php index 06d38701b8..931914b3ac 100644 --- a/app/Helpers/Webhook/Sha3SignatureGenerator.php +++ b/app/Helpers/Webhook/Sha3SignatureGenerator.php @@ -26,7 +26,7 @@ namespace FireflyIII\Helpers\Webhook; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\WebhookMessage; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class Sha3SignatureGenerator diff --git a/app/Http/Controllers/Account/CreateController.php b/app/Http/Controllers/Account/CreateController.php index abb79eca3a..44c8bc8370 100644 --- a/app/Http/Controllers/Account/CreateController.php +++ b/app/Http/Controllers/Account/CreateController.php @@ -35,7 +35,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Account/IndexController.php b/app/Http/Controllers/Account/IndexController.php index 6d52d29b25..c8014aac7c 100644 --- a/app/Http/Controllers/Account/IndexController.php +++ b/app/Http/Controllers/Account/IndexController.php @@ -34,7 +34,7 @@ use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\View\View; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 45e2badfbb..a1131de344 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -40,7 +40,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\View\View; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index a5c03deff9..8b13529d5a 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -30,7 +30,7 @@ use FireflyIII\Http\Requests\ConfigurationRequest; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index ee64b72401..5bfd8d9102 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -34,7 +34,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index 5be62d08a8..e89254c06d 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -33,7 +33,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; /** * Class LinkController. diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 8cf4a02824..728c906527 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -37,7 +37,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 70d2db78ac..de43be4208 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -32,7 +32,7 @@ use Illuminate\Foundation\Auth\SendsPasswordResetEmails; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index aa5ac49521..cdb49b73a9 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -39,7 +39,7 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Routing\Redirector; use Illuminate\Validation\ValidationException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index c7e6cbc1df..f658a03b26 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -37,7 +37,7 @@ use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\Validation\ValidationException; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Bill/CreateController.php b/app/Http/Controllers/Bill/CreateController.php index da116f6936..6504dce7ac 100644 --- a/app/Http/Controllers/Bill/CreateController.php +++ b/app/Http/Controllers/Bill/CreateController.php @@ -33,7 +33,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CreateController diff --git a/app/Http/Controllers/Bill/IndexController.php b/app/Http/Controllers/Bill/IndexController.php index f8d43ca274..390f6ac419 100644 --- a/app/Http/Controllers/Bill/IndexController.php +++ b/app/Http/Controllers/Bill/IndexController.php @@ -32,7 +32,7 @@ use FireflyIII\Repositories\ObjectGroup\OrganisesObjectGroups; use FireflyIII\Transformers\BillTransformer; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Symfony\Component\HttpFoundation\ParameterBag; diff --git a/app/Http/Controllers/Budget/BudgetLimitController.php b/app/Http/Controllers/Budget/BudgetLimitController.php index 67df3abb32..b69b5e4c1d 100644 --- a/app/Http/Controllers/Budget/BudgetLimitController.php +++ b/app/Http/Controllers/Budget/BudgetLimitController.php @@ -42,7 +42,7 @@ use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; /** * diff --git a/app/Http/Controllers/Budget/IndexController.php b/app/Http/Controllers/Budget/IndexController.php index 30556efee9..aa6b6bd26d 100644 --- a/app/Http/Controllers/Budget/IndexController.php +++ b/app/Http/Controllers/Budget/IndexController.php @@ -42,7 +42,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Collection; use Illuminate\View\View; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Category/NoCategoryController.php b/app/Http/Controllers/Category/NoCategoryController.php index 9194cf1790..d77c5df7fd 100644 --- a/app/Http/Controllers/Category/NoCategoryController.php +++ b/app/Http/Controllers/Category/NoCategoryController.php @@ -35,7 +35,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Collection; use Illuminate\View\View; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index 0e726c999b..86af022265 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -41,7 +41,7 @@ use FireflyIII\Support\Http\Controllers\DateCalculation; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index fc35edf437..a762f22e27 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -38,7 +38,7 @@ use FireflyIII\Support\Http\Controllers\ChartGeneration; use Illuminate\Http\JsonResponse; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ReportController. diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 5987e12dd6..2715d916d5 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -36,7 +36,7 @@ use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/DebugController.php b/app/Http/Controllers/DebugController.php index 27bb83334a..deac77a499 100644 --- a/app/Http/Controllers/DebugController.php +++ b/app/Http/Controllers/DebugController.php @@ -35,7 +35,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Monolog\Handler\RotatingFileHandler; /** diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 0405ba75a7..8c268535fa 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -36,7 +36,7 @@ use FireflyIII\User; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class HomeController. diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php index ff1fd77bd1..1b905307fc 100644 --- a/app/Http/Controllers/Json/BoxController.php +++ b/app/Http/Controllers/Json/BoxController.php @@ -38,7 +38,7 @@ use FireflyIII\Repositories\Budget\OperationsRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\JsonResponse; -use Log; +use Illuminate\Support\Facades\Log; /** * Class BoxController. diff --git a/app/Http/Controllers/Json/FrontpageController.php b/app/Http/Controllers/Json/FrontpageController.php index a676e8c138..db0e2f10c0 100644 --- a/app/Http/Controllers/Json/FrontpageController.php +++ b/app/Http/Controllers/Json/FrontpageController.php @@ -28,7 +28,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\PiggyBank; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use Illuminate\Http\JsonResponse; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php index 500c0291c9..8f0b7b2c24 100644 --- a/app/Http/Controllers/Json/IntroController.php +++ b/app/Http/Controllers/Json/IntroController.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Support\Http\Controllers\GetConfigurationData; use Illuminate\Http\JsonResponse; -use Log; +use Illuminate\Support\Facades\Log; /** * Class IntroController. diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php index 59ee86bc8b..fbe8ac5419 100644 --- a/app/Http/Controllers/Json/ReconcileController.php +++ b/app/Http/Controllers/Json/ReconcileController.php @@ -35,7 +35,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php index ff0037f633..44d742a373 100644 --- a/app/Http/Controllers/Json/RecurrenceController.php +++ b/app/Http/Controllers/Json/RecurrenceController.php @@ -30,7 +30,7 @@ use FireflyIII\Models\RecurrenceRepetition; use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Json/RuleController.php b/app/Http/Controllers/Json/RuleController.php index f66fe0b604..3360fca391 100644 --- a/app/Http/Controllers/Json/RuleController.php +++ b/app/Http/Controllers/Json/RuleController.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Http\Controllers\Controller; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/ObjectGroup/IndexController.php b/app/Http/Controllers/ObjectGroup/IndexController.php index c970054544..27071864a8 100644 --- a/app/Http/Controllers/ObjectGroup/IndexController.php +++ b/app/Http/Controllers/ObjectGroup/IndexController.php @@ -31,7 +31,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Class IndexController diff --git a/app/Http/Controllers/PiggyBank/AmountController.php b/app/Http/Controllers/PiggyBank/AmountController.php index 3a0b2aab4b..586ba632c3 100644 --- a/app/Http/Controllers/PiggyBank/AmountController.php +++ b/app/Http/Controllers/PiggyBank/AmountController.php @@ -33,7 +33,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AmountController diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index 0eb0eaf471..f695d16920 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -34,7 +34,7 @@ use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index edbef0bce3..2ecf0b661b 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -51,7 +51,7 @@ use Illuminate\Routing\Redirector; use Illuminate\Support\Collection; use Illuminate\View\View; use Laravel\Passport\ClientRepository; -use Log; +use Illuminate\Support\Facades\Log; use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException; diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php index 79bc1b0db7..60e240b7e2 100644 --- a/app/Http/Controllers/Report/AccountController.php +++ b/app/Http/Controllers/Report/AccountController.php @@ -29,7 +29,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.php index 751a05aff2..7909be8e9a 100644 --- a/app/Http/Controllers/Report/BalanceController.php +++ b/app/Http/Controllers/Report/BalanceController.php @@ -32,7 +32,7 @@ use FireflyIII\Models\Budget; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/BillController.php b/app/Http/Controllers/Report/BillController.php index eb5105e93f..f8b87d3b8c 100644 --- a/app/Http/Controllers/Report/BillController.php +++ b/app/Http/Controllers/Report/BillController.php @@ -29,7 +29,7 @@ use FireflyIII\Helpers\Report\ReportHelperInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index 71c609b0e9..809f93e51e 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -36,7 +36,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; use Illuminate\View\View; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 595a3639a7..58ab80f5af 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -36,7 +36,7 @@ use FireflyIII\Support\Report\Category\CategoryReportGenerator; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/DoubleController.php b/app/Http/Controllers/Report/DoubleController.php index bfa6a0b62a..75f2ab43ce 100644 --- a/app/Http/Controllers/Report/DoubleController.php +++ b/app/Http/Controllers/Report/DoubleController.php @@ -33,7 +33,7 @@ use FireflyIII\Support\Http\Controllers\AugumentData; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php index f73e2cf7bf..7d833b2d09 100644 --- a/app/Http/Controllers/Report/OperationsController.php +++ b/app/Http/Controllers/Report/OperationsController.php @@ -29,7 +29,7 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Report/TagController.php b/app/Http/Controllers/Report/TagController.php index c9c599be49..fa375a05cb 100644 --- a/app/Http/Controllers/Report/TagController.php +++ b/app/Http/Controllers/Report/TagController.php @@ -32,7 +32,7 @@ use FireflyIII\Repositories\Tag\OperationsRepositoryInterface; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index b3d0dd854a..63b8e4d6c1 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -39,7 +39,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Rule/EditController.php b/app/Http/Controllers/Rule/EditController.php index 1e23675610..2e9eecd758 100644 --- a/app/Http/Controllers/Rule/EditController.php +++ b/app/Http/Controllers/Rule/EditController.php @@ -37,7 +37,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/Rule/SelectController.php b/app/Http/Controllers/Rule/SelectController.php index fbaebc00cc..bed7e662ea 100644 --- a/app/Http/Controllers/Rule/SelectController.php +++ b/app/Http/Controllers/Rule/SelectController.php @@ -39,7 +39,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 2274d1bcd8..5563500c27 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -30,7 +30,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Http/Controllers/System/CronController.php b/app/Http/Controllers/System/CronController.php index fe711c5844..1e9c80f9dd 100644 --- a/app/Http/Controllers/System/CronController.php +++ b/app/Http/Controllers/System/CronController.php @@ -26,7 +26,7 @@ namespace FireflyIII\Http\Controllers\System; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Routing\ResponseFactory; use Illuminate\Http\Response; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CronController diff --git a/app/Http/Controllers/System/InstallController.php b/app/Http/Controllers/System/InstallController.php index d8153ba008..7a8d53f6c3 100644 --- a/app/Http/Controllers/System/InstallController.php +++ b/app/Http/Controllers/System/InstallController.php @@ -35,7 +35,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\View\View; use Laravel\Passport\Passport; -use Log; +use Illuminate\Support\Facades\Log; use phpseclib3\Crypt\RSA; /** diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 2307edc31e..fc35f29ee4 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -35,7 +35,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Http/Controllers/Transaction/BulkController.php b/app/Http/Controllers/Transaction/BulkController.php index 02fa8b4175..e9129d4f48 100644 --- a/app/Http/Controllers/Transaction/BulkController.php +++ b/app/Http/Controllers/Transaction/BulkController.php @@ -35,7 +35,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\Support\Collection; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; /** * Class BulkController diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index f0a29ea83e..fa0ddc9ab4 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -43,7 +43,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ConvertController. diff --git a/app/Http/Controllers/Transaction/DeleteController.php b/app/Http/Controllers/Transaction/DeleteController.php index ed0c7c3e12..421f4b7ac5 100644 --- a/app/Http/Controllers/Transaction/DeleteController.php +++ b/app/Http/Controllers/Transaction/DeleteController.php @@ -34,7 +34,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.php index 41bf3ce9f7..168c316af1 100644 --- a/app/Http/Controllers/Transaction/LinkController.php +++ b/app/Http/Controllers/Transaction/LinkController.php @@ -34,7 +34,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -use Log; +use Illuminate\Support\Facades\Log; /** * Class LinkController. diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index f4c1345c67..42df90c845 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -41,7 +41,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; use Illuminate\View\View as IlluminateView; use InvalidArgumentException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class MassController. diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 998a9ffd82..584ee3d018 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -30,7 +30,7 @@ use FireflyIII\User; use Illuminate\Auth\AuthenticationException; use Illuminate\Contracts\Auth\Factory as Auth; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Class Authenticate diff --git a/app/Http/Middleware/Installer.php b/app/Http/Middleware/Installer.php index c9c922eed1..3207fbc5a4 100644 --- a/app/Http/Middleware/Installer.php +++ b/app/Http/Middleware/Installer.php @@ -30,7 +30,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Support\System\OAuthKeys; use Illuminate\Database\QueryException; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Class Installer diff --git a/app/Http/Middleware/IsDemoUser.php b/app/Http/Middleware/IsDemoUser.php index 6ce1d912e2..9d1211aff0 100644 --- a/app/Http/Middleware/IsDemoUser.php +++ b/app/Http/Middleware/IsDemoUser.php @@ -27,7 +27,7 @@ use Closure; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Class IsDemoUser. diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php index 5fb60e1c94..8487d084a3 100644 --- a/app/Http/Middleware/Range.php +++ b/app/Http/Middleware/Range.php @@ -29,7 +29,7 @@ use Closure; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Support\Http\Controllers\RequestInformation; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SessionFilter. diff --git a/app/Http/Requests/ReconciliationStoreRequest.php b/app/Http/Requests/ReconciliationStoreRequest.php index a6f03ae9eb..c9a1613f20 100644 --- a/app/Http/Requests/ReconciliationStoreRequest.php +++ b/app/Http/Requests/ReconciliationStoreRequest.php @@ -27,7 +27,7 @@ use FireflyIII\Rules\ValidJournals; use FireflyIII\Support\Request\ChecksLogin; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Foundation\Http\FormRequest; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ReconciliationStoreRequest diff --git a/app/Http/Requests/RecurrenceFormRequest.php b/app/Http/Requests/RecurrenceFormRequest.php index 83e2b09eba..274aec607d 100644 --- a/app/Http/Requests/RecurrenceFormRequest.php +++ b/app/Http/Requests/RecurrenceFormRequest.php @@ -34,7 +34,7 @@ use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Validation\AccountValidator; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RecurrenceFormRequest diff --git a/app/Http/Requests/ReportFormRequest.php b/app/Http/Requests/ReportFormRequest.php index 499de9f21d..0ad6760f87 100644 --- a/app/Http/Requests/ReportFormRequest.php +++ b/app/Http/Requests/ReportFormRequest.php @@ -33,7 +33,7 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface; use FireflyIII\Support\Request\ChecksLogin; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CategoryFormRequest. diff --git a/app/Jobs/CreateAutoBudgetLimits.php b/app/Jobs/CreateAutoBudgetLimits.php index a1e8eddcbd..e308384e04 100644 --- a/app/Jobs/CreateAutoBudgetLimits.php +++ b/app/Jobs/CreateAutoBudgetLimits.php @@ -36,7 +36,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CreateAutoBudgetLimits diff --git a/app/Jobs/CreateRecurringTransactions.php b/app/Jobs/CreateRecurringTransactions.php index 07ed219409..187bb4f604 100644 --- a/app/Jobs/CreateRecurringTransactions.php +++ b/app/Jobs/CreateRecurringTransactions.php @@ -42,7 +42,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CreateRecurringTransactions. diff --git a/app/Jobs/DownloadExchangeRates.php b/app/Jobs/DownloadExchangeRates.php index ccd07559d7..b7d014069f 100644 --- a/app/Jobs/DownloadExchangeRates.php +++ b/app/Jobs/DownloadExchangeRates.php @@ -37,7 +37,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class DownloadExchangeRates diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index 4d3cedadee..777601b3b6 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -29,7 +29,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Message; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Log; +use Illuminate\Support\Facades\Log; use Mail; /** @@ -100,7 +100,8 @@ class MailError extends Job implements ShouldQueue Log::warning('[RFC] Could not email or log the error. Please validate your email settings, use the .env.example file as a guide.'); return; } - throw new FireflyException($e->getMessage(), 0, $e); + Log::error($e->getMessage()); + Log::error($e->getTraceAsString()); } } } diff --git a/app/Jobs/SendWebhookMessage.php b/app/Jobs/SendWebhookMessage.php index 05efaeb8a2..c557ec61c4 100644 --- a/app/Jobs/SendWebhookMessage.php +++ b/app/Jobs/SendWebhookMessage.php @@ -31,7 +31,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SendWebhookMessage diff --git a/app/Jobs/WarnAboutBills.php b/app/Jobs/WarnAboutBills.php index 2aee67ce18..e339194bc6 100644 --- a/app/Jobs/WarnAboutBills.php +++ b/app/Jobs/WarnAboutBills.php @@ -32,7 +32,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Log; +use Illuminate\Support\Facades\Log; /** * Class WarnAboutBills diff --git a/app/Mail/NewIPAddressWarningMail.php b/app/Mail/NewIPAddressWarningMail.php index c40eed2d28..472c6274b5 100644 --- a/app/Mail/NewIPAddressWarningMail.php +++ b/app/Mail/NewIPAddressWarningMail.php @@ -28,7 +28,7 @@ use FireflyIII\Exceptions\FireflyException; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; -use Log; +use Illuminate\Support\Facades\Log; /** * Class NewIPAddressWarningMail diff --git a/app/Models/UserGroup.php b/app/Models/UserGroup.php index a5e36294d2..2852213961 100644 --- a/app/Models/UserGroup.php +++ b/app/Models/UserGroup.php @@ -63,4 +63,14 @@ class UserGroup extends Model { return $this->hasMany(GroupMembership::class); } + + /** + * Link to accounts. + * + * @return HasMany + */ + public function accounts(): HasMany + { + return $this->hasMany(Account::class); + } } diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php index a6539fe8d8..d7fb61298e 100644 --- a/app/Providers/AccountServiceProvider.php +++ b/app/Providers/AccountServiceProvider.php @@ -25,6 +25,8 @@ namespace FireflyIII\Providers; use FireflyIII\Repositories\Account\AccountRepository; use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Repositories\Administration\Account\AccountRepository as AdminAccountRepository; +use FireflyIII\Repositories\Administration\Account\AccountRepositoryInterface as AdminAccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountTasker; use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Account\OperationsRepository; @@ -73,6 +75,22 @@ class AccountServiceProvider extends ServiceProvider } ); + $this->app->bind( + AdminAccountRepositoryInterface::class, + function (Application $app) { + /** @var AdminAccountRepositoryInterface $repository */ + $repository = app(AdminAccountRepository::class); + + // phpstan thinks auth does not exist. + if ($app->auth->check()) { // @phpstan-ignore-line + $repository->setUser(auth()->user()); + $repository->setAdministrationId((int) auth()->user()->user_group_id); + } + + return $repository; + } + ); + $this->app->bind( OperationsRepositoryInterface::class, static function (Application $app) { diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index f4f533f7ac..5588d32550 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -50,7 +50,7 @@ use FireflyIII\Repositories\Budget\BudgetLimitRepositoryInterface; use Illuminate\Auth\Events\Login; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Laravel\Passport\Events\AccessTokenCreated; -use Log; +use Illuminate\Support\Facades\Log; /** * Class EventServiceProvider. diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index ec4a4514fa..ed47edd520 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -43,7 +43,7 @@ use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index 17891d2ba8..6a10a73080 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -33,7 +33,7 @@ use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AccountTasker. diff --git a/app/Repositories/Administration/Account/AccountRepository.php b/app/Repositories/Administration/Account/AccountRepository.php new file mode 100644 index 0000000000..df4e834d6e --- /dev/null +++ b/app/Repositories/Administration/Account/AccountRepository.php @@ -0,0 +1,63 @@ +. + */ + +namespace FireflyIII\Repositories\Administration\Account; + +use FireflyIII\Support\Repositories\Administration\AdministrationTrait; +use Illuminate\Support\Collection; + +/** + * Class AccountRepository + */ +class AccountRepository implements AccountRepositoryInterface +{ + use AdministrationTrait; + + /** + * @inheritDoc + */ + public function searchAccount(string $query, array $types, int $limit): Collection + { + // search by group, not by user + $dbQuery = $this->userGroup->accounts() + ->where('active', true) + ->orderBy('accounts.order', 'ASC') + ->orderBy('accounts.account_type_id', 'ASC') + ->orderBy('accounts.name', 'ASC') + ->with(['accountType']); + if ('' !== $query) { + // split query on spaces just in case: + $parts = explode(' ', $query); + foreach ($parts as $part) { + $search = sprintf('%%%s%%', $part); + $dbQuery->where('name', 'LIKE', $search); + } + } + if (0 !== count($types)) { + $dbQuery->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id'); + $dbQuery->whereIn('account_types.type', $types); + } + + return $dbQuery->take($limit)->get(['accounts.*']); + } +} diff --git a/app/Repositories/Administration/Account/AccountRepositoryInterface.php b/app/Repositories/Administration/Account/AccountRepositoryInterface.php new file mode 100644 index 0000000000..f853ac4ef8 --- /dev/null +++ b/app/Repositories/Administration/Account/AccountRepositoryInterface.php @@ -0,0 +1,41 @@ +. + */ + +namespace FireflyIII\Repositories\Administration\Account; + +use Illuminate\Support\Collection; + +/** + * Interface AccountRepositoryInterface + */ +interface AccountRepositoryInterface +{ + /** + * @param string $query + * @param array $types + * @param int $limit + * + * @return Collection + */ + public function searchAccount(string $query, array $types, int $limit): Collection; +} diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php index b28fc55814..18f6427d01 100644 --- a/app/Repositories/Attachment/AttachmentRepository.php +++ b/app/Repositories/Attachment/AttachmentRepository.php @@ -36,7 +36,7 @@ use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Storage; use League\Flysystem\UnableToDeleteFile; -use Log; +use Illuminate\Support\Facades\Log; use LogicException; /** diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index d8855734cd..874cc92ff5 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -44,7 +44,7 @@ use Illuminate\Database\Query\JoinClause; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Repositories/Budget/BudgetLimitRepository.php b/app/Repositories/Budget/BudgetLimitRepository.php index 2080c21f3e..74422c6ef6 100644 --- a/app/Repositories/Budget/BudgetLimitRepository.php +++ b/app/Repositories/Budget/BudgetLimitRepository.php @@ -34,7 +34,7 @@ use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 9122c374a5..75213a621f 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -45,7 +45,7 @@ use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Database\QueryException; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Repositories/Budget/OperationsRepository.php b/app/Repositories/Budget/OperationsRepository.php index 93d80b6329..07a10a4e95 100644 --- a/app/Repositories/Budget/OperationsRepository.php +++ b/app/Repositories/Budget/OperationsRepository.php @@ -33,7 +33,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 26fa5ee630..6b9024c82d 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -38,7 +38,7 @@ use FireflyIII\Services\Internal\Update\CategoryUpdateService; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index 82379071a1..a414936728 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -42,7 +42,7 @@ use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CurrencyRepository. diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php index a933f2630c..c068e453c9 100644 --- a/app/Repositories/LinkType/LinkTypeRepository.php +++ b/app/Repositories/LinkType/LinkTypeRepository.php @@ -32,7 +32,7 @@ use FireflyIII\Models\TransactionJournalLink; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class LinkTypeRepository. diff --git a/app/Repositories/ObjectGroup/ObjectGroupRepository.php b/app/Repositories/ObjectGroup/ObjectGroupRepository.php index 84005207da..6971b4d79a 100644 --- a/app/Repositories/ObjectGroup/ObjectGroupRepository.php +++ b/app/Repositories/ObjectGroup/ObjectGroupRepository.php @@ -30,7 +30,7 @@ use FireflyIII\Models\PiggyBank; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ObjectGroupRepository diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 861c823906..9f03677c6a 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -37,7 +37,7 @@ use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Repositories/Recurring/RecurringRepository.php b/app/Repositories/Recurring/RecurringRepository.php index 091a036568..1948b9ece4 100644 --- a/app/Repositories/Recurring/RecurringRepository.php +++ b/app/Repositories/Recurring/RecurringRepository.php @@ -48,7 +48,7 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RecurringRepository diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index 0fffd52bec..badfc08c47 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -34,7 +34,7 @@ use FireflyIII\Support\Search\OperatorQuerySearch; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RuleRepository. diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php index 377130f719..91d38404f1 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepository.php +++ b/app/Repositories/RuleGroup/RuleGroupRepository.php @@ -32,7 +32,7 @@ use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RuleGroupRepository. diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index a6763bb3f9..e63c512b18 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -36,7 +36,7 @@ use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Storage; /** diff --git a/app/Repositories/TransactionGroup/TransactionGroupRepository.php b/app/Repositories/TransactionGroup/TransactionGroupRepository.php index 00eadc2740..33308d004b 100644 --- a/app/Repositories/TransactionGroup/TransactionGroupRepository.php +++ b/app/Repositories/TransactionGroup/TransactionGroupRepository.php @@ -49,7 +49,7 @@ use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionGroupRepository diff --git a/app/Repositories/TransactionType/TransactionTypeRepository.php b/app/Repositories/TransactionType/TransactionTypeRepository.php index 40f8edb19b..3b2aacce20 100644 --- a/app/Repositories/TransactionType/TransactionTypeRepository.php +++ b/app/Repositories/TransactionType/TransactionTypeRepository.php @@ -25,7 +25,7 @@ namespace FireflyIII\Repositories\TransactionType; use FireflyIII\Models\TransactionType; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionTypeRepository diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 570cf7c105..cc7972ba5b 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -34,7 +34,7 @@ use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Database\QueryException; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Str; /** diff --git a/app/Rules/BelongsUser.php b/app/Rules/BelongsUser.php index e157dad67f..f951b92d06 100644 --- a/app/Rules/BelongsUser.php +++ b/app/Rules/BelongsUser.php @@ -32,7 +32,7 @@ use FireflyIII\Models\Category; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\TransactionJournal; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class BelongsUser diff --git a/app/Rules/IsDateOrTime.php b/app/Rules/IsDateOrTime.php index f79a1287a0..4acdaf9362 100644 --- a/app/Rules/IsDateOrTime.php +++ b/app/Rules/IsDateOrTime.php @@ -28,7 +28,7 @@ use Carbon\Carbon; use Carbon\Exceptions\InvalidDateException; use Carbon\Exceptions\InvalidFormatException; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class IsDateOrTime diff --git a/app/Rules/IsTransferAccount.php b/app/Rules/IsTransferAccount.php index 7cf7f00e0d..2451c5f7fd 100644 --- a/app/Rules/IsTransferAccount.php +++ b/app/Rules/IsTransferAccount.php @@ -27,7 +27,7 @@ namespace FireflyIII\Rules; use FireflyIII\Models\TransactionType; use FireflyIII\Validation\AccountValidator; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class IsTransferAccount diff --git a/app/Rules/IsValidAttachmentModel.php b/app/Rules/IsValidAttachmentModel.php index 9eb88777a9..5b4cf7af9d 100644 --- a/app/Rules/IsValidAttachmentModel.php +++ b/app/Rules/IsValidAttachmentModel.php @@ -40,7 +40,7 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class IsValidAttachmentModel diff --git a/app/Rules/UniqueAccountNumber.php b/app/Rules/UniqueAccountNumber.php index 6bfd71f42d..925fa23f4c 100644 --- a/app/Rules/UniqueAccountNumber.php +++ b/app/Rules/UniqueAccountNumber.php @@ -27,7 +27,7 @@ use FireflyIII\Models\Account; use FireflyIII\Models\AccountMeta; use FireflyIII\Models\AccountType; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class UniqueAccountNumber diff --git a/app/Rules/UniqueIban.php b/app/Rules/UniqueIban.php index 84afd3494a..75c247d82d 100644 --- a/app/Rules/UniqueIban.php +++ b/app/Rules/UniqueIban.php @@ -26,7 +26,7 @@ namespace FireflyIII\Rules; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class UniqueIban diff --git a/app/Rules/ValidJournals.php b/app/Rules/ValidJournals.php index b7f387d7c7..d10785f2d0 100644 --- a/app/Rules/ValidJournals.php +++ b/app/Rules/ValidJournals.php @@ -26,7 +26,7 @@ namespace FireflyIII\Rules; use FireflyIII\Models\TransactionJournal; use Illuminate\Contracts\Validation\Rule; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ValidJournals diff --git a/app/Rules/ValidRecurrenceRepetitionValue.php b/app/Rules/ValidRecurrenceRepetitionValue.php index 19087da65e..247b5d715e 100644 --- a/app/Rules/ValidRecurrenceRepetitionValue.php +++ b/app/Rules/ValidRecurrenceRepetitionValue.php @@ -26,7 +26,7 @@ namespace FireflyIII\Rules; use Carbon\Carbon; use Illuminate\Contracts\Validation\Rule; use InvalidArgumentException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ValidRecurrenceRepetitionValue diff --git a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php index 58615fb06b..c0dfc41884 100644 --- a/app/Services/FireflyIIIOrg/Update/UpdateRequest.php +++ b/app/Services/FireflyIIIOrg/Update/UpdateRequest.php @@ -29,7 +29,7 @@ use FireflyIII\Events\NewVersionAvailable; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class UpdateRequest diff --git a/app/Services/Internal/Destroy/AccountDestroyService.php b/app/Services/Internal/Destroy/AccountDestroyService.php index a579ee0783..683077ee06 100644 --- a/app/Services/Internal/Destroy/AccountDestroyService.php +++ b/app/Services/Internal/Destroy/AccountDestroyService.php @@ -31,7 +31,7 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use Illuminate\Database\Eloquent\Builder; -use Log; +use Illuminate\Support\Facades\Log; use stdClass; /** diff --git a/app/Services/Internal/Destroy/JournalDestroyService.php b/app/Services/Internal/Destroy/JournalDestroyService.php index b25f27e458..a8a0d79b80 100644 --- a/app/Services/Internal/Destroy/JournalDestroyService.php +++ b/app/Services/Internal/Destroy/JournalDestroyService.php @@ -29,7 +29,7 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournalLink; use FireflyIII\Models\TransactionJournalMeta; -use Log; +use Illuminate\Support\Facades\Log; /** * Class JournalDestroyService diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 3c0832a356..244dd60c98 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -39,7 +39,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Validator; /** diff --git a/app/Services/Internal/Support/BillServiceTrait.php b/app/Services/Internal/Support/BillServiceTrait.php index 5e0f17ec35..bfe6e37299 100644 --- a/app/Services/Internal/Support/BillServiceTrait.php +++ b/app/Services/Internal/Support/BillServiceTrait.php @@ -26,7 +26,7 @@ namespace FireflyIII\Services\Internal\Support; use FireflyIII\Models\Bill; use FireflyIII\Models\Note; use FireflyIII\Models\RuleAction; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait BillServiceTrait diff --git a/app/Services/Internal/Support/CreditRecalculateService.php b/app/Services/Internal/Support/CreditRecalculateService.php index a1dd1ee691..af56aca240 100644 --- a/app/Services/Internal/Support/CreditRecalculateService.php +++ b/app/Services/Internal/Support/CreditRecalculateService.php @@ -32,7 +32,7 @@ use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use Log; +use Illuminate\Support\Facades\Log; class CreditRecalculateService { @@ -86,13 +86,11 @@ class CreditRecalculateService { /** @var TransactionJournal $journal */ foreach ($this->group->transactionJournals as $journal) { - if (0 === count($this->work)) { - try { - $this->findByJournal($journal); - } catch (FireflyException $e) { - Log::error($e->getTraceAsString()); - Log::error(sprintf('Could not find work account for transaction group #%d.', $this->group->id)); - } + try { + $this->findByJournal($journal); + } catch (FireflyException $e) { + Log::error($e->getTraceAsString()); + Log::error(sprintf('Could not find work account for transaction group #%d.', $this->group->id)); } } Log::debug(sprintf('Done with %s', __METHOD__)); diff --git a/app/Services/Internal/Support/JournalServiceTrait.php b/app/Services/Internal/Support/JournalServiceTrait.php index a57d16487f..70a9668b0c 100644 --- a/app/Services/Internal/Support/JournalServiceTrait.php +++ b/app/Services/Internal/Support/JournalServiceTrait.php @@ -35,7 +35,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\NullArrayObject; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait JournalServiceTrait @@ -86,9 +86,14 @@ trait JournalServiceTrait Log::debug(sprintf('Search again using the new name, "%s".', $data['name'])); $result = $this->findAccountByName(null, $data, $expectedTypes[$transactionType]); } + + // the account that Firefly III creates must be "creatable", aka select the one we can create from the list just in case + $creatableType = $this->getCreatableType($expectedTypes[$transactionType]); + + // if the result is NULL but the ID is set, an account could exist of the wrong type. // that data can be used to create a new account of the right type. - if (null === $result && null !== $data['id']) { + if (null === $result && null !== $data['id'] && null !== $creatableType) { Log::debug(sprintf('Account #%d may exist and be of the wrong type, use data to create one of the right type.', $data['id'])); $temp = $this->findAccountById(['id' => $data['id']], []); if (null !== $temp) { @@ -98,12 +103,12 @@ trait JournalServiceTrait 'number' => null, 'bic' => null, ]; - $result = $this->createAccount(null, $tempData, $expectedTypes[$transactionType][0]); + $result = $this->createAccount(null, $tempData, $creatableType); } } - if (null === $result) { + if (null === $result && null !== $creatableType) { Log::debug('If nothing is found, create it.'); - $result = $this->createAccount($result, $data, $expectedTypes[$transactionType][0]); + $result = $this->createAccount($result, $data, $creatableType); } if (null === $result) { Log::debug('If cant be created, return cash account.'); @@ -237,6 +242,24 @@ trait JournalServiceTrait return null; } + /** + * @param array $types + * @return null|string + */ + private function getCreatableType(array $types): ?string + { + $result = null; + $list = config('firefly.dynamic_creation_allowed'); + /** @var string $type */ + foreach ($types as $type) { + if (true === in_array($type, $list, true)) { + $result = $type; + break; + } + } + return $result; + } + /** * @param Account|null $account * @param array $data diff --git a/app/Services/Internal/Support/RecurringTransactionTrait.php b/app/Services/Internal/Support/RecurringTransactionTrait.php index 1510e5ecff..f5d131ede0 100644 --- a/app/Services/Internal/Support/RecurringTransactionTrait.php +++ b/app/Services/Internal/Support/RecurringTransactionTrait.php @@ -41,7 +41,7 @@ use FireflyIII\Models\RecurrenceTransactionMeta; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Validation\AccountValidator; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait RecurringTransactionTrait diff --git a/app/Services/Internal/Support/TransactionTypeTrait.php b/app/Services/Internal/Support/TransactionTypeTrait.php index 518f06a327..1e5c0457da 100644 --- a/app/Services/Internal/Support/TransactionTypeTrait.php +++ b/app/Services/Internal/Support/TransactionTypeTrait.php @@ -26,7 +26,7 @@ namespace FireflyIII\Services\Internal\Support; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Factory\TransactionTypeFactory; use FireflyIII\Models\TransactionType; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait TransactionTypeTrait diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php index 1ba8182121..020cffdbee 100644 --- a/app/Services/Internal/Update/AccountUpdateService.php +++ b/app/Services/Internal/Update/AccountUpdateService.php @@ -32,7 +32,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Services\Internal\Support\AccountServiceTrait; use FireflyIII\User; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AccountUpdateService diff --git a/app/Services/Internal/Update/BillUpdateService.php b/app/Services/Internal/Update/BillUpdateService.php index 0980eece73..841cec3473 100644 --- a/app/Services/Internal/Update/BillUpdateService.php +++ b/app/Services/Internal/Update/BillUpdateService.php @@ -34,7 +34,7 @@ use FireflyIII\Services\Internal\Support\BillServiceTrait; use FireflyIII\User; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class BillUpdateService diff --git a/app/Services/Internal/Update/CategoryUpdateService.php b/app/Services/Internal/Update/CategoryUpdateService.php index 16eea5e01c..569ebbc3bb 100644 --- a/app/Services/Internal/Update/CategoryUpdateService.php +++ b/app/Services/Internal/Update/CategoryUpdateService.php @@ -29,7 +29,7 @@ use FireflyIII\Models\Note; use FireflyIII\Models\RecurrenceTransactionMeta; use FireflyIII\Models\RuleAction; use FireflyIII\Models\RuleTrigger; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CategoryUpdateService diff --git a/app/Services/Internal/Update/GroupUpdateService.php b/app/Services/Internal/Update/GroupUpdateService.php index cd16f6f828..997d5d5351 100644 --- a/app/Services/Internal/Update/GroupUpdateService.php +++ b/app/Services/Internal/Update/GroupUpdateService.php @@ -30,7 +30,7 @@ use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; use FireflyIII\Services\Internal\Destroy\JournalDestroyService; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class GroupUpdateService diff --git a/app/Services/Internal/Update/JournalUpdateService.php b/app/Services/Internal/Update/JournalUpdateService.php index acc3735fd7..b21abba98a 100644 --- a/app/Services/Internal/Update/JournalUpdateService.php +++ b/app/Services/Internal/Update/JournalUpdateService.php @@ -42,7 +42,7 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Services\Internal\Support\JournalServiceTrait; use FireflyIII\Support\NullArrayObject; use FireflyIII\Validation\AccountValidator; -use Log; +use Illuminate\Support\Facades\Log; /** * Class to centralise code that updates a journal given the input by system. @@ -322,7 +322,7 @@ class JournalUpdateService $validator->setTransactionType($expectedType); $validator->setUser($this->transactionJournal->user); $validator->source = $this->getValidSourceAccount(); - $result = $validator->validateDestination(['id' => $destId, 'name' => $destName]); + $result = $validator->validateDestination(['id' => $destId, 'name' => $destName]); Log::debug(sprintf('hasValidDestinationAccount(%d, "%s") will return %s', $destId, $destName, var_export($result, true))); // TODO typeOverrule: the account validator may have another opinion on the transaction type. diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.php index 5d3ddd44bb..d6c0de05a9 100644 --- a/app/Services/Internal/Update/RecurrenceUpdateService.php +++ b/app/Services/Internal/Update/RecurrenceUpdateService.php @@ -33,7 +33,7 @@ use FireflyIII\Services\Internal\Support\RecurringTransactionTrait; use FireflyIII\Services\Internal\Support\TransactionTypeTrait; use FireflyIII\User; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RecurrenceUpdateService diff --git a/app/Services/Password/PwndVerifierV2.php b/app/Services/Password/PwndVerifierV2.php index 14853e1d1c..492519d753 100644 --- a/app/Services/Password/PwndVerifierV2.php +++ b/app/Services/Password/PwndVerifierV2.php @@ -26,7 +26,7 @@ namespace FireflyIII\Services\Password; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\RequestException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class PwndVerifierV2. diff --git a/app/Services/Webhook/StandardWebhookSender.php b/app/Services/Webhook/StandardWebhookSender.php index ecb11a3b4f..2258742362 100644 --- a/app/Services/Webhook/StandardWebhookSender.php +++ b/app/Services/Webhook/StandardWebhookSender.php @@ -31,7 +31,7 @@ use GuzzleHttp\Client; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class StandardWebhookSender diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 43d0556d64..1956633760 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -83,13 +83,13 @@ class Amount if (true === $coloured) { if (1 === bccomp($rounded, '0')) { - return sprintf('%s', $result); + return sprintf('%s', $result); } if (-1 === bccomp($rounded, '0')) { - return sprintf('%s', $result); + return sprintf('%s', $result); } - return sprintf('%s', $result); + return sprintf('%s', $result); } return $result; diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php index 9edee6510c..f554295034 100644 --- a/app/Support/Authentication/RemoteUserGuard.php +++ b/app/Support/Authentication/RemoteUserGuard.php @@ -31,7 +31,7 @@ use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Foundation\Application; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/Authentication/RemoteUserProvider.php b/app/Support/Authentication/RemoteUserProvider.php index 835fd0a500..73499a7679 100644 --- a/app/Support/Authentication/RemoteUserProvider.php +++ b/app/Support/Authentication/RemoteUserProvider.php @@ -24,12 +24,13 @@ declare(strict_types=1); namespace FireflyIII\Support\Authentication; +use FireflyIII\Console\Commands\Integrity\CreateGroupMemberships; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Role; use FireflyIII\User; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\UserProvider; -use Log; +use Illuminate\Support\Facades\Log; use Str; /** @@ -68,6 +69,8 @@ class RemoteUserProvider implements UserProvider $roleObject = Role::where('name', 'owner')->first(); $user->roles()->attach($roleObject); } + // make sure the user gets an administration as well. + CreateGroupMemberships::createGroupMembership($user); } Log::debug(sprintf('Going to return user #%d (%s)', $user->id, $user->email)); diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php index 4d2c2b9e43..828b72aa51 100644 --- a/app/Support/Binder/AccountList.php +++ b/app/Support/Binder/AccountList.php @@ -26,7 +26,7 @@ namespace FireflyIII\Support\Binder; use FireflyIII\Models\AccountType; use Illuminate\Routing\Route; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Support/Binder/CLIToken.php b/app/Support/Binder/CLIToken.php index e26a775aae..cffa4e4ffd 100644 --- a/app/Support/Binder/CLIToken.php +++ b/app/Support/Binder/CLIToken.php @@ -26,7 +26,7 @@ namespace FireflyIII\Support\Binder; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Repositories\User\UserRepositoryInterface; use Illuminate\Routing\Route; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Support/Binder/Date.php b/app/Support/Binder/Date.php index 26a60f0bc1..367b4406bc 100644 --- a/app/Support/Binder/Date.php +++ b/app/Support/Binder/Date.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use Carbon\Exceptions\InvalidDateException; use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; use Illuminate\Routing\Route; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Support/Binder/TagList.php b/app/Support/Binder/TagList.php index 8b432a07d0..efd0adad48 100644 --- a/app/Support/Binder/TagList.php +++ b/app/Support/Binder/TagList.php @@ -27,7 +27,7 @@ use FireflyIII\Models\Tag; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Routing\Route; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Support/Binder/TagOrId.php b/app/Support/Binder/TagOrId.php index 12ecd26c0f..4cb54de2ad 100644 --- a/app/Support/Binder/TagOrId.php +++ b/app/Support/Binder/TagOrId.php @@ -26,7 +26,7 @@ namespace FireflyIII\Support\Binder; use FireflyIII\Models\Tag; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Routing\Route; -use Log; +use Illuminate\Support\Facades\Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** diff --git a/app/Support/Cronjobs/AutoBudgetCronjob.php b/app/Support/Cronjobs/AutoBudgetCronjob.php index 0aaba15929..6ac950a1f8 100644 --- a/app/Support/Cronjobs/AutoBudgetCronjob.php +++ b/app/Support/Cronjobs/AutoBudgetCronjob.php @@ -27,7 +27,7 @@ namespace FireflyIII\Support\Cronjobs; use Carbon\Carbon; use FireflyIII\Jobs\CreateAutoBudgetLimits; use FireflyIII\Models\Configuration; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AutoBudgetCronjob diff --git a/app/Support/Cronjobs/BillWarningCronjob.php b/app/Support/Cronjobs/BillWarningCronjob.php index bf069c3031..2b3c03f512 100644 --- a/app/Support/Cronjobs/BillWarningCronjob.php +++ b/app/Support/Cronjobs/BillWarningCronjob.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Jobs\WarnAboutBills; use FireflyIII\Models\Configuration; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/Cronjobs/ExchangeRatesCronjob.php b/app/Support/Cronjobs/ExchangeRatesCronjob.php index 55911154a2..c76131777a 100644 --- a/app/Support/Cronjobs/ExchangeRatesCronjob.php +++ b/app/Support/Cronjobs/ExchangeRatesCronjob.php @@ -27,7 +27,7 @@ namespace FireflyIII\Support\Cronjobs; use Carbon\Carbon; use FireflyIII\Jobs\DownloadExchangeRates; use FireflyIII\Models\Configuration; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ExchangeRatesCronjob diff --git a/app/Support/Cronjobs/RecurringCronjob.php b/app/Support/Cronjobs/RecurringCronjob.php index b1107e7a22..cdb2b989ff 100644 --- a/app/Support/Cronjobs/RecurringCronjob.php +++ b/app/Support/Cronjobs/RecurringCronjob.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Jobs\CreateRecurringTransactions; use FireflyIII\Models\Configuration; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index 6c361b920d..c097984579 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -28,7 +28,7 @@ use Eloquent; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Support\Form\FormSupport; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php index 57abb7e45b..3796b89a0e 100644 --- a/app/Support/FireflyConfig.php +++ b/app/Support/FireflyConfig.php @@ -28,7 +28,7 @@ use Exception; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Configuration; use Illuminate\Database\QueryException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class FireflyConfig. diff --git a/app/Support/Form/AccountForm.php b/app/Support/Form/AccountForm.php index 2e244dc812..6134ded1cd 100644 --- a/app/Support/Form/AccountForm.php +++ b/app/Support/Form/AccountForm.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/Form/CurrencyForm.php b/app/Support/Form/CurrencyForm.php index 56e95cc055..67302a613e 100644 --- a/app/Support/Form/CurrencyForm.php +++ b/app/Support/Form/CurrencyForm.php @@ -28,7 +28,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/Form/FormSupport.php b/app/Support/Form/FormSupport.php index cfcb34f661..b1c3e35c5f 100644 --- a/app/Support/Form/FormSupport.php +++ b/app/Support/Form/FormSupport.php @@ -27,7 +27,7 @@ use Carbon\Carbon; use Carbon\Exceptions\InvalidDateException; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Support\MessageBag; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/Http/Api/ConvertsExchangeRates.php b/app/Support/Http/Api/ConvertsExchangeRates.php index 2da58e4abe..85b6bb83ce 100644 --- a/app/Support/Http/Api/ConvertsExchangeRates.php +++ b/app/Support/Http/Api/ConvertsExchangeRates.php @@ -28,7 +28,7 @@ use Carbon\Carbon; use DateTimeInterface; use FireflyIII\Models\CurrencyExchangeRate; use FireflyIII\Models\TransactionCurrency; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait ConvertsExchangeRates diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index ce5518e8d3..6a5165e76d 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -32,7 +32,7 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait ChartGeneration diff --git a/app/Support/Http/Controllers/CreateStuff.php b/app/Support/Http/Controllers/CreateStuff.php index df8cdf4af0..ebb5c186c1 100644 --- a/app/Support/Http/Controllers/CreateStuff.php +++ b/app/Support/Http/Controllers/CreateStuff.php @@ -29,7 +29,7 @@ use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; use Laravel\Passport\Passport; -use Log; +use Illuminate\Support\Facades\Log; use phpseclib3\Crypt\RSA; /** diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php index fd06294bfb..315262c88d 100644 --- a/app/Support/Http/Controllers/GetConfigurationData.php +++ b/app/Support/Http/Controllers/GetConfigurationData.php @@ -25,7 +25,7 @@ namespace FireflyIII\Support\Http\Controllers; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/Http/Controllers/ModelInformation.php b/app/Support/Http/Controllers/ModelInformation.php index ecdacf06bf..15242561f2 100644 --- a/app/Support/Http/Controllers/ModelInformation.php +++ b/app/Support/Http/Controllers/ModelInformation.php @@ -30,7 +30,7 @@ use FireflyIII\Models\Tag; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index ed6973a058..8630365ae7 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -33,7 +33,7 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/Http/Controllers/RenderPartialViews.php b/app/Support/Http/Controllers/RenderPartialViews.php index 568af28212..84dfd9546a 100644 --- a/app/Support/Http/Controllers/RenderPartialViews.php +++ b/app/Support/Http/Controllers/RenderPartialViews.php @@ -36,7 +36,7 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use FireflyIII\Support\Search\OperatorQuerySearch; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/Http/Controllers/RequestInformation.php b/app/Support/Http/Controllers/RequestInformation.php index 824975c4ed..53091d7bfc 100644 --- a/app/Support/Http/Controllers/RequestInformation.php +++ b/app/Support/Http/Controllers/RequestInformation.php @@ -35,7 +35,7 @@ use Illuminate\Contracts\Validation\Validator as ValidatorContract; use Illuminate\Routing\Route; use Illuminate\Support\Facades\Validator; use InvalidArgumentException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Route as RouteFacade; diff --git a/app/Support/Http/Controllers/RuleManagement.php b/app/Support/Http/Controllers/RuleManagement.php index 42865ab1ce..f3068e7b0c 100644 --- a/app/Support/Http/Controllers/RuleManagement.php +++ b/app/Support/Http/Controllers/RuleManagement.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use FireflyIII\Support\Search\OperatorQuerySearch; use Illuminate\Http\Request; -use Log; +use Illuminate\Support\Facades\Log; use Throwable; /** diff --git a/app/Support/Http/Controllers/UserNavigation.php b/app/Support/Http/Controllers/UserNavigation.php index 84cf46b458..3ccdfc1d4c 100644 --- a/app/Support/Http/Controllers/UserNavigation.php +++ b/app/Support/Http/Controllers/UserNavigation.php @@ -31,7 +31,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait UserNavigation diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 3aa6d81fbb..aab44e3d24 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -26,7 +26,7 @@ namespace FireflyIII\Support; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/ParseDateString.php b/app/Support/ParseDateString.php index d85fde5830..02b5c8d227 100644 --- a/app/Support/ParseDateString.php +++ b/app/Support/ParseDateString.php @@ -26,7 +26,7 @@ namespace FireflyIII\Support; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ParseDateString diff --git a/app/Support/Repositories/Administration/AdministrationTrait.php b/app/Support/Repositories/Administration/AdministrationTrait.php new file mode 100644 index 0000000000..046a30e2ae --- /dev/null +++ b/app/Support/Repositories/Administration/AdministrationTrait.php @@ -0,0 +1,84 @@ +. + */ + +namespace FireflyIII\Support\Repositories\Administration; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Models\GroupMembership; +use FireflyIII\Models\UserGroup; +use FireflyIII\User; +use Illuminate\Contracts\Auth\Authenticatable; + +/** + * Trait AdministrationTrait + */ +trait AdministrationTrait +{ + protected User $user; + protected ?int $administrationId = null; + protected ?UserGroup $userGroup = null; + + /** + * @return int + */ + public function getAdministrationId(): int + { + return $this->administrationId; + } + + /** + * @param int $administrationId + * @throws FireflyException + */ + public function setAdministrationId(int $administrationId): void + { + $this->administrationId = $administrationId; + $this->refreshAdministration(); + } + + /** + * @return void + */ + private function refreshAdministration(): void + { + if (null !== $this->administrationId) { + $memberships = GroupMembership::where('user_id', $this->user->id) + ->where('user_group_id', $this->administrationId) + ->count(); + if (0 === $memberships) { + throw new FireflyException(sprintf('User #%d has no access to administration #%d', $this->user->id, $this->administrationId)); + } + $this->userGroup = UserGroup::find($this->administrationId); + return; + } + throw new FireflyException(sprintf('Cannot validate administration for user #%d', $this->user->id)); + } + + + public function setUser(Authenticatable|User|null $user): void + { + if (null !== $user) { + $this->user = $user; + } + } +} diff --git a/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php b/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php index c9b505c25a..950c2ec5d2 100644 --- a/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php +++ b/app/Support/Repositories/Recurring/CalculateXOccurrencesSince.php @@ -25,7 +25,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Repositories\Recurring; use Carbon\Carbon; -use Log; +use Illuminate\Support\Facades\Log; /** * Class CalculateXOccurrencesSince diff --git a/app/Support/Request/AppendsLocationData.php b/app/Support/Request/AppendsLocationData.php index 0bd76b8143..d37584b759 100644 --- a/app/Support/Request/AppendsLocationData.php +++ b/app/Support/Request/AppendsLocationData.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Request; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait AppendsLocationData diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php index f1a3ebcf09..67f0417db8 100644 --- a/app/Support/Request/ConvertsDataTypes.php +++ b/app/Support/Request/ConvertsDataTypes.php @@ -25,7 +25,7 @@ namespace FireflyIII\Support\Request; use Carbon\Carbon; use Carbon\Exceptions\InvalidFormatException; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait ConvertsDataTypes diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.php index 1ac3dd3b4b..7c83ceb91d 100644 --- a/app/Support/Search/OperatorQuerySearch.php +++ b/app/Support/Search/OperatorQuerySearch.php @@ -54,7 +54,7 @@ use Gdbots\QueryParser\Node\Word; use Gdbots\QueryParser\QueryParser; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; use LogicException; use TypeError; diff --git a/app/Support/Steam.php b/app/Support/Steam.php index ab882b2ac0..5e8459b3ef 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -33,7 +33,7 @@ use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Support\Collection; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use stdClass; diff --git a/app/Support/System/GeneratesInstallationId.php b/app/Support/System/GeneratesInstallationId.php index 8ac9d8dd3e..beccdaafab 100644 --- a/app/Support/System/GeneratesInstallationId.php +++ b/app/Support/System/GeneratesInstallationId.php @@ -25,7 +25,7 @@ declare(strict_types=1); namespace FireflyIII\Support\System; use FireflyIII\Exceptions\FireflyException; -use Log; +use Illuminate\Support\Facades\Log; use Ramsey\Uuid\Uuid; /** diff --git a/app/Support/System/OAuthKeys.php b/app/Support/System/OAuthKeys.php index 0266cb5feb..abb8cc036d 100644 --- a/app/Support/System/OAuthKeys.php +++ b/app/Support/System/OAuthKeys.php @@ -29,7 +29,7 @@ use Crypt; use FireflyIII\Exceptions\FireflyException; use Illuminate\Contracts\Encryption\DecryptException; use Laravel\Passport\Console\KeysCommand; -use Log; +use Illuminate\Support\Facades\Log; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/app/Support/Twig/TransactionGroupTwig.php b/app/Support/Twig/TransactionGroupTwig.php index 409f3b21d9..2eb9f226cf 100644 --- a/app/Support/Twig/TransactionGroupTwig.php +++ b/app/Support/Twig/TransactionGroupTwig.php @@ -97,7 +97,7 @@ class TransactionGroupTwig extends AbstractExtension $result = app('amount')->formatFlat($array['currency_symbol'], (int)$array['currency_decimal_places'], $amount, $colored); if ($type === TransactionType::TRANSFER) { - $result = sprintf('%s', $result); + $result = sprintf('%s', $result); } return $result; @@ -151,7 +151,7 @@ class TransactionGroupTwig extends AbstractExtension } $result = app('amount')->formatFlat($array['foreign_currency_symbol'], (int)$array['foreign_currency_decimal_places'], $amount, $colored); if ($type === TransactionType::TRANSFER) { - $result = sprintf('%s', $result); + $result = sprintf('%s', $result); } return $result; @@ -203,7 +203,7 @@ class TransactionGroupTwig extends AbstractExtension } $result = app('amount')->formatFlat($currency->symbol, (int)$currency->decimal_places, $amount, $colored); if ($type === TransactionType::TRANSFER) { - $result = sprintf('%s', $result); + $result = sprintf('%s', $result); } return $result; @@ -246,7 +246,7 @@ class TransactionGroupTwig extends AbstractExtension } $result = app('amount')->formatFlat($currency->symbol, (int)$currency->decimal_places, $amount, $colored); if ($type === TransactionType::TRANSFER) { - $result = sprintf('%s', $result); + $result = sprintf('%s', $result); } return $result; diff --git a/app/TransactionRules/Actions/AddTag.php b/app/TransactionRules/Actions/AddTag.php index ff80c70a02..e865abb117 100644 --- a/app/TransactionRules/Actions/AddTag.php +++ b/app/TransactionRules/Actions/AddTag.php @@ -29,7 +29,7 @@ use FireflyIII\Factory\TagFactory; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AddTag. diff --git a/app/TransactionRules/Actions/AppendDescriptionToNotes.php b/app/TransactionRules/Actions/AppendDescriptionToNotes.php index 7c887557f5..7da45b78a7 100644 --- a/app/TransactionRules/Actions/AppendDescriptionToNotes.php +++ b/app/TransactionRules/Actions/AppendDescriptionToNotes.php @@ -30,6 +30,9 @@ use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use Illuminate\Support\Facades\Log; +/** + * Class AppendDescriptionToNotes + */ class AppendDescriptionToNotes implements ActionInterface { private RuleAction $action; diff --git a/app/TransactionRules/Actions/AppendNotes.php b/app/TransactionRules/Actions/AppendNotes.php index f55d6dc358..c0595a9e31 100644 --- a/app/TransactionRules/Actions/AppendNotes.php +++ b/app/TransactionRules/Actions/AppendNotes.php @@ -27,7 +27,7 @@ use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\Note; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AppendNotes. diff --git a/app/TransactionRules/Actions/ClearBudget.php b/app/TransactionRules/Actions/ClearBudget.php index 2bef3a4fe4..d2915f8e5f 100644 --- a/app/TransactionRules/Actions/ClearBudget.php +++ b/app/TransactionRules/Actions/ClearBudget.php @@ -27,7 +27,7 @@ use DB; use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ClearBudget. diff --git a/app/TransactionRules/Actions/ClearCategory.php b/app/TransactionRules/Actions/ClearCategory.php index 43874d063c..158b5b212d 100644 --- a/app/TransactionRules/Actions/ClearCategory.php +++ b/app/TransactionRules/Actions/ClearCategory.php @@ -27,7 +27,7 @@ use DB; use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ClearCategory. diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php index e14fe32b95..bdac946b25 100644 --- a/app/TransactionRules/Actions/ClearNotes.php +++ b/app/TransactionRules/Actions/ClearNotes.php @@ -27,7 +27,7 @@ use DB; use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ClearNotes. diff --git a/app/TransactionRules/Actions/ConvertToDeposit.php b/app/TransactionRules/Actions/ConvertToDeposit.php index 157e3f81da..99dd4d3e83 100644 --- a/app/TransactionRules/Actions/ConvertToDeposit.php +++ b/app/TransactionRules/Actions/ConvertToDeposit.php @@ -31,9 +31,10 @@ use FireflyIII\Models\AccountType; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; +use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * @@ -56,6 +57,7 @@ class ConvertToDeposit implements ActionInterface /** * @inheritDoc * @throws FireflyException + * @throws JsonException */ public function actOnArray(array $journal): bool { @@ -109,18 +111,26 @@ class ConvertToDeposit implements ActionInterface $factory = app(AccountFactory::class); $factory->setUser($user); - // get the action value, or use the original destination name in case the action value is empty: - // this becomes a new or existing revenue account. - $revenueName = '' === $this->action->action_value ? $journal['destination_account_name'] : $this->action->action_value; - $revenue = $factory->findOrCreate($revenueName, AccountType::REVENUE); + $repository = app(AccountRepositoryInterface::class); + $repository->setUser($user); - Log::debug(sprintf('ConvertToDeposit. Action value is "%s", revenue name is "%s"', $this->action->action_value, $journal['destination_account_name'])); + // get the action value, or use the original destination name in case the action value is empty: + // this becomes a new or existing (revenue) account, which is the source of the new deposit. + $opposingName = '' === $this->action->action_value ? $journal['destination_account_name'] : $this->action->action_value; + // we check all possible source account types if one exists: + $validTypes = config('firefly.expected_source_types.source.Deposit'); + $opposingAccount = $repository->findByName($opposingName, $validTypes); + if (null === $opposingAccount) { + $opposingAccount = $factory->findOrCreate($opposingName, AccountType::REVENUE); + } + + Log::debug(sprintf('ConvertToDeposit. Action value is "%s", new opposing name is "%s"', $this->action->action_value, $journal['destination_account_name'])); // update the source transaction and put in the new revenue ID. DB::table('transactions') ->where('transaction_journal_id', '=', $journal['transaction_journal_id']) ->where('amount', '<', 0) - ->update(['account_id' => $revenue->id]); + ->update(['account_id' => $opposingAccount->id]); // update the destination transaction and put in the original source account ID. DB::table('transactions') @@ -143,6 +153,7 @@ class ConvertToDeposit implements ActionInterface /** * Input is a transfer from A to B. * Output is a deposit from C to B. + * The source account is replaced. * * @param array $journal * @@ -158,10 +169,18 @@ class ConvertToDeposit implements ActionInterface $factory = app(AccountFactory::class); $factory->setUser($user); + $repository = app(AccountRepositoryInterface::class); + $repository->setUser($user); + // get the action value, or use the original source name in case the action value is empty: - // this becomes a new or existing revenue account. - $revenueName = '' === $this->action->action_value ? $journal['source_account_name'] : $this->action->action_value; - $revenue = $factory->findOrCreate($revenueName, AccountType::REVENUE); + // this becomes a new or existing (revenue) account, which is the source of the new deposit. + $opposingName = '' === $this->action->action_value ? $journal['source_account_name'] : $this->action->action_value; + // we check all possible source account types if one exists: + $validTypes = config('firefly.expected_source_types.source.Deposit'); + $opposingAccount = $repository->findByName($opposingName, $validTypes); + if (null === $opposingAccount) { + $opposingAccount = $factory->findOrCreate($opposingName, AccountType::REVENUE); + } Log::debug(sprintf('ConvertToDeposit. Action value is "%s", revenue name is "%s"', $this->action->action_value, $journal['source_account_name'])); @@ -169,7 +188,7 @@ class ConvertToDeposit implements ActionInterface DB::table('transactions') ->where('transaction_journal_id', '=', $journal['transaction_journal_id']) ->where('amount', '<', 0) - ->update(['account_id' => $revenue->id]); + ->update(['account_id' => $opposingAccount->id]); // change transaction type of journal: $newType = TransactionType::whereType(TransactionType::DEPOSIT)->first(); diff --git a/app/TransactionRules/Actions/ConvertToTransfer.php b/app/TransactionRules/Actions/ConvertToTransfer.php index 067a622735..30baedc4d1 100644 --- a/app/TransactionRules/Actions/ConvertToTransfer.php +++ b/app/TransactionRules/Actions/ConvertToTransfer.php @@ -26,13 +26,12 @@ namespace FireflyIII\TransactionRules\Actions; use DB; use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\Account; -use FireflyIII\Models\AccountType; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * @@ -78,11 +77,23 @@ class ConvertToTransfer implements ActionInterface /** @var AccountRepositoryInterface $repository */ $repository = app(AccountRepositoryInterface::class); $repository->setUser($user); - $asset = $repository->findByName($this->action->action_value, [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]); - if (null === $asset) { + $opposing = null; + $expectedType = null; + if (TransactionType::WITHDRAWAL === $type) { + $expectedType = $this->getSourceType($journal['transaction_journal_id']); + // Withdrawal? Replace destination with account with same type as source. + } + if (TransactionType::DEPOSIT === $type) { + $expectedType = $this->getDestinationType($journal['transaction_journal_id']); + // Deposit? Replace source with account with same type as destination. + } + $opposing = $repository->findByName($this->action->action_value, [$expectedType]); + + if (null === $opposing) { Log::error( sprintf( - 'Journal #%d cannot be converted because no asset with name "%s" exists (rule #%d).', + 'Journal #%d cannot be converted because no valid %s account with name "%s" exists (rule #%d).', + $expectedType, $journal['transaction_journal_id'], $this->action->action_value, $this->action->rule_id @@ -96,7 +107,7 @@ class ConvertToTransfer implements ActionInterface $object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']); event(new TriggeredAuditLog($this->action->rule, $object, 'update_transaction_type', TransactionType::WITHDRAWAL, TransactionType::TRANSFER)); - return $this->convertWithdrawalArray($journal, $asset); + return $this->convertWithdrawalArray($journal, $opposing); } if (TransactionType::DEPOSIT === $type) { Log::debug('Going to transform a deposit to a transfer.'); @@ -104,7 +115,7 @@ class ConvertToTransfer implements ActionInterface $object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']); event(new TriggeredAuditLog($this->action->rule, $object, 'update_transaction_type', TransactionType::DEPOSIT, TransactionType::TRANSFER)); - return $this->convertDepositArray($journal, $asset); + return $this->convertDepositArray($journal, $opposing); } return false; @@ -113,19 +124,20 @@ class ConvertToTransfer implements ActionInterface /** * A withdrawal is from Asset to Expense. * We replace the Expense with another asset. + * So this replaces the destination * * @param array $journal - * @param Account $asset + * @param Account $opposing * * @return bool */ - private function convertWithdrawalArray(array $journal, Account $asset): bool + private function convertWithdrawalArray(array $journal, Account $opposing): bool { - if ($journal['source_account_id'] === $asset->id) { + if ($journal['source_account_id'] === $opposing->id) { Log::error( vsprintf( 'Journal #%d has already has "%s" as a source asset. ConvertToTransfer failed. (rule #%d).', - [$journal['transaction_journal_id'], $asset->name, $this->action->rule_id] + [$journal['transaction_journal_id'], $opposing->name, $this->action->rule_id] ) ); @@ -136,7 +148,7 @@ class ConvertToTransfer implements ActionInterface DB::table('transactions') ->where('transaction_journal_id', '=', $journal['transaction_journal_id']) ->where('amount', '>', 0) - ->update(['account_id' => $asset->id]); + ->update(['account_id' => $opposing->id]); // change transaction type of journal: $newType = TransactionType::whereType(TransactionType::TRANSFER)->first(); @@ -155,17 +167,17 @@ class ConvertToTransfer implements ActionInterface * We replace the Revenue with another asset. * * @param array $journal - * @param Account $asset + * @param Account $opposing * * @return bool */ - private function convertDepositArray(array $journal, Account $asset): bool + private function convertDepositArray(array $journal, Account $opposing): bool { - if ($journal['destination_account_id'] === $asset->id) { + if ($journal['destination_account_id'] === $opposing->id) { Log::error( vsprintf( 'Journal #%d has already has "%s" as a destination asset. ConvertToTransfer failed. (rule #%d).', - [$journal['transaction_journal_id'], $asset->name, $this->action->rule_id] + [$journal['transaction_journal_id'], $opposing->name, $this->action->rule_id] ) ); @@ -176,7 +188,7 @@ class ConvertToTransfer implements ActionInterface DB::table('transactions') ->where('transaction_journal_id', '=', $journal['transaction_journal_id']) ->where('amount', '<', 0) - ->update(['account_id' => $asset->id]); + ->update(['account_id' => $opposing->id]); // change transaction type of journal: $newType = TransactionType::whereType(TransactionType::TRANSFER)->first(); @@ -189,4 +201,34 @@ class ConvertToTransfer implements ActionInterface return true; } + + /** + * @param int $journalId + * @return string + */ + private function getSourceType(int $journalId): string + { + /** @var TransactionJournal $journal */ + $journal = TransactionJournal::find($journalId); + if (null === $journal) { + Log::error(sprintf('Journal #%d does not exist. Cannot convert to transfer.', $journalId)); + return ''; + } + return (string)$journal->transactions()->where('amount', '<', 0)->first()?->account?->accountType?->type; + } + + /** + * @param int $journalId + * @return string + */ + private function getDestinationType(int $journalId): string + { + /** @var TransactionJournal $journal */ + $journal = TransactionJournal::find($journalId); + if (null === $journal) { + Log::error(sprintf('Journal #%d does not exist. Cannot convert to transfer.', $journalId)); + return ''; + } + return (string)$journal->transactions()->where('amount', '>', 0)->first()?->account?->accountType?->type; + } } diff --git a/app/TransactionRules/Actions/ConvertToWithdrawal.php b/app/TransactionRules/Actions/ConvertToWithdrawal.php index 14aee755ff..9b0a79672f 100644 --- a/app/TransactionRules/Actions/ConvertToWithdrawal.php +++ b/app/TransactionRules/Actions/ConvertToWithdrawal.php @@ -31,9 +31,10 @@ use FireflyIII\Models\AccountType; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; +use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; use JsonException; -use Log; +use Illuminate\Support\Facades\Log; /** * @@ -89,6 +90,12 @@ class ConvertToWithdrawal implements ActionInterface return false; } + /** + * @param array $journal + * @return bool + * @throws FireflyException + * @throws JsonException + */ private function convertDepositArray(array $journal): bool { $user = User::find($journal['user_id']); @@ -96,10 +103,21 @@ class ConvertToWithdrawal implements ActionInterface $factory = app(AccountFactory::class); $factory->setUser($user); - $expenseName = '' === $this->action->action_value ? $journal['source_account_name'] : $this->action->action_value; - $expense = $factory->findOrCreate($expenseName, AccountType::EXPENSE); + $repository = app(AccountRepositoryInterface::class); + $repository->setUser($user); + + // get the action value, or use the original source name in case the action value is empty: + // this becomes a new or existing (expense) account, which is the destination of the new withdrawal. + $opposingName = '' === $this->action->action_value ? $journal['source_account_name'] : $this->action->action_value; + // we check all possible source account types if one exists: + $validTypes = config('firefly.expected_source_types.destination.Withdrawal'); + $opposingAccount = $repository->findByName($opposingName, $validTypes); + if (null === $opposingAccount) { + $opposingAccount = $factory->findOrCreate($opposingName, AccountType::EXPENSE); + } + $destinationId = $journal['destination_account_id']; - Log::debug(sprintf('ConvertToWithdrawal. Action value is "%s", expense name is "%s"', $this->action->action_value, $expenseName)); + Log::debug(sprintf('ConvertToWithdrawal. Action value is "%s", expense name is "%s"', $this->action->action_value, $opposingName)); // update source transaction(s) to be the original destination account DB::table('transactions') @@ -111,7 +129,7 @@ class ConvertToWithdrawal implements ActionInterface DB::table('transactions') ->where('transaction_journal_id', '=', $journal['transaction_journal_id']) ->where('amount', '>', 0) - ->update(['account_id' => $expense->id]); + ->update(['account_id' => $opposingAccount->id]); // change transaction type of journal: $newType = TransactionType::whereType(TransactionType::WITHDRAWAL)->first(); @@ -141,16 +159,27 @@ class ConvertToWithdrawal implements ActionInterface /** @var AccountFactory $factory */ $factory = app(AccountFactory::class); $factory->setUser($user); - $expenseName = '' === $this->action->action_value ? $journal['destination_account_name'] : $this->action->action_value; - $expense = $factory->findOrCreate($expenseName, AccountType::EXPENSE); - Log::debug(sprintf('ConvertToWithdrawal. Action value is "%s", expense name is "%s"', $this->action->action_value, $expenseName)); + $repository = app(AccountRepositoryInterface::class); + $repository->setUser($user); + + // get the action value, or use the original source name in case the action value is empty: + // this becomes a new or existing (expense) account, which is the destination of the new withdrawal. + $opposingName = '' === $this->action->action_value ? $journal['destination_account_name'] : $this->action->action_value; + // we check all possible source account types if one exists: + $validTypes = config('firefly.expected_source_types.destination.Withdrawal'); + $opposingAccount = $repository->findByName($opposingName, $validTypes); + if (null === $opposingAccount) { + $opposingAccount = $factory->findOrCreate($opposingName, AccountType::EXPENSE); + } + + Log::debug(sprintf('ConvertToWithdrawal. Action value is "%s", destination name is "%s"', $this->action->action_value, $opposingName)); // update destination transaction(s) to be new expense account. DB::table('transactions') ->where('transaction_journal_id', '=', $journal['transaction_journal_id']) ->where('amount', '>', 0) - ->update(['account_id' => $expense->id]); + ->update(['account_id' => $opposingAccount->id]); // change transaction type of journal: $newType = TransactionType::whereType(TransactionType::WITHDRAWAL)->first(); diff --git a/app/TransactionRules/Actions/DeleteTransaction.php b/app/TransactionRules/Actions/DeleteTransaction.php index 35be86196a..3f357b2e6c 100644 --- a/app/TransactionRules/Actions/DeleteTransaction.php +++ b/app/TransactionRules/Actions/DeleteTransaction.php @@ -29,7 +29,7 @@ use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionJournal; use FireflyIII\Services\Internal\Destroy\JournalDestroyService; use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService; -use Log; +use Illuminate\Support\Facades\Log; /** * Class DeleteTransaction. diff --git a/app/TransactionRules/Actions/LinkToBill.php b/app/TransactionRules/Actions/LinkToBill.php index bbff66dfb3..b1f6b463cb 100644 --- a/app/TransactionRules/Actions/LinkToBill.php +++ b/app/TransactionRules/Actions/LinkToBill.php @@ -30,7 +30,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class LinkToBill. diff --git a/app/TransactionRules/Actions/MoveNotesToDescription.php b/app/TransactionRules/Actions/MoveNotesToDescription.php index 24ca785380..0771e48996 100644 --- a/app/TransactionRules/Actions/MoveNotesToDescription.php +++ b/app/TransactionRules/Actions/MoveNotesToDescription.php @@ -30,6 +30,13 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Support\Request\ConvertsDataTypes; use Illuminate\Support\Facades\Log; +/** + * Class MoveNotesToDescription + */ + +/** + * Class MoveNotesToDescription + */ class MoveNotesToDescription implements ActionInterface { use ConvertsDataTypes; diff --git a/app/TransactionRules/Actions/PrependNotes.php b/app/TransactionRules/Actions/PrependNotes.php index cff973022c..c98d18688d 100644 --- a/app/TransactionRules/Actions/PrependNotes.php +++ b/app/TransactionRules/Actions/PrependNotes.php @@ -27,7 +27,7 @@ use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\Note; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class PrependNotes. diff --git a/app/TransactionRules/Actions/RemoveAllTags.php b/app/TransactionRules/Actions/RemoveAllTags.php index 54c9d06e2f..b819c44406 100644 --- a/app/TransactionRules/Actions/RemoveAllTags.php +++ b/app/TransactionRules/Actions/RemoveAllTags.php @@ -27,7 +27,7 @@ use DB; use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RemoveAllTags. diff --git a/app/TransactionRules/Actions/RemoveTag.php b/app/TransactionRules/Actions/RemoveTag.php index f2b14aa109..1a5b3be1d9 100644 --- a/app/TransactionRules/Actions/RemoveTag.php +++ b/app/TransactionRules/Actions/RemoveTag.php @@ -28,7 +28,7 @@ use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class RemoveTag. diff --git a/app/TransactionRules/Actions/SetBudget.php b/app/TransactionRules/Actions/SetBudget.php index 35714bd276..b9ed8c6171 100644 --- a/app/TransactionRules/Actions/SetBudget.php +++ b/app/TransactionRules/Actions/SetBudget.php @@ -29,7 +29,7 @@ use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SetBudget. diff --git a/app/TransactionRules/Actions/SetCategory.php b/app/TransactionRules/Actions/SetCategory.php index ed4cdc34c6..44669cc05a 100644 --- a/app/TransactionRules/Actions/SetCategory.php +++ b/app/TransactionRules/Actions/SetCategory.php @@ -29,7 +29,7 @@ use FireflyIII\Factory\CategoryFactory; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SetCategory. diff --git a/app/TransactionRules/Actions/SetDescription.php b/app/TransactionRules/Actions/SetDescription.php index 17eaedce95..2c74f756b9 100644 --- a/app/TransactionRules/Actions/SetDescription.php +++ b/app/TransactionRules/Actions/SetDescription.php @@ -27,7 +27,7 @@ use DB; use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SetDescription. diff --git a/app/TransactionRules/Actions/SetDestinationAccount.php b/app/TransactionRules/Actions/SetDestinationAccount.php index 0bf9b4f187..239b7b61fe 100644 --- a/app/TransactionRules/Actions/SetDestinationAccount.php +++ b/app/TransactionRules/Actions/SetDestinationAccount.php @@ -32,7 +32,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SetDestinationAccount. diff --git a/app/TransactionRules/Actions/SetNotes.php b/app/TransactionRules/Actions/SetNotes.php index 0979fd8e48..840a9f9c93 100644 --- a/app/TransactionRules/Actions/SetNotes.php +++ b/app/TransactionRules/Actions/SetNotes.php @@ -27,7 +27,7 @@ use FireflyIII\Events\TriggeredAuditLog; use FireflyIII\Models\Note; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SetNotes. diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php index f79650e8ea..9e95c80bb5 100644 --- a/app/TransactionRules/Actions/SetSourceAccount.php +++ b/app/TransactionRules/Actions/SetSourceAccount.php @@ -32,7 +32,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SetSourceAccount. diff --git a/app/TransactionRules/Actions/UpdatePiggybank.php b/app/TransactionRules/Actions/UpdatePiggybank.php index 173306ac3a..2f13ca31b0 100644 --- a/app/TransactionRules/Actions/UpdatePiggybank.php +++ b/app/TransactionRules/Actions/UpdatePiggybank.php @@ -32,7 +32,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\User; -use Log; +use Illuminate\Support\Facades\Log; /** * Class UpdatePiggybank diff --git a/app/TransactionRules/Engine/SearchRuleEngine.php b/app/TransactionRules/Engine/SearchRuleEngine.php index bf22a98065..11bc21d75c 100644 --- a/app/TransactionRules/Engine/SearchRuleEngine.php +++ b/app/TransactionRules/Engine/SearchRuleEngine.php @@ -35,7 +35,7 @@ use FireflyIII\Support\Search\SearchInterface; use FireflyIII\TransactionRules\Factory\ActionFactory; use FireflyIII\User; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class SearchRuleEngine diff --git a/app/TransactionRules/Factory/ActionFactory.php b/app/TransactionRules/Factory/ActionFactory.php index ebcb35dd1c..cfc04ecb86 100644 --- a/app/TransactionRules/Factory/ActionFactory.php +++ b/app/TransactionRules/Factory/ActionFactory.php @@ -27,7 +27,7 @@ use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\RuleAction; use FireflyIII\Support\Domain; use FireflyIII\TransactionRules\Actions\ActionInterface; -use Log; +use Illuminate\Support\Facades\Log; /** * Class ActionFactory can create actions. diff --git a/app/Transformers/RecurrenceTransformer.php b/app/Transformers/RecurrenceTransformer.php index e4b205ac0c..5869664f0c 100644 --- a/app/Transformers/RecurrenceTransformer.php +++ b/app/Transformers/RecurrenceTransformer.php @@ -34,7 +34,7 @@ use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface; -use Log; +use Illuminate\Support\Facades\Log; /** * diff --git a/app/Transformers/TransactionGroupTransformer.php b/app/Transformers/TransactionGroupTransformer.php index 98ace4a7fd..780192094e 100644 --- a/app/Transformers/TransactionGroupTransformer.php +++ b/app/Transformers/TransactionGroupTransformer.php @@ -36,7 +36,7 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\TransactionGroup\TransactionGroupRepositoryInterface; use FireflyIII\Support\NullArrayObject; use Illuminate\Support\Collection; -use Log; +use Illuminate\Support\Facades\Log; /** * Class TransactionGroupTransformer diff --git a/app/Transformers/WebhookMessageTransformer.php b/app/Transformers/WebhookMessageTransformer.php index 599738e2de..f62761964a 100644 --- a/app/Transformers/WebhookMessageTransformer.php +++ b/app/Transformers/WebhookMessageTransformer.php @@ -25,7 +25,7 @@ namespace FireflyIII\Transformers; use FireflyIII\Models\WebhookMessage; use Jsonexception; -use Log; +use Illuminate\Support\Facades\Log; /** * Class WebhookMessageTransformer diff --git a/app/Validation/Account/DepositValidation.php b/app/Validation/Account/DepositValidation.php index f78f74dfae..2c009e5ab6 100644 --- a/app/Validation/Account/DepositValidation.php +++ b/app/Validation/Account/DepositValidation.php @@ -25,7 +25,7 @@ namespace FireflyIII\Validation\Account; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait DepositValidation diff --git a/app/Validation/Account/LiabilityValidation.php b/app/Validation/Account/LiabilityValidation.php index 805271f1ba..909b7e6f26 100644 --- a/app/Validation/Account/LiabilityValidation.php +++ b/app/Validation/Account/LiabilityValidation.php @@ -26,7 +26,7 @@ namespace FireflyIII\Validation\Account; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait LiabilityValidation diff --git a/app/Validation/Account/OBValidation.php b/app/Validation/Account/OBValidation.php index 1f1e349b27..655259a321 100644 --- a/app/Validation/Account/OBValidation.php +++ b/app/Validation/Account/OBValidation.php @@ -26,7 +26,7 @@ namespace FireflyIII\Validation\Account; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait OBValidation diff --git a/app/Validation/Account/ReconciliationValidation.php b/app/Validation/Account/ReconciliationValidation.php index 1277b76fa3..f6439c303f 100644 --- a/app/Validation/Account/ReconciliationValidation.php +++ b/app/Validation/Account/ReconciliationValidation.php @@ -25,7 +25,7 @@ declare(strict_types=1); namespace FireflyIII\Validation\Account; use FireflyIII\Models\Account; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait ReconciliationValidation diff --git a/app/Validation/Account/TransferValidation.php b/app/Validation/Account/TransferValidation.php index e8032e7428..7cee3f8731 100644 --- a/app/Validation/Account/TransferValidation.php +++ b/app/Validation/Account/TransferValidation.php @@ -24,7 +24,7 @@ declare(strict_types=1); namespace FireflyIII\Validation\Account; use FireflyIII\Models\Account; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait TransferValidation diff --git a/app/Validation/Account/WithdrawalValidation.php b/app/Validation/Account/WithdrawalValidation.php index 54af2768ee..dd0e262d3d 100644 --- a/app/Validation/Account/WithdrawalValidation.php +++ b/app/Validation/Account/WithdrawalValidation.php @@ -25,7 +25,7 @@ namespace FireflyIII\Validation\Account; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait WithdrawalValidation diff --git a/app/Validation/AccountValidator.php b/app/Validation/AccountValidator.php index 3d15b236e0..de4133b41c 100644 --- a/app/Validation/AccountValidator.php +++ b/app/Validation/AccountValidator.php @@ -35,7 +35,7 @@ use FireflyIII\Validation\Account\OBValidation; use FireflyIII\Validation\Account\ReconciliationValidation; use FireflyIII\Validation\Account\TransferValidation; use FireflyIII\Validation\Account\WithdrawalValidation; -use Log; +use Illuminate\Support\Facades\Log; /** * Class AccountValidator diff --git a/app/Validation/CurrencyValidation.php b/app/Validation/CurrencyValidation.php index f52d5d714f..f454c3bd15 100644 --- a/app/Validation/CurrencyValidation.php +++ b/app/Validation/CurrencyValidation.php @@ -25,7 +25,7 @@ declare(strict_types=1); namespace FireflyIII\Validation; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait CurrencyValidation diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index 3181cd4ac1..14a4169835 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -43,7 +43,7 @@ use FireflyIII\User; use Google2FA; use Illuminate\Support\Collection; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException; use PragmaRX\Google2FA\Exceptions\InvalidCharactersException; use PragmaRX\Google2FA\Exceptions\SecretKeyTooShortException; diff --git a/app/Validation/GroupValidation.php b/app/Validation/GroupValidation.php index bf00a593ac..2d25f966f2 100644 --- a/app/Validation/GroupValidation.php +++ b/app/Validation/GroupValidation.php @@ -26,7 +26,7 @@ namespace FireflyIII\Validation; use FireflyIII\Models\TransactionGroup; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait GroupValidation. diff --git a/app/Validation/RecurrenceValidation.php b/app/Validation/RecurrenceValidation.php index 81b437fac1..fb7669603d 100644 --- a/app/Validation/RecurrenceValidation.php +++ b/app/Validation/RecurrenceValidation.php @@ -28,7 +28,7 @@ use FireflyIII\Models\Recurrence; use FireflyIII\Models\RecurrenceTransaction; use Illuminate\Validation\Validator; use InvalidArgumentException; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait RecurrenceValidation diff --git a/app/Validation/TransactionValidation.php b/app/Validation/TransactionValidation.php index 71adc328ef..0f28ccedb9 100644 --- a/app/Validation/TransactionValidation.php +++ b/app/Validation/TransactionValidation.php @@ -31,7 +31,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Illuminate\Validation\Validator; -use Log; +use Illuminate\Support\Facades\Log; /** * Trait TransactionValidation diff --git a/changelog.md b/changelog.md index f3eb8a531d..85ab95f730 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,25 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## v6.0.6 - 2023-04-02 + +### Changed +- Database migrations are capped at 12 decimals. +- Currency processing is capped at 12 decimals. +- Mail errors no longer crash the app but report the error in logs +- Disabled Sonarcloud runs + +### Fixed +- "Change transaction type"-rule actions would create a new expense account instead of finding a liability. +- New users from remote user repositories would not be able to create new asset accounts. +- Firefly III would create "Loan" instead of "Expense account" when faced with unknown accounts during API calls. +- Icons would not show up in the minimized left-hand menu. +- Contrast for dark mode improved. +- Better credit calculation for liabilities in case of complex transactions. + +### API +- Fixed: Could not give piggy bank an unlimited amount. + ## v6.0.5 - 2023-03-19 ### Changed diff --git a/composer.json b/composer.json index 21187d1850..529c7b5b3e 100644 --- a/composer.json +++ b/composer.json @@ -116,7 +116,7 @@ "mockery/mockery": "1.*", "nunomaduro/larastan": "^2.5", "phpstan/phpstan": "^1.10", - "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-deprecation-rules": "^1.1", "phpstan/phpstan-strict-rules": "^1.4", "phpunit/phpunit": "^10", "thecodingmachine/phpstan-strict-rules": "^1.0" diff --git a/composer.lock b/composer.lock index c5fe215cba..62182f886d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d039ac062900b9cf70e12f1e7a6cacd9", + "content-hash": "ac90c0382ca1d0cb597ee1418a066866", "packages": [ { "name": "bacon/bacon-qr-code", @@ -1944,16 +1944,16 @@ }, { "name": "laravel/framework", - "version": "v10.3.3", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "90f24d9e2860ecf6b5492e966956270ceb98c03d" + "reference": "485f22333e8c1dff5bae0fe0421c1e2e139713de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/90f24d9e2860ecf6b5492e966956270ceb98c03d", - "reference": "90f24d9e2860ecf6b5492e966956270ceb98c03d", + "url": "https://api.github.com/repos/laravel/framework/zipball/485f22333e8c1dff5bae0fe0421c1e2e139713de", + "reference": "485f22333e8c1dff5bae0fe0421c1e2e139713de", "shasum": "" }, "require": { @@ -2052,7 +2052,7 @@ "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^8.0", + "orchestra/testbench-core": "^8.1", "pda/pheanstalk": "^4.0", "phpstan/phpdoc-parser": "^1.15", "phpstan/phpstan": "^1.4.7", @@ -2140,20 +2140,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-03-09T14:00:53+00:00" + "time": "2023-03-29T15:09:16+00:00" }, { "name": "laravel/passport", - "version": "v11.8.3", + "version": "v11.8.4", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "d60300185cfd066190b7842982cce314f779f9dd" + "reference": "b6b68fad1d02e39c6c659705159487f643393cdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/d60300185cfd066190b7842982cce314f779f9dd", - "reference": "d60300185cfd066190b7842982cce314f779f9dd", + "url": "https://api.github.com/repos/laravel/passport/zipball/b6b68fad1d02e39c6c659705159487f643393cdd", + "reference": "b6b68fad1d02e39c6c659705159487f643393cdd", "shasum": "" }, "require": { @@ -2218,7 +2218,7 @@ "issues": "https://github.com/laravel/passport/issues", "source": "https://github.com/laravel/passport" }, - "time": "2023-03-01T15:56:44+00:00" + "time": "2023-03-18T18:55:20+00:00" }, { "name": "laravel/sanctum", @@ -2542,20 +2542,20 @@ }, { "name": "lcobucci/clock", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc" + "reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/039ef98c6b57b101d10bd11d8fdfda12cbd996dc", - "reference": "039ef98c6b57b101d10bd11d8fdfda12cbd996dc", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/30a854ceb22bd87d83a7a4563b3f6312453945fc", + "reference": "30a854ceb22bd87d83a7a4563b3f6312453945fc", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.2.0", "psr/clock": "^1.0" }, "provide": { @@ -2563,13 +2563,13 @@ }, "require-dev": { "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", + "lcobucci/coding-standard": "^10.0.0", "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" + "phpstan/phpstan": "^1.10.7", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.10", + "phpstan/phpstan-strict-rules": "^1.5.0", + "phpunit/phpunit": "^10.0.17" }, "type": "library", "autoload": { @@ -2590,7 +2590,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/3.0.0" + "source": "https://github.com/lcobucci/clock/tree/3.1.0" }, "funding": [ { @@ -2602,7 +2602,7 @@ "type": "patreon" } ], - "time": "2022-12-19T15:00:24+00:00" + "time": "2023-03-20T19:12:25+00:00" }, { "name": "lcobucci/jwt", @@ -2680,16 +2680,16 @@ }, { "name": "league/commonmark", - "version": "2.3.9", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "c1e114f74e518daca2729ea8c4bf1167038fa4b5" + "reference": "d44a24690f16b8c1808bf13b1bd54ae4c63ea048" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c1e114f74e518daca2729ea8c4bf1167038fa4b5", - "reference": "c1e114f74e518daca2729ea8c4bf1167038fa4b5", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d44a24690f16b8c1808bf13b1bd54ae4c63ea048", + "reference": "d44a24690f16b8c1808bf13b1bd54ae4c63ea048", "shasum": "" }, "require": { @@ -2725,7 +2725,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" } }, "autoload": { @@ -2782,7 +2782,7 @@ "type": "tidelift" } ], - "time": "2023-02-15T14:07:24+00:00" + "time": "2023-03-24T15:16:10+00:00" }, { "name": "league/config", @@ -3226,16 +3226,16 @@ }, { "name": "league/oauth2-server", - "version": "8.4.0", + "version": "8.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "539f4340c14eca8d44578fd118f6bdc0ad16d1ce" + "reference": "eed31d86d8cc8e6e9c9f58fbb2113494f8b41e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/539f4340c14eca8d44578fd118f6bdc0ad16d1ce", - "reference": "539f4340c14eca8d44578fd118f6bdc0ad16d1ce", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/eed31d86d8cc8e6e9c9f58fbb2113494f8b41e24", + "reference": "eed31d86d8cc8e6e9c9f58fbb2113494f8b41e24", "shasum": "" }, "require": { @@ -3302,7 +3302,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.0" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.4.1" }, "funding": [ { @@ -3310,7 +3310,7 @@ "type": "github" } ], - "time": "2023-02-15T16:08:35+00:00" + "time": "2023-03-22T11:47:53+00:00" }, { "name": "league/uri", @@ -3891,35 +3891,38 @@ }, { "name": "nunomaduro/collision", - "version": "v7.1.0", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "2b97fed4950cf0ff148c18b853975ec8ea135e90" + "reference": "42bab217d4913d6610f341d0468cec860aae165e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/2b97fed4950cf0ff148c18b853975ec8ea135e90", - "reference": "2b97fed4950cf0ff148c18b853975ec8ea135e90", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/42bab217d4913d6610f341d0468cec860aae165e", + "reference": "42bab217d4913d6610f341d0468cec860aae165e", "shasum": "" }, "require": { - "filp/whoops": "^2.14.6", + "filp/whoops": "^2.15.1", "nunomaduro/termwind": "^1.15.1", "php": "^8.1.0", "symfony/console": "^6.2.7" }, + "conflict": { + "phpunit/phpunit": "<10.0.17" + }, "require-dev": { - "brianium/paratest": "^7.1.0", - "laravel/framework": "^10.2.0", - "laravel/pint": "^1.6.0", - "laravel/sail": "^1.21.1", + "brianium/paratest": "^7.1.2", + "laravel/framework": "^10.5.1", + "laravel/pint": "^1.7.0", + "laravel/sail": "^1.21.3", "laravel/sanctum": "^3.2.1", "laravel/tinker": "^2.8.1", - "nunomaduro/larastan": "^2.4.1", - "orchestra/testbench-core": "^8.0.3", - "pestphp/pest": "^2.0.0", - "phpunit/phpunit": "^10.0.14", + "nunomaduro/larastan": "^2.5.1", + "orchestra/testbench-core": "^8.2.0", + "pestphp/pest": "^2.3.0", + "phpunit/phpunit": "^10.0.19", "sebastian/environment": "^6.0.0", "spatie/laravel-ignition": "^2.0.0" }, @@ -3980,7 +3983,7 @@ "type": "patreon" } ], - "time": "2023-03-03T10:00:22+00:00" + "time": "2023-03-31T08:17:12+00:00" }, { "name": "nunomaduro/termwind", @@ -5798,16 +5801,16 @@ }, { "name": "symfony/console", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45" + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45", - "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", "shasum": "" }, "require": { @@ -5869,12 +5872,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.7" + "source": "https://github.com/symfony/console/tree/v6.2.8" }, "funding": [ { @@ -5890,7 +5893,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T17:00:03+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "symfony/css-selector", @@ -6097,16 +6100,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "404b307de426c1c488e5afad64403e5f145e82a5" + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/404b307de426c1c488e5afad64403e5f145e82a5", - "reference": "404b307de426c1c488e5afad64403e5f145e82a5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/04046f35fd7d72f9646e721fc2ecb8f9c67d3339", + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339", "shasum": "" }, "require": { @@ -6160,7 +6163,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.7" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.8" }, "funding": [ { @@ -6176,7 +6179,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6323,16 +6326,16 @@ }, { "name": "symfony/http-client", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "0a5be6cbc570ae23b51b49d67341f378629d78e4" + "reference": "66391ba3a8862c560e1d9134c96d9bd2a619b477" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/0a5be6cbc570ae23b51b49d67341f378629d78e4", - "reference": "0a5be6cbc570ae23b51b49d67341f378629d78e4", + "url": "https://api.github.com/repos/symfony/http-client/zipball/66391ba3a8862c560e1d9134c96d9bd2a619b477", + "reference": "66391ba3a8862c560e1d9134c96d9bd2a619b477", "shasum": "" }, "require": { @@ -6387,8 +6390,11 @@ ], "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", + "keywords": [ + "http" + ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.2.7" + "source": "https://github.com/symfony/http-client/tree/v6.2.8" }, "funding": [ { @@ -6404,7 +6410,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T10:54:55+00:00" + "time": "2023-03-31T09:14:44+00:00" }, { "name": "symfony/http-client-contracts", @@ -6489,16 +6495,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5fc3038d4a594223f9ea42e4e985548f3fcc9a3b" + "reference": "511a524affeefc191939348823ac75e9921c2112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5fc3038d4a594223f9ea42e4e985548f3fcc9a3b", - "reference": "5fc3038d4a594223f9ea42e4e985548f3fcc9a3b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/511a524affeefc191939348823ac75e9921c2112", + "reference": "511a524affeefc191939348823ac75e9921c2112", "shasum": "" }, "require": { @@ -6547,7 +6553,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.7" + "source": "https://github.com/symfony/http-foundation/tree/v6.2.8" }, "funding": [ { @@ -6563,20 +6569,20 @@ "type": "tidelift" } ], - "time": "2023-02-21T10:54:55+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd" + "reference": "9563229e56076070d92ca30c089e801e8a4629a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd", - "reference": "ca0680ad1e2d678536cc20e0ae33f9e4e5d2becd", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9563229e56076070d92ca30c089e801e8a4629a3", + "reference": "9563229e56076070d92ca30c089e801e8a4629a3", "shasum": "" }, "require": { @@ -6658,7 +6664,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.2.7" + "source": "https://github.com/symfony/http-kernel/tree/v6.2.8" }, "funding": [ { @@ -6674,20 +6680,20 @@ "type": "tidelift" } ], - "time": "2023-02-28T13:26:41+00:00" + "time": "2023-03-31T12:00:10+00:00" }, { "name": "symfony/mailer", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "e4f84c633b72ec70efc50b8016871c3bc43e691e" + "reference": "bfcfa015c67e19c6fdb7ca6fe70700af1e740a17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/e4f84c633b72ec70efc50b8016871c3bc43e691e", - "reference": "e4f84c633b72ec70efc50b8016871c3bc43e691e", + "url": "https://api.github.com/repos/symfony/mailer/zipball/bfcfa015c67e19c6fdb7ca6fe70700af1e740a17", + "reference": "bfcfa015c67e19c6fdb7ca6fe70700af1e740a17", "shasum": "" }, "require": { @@ -6737,7 +6743,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.2.7" + "source": "https://github.com/symfony/mailer/tree/v6.2.8" }, "funding": [ { @@ -6753,7 +6759,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T10:35:38+00:00" + "time": "2023-03-14T15:00:05+00:00" }, { "name": "symfony/mailgun-mailer", @@ -7563,16 +7569,16 @@ }, { "name": "symfony/process", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902" + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902", - "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416", "shasum": "" }, "require": { @@ -7604,7 +7610,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.7" + "source": "https://github.com/symfony/process/tree/v6.2.8" }, "funding": [ { @@ -7620,7 +7626,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-09T16:20:02+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -7712,16 +7718,16 @@ }, { "name": "symfony/routing", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "fa643fa4c56de161f8bc8c0492a76a60140b50e4" + "reference": "69062e2823f03b82265d73a966999660f0e1e404" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/fa643fa4c56de161f8bc8c0492a76a60140b50e4", - "reference": "fa643fa4c56de161f8bc8c0492a76a60140b50e4", + "url": "https://api.github.com/repos/symfony/routing/zipball/69062e2823f03b82265d73a966999660f0e1e404", + "reference": "69062e2823f03b82265d73a966999660f0e1e404", "shasum": "" }, "require": { @@ -7780,7 +7786,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.2.7" + "source": "https://github.com/symfony/routing/tree/v6.2.8" }, "funding": [ { @@ -7796,7 +7802,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:53:37+00:00" + "time": "2023-03-14T15:00:05+00:00" }, { "name": "symfony/service-contracts", @@ -7885,16 +7891,16 @@ }, { "name": "symfony/string", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "67b8c1eec78296b85dc1c7d9743830160218993d" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d", - "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { @@ -7951,7 +7957,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.7" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -7967,20 +7973,20 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/translation", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73" + "reference": "817535dbb1721df8b3a8f2489dc7e50bcd6209b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/90db1c6138c90527917671cd9ffa9e8b359e3a73", - "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73", + "url": "https://api.github.com/repos/symfony/translation/zipball/817535dbb1721df8b3a8f2489dc7e50bcd6209b5", + "reference": "817535dbb1721df8b3a8f2489dc7e50bcd6209b5", "shasum": "" }, "require": { @@ -8049,7 +8055,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.2.7" + "source": "https://github.com/symfony/translation/tree/v6.2.8" }, "funding": [ { @@ -8065,7 +8071,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-31T09:14:44+00:00" }, { "name": "symfony/translation-contracts", @@ -8224,16 +8230,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e" + "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", - "reference": "cf8d4ca1ddc1e3cc242375deb8fc23e54f5e2a1e", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d37ab6787be2db993747b6218fcc96e8e3bb4bd0", + "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0", "shasum": "" }, "require": { @@ -8292,7 +8298,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.7" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.8" }, "funding": [ { @@ -8308,7 +8314,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "therobfonz/laravel-mandrill-driver", @@ -9655,24 +9661,27 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.2", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + "reference": "dfc078e8af9c99210337325ff5aa152872c98714" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dfc078e8af9c99210337325ff5aa152872c98714", + "reference": "dfc078e8af9c99210337325ff5aa152872c98714", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", @@ -9704,9 +9713,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.1" }, - "time": "2022-10-14T12:47:21+00:00" + "time": "2023-03-27T19:02:04+00:00" }, { "name": "phpmyadmin/sql-parser", @@ -9796,17 +9805,62 @@ "time": "2023-01-25T10:43:40+00:00" }, { - "name": "phpstan/phpstan", - "version": "1.10.6", + "name": "phpstan/phpdoc-parser", + "version": "1.16.1", "source": { "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "50d089a3e0904b0fe7e2cf2d4fd37d427d64235a" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "e27e92d939e2e3636f0a1f0afaba59692c0bf571" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d089a3e0904b0fe7e2cf2d4fd37d427d64235a", - "reference": "50d089a3e0904b0fe7e2cf2d4fd37d427d64235a", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/e27e92d939e2e3636f0a1f0afaba59692c0bf571", + "reference": "e27e92d939e2e3636f0a1f0afaba59692c0bf571", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.16.1" + }, + "time": "2023-02-07T18:11:17+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.9", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "9b13dafe3d66693d20fe5729c3dde1d31bb64703" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b13dafe3d66693d20fe5729c3dde1d31bb64703", + "reference": "9b13dafe3d66693d20fe5729c3dde1d31bb64703", "shasum": "" }, "require": { @@ -9835,8 +9889,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.10.6" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -9852,20 +9909,20 @@ "type": "tidelift" } ], - "time": "2023-03-09T16:55:12+00:00" + "time": "2023-03-30T08:58:01+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "bcc1e8cdf81c3da1a2ba9188ee94cd7e2a62e865" + "reference": "a22b36b955a2e9a3d39fe533b6c1bb5359f9c319" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/bcc1e8cdf81c3da1a2ba9188ee94cd7e2a62e865", - "reference": "bcc1e8cdf81c3da1a2ba9188ee94cd7e2a62e865", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/a22b36b955a2e9a3d39fe533b6c1bb5359f9c319", + "reference": "a22b36b955a2e9a3d39fe533b6c1bb5359f9c319", "shasum": "" }, "require": { @@ -9898,22 +9955,22 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.2" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.3" }, - "time": "2023-01-17T16:14:21+00:00" + "time": "2023-03-17T07:50:08+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "b7dd96a5503919a43b3cd06a2dced9d4252492f2" + "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b7dd96a5503919a43b3cd06a2dced9d4252492f2", - "reference": "b7dd96a5503919a43b3cd06a2dced9d4252492f2", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b21c03d4f6f3a446e4311155f4be9d65048218e6", + "reference": "b21c03d4f6f3a446e4311155f4be9d65048218e6", "shasum": "" }, "require": { @@ -9947,9 +10004,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.0" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.1" }, - "time": "2023-02-21T10:17:10+00:00" + "time": "2023-03-29T14:47:40+00:00" }, { "name": "phpunit/php-code-coverage", @@ -10271,16 +10328,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.0.15", + "version": "10.0.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9b0c2245ef173a3d9546f6a4393a85d60eabe071" + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b0c2245ef173a3d9546f6a4393a85d60eabe071", - "reference": "9b0c2245ef173a3d9546f6a4393a85d60eabe071", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20c23e85c86e5c06d63538ba464e8054f4744e62", + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62", "shasum": "" }, "require": { @@ -10351,7 +10408,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.15" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.19" }, "funding": [ { @@ -10367,7 +10425,7 @@ "type": "tidelift" } ], - "time": "2023-03-09T06:43:13+00:00" + "time": "2023-03-27T11:46:33+00:00" }, { "name": "sebastian/cli-parser", @@ -10671,16 +10729,16 @@ }, { "name": "sebastian/diff", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f" + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/70dd1b20bc198da394ad542e988381b44e64e39f", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", "shasum": "" }, "require": { @@ -10725,7 +10783,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" }, "funding": [ { @@ -10733,7 +10792,7 @@ "type": "github" } ], - "time": "2023-02-03T07:00:31+00:00" + "time": "2023-03-23T05:12:41+00:00" }, { "name": "sebastian/environment", diff --git a/config/firefly.php b/config/firefly.php index 68a4ca453a..7b43095c17 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -107,7 +107,7 @@ return [ 'webhooks' => true, 'handle_debts' => true, ], - 'version' => '6.0.5', + 'version' => '6.0.6', 'api_version' => '2.0.1', 'db_version' => 19, @@ -531,7 +531,7 @@ return [ 'expected_source_types' => [ 'source' => [ TransactionTypeModel::WITHDRAWAL => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], - TransactionTypeEnum::DEPOSIT->value => [AccountType::REVENUE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], + TransactionTypeEnum::DEPOSIT->value => [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, AccountType::REVENUE, AccountType::CASH], TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeModel::OPENING_BALANCE => [ AccountType::INITIAL_BALANCE, @@ -554,11 +554,11 @@ return [ ], 'destination' => [ TransactionTypeModel::WITHDRAWAL => [ - AccountType::EXPENSE, - AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE, + AccountType::EXPENSE, + AccountType::CASH, ], TransactionTypeEnum::DEPOSIT->value => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], @@ -877,6 +877,7 @@ return [ ], 'can_have_virtual_amounts' => [AccountType::ASSET], 'can_have_opening_balance' => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], + 'dynamic_creation_allowed' => [AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION], 'valid_asset_fields' => ['account_role', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], 'valid_cc_fields' => ['account_role', 'cc_monthly_payment_date', 'cc_type', 'account_number', 'currency_id', 'BIC', 'include_net_worth'], 'valid_account_fields' => ['account_number', 'currency_id', 'BIC', 'interest', 'interest_period', 'include_net_worth', 'liability_direction'], diff --git a/database/migrations/2016_06_16_000002_create_main_tables.php b/database/migrations/2016_06_16_000002_create_main_tables.php index 6b06669502..7f364d2cf8 100644 --- a/database/migrations/2016_06_16_000002_create_main_tables.php +++ b/database/migrations/2016_06_16_000002_create_main_tables.php @@ -99,7 +99,7 @@ class CreateMainTables extends Migration $table->integer('user_id', false, true); $table->integer('account_type_id', false, true); $table->string('name', 1024); - $table->decimal('virtual_balance', 36, 24)->nullable(); + $table->decimal('virtual_balance', 32, 12)->nullable(); $table->string('iban', 255)->nullable(); $table->boolean('active')->default(1); $table->boolean('encrypted')->default(0); @@ -135,7 +135,7 @@ class CreateMainTables extends Migration $table->softDeletes(); $table->integer('account_id', false, true); $table->string('name', 1024); - $table->decimal('targetamount', 36, 24); + $table->decimal('targetamount', 32, 12); $table->date('startdate')->nullable(); $table->date('targetdate')->nullable(); $table->integer('order', false, true)->default(0); @@ -155,7 +155,7 @@ class CreateMainTables extends Migration $table->integer('piggy_bank_id', false, true); $table->date('startdate')->nullable(); $table->date('targetdate')->nullable(); - $table->decimal('currentamount', 36, 24); + $table->decimal('currentamount', 32, 12); $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade'); } ); @@ -202,8 +202,8 @@ class CreateMainTables extends Migration $table->integer('user_id', false, true); $table->string('name', 1024); $table->string('match', 1024); - $table->decimal('amount_min', 36, 24); - $table->decimal('amount_max', 36, 24); + $table->decimal('amount_min', 32, 12); + $table->decimal('amount_max', 32, 12); $table->date('date'); $table->string('repeat_freq', 30); $table->smallInteger('skip', false, true)->default(0); @@ -247,7 +247,7 @@ class CreateMainTables extends Migration $table->timestamps(); $table->integer('budget_id', false, true); $table->date('startdate'); - $table->decimal('amount', 36, 24); + $table->decimal('amount', 32, 12); $table->string('repeat_freq', 30); $table->boolean('repeats')->default(0); $table->foreign('budget_id')->references('id')->on('budgets')->onDelete('cascade'); @@ -263,7 +263,7 @@ class CreateMainTables extends Migration $table->integer('budget_limit_id', false, true); $table->date('startdate'); $table->date('enddate'); - $table->decimal('amount', 36, 24); + $table->decimal('amount', 32, 12); $table->foreign('budget_limit_id')->references('id')->on('budget_limits')->onDelete('cascade'); } ); @@ -463,8 +463,8 @@ class CreateMainTables extends Migration $table->string('tagMode', 1024); $table->date('date')->nullable(); $table->text('description')->nullable(); - $table->decimal('latitude', 36, 24)->nullable(); - $table->decimal('longitude', 36, 24)->nullable(); + $table->decimal('latitude', 12, 8)->nullable(); + $table->decimal('longitude', 12, 8)->nullable(); $table->smallInteger('zoomLevel', false, true)->nullable(); // link user id to users table @@ -575,7 +575,7 @@ class CreateMainTables extends Migration $table->integer('piggy_bank_id', false, true); $table->integer('transaction_journal_id', false, true)->nullable(); $table->date('date'); - $table->decimal('amount', 36, 24); + $table->decimal('amount', 32, 12); $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade'); $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('set null'); @@ -593,7 +593,7 @@ class CreateMainTables extends Migration $table->integer('account_id', false, true); $table->integer('transaction_journal_id', false, true); $table->string('description', 1024)->nullable(); - $table->decimal('amount', 36, 24); + $table->decimal('amount', 32, 12); $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade'); diff --git a/database/migrations/2016_12_22_150431_changes_for_v430.php b/database/migrations/2016_12_22_150431_changes_for_v430.php index 579001ebc6..f478647289 100644 --- a/database/migrations/2016_12_22_150431_changes_for_v430.php +++ b/database/migrations/2016_12_22_150431_changes_for_v430.php @@ -54,7 +54,7 @@ class ChangesForV430 extends Migration $table->softDeletes(); $table->integer('user_id', false, true); $table->integer('transaction_currency_id', false, true); - $table->decimal('amount', 36, 24); + $table->decimal('amount', 32, 12); $table->date('start_date'); $table->date('end_date'); diff --git a/database/migrations/2017_04_13_163623_changes_for_v440.php b/database/migrations/2017_04_13_163623_changes_for_v440.php index 9d62b05037..79204d198b 100644 --- a/database/migrations/2017_04_13_163623_changes_for_v440.php +++ b/database/migrations/2017_04_13_163623_changes_for_v440.php @@ -72,8 +72,8 @@ class ChangesForV440 extends Migration $table->integer('from_currency_id', false, true); $table->integer('to_currency_id', false, true); $table->date('date'); - $table->decimal('rate', 36, 24); - $table->decimal('user_rate', 36, 24)->nullable(); + $table->decimal('rate', 32, 12); + $table->decimal('user_rate', 32, 12)->nullable(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('from_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade'); diff --git a/database/migrations/2017_06_02_105232_changes_for_v450.php b/database/migrations/2017_06_02_105232_changes_for_v450.php index 1caf09aa77..706a75fe39 100644 --- a/database/migrations/2017_06_02_105232_changes_for_v450.php +++ b/database/migrations/2017_06_02_105232_changes_for_v450.php @@ -73,7 +73,7 @@ class ChangesForV450 extends Migration Schema::table( 'transactions', static function (Blueprint $table) { - $table->decimal('foreign_amount', 36, 24)->nullable()->after('amount'); + $table->decimal('foreign_amount', 32, 12)->nullable()->after('amount'); } ); diff --git a/database/migrations/2018_06_08_200526_changes_for_v475.php b/database/migrations/2018_06_08_200526_changes_for_v475.php index 6e7053056e..17c6f86898 100644 --- a/database/migrations/2018_06_08_200526_changes_for_v475.php +++ b/database/migrations/2018_06_08_200526_changes_for_v475.php @@ -92,8 +92,8 @@ class ChangesForV475 extends Migration $table->integer('source_id', false, true); $table->integer('destination_id', false, true); - $table->decimal('amount', 36, 24); - $table->decimal('foreign_amount', 36, 24)->nullable(); + $table->decimal('amount', 32, 12); + $table->decimal('foreign_amount', 32, 12)->nullable(); $table->string('description', 1024); $table->foreign('recurrence_id')->references('id')->on('recurrences')->onDelete('cascade'); diff --git a/database/migrations/2019_12_28_191351_make_locations_table.php b/database/migrations/2019_12_28_191351_make_locations_table.php index 65c6dc91b0..ff945896e7 100644 --- a/database/migrations/2019_12_28_191351_make_locations_table.php +++ b/database/migrations/2019_12_28_191351_make_locations_table.php @@ -60,8 +60,8 @@ class MakeLocationsTable extends Migration $table->integer('locatable_id', false, true); $table->string('locatable_type', 255); - $table->decimal('latitude', 36, 24)->nullable(); - $table->decimal('longitude', 36, 24)->nullable(); + $table->decimal('latitude', 12, 8)->nullable(); + $table->decimal('longitude', 12, 8)->nullable(); $table->smallInteger('zoom_level', false, true)->nullable(); } ); diff --git a/database/migrations/2020_03_13_201950_changes_for_v520.php b/database/migrations/2020_03_13_201950_changes_for_v520.php index 1ee987937a..cf864c4c12 100644 --- a/database/migrations/2020_03_13_201950_changes_for_v520.php +++ b/database/migrations/2020_03_13_201950_changes_for_v520.php @@ -59,7 +59,7 @@ class ChangesForV520 extends Migration $table->integer('budget_id', false, true); $table->integer('transaction_currency_id', false, true); $table->tinyInteger('auto_budget_type', false, true)->default(1); - $table->decimal('amount', 36, 24); + $table->decimal('amount', 32, 12); $table->string('period', 50); $table->foreign('transaction_currency_id')->references('id')->on('transaction_currencies')->onDelete('cascade'); diff --git a/frontend/package.json b/frontend/package.json index 06faf07f59..b0a328d699 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,14 +11,14 @@ }, "dependencies": { "@popperjs/core": "^2.11.2", - "@quasar/extras": "^1.15.11", + "@quasar/extras": "^1.16.1", "apexcharts": "^3.32.1", "axios": "^0.21.1", "axios-cache-adapter": "^2.7.3", "core-js": "^3.6.5", "date-fns": "^2.28.0", "pinia": "^2.0.14", - "quasar": "^2.11.8", + "quasar": "^2.11.9", "vue": "3", "vue-i18n": "^9.0.0", "vue-router": "^4.0.0", diff --git a/frontend/src/api/v2/autocomplete/accounts.js b/frontend/src/api/v2/autocomplete/accounts.js new file mode 100644 index 0000000000..83756b128e --- /dev/null +++ b/frontend/src/api/v2/autocomplete/accounts.js @@ -0,0 +1,35 @@ +/* + * get.js + * Copyright (c) 2022 james@firefly-iii.org + * + * This file is part of Firefly III (https://github.com/firefly-iii). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +import {api} from "boot/axios"; + +export default class Accounts { + + /** + * + * @param types + * @returns {Promise>} + */ + get(types, query) { + let url = 'api/v2/autocomplete/accounts'; + return api.get(url, {params: {types: types, query: query, limit: 25}}) + } + +} diff --git a/frontend/src/boot/axios.js b/frontend/src/boot/axios.js index 6cc571832e..40bb2c27dc 100644 --- a/frontend/src/boot/axios.js +++ b/frontend/src/boot/axios.js @@ -34,7 +34,7 @@ const cache = setupCache({ // "export default () => {}" function below (which runs individually // for each client) -const url = process.env.DEBUGGING ? 'https://firefly.sd.home' : '/'; +const url = process.env.DEBUGGING ? 'https://firefly.sd.local' : '/'; const api = axios.create({baseURL: url, withCredentials: true, adapter: cache.adapter}); export default boot(({app}) => { diff --git a/frontend/src/components/transactions/Split.vue b/frontend/src/components/transactions/Split.vue new file mode 100644 index 0000000000..c5d78872b3 --- /dev/null +++ b/frontend/src/components/transactions/Split.vue @@ -0,0 +1,339 @@ + + + + + + + diff --git a/frontend/src/components/transactions/form/DestinationAccount.vue b/frontend/src/components/transactions/form/DestinationAccount.vue new file mode 100644 index 0000000000..dc09048ee4 --- /dev/null +++ b/frontend/src/components/transactions/form/DestinationAccount.vue @@ -0,0 +1,156 @@ + + + + + + + diff --git a/frontend/src/components/transactions/form/SourceAccount.vue b/frontend/src/components/transactions/form/SourceAccount.vue new file mode 100644 index 0000000000..e8cbce81b0 --- /dev/null +++ b/frontend/src/components/transactions/form/SourceAccount.vue @@ -0,0 +1,156 @@ + + + + + + + diff --git a/frontend/src/components/transactions/form/TransactionDescription.vue b/frontend/src/components/transactions/form/TransactionDescription.vue new file mode 100644 index 0000000000..1529ef9462 --- /dev/null +++ b/frontend/src/components/transactions/form/TransactionDescription.vue @@ -0,0 +1,70 @@ + + + + + + + + + diff --git a/frontend/src/i18n/es_ES/index.js b/frontend/src/i18n/es_ES/index.js index 1e404b37df..7b01d9d9e4 100644 --- a/frontend/src/i18n/es_ES/index.js +++ b/frontend/src/i18n/es_ES/index.js @@ -85,10 +85,10 @@ export default { "rule_trigger_source_account_ends_choice": "El nombre de la cuenta de origen termina con..", "rule_trigger_source_account_is_choice": "El nombre de la cuenta origen es..", "rule_trigger_source_account_contains_choice": "El nombre de cuenta de origen contiene..", - "rule_trigger_account_id_choice": "Either account ID is exactly..", + "rule_trigger_account_id_choice": "El ID de cualquiera de las cuentas es exactamente..", "rule_trigger_source_account_id_choice": "El ID de la cuenta de origen es exactamente..", "rule_trigger_destination_account_id_choice": "El ID de la cuenta de destino es exactamente..", - "rule_trigger_account_is_cash_choice": "Either account is cash", + "rule_trigger_account_is_cash_choice": "Cualquiera de las cuentas es efectivo", "rule_trigger_source_is_cash_choice": "La cuenta de origen es de efectivo", "rule_trigger_destination_is_cash_choice": "La cuenta de destino es de efectivo", "rule_trigger_source_account_nr_starts_choice": "N\u00famero de la cuenta de origen \/ IBAN comienza con..", @@ -115,10 +115,10 @@ export default { "rule_trigger_date_on_choice": "La fecha de la transacci\u00f3n es..", "rule_trigger_date_before_choice": "La fecha de la transacci\u00f3n es anterior a..", "rule_trigger_date_after_choice": "La fecha de la transacci\u00f3n es despu\u00e9s de..", - "rule_trigger_created_at_on_choice": "Transaction was made on..", - "rule_trigger_updated_at_on_choice": "Transaction was last edited on..", + "rule_trigger_created_at_on_choice": "La transacci\u00f3n se realiz\u00f3 el..", + "rule_trigger_updated_at_on_choice": "La transacci\u00f3n fue editada por \u00faltima vez el..", "rule_trigger_budget_is_choice": "Presupuesto es..", - "rule_trigger_tag_is_choice": "Any tag is..", + "rule_trigger_tag_is_choice": "Cualquier etiqueta es..", "rule_trigger_currency_is_choice": "La moneda de la transacci\u00f3n es..", "rule_trigger_foreign_currency_is_choice": "La transacci\u00f3n en moneda extranjera es..", "rule_trigger_has_attachments_choice": "Tiene al menos tantos archivos adjuntos", @@ -132,13 +132,13 @@ export default { "rule_trigger_has_any_tag_choice": "Tiene una o mas (cualquier) etiquetas", "rule_trigger_any_notes_choice": "Tiene (cualquier) notas", "rule_trigger_no_notes_choice": "No tiene notas", - "rule_trigger_notes_is_choice": "Notes are..", - "rule_trigger_notes_contains_choice": "Notes contain..", - "rule_trigger_notes_starts_choice": "Notes start with..", - "rule_trigger_notes_ends_choice": "Notes end with..", + "rule_trigger_notes_is_choice": "Las notas son..", + "rule_trigger_notes_contains_choice": "Las notas contienen..", + "rule_trigger_notes_starts_choice": "Las notas comienzan con..", + "rule_trigger_notes_ends_choice": "Las notas terminan con..", "rule_trigger_bill_is_choice": "La factura es..", - "rule_trigger_external_id_is_choice": "External ID is..", - "rule_trigger_internal_reference_is_choice": "Internal reference is..", + "rule_trigger_external_id_is_choice": "El ID externo es..", + "rule_trigger_internal_reference_is_choice": "La referencia interna es..", "rule_trigger_journal_id_choice": "El ID del diario de transacciones es..", "rule_trigger_any_external_url_choice": "La transacci\u00f3n tiene una URL externa", "rule_trigger_no_external_url_choice": "La transacci\u00f3n no tiene URL externa", diff --git a/frontend/src/layouts/MainLayout.vue b/frontend/src/layouts/MainLayout.vue index 44000065c3..20dd9ae306 100644 --- a/frontend/src/layouts/MainLayout.vue +++ b/frontend/src/layouts/MainLayout.vue @@ -338,7 +338,7 @@ page container: q-ma-xs (margin all, xs) AND q-mb-md to give the page content so
- Firefly III v v6.0.5 © James Cole, AGPL-3.0-or-later. + Firefly III v v6.0.6 © James Cole, AGPL-3.0-or-later.
diff --git a/frontend/src/pages/transactions/Create.vue b/frontend/src/pages/transactions/Create.vue index b89a581e0c..cfd7bdb62f 100644 --- a/frontend/src/pages/transactions/Create.vue +++ b/frontend/src/pages/transactions/Create.vue @@ -30,7 +30,6 @@ -
- - -
Info for {{ $route.params.type }} {{ index }}
-
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
- -
-
-
- - +