mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
More PHP8.4 updates
This commit is contained in:
@@ -45,6 +45,7 @@ class AccountServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->registerRepository();
|
||||
|
@@ -41,6 +41,7 @@ class AdminServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->linkType();
|
||||
|
@@ -86,6 +86,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
Passport::ignoreRoutes();
|
||||
|
@@ -41,6 +41,7 @@ class AttachmentServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -48,16 +48,12 @@ class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
Auth::provider(
|
||||
'remote_user_provider',
|
||||
static function ($app, array $config) {
|
||||
return new RemoteUserProvider();
|
||||
}
|
||||
static fn($app, array $config) => new RemoteUserProvider()
|
||||
);
|
||||
|
||||
Auth::extend(
|
||||
'remote_user_guard',
|
||||
static function ($app, string $name, array $config) {
|
||||
return new RemoteUserGuard(Auth::createUserProvider($config['provider']), $app);
|
||||
}
|
||||
static fn($app, string $name, array $config) => new RemoteUserGuard(Auth::createUserProvider($config['provider']), $app)
|
||||
);
|
||||
|
||||
Passport::tokensExpireIn(now()->addDays(14));
|
||||
|
@@ -41,6 +41,7 @@ class BillServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -51,6 +51,7 @@ class BudgetServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
// reference to auth is not understood by phpstan.
|
||||
|
@@ -45,6 +45,7 @@ class CategoryServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
// phpstan does not understand reference to 'auth'.
|
||||
|
@@ -45,6 +45,7 @@ class CurrencyServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -260,6 +260,7 @@ class EventServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*/
|
||||
#[\Override]
|
||||
public function boot(): void
|
||||
{
|
||||
$this->registerObservers();
|
||||
|
@@ -90,9 +90,7 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
Validator::resolver(
|
||||
static function ($translator, $data, $rules, $messages) {
|
||||
return new FireflyValidator($translator, $data, $rules, $messages);
|
||||
}
|
||||
static fn($translator, $data, $rules, $messages) => new FireflyValidator($translator, $data, $rules, $messages)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -101,78 +99,57 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
'preferences',
|
||||
static function () {
|
||||
return new Preferences();
|
||||
}
|
||||
static fn() => new Preferences()
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'fireflyconfig',
|
||||
static function () {
|
||||
return new FireflyConfig();
|
||||
}
|
||||
static fn() => new FireflyConfig()
|
||||
);
|
||||
$this->app->bind(
|
||||
'navigation',
|
||||
static function () {
|
||||
return new Navigation();
|
||||
}
|
||||
static fn() => new Navigation()
|
||||
);
|
||||
$this->app->bind(
|
||||
'amount',
|
||||
static function () {
|
||||
return new Amount();
|
||||
}
|
||||
static fn() => new Amount()
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'steam',
|
||||
static function () {
|
||||
return new Steam();
|
||||
}
|
||||
static fn() => new Steam()
|
||||
);
|
||||
$this->app->bind(
|
||||
'balance',
|
||||
static function () {
|
||||
return new Balance();
|
||||
}
|
||||
static fn() => new Balance()
|
||||
);
|
||||
$this->app->bind(
|
||||
'expandedform',
|
||||
static function () {
|
||||
return new ExpandedForm();
|
||||
}
|
||||
static fn() => new ExpandedForm()
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'accountform',
|
||||
static function () {
|
||||
return new AccountForm();
|
||||
}
|
||||
static fn() => new AccountForm()
|
||||
);
|
||||
$this->app->bind(
|
||||
'currencyform',
|
||||
static function () {
|
||||
return new CurrencyForm();
|
||||
}
|
||||
static fn() => new CurrencyForm()
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'piggybankform',
|
||||
static function () {
|
||||
return new PiggyBankForm();
|
||||
}
|
||||
static fn() => new PiggyBankForm()
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'ruleform',
|
||||
static function () {
|
||||
return new RuleForm();
|
||||
}
|
||||
static fn() => new RuleForm()
|
||||
);
|
||||
|
||||
// chart generator:
|
||||
|
@@ -35,6 +35,7 @@ class FireflySessionProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->registerSessionManager();
|
||||
@@ -51,9 +52,7 @@ class FireflySessionProvider extends ServiceProvider
|
||||
{
|
||||
$this->app->singleton(
|
||||
'session',
|
||||
static function ($app) {
|
||||
return new SessionManager($app);
|
||||
}
|
||||
static fn($app) => new SessionManager($app)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,12 +63,11 @@ class FireflySessionProvider extends ServiceProvider
|
||||
{
|
||||
$this->app->singleton(
|
||||
'session.store',
|
||||
static function ($app) {
|
||||
static fn($app) =>
|
||||
// First, we will create the session manager which is responsible for the
|
||||
// creation of the various session drivers when they are needed by the
|
||||
// application instance, and will resolve them on a lazy load basis.
|
||||
return $app->make('session')->driver();
|
||||
}
|
||||
$app->make('session')->driver()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ class JournalServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->registerRepository();
|
||||
|
@@ -41,6 +41,7 @@ class PiggyBankServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -41,6 +41,7 @@ class RecurringServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -37,6 +37,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*/
|
||||
#[\Override]
|
||||
public function boot(): void
|
||||
{
|
||||
$this->routes(function (): void {
|
||||
|
@@ -41,6 +41,7 @@ class RuleGroupServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -41,6 +41,7 @@ class RuleServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -44,6 +44,7 @@ class SearchServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
@@ -34,6 +34,7 @@ class SessionServiceProvider extends BaseSessionServiceProvider
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->registerSessionManager();
|
||||
|
@@ -43,6 +43,7 @@ class TagServiceProvider extends ServiceProvider
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
#[\Override]
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind(
|
||||
|
Reference in New Issue
Block a user