mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Upgrade to 7.4
This commit is contained in:
parent
6cc4d14fcb
commit
8643034945
@ -290,6 +290,7 @@ USE_ENCRYPTION=false
|
||||
IS_SANDSTORM=false
|
||||
IS_HEROKU=false
|
||||
BUNQ_USE_SANDBOX=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
# If you have trouble configuring your Firefly III installation, DON'T BOTHER setting this variable.
|
||||
|
@ -55,9 +55,9 @@ class FixRecurringTransactions extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): int
|
||||
{
|
||||
$start = microtime(true);
|
||||
$this->stupidLaravel();
|
||||
|
@ -50,9 +50,9 @@ class CreateDatabase extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): int
|
||||
{
|
||||
if ('mysql' !== env('DB_CONNECTION')) {
|
||||
$this->info(sprintf('CreateDB does not apply to "%s", skipped.', env('DB_CONNECTION')));
|
||||
|
@ -38,6 +38,7 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Log;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Class GracefulNotFoundHandler
|
||||
@ -53,7 +54,7 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
* @throws Exception
|
||||
* @return mixed
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
$route = $request->route();
|
||||
if (null === $route) {
|
||||
@ -136,12 +137,12 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Exception $exception
|
||||
* @param Throwable $exception
|
||||
*
|
||||
* @throws Exception
|
||||
* @return Redirector|Response
|
||||
*/
|
||||
private function handleAccount(Request $request, Exception $exception)
|
||||
private function handleAccount(Request $request, Throwable $exception)
|
||||
{
|
||||
Log::debug('404 page is probably a deleted account. Redirect to overview of account types.');
|
||||
/** @var User $user */
|
||||
@ -164,12 +165,12 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Exception $exception
|
||||
* @param Throwable $exception
|
||||
*
|
||||
* @throws Exception
|
||||
* @return RedirectResponse|Redirector|Response
|
||||
*/
|
||||
private function handleAttachment(Request $request, Exception $exception)
|
||||
private function handleAttachment(Request $request, Throwable $exception)
|
||||
{
|
||||
Log::debug('404 page is probably a deleted attachment. Redirect to parent object.');
|
||||
/** @var User $user */
|
||||
@ -208,13 +209,13 @@ class GracefulNotFoundHandler extends ExceptionHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Throwable $request
|
||||
* @param Exception $exception
|
||||
*
|
||||
* @throws Exception
|
||||
* @return RedirectResponse|\Illuminate\Http\Response|Redirector|Response
|
||||
*/
|
||||
private function handleGroup(Request $request, Exception $exception)
|
||||
private function handleGroup(Request $request, Throwable $exception)
|
||||
{
|
||||
Log::debug('404 page is probably a deleted group. Redirect to overview of group types.');
|
||||
/** @var User $user */
|
||||
|
@ -33,9 +33,9 @@ use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Validation\ValidationException as LaravelValidationException;
|
||||
use League\OAuth2\Server\Exception\OAuthServerException;
|
||||
use Request;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Throwable;
|
||||
/**
|
||||
* Class Handler
|
||||
*
|
||||
@ -51,7 +51,7 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function render($request, Exception $exception)
|
||||
public function render($request, Throwable $exception)
|
||||
{
|
||||
if ($exception instanceof LaravelValidationException && $request->expectsJson()) {
|
||||
// ignore it: controller will handle it.
|
||||
@ -119,7 +119,7 @@ class Handler extends ExceptionHandler
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
$doMailError = config('firefly.send_error_message');
|
||||
// if the user wants us to mail:
|
||||
@ -143,13 +143,13 @@ class Handler extends ExceptionHandler
|
||||
'line' => $exception->getLine(),
|
||||
'code' => $exception->getCode(),
|
||||
'version' => config('firefly.version'),
|
||||
'url' => Request::fullUrl(),
|
||||
'userAgent' => Request::userAgent(),
|
||||
'json' => Request::acceptsJson(),
|
||||
'url' => request()->fullUrl(),
|
||||
'userAgent' => request()->userAgent(),
|
||||
'json' => request()->acceptsJson(),
|
||||
];
|
||||
|
||||
// create job that will mail.
|
||||
$ipAddress = Request::ip() ?? '0.0.0.0';
|
||||
$ipAddress = request()->ip() ?? '0.0.0.0';
|
||||
$job = new MailError($userData, (string) config('firefly.site_owner'), $ipAddress, $data);
|
||||
dispatch($job);
|
||||
}
|
||||
|
@ -39,13 +39,13 @@ class Controller extends BaseController
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests, UserNavigation, RequestInformation;
|
||||
|
||||
/** @var string Format for date and time. */
|
||||
protected $dateTimeFormat;
|
||||
protected string $dateTimeFormat;
|
||||
/** @var string Format for "23 Feb, 2016". */
|
||||
protected $monthAndDayFormat;
|
||||
protected string $monthAndDayFormat;
|
||||
/** @var string Format for "March 2018" */
|
||||
protected $monthFormat;
|
||||
protected string $monthFormat;
|
||||
/** @var string Redirect user */
|
||||
protected $redirectUri = '/';
|
||||
protected string $redirectUri = '/';
|
||||
|
||||
/**
|
||||
* Controller constructor.
|
||||
|
@ -69,7 +69,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.3.0",
|
||||
"php": ">=7.4.0",
|
||||
"ext-bcmath": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-fileinfo": "*",
|
||||
@ -88,7 +88,7 @@
|
||||
"doctrine/dbal": "2.*",
|
||||
"fideloper/proxy": "4.*",
|
||||
"jc5/google2fa-laravel": "2.0.4",
|
||||
"laravel/framework": "^6.0",
|
||||
"laravel/framework": "^7.0",
|
||||
"laravel/passport": "8.*",
|
||||
"laravelcollective/html": "6.*",
|
||||
"league/commonmark": "1.*",
|
||||
@ -105,7 +105,7 @@
|
||||
"fzaninotto/faker": "1.*",
|
||||
"johnkary/phpunit-speedtrap": "^3.1",
|
||||
"mockery/mockery": "1.*",
|
||||
"phpunit/phpunit": "8.*",
|
||||
"phpunit/phpunit": "^8.5",
|
||||
"psalm/plugin-laravel": "^1.1",
|
||||
"roave/security-advisories": "dev-master",
|
||||
"vimeo/psalm": "^3.10"
|
||||
|
862
composer.lock
generated
862
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -147,6 +147,24 @@ return [
|
||||
'Google2FA' => PragmaRX\Google2FALaravel\Facade::class,
|
||||
'Twig' => TwigBridge\Facade\Twig::class,
|
||||
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Http' => Illuminate\Support\Facades\Http::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
],
|
||||
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Faker Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This locale will be used by the Faker PHP library when generating fake
|
||||
| data for your database seeds. For example, this will be used to get
|
||||
| localized telephone numbers, street address information and more.
|
||||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
|
||||
];
|
||||
|
@ -113,4 +113,18 @@ return [
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define the amount of seconds before a password confirmation
|
||||
| times out and the user is prompted to re-enter their password via the
|
||||
| confirmation screen. By default, the timeout lasts for three hours.
|
||||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => 10800,
|
||||
|
||||
];
|
||||
|
@ -56,6 +56,7 @@ return [
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
|
||||
'database' => [
|
||||
@ -93,6 +94,15 @@ return [
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
@ -108,4 +118,5 @@ return [
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', 'firefly'),
|
||||
|
||||
|
||||
];
|
||||
|
@ -146,34 +146,34 @@ return [
|
||||
'api_version' => '1.1.0',
|
||||
'db_version' => 13,
|
||||
'maxUploadSize' => 15242880,
|
||||
'send_error_message' => env('SEND_ERROR_MESSAGE', true),
|
||||
'site_owner' => env('SITE_OWNER', ''),
|
||||
'send_registration_mail' => env('SEND_REGISTRATION_MAIL', true),
|
||||
'demo_username' => env('DEMO_USERNAME', ''),
|
||||
'demo_password' => env('DEMO_PASSWORD', ''),
|
||||
'is_sandstorm' => env('IS_SANDSTORM', 'unknown'),
|
||||
'bunq_use_sandbox' => env('BUNQ_USE_SANDBOX', false),
|
||||
'fixer_api_key' => env('FIXER_API_KEY', ''),
|
||||
'mapbox_api_key' => env('MAPBOX_API_KEY', ''),
|
||||
'trusted_proxies' => env('TRUSTED_PROXIES', ''),
|
||||
'search_result_limit' => env('SEARCH_RESULT_LIMIT', 50),
|
||||
'send_report_journals' => envNonEmpty('SEND_REPORT_JOURNALS', true),
|
||||
'tracker_site_id' => env('TRACKER_SITE_ID', ''),
|
||||
'tracker_url' => env('TRACKER_URL', ''),
|
||||
'disable_frame_header' => env('DISABLE_FRAME_HEADER', false),
|
||||
'disable_csp_header' => env('DISABLE_CSP_HEADER', false),
|
||||
'login_provider' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'),
|
||||
'cer_provider' => envNonEmpty('CER_PROVIDER', 'fixer'),
|
||||
'update_endpoint' => 'https://version.firefly-iii.org/index.json',
|
||||
'send_telemetry' => env('SEND_TELEMETRY', false),
|
||||
'telemetry_endpoint' => 'https://telemetry.firefly-iii.org',
|
||||
'update_minimum_age' => 6,
|
||||
'default_location' => [
|
||||
'send_error_message' => env('SEND_ERROR_MESSAGE', true),
|
||||
'site_owner' => env('SITE_OWNER', ''),
|
||||
'send_registration_mail' => env('SEND_REGISTRATION_MAIL', true),
|
||||
'demo_username' => env('DEMO_USERNAME', ''),
|
||||
'demo_password' => env('DEMO_PASSWORD', ''),
|
||||
'is_sandstorm' => env('IS_SANDSTORM', 'unknown'),
|
||||
'fixer_api_key' => env('FIXER_API_KEY', ''),
|
||||
'mapbox_api_key' => env('MAPBOX_API_KEY', ''),
|
||||
'trusted_proxies' => env('TRUSTED_PROXIES', ''),
|
||||
'search_result_limit' => env('SEARCH_RESULT_LIMIT', 50),
|
||||
'send_report_journals' => envNonEmpty('SEND_REPORT_JOURNALS', true),
|
||||
'tracker_site_id' => env('TRACKER_SITE_ID', ''),
|
||||
'tracker_url' => env('TRACKER_URL', ''),
|
||||
'disable_frame_header' => env('DISABLE_FRAME_HEADER', false),
|
||||
'disable_csp_header' => env('DISABLE_CSP_HEADER', false),
|
||||
'login_provider' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'),
|
||||
'cer_provider' => envNonEmpty('CER_PROVIDER', 'fixer'),
|
||||
'update_endpoint' => 'https://version.firefly-iii.org/index.json',
|
||||
'send_telemetry' => env('SEND_TELEMETRY', false),
|
||||
'telemetry_endpoint' => 'https://telemetry.firefly-iii.org',
|
||||
'layout' => env('FIREFLY_III_LAYOUT', 'v1'),
|
||||
'update_minimum_age' => 6,
|
||||
'default_location' => [
|
||||
'longitude' => env('MAP_DEFAULT_LONG', '5.916667'),
|
||||
'latitude' => env('MAP_DEFAULT_LAT', '51.983333'),
|
||||
'zoom_level' => env('MAP_DEFAULT_ZOOM', '6'),
|
||||
],
|
||||
'valid_attachment_models' => [
|
||||
'valid_attachment_models' => [
|
||||
Account::class,
|
||||
Bill::class,
|
||||
Budget::class,
|
||||
@ -183,7 +183,7 @@ return [
|
||||
Transaction::class,
|
||||
TransactionJournal::class,
|
||||
],
|
||||
'allowedMimes' => [
|
||||
'allowedMimes' => [
|
||||
/* plain files */
|
||||
'text/plain',
|
||||
|
||||
|
141
config/mail.php
141
config/mail.php
@ -22,111 +22,60 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||
| "sparkpost", "log", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => envNonEmpty('MAIL_DRIVER', 'log'),
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Mailgun mail service which will provide reliable deliveries.
|
||||
|
|
||||
*/
|
||||
'mailers' => [
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'host' => env('MAIL_HOST', 'smtp.mailtrap.io'),
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
],
|
||||
|
||||
'host' => env('MAIL_HOST', 'smtp.mailtrap.io'),
|
||||
'ses' => [
|
||||
'transport' => 'ses',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to deliver e-mails to
|
||||
| users of the application. Like the host we have set this value to
|
||||
| stay compatible with the Mailgun e-mail application by default.
|
||||
|
|
||||
*/
|
||||
'mailgun' => [
|
||||
'transport' => 'mailgun',
|
||||
],
|
||||
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
'postmark' => [
|
||||
'transport' => 'postmark',
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => '/usr/sbin/sendmail -bs',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'transport' => 'array',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
'from' => ['address' => envNonEmpty('MAIL_FROM', 'changeme@example.com'), 'name' => 'Firefly III Mailer'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using Markdown based email rendering, you may configure your
|
||||
| theme and component paths here, allowing you to customize the design
|
||||
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||
|
|
||||
*/
|
||||
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
|
@ -34,7 +34,7 @@ return [
|
||||
'cookie' => 'firefly_session',
|
||||
'path' => env('COOKIE_PATH', '/'),
|
||||
'domain' => env('COOKIE_DOMAIN', null),
|
||||
'secure' => env('COOKIE_SECURE', false),
|
||||
'secure' => env('COOKIE_SECURE', null),
|
||||
'http_only' => true,
|
||||
'same_site' => null,
|
||||
];
|
||||
|
@ -34,7 +34,7 @@ return [
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
realpath(base_path('resources/views/v1')),
|
||||
realpath(base_path(sprintf('resources/views/%s', env('FIREFLY_III_LAYOUT', 'v1')))),
|
||||
],
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user