mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-11 17:39:41 +00:00
🤖 Auto commit for release 'develop' on 2025-11-09
This commit is contained in:
@@ -66,7 +66,7 @@ class DeleteController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function delete(Account $account): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function delete(Account $account): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (!$this->isEditableAccount($account)) {
|
||||
return $this->redirectAccountToAccount($account);
|
||||
|
||||
@@ -76,7 +76,7 @@ class EditController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function edit(Request $request, Account $account, AccountRepositoryInterface $repository): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function edit(Request $request, Account $account, AccountRepositoryInterface $repository): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (!$this->isEditableAccount($account)) {
|
||||
return $this->redirectAccountToAccount($account);
|
||||
|
||||
@@ -78,7 +78,7 @@ class ReconcileController extends Controller
|
||||
*
|
||||
* @throws FireflyException
|
||||
* */
|
||||
public function reconcile(Account $account, ?Carbon $start = null, ?Carbon $end = null): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function reconcile(Account $account, ?Carbon $start = null, ?Carbon $end = null): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (!$this->isEditableAccount($account)) {
|
||||
return $this->redirectAccountToAccount($account);
|
||||
@@ -146,7 +146,6 @@ class ReconcileController extends Controller
|
||||
/**
|
||||
* Submit a new reconciliation.
|
||||
*
|
||||
*
|
||||
* @throws DuplicateTransactionException
|
||||
*/
|
||||
public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end): Redirector|RedirectResponse
|
||||
|
||||
@@ -84,7 +84,7 @@ class ShowController extends Controller
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(Request $request, Account $account, ?Carbon $start = null, ?Carbon $end = null): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function show(Request $request, Account $account, ?Carbon $start = null, ?Carbon $end = null): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (0 === $account->id) {
|
||||
throw new NotFoundHttpException();
|
||||
@@ -187,47 +187,47 @@ class ShowController extends Controller
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showAll(Request $request, Account $account): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function showAll(Request $request, Account $account): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (!$this->isEditableAccount($account)) {
|
||||
return $this->redirectAccountToAccount($account);
|
||||
}
|
||||
$location = $this->repository->getLocation($account);
|
||||
$isLiability = $this->repository->isLiability($account);
|
||||
$attachments = $this->repository->getAttachments($account);
|
||||
$objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type));
|
||||
$end = today(config('app.timezone'));
|
||||
$today = today(config('app.timezone'));
|
||||
$location = $this->repository->getLocation($account);
|
||||
$isLiability = $this->repository->isLiability($account);
|
||||
$attachments = $this->repository->getAttachments($account);
|
||||
$objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type));
|
||||
$end = today(config('app.timezone'));
|
||||
$today = today(config('app.timezone'));
|
||||
$this->repository->getAccountCurrency($account);
|
||||
$start = $this->repository->oldestJournalDate($account) ?? today(config('app.timezone'))->startOfMonth();
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.'.$account->accountType->type);
|
||||
$page = (int) $request->get('page');
|
||||
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
|
||||
$currency = $this->repository->getAccountCurrency($account) ?? $this->primaryCurrency;
|
||||
$subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]);
|
||||
$periods = new Collection();
|
||||
$start = $this->repository->oldestJournalDate($account) ?? today(config('app.timezone'))->startOfMonth();
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.'.$account->accountType->type);
|
||||
$page = (int) $request->get('page');
|
||||
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
|
||||
$currency = $this->repository->getAccountCurrency($account) ?? $this->primaryCurrency;
|
||||
$subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]);
|
||||
$periods = new Collection();
|
||||
|
||||
$end->endOfDay();
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setAccounts(new Collection()->push($account))->setLimit($pageSize)->setPage($page)->withAccountInformation()->withCategoryInformation();
|
||||
|
||||
// this search will not include transaction groups where this asset account (or liability)
|
||||
// is just part of ONE of the journals. To force this:
|
||||
$collector->setExpandGroupSearch(true);
|
||||
|
||||
$groups = $collector->getPaginatedGroups();
|
||||
$groups = $collector->getPaginatedGroups();
|
||||
$groups->setPath(route('accounts.show.all', [$account->id]));
|
||||
$chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||
$showAll = true;
|
||||
$chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||
$showAll = true;
|
||||
// correct
|
||||
Log::debug(sprintf('showAll: Call accountsBalancesOptimized with date/time "%s"', $end->toIso8601String()));
|
||||
|
||||
// 2025-10-08 replace finalAccountBalance with accountsBalancesOptimized.
|
||||
// $balances = Steam::finalAccountBalance($account, $end);
|
||||
// $balances = Steam::filterAccountBalance($balances, $account, $this->convertToPrimary, $accountCurrency);
|
||||
$balances = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id];
|
||||
$balances = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id];
|
||||
|
||||
return view(
|
||||
'accounts.show',
|
||||
|
||||
@@ -86,7 +86,7 @@ class LinkController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function delete(Request $request, LinkType $linkType): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function delete(Request $request, LinkType $linkType): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (false === $linkType->editable) {
|
||||
$request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)]));
|
||||
@@ -135,7 +135,7 @@ class LinkController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function edit(Request $request, LinkType $linkType): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function edit(Request $request, LinkType $linkType): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (false === $linkType->editable) {
|
||||
$request->session()->flash('error', (string) trans('firefly.cannot_edit_link_type', ['name' => e($linkType->name)]));
|
||||
|
||||
@@ -73,7 +73,7 @@ class UserController extends Controller
|
||||
/**
|
||||
* @return Application|Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function delete(User $user): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function delete(User $user): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if ($this->externalIdentity) {
|
||||
request()->session()->flash('error', trans('firefly.external_user_mgt_disabled'));
|
||||
|
||||
@@ -68,7 +68,7 @@ class LoginController extends Controller
|
||||
protected string $redirectTo = RouteServiceProvider::HOME;
|
||||
private UserRepositoryInterface $repository;
|
||||
|
||||
private string $username = 'email';
|
||||
private string $username = 'email';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
@@ -222,7 +222,7 @@ class LoginController extends Controller
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function showLoginForm(Request $request): Redirector|RedirectResponse|Factory|View
|
||||
public function showLoginForm(Request $request): Factory|Redirector|RedirectResponse|View
|
||||
{
|
||||
Log::channel('audit')->info('Show login form (1.1).');
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ class ResetPasswordController extends Controller
|
||||
*
|
||||
* If no token is present, display the link request form.
|
||||
*
|
||||
* @param null|mixed $token
|
||||
*
|
||||
* @return Factory|View
|
||||
*
|
||||
|
||||
@@ -59,7 +59,6 @@ class TwoFactorController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -211,6 +210,7 @@ class TwoFactorController extends Controller
|
||||
if (!is_array($list)) {
|
||||
$list = [];
|
||||
}
|
||||
|
||||
return in_array($mfaCode, $list, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ class DebugController extends Controller
|
||||
/**
|
||||
* Clear log and session.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function flush(Request $request): Redirector|RedirectResponse
|
||||
@@ -514,30 +513,40 @@ class DebugController extends Controller
|
||||
|
||||
case 'userGroup':
|
||||
return '1';
|
||||
|
||||
case 'start_date':
|
||||
|
||||
case 'date':
|
||||
return '20241201';
|
||||
|
||||
case 'end_date':
|
||||
return '20241231';
|
||||
|
||||
case 'fromCurrencyCode':
|
||||
return 'EUR';
|
||||
|
||||
case 'toCurrencyCode':
|
||||
return 'USD';
|
||||
|
||||
case 'accountList':
|
||||
return '1,6';
|
||||
|
||||
case 'budgetList':
|
||||
case 'categoryList':
|
||||
case 'doubleList':
|
||||
case 'tagList':
|
||||
case 'journalList':
|
||||
return '1,2';
|
||||
|
||||
case 'route':
|
||||
return 'accounts';
|
||||
|
||||
case 'specificPage':
|
||||
return 'show';
|
||||
|
||||
case 'reportType':
|
||||
return 'default';
|
||||
|
||||
case 'transactionType':
|
||||
return 'withdrawal';
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class NewUserController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function index(): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function index(): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
app('view')->share('title', (string) trans('firefly.welcome'));
|
||||
app('view')->share('mainTitleIcon', 'fa-fire');
|
||||
|
||||
@@ -188,7 +188,6 @@ class PreferencesController extends Controller
|
||||
/**
|
||||
* Store new preferences.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
|
||||
|
||||
@@ -228,7 +228,6 @@ class MfaController extends Controller
|
||||
/**
|
||||
* Submit 2FA for the first time.
|
||||
*
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
||||
@@ -288,7 +288,7 @@ class ProfileController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function changePassword(Request $request): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function changePassword(Request $request): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (!$this->internalAuth) {
|
||||
$request->session()->flash('error', trans('firefly.external_user_mgt_disabled'));
|
||||
@@ -361,7 +361,6 @@ class ProfileController extends Controller
|
||||
/**
|
||||
* Regenerate access token.
|
||||
*
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function regenerate(Request $request): Redirector|RedirectResponse
|
||||
@@ -384,7 +383,6 @@ class ProfileController extends Controller
|
||||
/**
|
||||
* Undo change of user email address.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function undoEmailChange(UserRepositoryInterface $repository, string $token, string $hash): Redirector|RedirectResponse
|
||||
|
||||
@@ -193,7 +193,6 @@ class ReportController extends Controller
|
||||
/**
|
||||
* Show account report.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function doubleReport(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): string
|
||||
|
||||
@@ -37,7 +37,7 @@ class CronController
|
||||
/**
|
||||
* @return Application|Response|ResponseFactory
|
||||
*/
|
||||
public function cron(): ResponseFactory|Response
|
||||
public function cron(): Response|ResponseFactory
|
||||
{
|
||||
Log::error('The cron endpoint has moved to GET /api/v1/cron/[token]');
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@ class InstallController extends Controller
|
||||
public const string BASEDIR_ERROR = 'Firefly III cannot execute the upgrade commands. It is not allowed to because of an open_basedir restriction.';
|
||||
public const string FORBIDDEN_ERROR = 'Internal PHP function "proc_close" is disabled for your installation. Auto-migration is not possible.';
|
||||
public const string OTHER_ERROR = 'An unknown error prevented Firefly III from executing the upgrade commands. Sorry.';
|
||||
private string $lastError = '';
|
||||
private string $lastError = '';
|
||||
// empty on purpose.
|
||||
private array $upgradeCommands = [
|
||||
private array $upgradeCommands = [
|
||||
// there are 5 initial commands
|
||||
// Check 4 places: InstallController, Docker image, UpgradeDatabase, composer.json
|
||||
'migrate' => ['--seed' => true, '--force' => true],
|
||||
|
||||
@@ -87,7 +87,7 @@ class ConvertController extends Controller
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function index(TransactionType $destinationType, TransactionGroup $group): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function index(TransactionType $destinationType, TransactionGroup $group): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
if (!$this->isEditableGroup($group)) {
|
||||
return $this->redirectGroupToAccount($group);
|
||||
|
||||
@@ -100,7 +100,6 @@ class CreateController extends Controller
|
||||
/**
|
||||
* Create a new transaction group.
|
||||
*
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws UrlException
|
||||
|
||||
@@ -68,7 +68,7 @@ class DeleteController extends Controller
|
||||
/**
|
||||
* Shows the form that allows a user to delete a transaction journal.
|
||||
*/
|
||||
public function delete(TransactionGroup $group): Redirector|RedirectResponse|Factory|View
|
||||
public function delete(TransactionGroup $group): Factory|Redirector|RedirectResponse|View
|
||||
{
|
||||
if (!$this->isEditableGroup($group)) {
|
||||
return $this->redirectGroupToAccount($group);
|
||||
|
||||
@@ -74,7 +74,7 @@ class EditController extends Controller
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws UrlException
|
||||
*/
|
||||
public function edit(TransactionGroup $transactionGroup): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function edit(TransactionGroup $transactionGroup): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
app('preferences')->mark();
|
||||
|
||||
|
||||
@@ -154,7 +154,6 @@ class MassController extends Controller
|
||||
/**
|
||||
* Mass update of journals.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function update(MassEditJournalRequest $request): Redirector|RedirectResponse
|
||||
|
||||
@@ -70,7 +70,7 @@ class CreateController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function create(Request $request): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function create(Request $request): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
@@ -71,7 +71,7 @@ class DeleteController extends Controller
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function delete(Request $request, TransactionCurrency $currency): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function delete(Request $request, TransactionCurrency $currency): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
@@ -102,7 +102,6 @@ class DeleteController extends Controller
|
||||
/**
|
||||
* Destroys a currency.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function destroy(Request $request, TransactionCurrency $currency): Redirector|RedirectResponse
|
||||
|
||||
@@ -67,7 +67,7 @@ class EditController extends Controller
|
||||
*
|
||||
* @return Factory|Redirector|RedirectResponse|View
|
||||
*/
|
||||
public function edit(Request $request, TransactionCurrency $currency): Redirector|RedirectResponse|Factory|\Illuminate\Contracts\View\View
|
||||
public function edit(Request $request, TransactionCurrency $currency): Factory|\Illuminate\Contracts\View\View|Redirector|RedirectResponse
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
@@ -107,7 +107,6 @@ class EditController extends Controller
|
||||
/**
|
||||
* Updates a currency.
|
||||
*
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function update(CurrencyFormRequest $request, TransactionCurrency $currency): Redirector|RedirectResponse
|
||||
|
||||
@@ -139,6 +139,7 @@ class Authenticate
|
||||
app('session')->flash('logoutMessage', $message);
|
||||
// @noinspection PhpUndefinedMethodInspection
|
||||
$this->auth->logout();
|
||||
|
||||
// @phpstan-ignore-line (thinks function is undefined)
|
||||
throw new AuthenticationException('Blocked account.', $guards);
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ class Binder
|
||||
public function __construct(/**
|
||||
* The authentication factory instance.
|
||||
*/
|
||||
protected Auth $auth)
|
||||
{
|
||||
protected Auth $auth
|
||||
) {
|
||||
$this->binders = Domain::getBindables();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user