From 1a2ebe7e08b88bafa39d0725d57d44da79480d46 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 08:44:43 -0400 Subject: [PATCH 01/10] require spatie/laravelsettings --- .phpstorm.meta.php | 55 ++ composer.json | 3 + composer.lock | 933 ++++++++++++++---- config/settings.php | 80 ++ ...022_10_21_104903_create_settings_table.php | 27 + 5 files changed, 891 insertions(+), 207 deletions(-) create mode 100644 config/settings.php create mode 100644 database/migrations/2022_10_21_104903_create_settings_table.php diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index cdad6ebb5..166da26a5 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -11,6 +11,7 @@ */ override(new \Illuminate\Contracts\Container\Container, map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -148,6 +149,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -198,6 +203,7 @@ ])); override(\Illuminate\Container\Container::makeWith(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -335,6 +341,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -385,6 +395,7 @@ ])); override(\Illuminate\Contracts\Container\Container::get(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -522,6 +533,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -572,6 +587,7 @@ ])); override(\Illuminate\Contracts\Container\Container::make(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -709,6 +725,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -759,6 +779,7 @@ ])); override(\Illuminate\Contracts\Container\Container::makeWith(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -896,6 +917,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -946,6 +971,7 @@ ])); override(\App::get(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1083,6 +1109,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -1133,6 +1163,7 @@ ])); override(\App::make(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1270,6 +1301,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -1320,6 +1355,7 @@ ])); override(\App::makeWith(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1457,6 +1493,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -1507,6 +1547,7 @@ ])); override(\app(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1644,6 +1685,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -1694,6 +1739,7 @@ ])); override(\resolve(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1831,6 +1877,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, @@ -1881,6 +1931,7 @@ ])); override(\Psr\Container\ContainerInterface::get(0), map([ '' => '@', + 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -2018,6 +2069,10 @@ 'Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder' => \Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder::class, 'Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder' => \Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::class, 'Spatie\LaravelIgnition\Support\SentReports' => \Spatie\LaravelIgnition\Support\SentReports::class, + 'Spatie\LaravelSettings\SettingsCache' => \Spatie\LaravelSettings\SettingsCache::class, + 'Spatie\LaravelSettings\SettingsMapper' => \Spatie\LaravelSettings\SettingsMapper::class, + 'Spatie\LaravelSettings\SettingsRepositories\SettingsRepository' => \Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'Squire\RepositoryManager' => \Squire\RepositoryManager::class, 'Whoops\Handler\HandlerInterface' => \Spatie\LaravelIgnition\Renderers\IgnitionWhoopsHandler::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class, diff --git a/composer.json b/composer.json index b909d57e3..5ebafe04b 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,14 @@ "doctrine/dbal": "^3.4", "dragonmantank/cron-expression": "^3.3", "filament/filament": "^2.0", + "filament/spatie-laravel-settings-plugin": "^2.0", "guzzlehttp/guzzle": "^7.2", "influxdata/influxdb-client-php": "^2.9", "laravel/framework": "^9.19", "laravel/sanctum": "^3.0", "laravel/tinker": "^2.7", + "spatie/laravel-settings": "^2.4", + "squirephp/timezones-en": "^3.3", "symfony/yaml": "^6.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 0b9d6c58e..ad0f3e849 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": "b5629ef1f999b563b144e2a44f5a7d3c", + "content-hash": "014a602e72040b43da1b35704f796390", "packages": [ { "name": "akaunting/laravel-money", @@ -1266,6 +1266,53 @@ }, "time": "2022-10-17T08:43:26+00:00" }, + { + "name": "filament/spatie-laravel-settings-plugin", + "version": "v2.16.35", + "source": { + "type": "git", + "url": "https://github.com/filamentphp/spatie-laravel-settings-plugin.git", + "reference": "61a0e2725c390f6ec3d3075246dcdc0f50c405dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filamentphp/spatie-laravel-settings-plugin/zipball/61a0e2725c390f6ec3d3075246dcdc0f50c405dc", + "reference": "61a0e2725c390f6ec3d3075246dcdc0f50c405dc", + "shasum": "" + }, + "require": { + "filament/filament": "self.version", + "illuminate/console": "^8.6|^9.0", + "illuminate/filesystem": "^8.6|^9.0", + "illuminate/support": "^8.6|^9.0", + "php": "^8.0", + "spatie/laravel-settings": "^2.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Filament\\SpatieLaravelSettingsPluginServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Filament\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Filament support for `spatie/laravel-settings`.", + "homepage": "https://github.com/filamentphp/filament", + "support": { + "issues": "https://github.com/filamentphp/filament/issues", + "source": "https://github.com/filamentphp/filament" + }, + "time": "2022-10-17T08:43:16+00:00" + }, { "name": "filament/support", "version": "v2.16.35", @@ -3301,6 +3348,114 @@ ], "time": "2022-10-17T15:20:29+00:00" }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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" + }, + "time": "2022-10-14T12:47:21+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.0", @@ -4097,37 +4252,488 @@ "shasum": "" }, "require": { - "illuminate/contracts": "^8.0|^9.0", - "php": "^8.0", - "spatie/laravel-package-tools": "^1.9.2" - }, - "require-dev": { - "nunomaduro/collision": "^5.0|^6.0", - "nunomaduro/larastan": "^1.0", - "orchestra/testbench": "^6.23|^7.0", - "pestphp/pest": "^1.21", - "pestphp/pest-plugin-laravel": "^1.1", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5", - "spatie/laravel-ray": "^1.26" + "illuminate/contracts": "^8.0|^9.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9.2" + }, + "require-dev": { + "nunomaduro/collision": "^5.0|^6.0", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider" + ], + "aliases": { + "BladeCaptureDirective": "RyanChandler\\BladeCaptureDirective\\Facades\\BladeCaptureDirective" + } + } + }, + "autoload": { + "psr-4": { + "RyanChandler\\BladeCaptureDirective\\": "src", + "RyanChandler\\BladeCaptureDirective\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ryan Chandler", + "email": "support@ryangjchandler.co.uk", + "role": "Developer" + } + ], + "description": "Create inline partials in your Blade templates with ease.", + "homepage": "https://github.com/ryangjchandler/blade-capture-directive", + "keywords": [ + "blade-capture-directive", + "laravel", + "ryangjchandler" + ], + "support": { + "issues": "https://github.com/ryangjchandler/blade-capture-directive/issues", + "source": "https://github.com/ryangjchandler/blade-capture-directive/tree/v0.2.2" + }, + "funding": [ + { + "url": "https://github.com/ryangjchandler", + "type": "github" + } + ], + "time": "2022-09-02T11:04:28+00:00" + }, + { + "name": "spatie/data-transfer-object", + "version": "3.9.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/data-transfer-object.git", + "reference": "1df0906c4e9e3aebd6c0506fd82c8b7d5548c1c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/data-transfer-object/zipball/1df0906c4e9e3aebd6c0506fd82c8b7d5548c1c8", + "reference": "1df0906c4e9e3aebd6c0506fd82c8b7d5548c1c8", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "illuminate/collections": "^8.36", + "jetbrains/phpstorm-attributes": "^1.0", + "larapack/dd": "^1.1", + "phpunit/phpunit": "^9.5.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\DataTransferObject\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brent Roose", + "email": "brent@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Data transfer objects with batteries included", + "homepage": "https://github.com/spatie/data-transfer-object", + "keywords": [ + "data-transfer-object", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/data-transfer-object/issues", + "source": "https://github.com/spatie/data-transfer-object/tree/3.9.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-09-16T13:34:38+00:00" + }, + { + "name": "spatie/invade", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/invade.git", + "reference": "d0a9c895a96152549d478a7e3420e19039eef038" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/invade/zipball/d0a9c895a96152549d478a7e3420e19039eef038", + "reference": "d0a9c895a96152549d478a7e3420e19039eef038", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.20", + "phpstan/phpstan": "^1.4", + "spatie/ray": "^1.28" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "phpstan-extension.neon" + ] + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Spatie\\Invade\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "A PHP function to work with private properties and methods", + "homepage": "https://github.com/spatie/invade", + "keywords": [ + "invade", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/invade/tree/1.1.1" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-07-05T09:31:00+00:00" + }, + { + "name": "spatie/laravel-package-tools", + "version": "1.13.6", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "c377cc7223655c2278c148c1685b8b5a78af5c65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/c377cc7223655c2278c148c1685b8b5a78af5c65", + "reference": "c377cc7223655c2278c148c1685b8b5a78af5c65", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^9.28", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7", + "phpunit/phpunit": "^9.5.24", + "spatie/test-time": "^1.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.13.6" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-10-11T06:37:42+00:00" + }, + { + "name": "spatie/laravel-settings", + "version": "2.4.5", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-settings.git", + "reference": "f16a8d29c126deadddb84fff495212d2393cc850" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-settings/zipball/f16a8d29c126deadddb84fff495212d2393cc850", + "reference": "f16a8d29c126deadddb84fff495212d2393cc850", + "shasum": "" + }, + "require": { + "doctrine/dbal": "^2.13|^3.2", + "ext-json": "*", + "illuminate/database": "^8.73|^9.0", + "php": "^7.4|^8.0", + "phpdocumentor/type-resolver": "^1.5", + "spatie/data-transfer-object": "^2.8|^3.7", + "spatie/temporary-directory": "^1.3|^2.0" + }, + "require-dev": { + "ext-redis": "*", + "mockery/mockery": "^1.4", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "spatie/pest-plugin-snapshots": "^1.1", + "spatie/phpunit-snapshot-assertions": "^4.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelSettings\\LaravelSettingsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\LaravelSettings\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ruben Van Assche", + "email": "ruben@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Store your application settings", + "homepage": "https://github.com/spatie/laravel-settings", + "keywords": [ + "laravel-settings", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-settings/issues", + "source": "https://github.com/spatie/laravel-settings/tree/2.4.5" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-09-28T14:10:27+00:00" + }, + { + "name": "spatie/temporary-directory", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/temporary-directory.git", + "reference": "e2818d871783d520b319c2d38dc37c10ecdcde20" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/e2818d871783d520b319c2d38dc37c10ecdcde20", + "reference": "e2818d871783d520b319c2d38dc37c10ecdcde20", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\TemporaryDirectory\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Vanderbist", + "email": "alex@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily create, use and destroy temporary directories", + "homepage": "https://github.com/spatie/temporary-directory", + "keywords": [ + "php", + "spatie", + "temporary-directory" + ], + "support": { + "issues": "https://github.com/spatie/temporary-directory/issues", + "source": "https://github.com/spatie/temporary-directory/tree/2.1.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-08-23T07:15:15+00:00" + }, + { + "name": "squirephp/model", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/squirephp/model.git", + "reference": "2ef9669c10dd17e44b22575a2796f25b788a99f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squirephp/model/zipball/2ef9669c10dd17e44b22575a2796f25b788a99f0", + "reference": "2ef9669c10dd17e44b22575a2796f25b788a99f0", + "shasum": "" + }, + "require": { + "ext-pdo_sqlite": "*", + "illuminate/database": "^8.40|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Squire\\ModelServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Squire\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Harrin", + "email": "dan@danharrin.com" + } + ], + "description": "A library containing the base Squire model class.", + "homepage": "https://github.com/squirephp", + "keywords": [ + "squire" + ], + "support": { + "issues": "https://github.com/squirephp/squire/issues", + "source": "https://github.com/squirephp/squire" + }, + "time": "2022-02-08T08:50:39+00:00" + }, + { + "name": "squirephp/repository", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/squirephp/repository.git", + "reference": "1778190fea82ac6b4d3c2eacbf43ba2d3efe9dd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squirephp/repository/zipball/1778190fea82ac6b4d3c2eacbf43ba2d3efe9dd5", + "reference": "1778190fea82ac6b4d3c2eacbf43ba2d3efe9dd5", + "shasum": "" + }, + "require": { + "illuminate/support": "^8.0|^9.0", + "php": "^8.0" }, "type": "library", "extra": { "laravel": { "providers": [ - "RyanChandler\\BladeCaptureDirective\\BladeCaptureDirectiveServiceProvider" + "Squire\\RepositoryServiceProvider" ], "aliases": { - "BladeCaptureDirective": "RyanChandler\\BladeCaptureDirective\\Facades\\BladeCaptureDirective" + "RepositoryManager": "Squire\\Repository\\Facades\\Repository" } } }, "autoload": { "psr-4": { - "RyanChandler\\BladeCaptureDirective\\": "src", - "RyanChandler\\BladeCaptureDirective\\Database\\Factories\\": "database/factories" + "Squire\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4136,66 +4742,99 @@ ], "authors": [ { - "name": "Ryan Chandler", - "email": "support@ryangjchandler.co.uk", - "role": "Developer" + "name": "Dan Harrin", + "email": "dan@danharrin.com" } ], - "description": "Create inline partials in your Blade templates with ease.", - "homepage": "https://github.com/ryangjchandler/blade-capture-directive", + "description": "A library containing the Squire repository.", + "homepage": "https://github.com/squirephp", "keywords": [ - "blade-capture-directive", - "laravel", - "ryangjchandler" + "squire" ], "support": { - "issues": "https://github.com/ryangjchandler/blade-capture-directive/issues", - "source": "https://github.com/ryangjchandler/blade-capture-directive/tree/v0.2.2" + "issues": "https://github.com/squirephp/squire/issues", + "source": "https://github.com/squirephp/squire" }, - "funding": [ + "time": "2022-02-08T08:51:10+00:00" + }, + { + "name": "squirephp/rule", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/squirephp/rule.git", + "reference": "a1650e38aedcc1a7ce51e47340f17a9a4848ad9b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squirephp/rule/zipball/a1650e38aedcc1a7ce51e47340f17a9a4848ad9b", + "reference": "a1650e38aedcc1a7ce51e47340f17a9a4848ad9b", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0|^9.0", + "illuminate/database": "^8.40|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Squire\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "url": "https://github.com/ryangjchandler", - "type": "github" + "name": "Dan Harrin", + "email": "dan@danharrin.com" } ], - "time": "2022-09-02T11:04:28+00:00" + "description": "A library containing the base Squire rule class.", + "homepage": "https://github.com/squirephp", + "keywords": [ + "squire" + ], + "support": { + "issues": "https://github.com/squirephp/squire/issues", + "source": "https://github.com/squirephp/squire" + }, + "time": "2022-02-08T08:51:11+00:00" }, { - "name": "spatie/invade", - "version": "1.1.1", + "name": "squirephp/timezones", + "version": "v3.3.1", "source": { "type": "git", - "url": "https://github.com/spatie/invade.git", - "reference": "d0a9c895a96152549d478a7e3420e19039eef038" + "url": "https://github.com/squirephp/timezones.git", + "reference": "0bac51dacb5648f78e9030aca88363431d897c53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/invade/zipball/d0a9c895a96152549d478a7e3420e19039eef038", - "reference": "d0a9c895a96152549d478a7e3420e19039eef038", + "url": "https://api.github.com/repos/squirephp/timezones/zipball/0bac51dacb5648f78e9030aca88363431d897c53", + "reference": "0bac51dacb5648f78e9030aca88363431d897c53", "shasum": "" }, "require": { - "php": "^8.0" - }, - "require-dev": { - "pestphp/pest": "^1.20", - "phpstan/phpstan": "^1.4", - "spatie/ray": "^1.28" + "illuminate/support": "^8.0|^9.0", + "php": "^8.0", + "squirephp/model": "self.version", + "squirephp/rule": "self.version" }, "type": "library", "extra": { - "phpstan": { - "includes": [ - "phpstan-extension.neon" + "laravel": { + "providers": [ + "Squire\\TimezonesServiceProvider" ] } }, "autoload": { - "files": [ - "src/functions.php" - ], "psr-4": { - "Spatie\\Invade\\": "src" + "Squire\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4204,56 +4843,52 @@ ], "authors": [ { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "role": "Developer" + "name": "Dan Harrin", + "email": "dan@danharrin.com" } ], - "description": "A PHP function to work with private properties and methods", - "homepage": "https://github.com/spatie/invade", + "description": "A library containing Squire's Timezone model.", + "homepage": "https://github.com/squirephp", "keywords": [ - "invade", - "spatie" + "squire" ], "support": { - "source": "https://github.com/spatie/invade/tree/1.1.1" + "issues": "https://github.com/squirephp/squire/issues", + "source": "https://github.com/squirephp/squire" }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2022-07-05T09:31:00+00:00" + "time": "2022-02-08T08:51:13+00:00" }, { - "name": "spatie/laravel-package-tools", - "version": "1.13.6", + "name": "squirephp/timezones-en", + "version": "v3.3.1", "source": { "type": "git", - "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "c377cc7223655c2278c148c1685b8b5a78af5c65" + "url": "https://github.com/squirephp/timezones-en.git", + "reference": "48072b8d77480889f5be3eb7e615415d51767c58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/c377cc7223655c2278c148c1685b8b5a78af5c65", - "reference": "c377cc7223655c2278c148c1685b8b5a78af5c65", + "url": "https://api.github.com/repos/squirephp/timezones-en/zipball/48072b8d77480889f5be3eb7e615415d51767c58", + "reference": "48072b8d77480889f5be3eb7e615415d51767c58", "shasum": "" }, "require": { - "illuminate/contracts": "^9.28", - "php": "^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.5", - "orchestra/testbench": "^7.7", - "phpunit/phpunit": "^9.5.24", - "spatie/test-time": "^1.3" + "illuminate/support": "^8.0|^9.0", + "php": "^8.0", + "squirephp/repository": "self.version", + "squirephp/timezones": "self.version" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Squire\\TimezonesEnServiceProvider" + ] + } + }, "autoload": { "psr-4": { - "Spatie\\LaravelPackageTools\\": "src" + "Squire\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4262,28 +4897,20 @@ ], "authors": [ { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "role": "Developer" + "name": "Dan Harrin", + "email": "dan@danharrin.com" } ], - "description": "Tools for creating Laravel packages", - "homepage": "https://github.com/spatie/laravel-package-tools", + "description": "A library containing the English translation of Squire's Timezone model.", + "homepage": "https://github.com/squirephp", "keywords": [ - "laravel-package-tools", - "spatie" + "squire" ], "support": { - "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.13.6" + "issues": "https://github.com/squirephp/squire/issues", + "source": "https://github.com/squirephp/squire" }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2022-10-11T06:37:42+00:00" + "time": "2022-02-08T08:51:14+00:00" }, { "name": "symfony/console", @@ -7872,114 +8499,6 @@ }, "time": "2022-02-21T01:04:05+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "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" - }, - "time": "2022-10-14T12:47:21+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "9.2.17", diff --git a/config/settings.php b/config/settings.php new file mode 100644 index 000000000..89cb1e076 --- /dev/null +++ b/config/settings.php @@ -0,0 +1,80 @@ + [ + + ], + + /* + * In these directories settings migrations will be stored and ran when migrating. A settings + * migration created via the make:settings-migration command will be stored in the first path or + * a custom defined path when running the command. + */ + 'migrations_paths' => [ + database_path('settings'), + ], + + /* + * When no repository was set for a settings class the following repository + * will be used for loading and saving settings. + */ + 'default_repository' => 'database', + + /* + * Settings will be stored and loaded from these repositories. + */ + 'repositories' => [ + 'database' => [ + 'type' => Spatie\LaravelSettings\SettingsRepositories\DatabaseSettingsRepository::class, + 'model' => null, + 'table' => null, + 'connection' => null, + ], + 'redis' => [ + 'type' => Spatie\LaravelSettings\SettingsRepositories\RedisSettingsRepository::class, + 'connection' => null, + 'prefix' => null, + ], + ], + + /* + * The contents of settings classes can be cached through your application, + * settings will be stored within a provided Laravel store and can have an + * additional prefix. + */ + 'cache' => [ + 'enabled' => env('SETTINGS_CACHE_ENABLED', false), + 'store' => null, + 'prefix' => null, + 'ttl' => null, + ], + + /* + * These global casts will be automatically used whenever a property within + * your settings class isn't a default PHP type. + */ + 'global_casts' => [ + DateTimeInterface::class => Spatie\LaravelSettings\SettingsCasts\DateTimeInterfaceCast::class, + DateTimeZone::class => Spatie\LaravelSettings\SettingsCasts\DateTimeZoneCast::class, + Spatie\DataTransferObject\DataTransferObject::class => Spatie\LaravelSettings\SettingsCasts\DtoCast::class, + ], + + /* + * The package will look for settings in these paths and automatically + * register them. + */ + 'auto_discover_settings' => [ + app()->path(), + ], + + /* + * Automatically discovered settings classes can be cached so they don't + * need to be searched each time the application boots up. + */ + 'discovered_settings_cache_path' => storage_path('app/laravel-settings'), +]; diff --git a/database/migrations/2022_10_21_104903_create_settings_table.php b/database/migrations/2022_10_21_104903_create_settings_table.php new file mode 100644 index 000000000..d420e1eaa --- /dev/null +++ b/database/migrations/2022_10_21_104903_create_settings_table.php @@ -0,0 +1,27 @@ +id(); + + $table->string('group')->index(); + $table->string('name'); + $table->boolean('locked'); + $table->json('payload'); + + $table->timestamps(); + }); + } + + public function down() + { + Schema::dropIfExists('settings'); + } +} From 146688554194f69f0916628b8a49b486a657e7a0 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 08:46:17 -0400 Subject: [PATCH 02/10] moved site and speedtest settings to filament --- app/Filament/Pages/General.php | 89 +++++++++++++++++++ app/Jobs/SearchForSpeedtests.php | 43 +++------ app/Providers/FilamentServiceProvider.php | 1 + app/Settings/GeneralSettings.php | 23 +++++ config.example.yml | 12 --- ...2_10_21_105703_create_general_settings.php | 15 ++++ 6 files changed, 142 insertions(+), 41 deletions(-) create mode 100644 app/Filament/Pages/General.php create mode 100644 app/Settings/GeneralSettings.php create mode 100644 database/settings/2022_10_21_105703_create_general_settings.php diff --git a/app/Filament/Pages/General.php b/app/Filament/Pages/General.php new file mode 100644 index 000000000..7a1e93c3f --- /dev/null +++ b/app/Filament/Pages/General.php @@ -0,0 +1,89 @@ + 1, + 'md' => 3, + ]) + ->schema([ + Grid::make([ + 'default' => 1, + ]) + ->schema([ + Section::make('Site Settings') + ->collapsible() + ->schema([ + TextInput::make('site_name') + ->maxLength(50) + ->required() + ->columnSpan(['md' => 2]), + Select::make('timezone') + ->options(Timezone::all()->pluck('code', 'code')) + ->searchable() + ->required() + ->columnSpan(1), + ]) + ->columns([ + 'default' => 1, + 'md' => 2, + ]), + + Section::make('Speedtest Settings') + ->collapsible() + ->schema([ + TextInput::make('speedtest_schedule') + ->helperText('Leave empty to disable the schedule. You can also use the cron expression generator [HERE](https://crontab.cronhub.io/) to help you make schedules.') + ->nullable() + ->columnSpan(1), + TextInput::make('speedtest_server') + ->helperText('Leave empty to let the system pick the best server.') + ->nullable() + ->columnSpan(1), + ]) + ->columns([ + 'default' => 1, + 'md' => 2, + ]), + ]) + ->columnSpan([ + 'md' => 2, + ]), + + Card::make() + ->schema([ + Toggle::make('auth_enabled') + ->label('Authentication enabled') + ->helperText("NOTE: Authentication is currently required. It's on the roadmap to be able to disabled it though.") + ->disabled(), + ]) + ->columnSpan([ + 'md' => 1, + ]), + ]), + ]; + } +} diff --git a/app/Jobs/SearchForSpeedtests.php b/app/Jobs/SearchForSpeedtests.php index 1a99da0b9..eccbf2757 100644 --- a/app/Jobs/SearchForSpeedtests.php +++ b/app/Jobs/SearchForSpeedtests.php @@ -2,52 +2,37 @@ namespace App\Jobs; +use App\Settings\GeneralSettings; use Cron\CronExpression; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Facades\File; -use Symfony\Component\Yaml\Yaml; class SearchForSpeedtests implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct() - { - // - } - /** * Execute the job. * * @return void */ - public function handle() + public function handle(GeneralSettings $settings) { - if (File::exists(base_path().'/config.yml')) { - $config = Yaml::parseFile( - base_path().'/config.yml' - ); - } - - if (File::exists('/app/config.yml')) { - $config = Yaml::parseFile('/app/config.yml'); - } - - $speedtest = $config['speedtest']; - - $cron = new CronExpression($speedtest['schedule']); - - if ($cron->isDue() && $speedtest['enabled']) { - ExecSpeedtest::dispatch(speedtest: $speedtest, scheduled: true); + $speedtest = [ + 'enabled' => ! blank($settings->speedtest_schedule), + 'schedule' => optional($settings)->speedtest_schedule, + 'ookla_server_id' => optional($settings)->speedtest_server, + ]; + + if ($speedtest['enabled']) { + $cron = new CronExpression($speedtest['schedule']); + + if ($cron->isDue()) { + ExecSpeedtest::dispatch(speedtest: $speedtest, scheduled: true); + } } } } diff --git a/app/Providers/FilamentServiceProvider.php b/app/Providers/FilamentServiceProvider.php index 83fd0fe49..ca37a3c7f 100644 --- a/app/Providers/FilamentServiceProvider.php +++ b/app/Providers/FilamentServiceProvider.php @@ -27,6 +27,7 @@ public function boot() { Filament::serving(function () { Filament::registerNavigationGroups([ + 'Settings', 'Links', ]); diff --git a/app/Settings/GeneralSettings.php b/app/Settings/GeneralSettings.php new file mode 100644 index 000000000..191f6deba --- /dev/null +++ b/app/Settings/GeneralSettings.php @@ -0,0 +1,23 @@ +migrator->add('general.auth_enabled', true); + $this->migrator->add('general.site_name', 'Speedtest Tracker'); + $this->migrator->add('general.speedtest_schedule', '0 * * * *'); // every hour + $this->migrator->add('general.speedtest_server', null); + $this->migrator->add('general.timezone', 'UTC'); + } +} From 7761350a78acf6032eeae35f4f914341e4bc41ff Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 08:46:31 -0400 Subject: [PATCH 03/10] adhoc speedtest should use speedtest settings --- app/Filament/Pages/Dashboard.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index 5051f8dcb..29a71ccd0 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -4,6 +4,7 @@ use App\Filament\Widgets\StatsOverview; use App\Jobs\ExecSpeedtest; +use App\Settings\GeneralSettings; use Filament\Notifications\Notification; use Filament\Pages\Actions\Action; use Filament\Pages\Dashboard as BasePage; @@ -28,9 +29,15 @@ public function getHeaderWidgets(): array ]; } - public function queueSpeedtest() + public function queueSpeedtest(GeneralSettings $settings) { - ExecSpeedtest::dispatch(); + $speedtest = [ + 'enabled' => ! blank($settings->speedtest_schedule), + 'schedule' => optional($settings)->speedtest_schedule, + 'ookla_server_id' => optional($settings)->speedtest_server, + ]; + + ExecSpeedtest::dispatch(speedtest: $speedtest, scheduled: false); Notification::make() ->title('Speedtest added to the queue') From 8ac5013374a45ca4c269f26fd885b2dbb680d503 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 09:24:50 -0400 Subject: [PATCH 04/10] moved general settings page --- app/Filament/Pages/{ => Settings}/General.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename app/Filament/Pages/{ => Settings}/General.php (98%) diff --git a/app/Filament/Pages/General.php b/app/Filament/Pages/Settings/General.php similarity index 98% rename from app/Filament/Pages/General.php rename to app/Filament/Pages/Settings/General.php index 7a1e93c3f..977fc9330 100644 --- a/app/Filament/Pages/General.php +++ b/app/Filament/Pages/Settings/General.php @@ -1,6 +1,6 @@ Date: Fri, 21 Oct 2022 09:26:28 -0400 Subject: [PATCH 05/10] moved influxdb settings to filament --- app/Console/Commands/TestInfluxDB.php | 23 ++---- app/Filament/Pages/Settings/InfluxDb.php | 82 +++++++++++++++++++ app/Observers/ResultObserver.php | 23 ++---- app/Settings/InfluxDbSettings.php | 23 ++++++ ..._10_21_130121_create_influxdb_settings.php | 15 ++++ 5 files changed, 138 insertions(+), 28 deletions(-) create mode 100644 app/Filament/Pages/Settings/InfluxDb.php create mode 100644 app/Settings/InfluxDbSettings.php create mode 100644 database/settings/2022_10_21_130121_create_influxdb_settings.php diff --git a/app/Console/Commands/TestInfluxDB.php b/app/Console/Commands/TestInfluxDB.php index f89bbd06f..752a16b37 100644 --- a/app/Console/Commands/TestInfluxDB.php +++ b/app/Console/Commands/TestInfluxDB.php @@ -3,9 +3,8 @@ namespace App\Console\Commands; use App\Models\Result; +use App\Settings\InfluxDbSettings; use Illuminate\Console\Command; -use Illuminate\Support\Facades\File; -use Symfony\Component\Yaml\Yaml; class TestInfluxDB extends Command { @@ -28,19 +27,15 @@ class TestInfluxDB extends Command * * @return int */ - public function handle() + public function handle(InfluxDbSettings $settings) { - if (File::exists(base_path().'/config.yml')) { - $config = Yaml::parseFile( - base_path().'/config.yml' - ); - } - - if (File::exists('/app/config.yml')) { - $config = Yaml::parseFile('/app/config.yml'); - } - - $influxdb = $config['influxdb']; + $influxdb = [ + 'enabled' => $settings->v2_enabled, + 'url' => optional($settings)->v2_url, + 'org' => optional($settings)->v2_org, + 'bucket' => optional($settings)->v2_bucket, + 'token' => optional($settings)->v2_token, + ]; if ($influxdb['enabled'] == true) { $result = Result::factory()->create(); diff --git a/app/Filament/Pages/Settings/InfluxDb.php b/app/Filament/Pages/Settings/InfluxDb.php new file mode 100644 index 000000000..25804ac54 --- /dev/null +++ b/app/Filament/Pages/Settings/InfluxDb.php @@ -0,0 +1,82 @@ + 1, + 'md' => 3, + ]) + ->schema([ + Grid::make([ + 'default' => 1, + ]) + ->schema([ + Section::make('InfluxDB v2 Settings') + ->collapsible() + ->schema([ + TextInput::make('v2_url') + ->label('URL') + ->placeholder('http://your-influxdb-instance') + ->maxLength(255) + ->columnSpan(['md' => 2]), + TextInput::make('v2_org') + ->label('Org') + ->maxLength(255) + ->columnSpan(1), + TextInput::make('v2_bucket') + ->placeholder('speedtest-tracker') + ->label('Bucket') + ->maxLength(255) + ->columnSpan(1), + TextInput::make('v2_token') + ->label('Token') + ->maxLength(255) + ->password() + ->disableAutocomplete() + ->columnSpan(['md' => 2]), + ]) + ->columns([ + 'default' => 1, + 'md' => 2, + ]), + ]) + ->columnSpan([ + 'md' => 2, + ]), + + Card::make() + ->schema([ + Toggle::make('v2_enabled') + ->label('v2 enabled') + ->helperText("NOTE: At this time only InfluxDB v2 is supported"), + ]) + ->columnSpan([ + 'md' => 1, + ]), + ]), + ]; + } +} diff --git a/app/Observers/ResultObserver.php b/app/Observers/ResultObserver.php index 0089a3182..382687869 100644 --- a/app/Observers/ResultObserver.php +++ b/app/Observers/ResultObserver.php @@ -3,10 +3,9 @@ namespace App\Observers; use App\Models\Result; -use Illuminate\Support\Facades\File; +use App\Settings\InfluxDbSettings; use Illuminate\Support\Facades\Log; use InfluxDB2\Client; -use Symfony\Component\Yaml\Yaml; class ResultObserver { @@ -23,19 +22,15 @@ class ResultObserver * @param \App\Models\Result $result * @return void */ - public function created(Result $result) + public function created(InfluxDbSettings $settings, Result $result) { - if (File::exists(base_path().'/config.yml')) { - $config = Yaml::parseFile( - base_path().'/config.yml' - ); - } - - if (File::exists('/app/config.yml')) { - $config = Yaml::parseFile('/app/config.yml'); - } - - $influxdb = $config['influxdb']; + $influxdb = [ + 'enabled' => $settings->v2_enabled, + 'url' => optional($settings)->v2_url, + 'org' => optional($settings)->v2_org, + 'bucket' => optional($settings)->v2_bucket, + 'token' => optional($settings)->v2_token, + ]; if ($influxdb['enabled'] == true) { $client = new Client([ diff --git a/app/Settings/InfluxDbSettings.php b/app/Settings/InfluxDbSettings.php new file mode 100644 index 000000000..6920f3c95 --- /dev/null +++ b/app/Settings/InfluxDbSettings.php @@ -0,0 +1,23 @@ +migrator->add('influxdb.v2_enabled', false); + $this->migrator->add('influxdb.v2_url', null); + $this->migrator->add('influxdb.v2_org', null); + $this->migrator->add('influxdb.v2_bucket', 'speedtest-tracker'); + $this->migrator->add('influxdb.v2_token', null); + } +} From c30217193c31564963ad23a1e7f2262fa55d5c87 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 09:28:49 -0400 Subject: [PATCH 06/10] removed config file from the build process --- .dockerignore | 1 - config.example.yml | 8 -------- docker/deploy/etc/s6-overlay/scripts/startup | 9 --------- 3 files changed, 18 deletions(-) delete mode 100644 config.example.yml diff --git a/.dockerignore b/.dockerignore index d89ac53be..1a8d61ec4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,7 +16,6 @@ _ide_helper.php .env.backup .phpstorm.meta.php .phpunit.result.cache -config.yml auth.json docker-compose.yml Homestead.json diff --git a/config.example.yml b/config.example.yml deleted file mode 100644 index d76a29dc6..000000000 --- a/config.example.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -influxdb: - enabled: false - version: 2 # Only InfluxDB2 is supported right now - url: 'http://your-influxdb-instance' # Full url to your InfluxDB instance, sometimes this includes a port number - org: '' # Organization name, usually created when you installed InfluxDB - bucket: 'speedtest-tracker' # A name location to store the speedtest data in - token: '' # This is your API token diff --git a/docker/deploy/etc/s6-overlay/scripts/startup b/docker/deploy/etc/s6-overlay/scripts/startup index 630c96d12..b1f61901a 100644 --- a/docker/deploy/etc/s6-overlay/scripts/startup +++ b/docker/deploy/etc/s6-overlay/scripts/startup @@ -39,19 +39,10 @@ else echo "✅ Environment file exists" fi -# Check for config file -if [ ! -f /config/config.yml ]; then - echo "🙄 Config file not found, creating..." - cp $WEBUSER_HOME/config.example.yml /config/config.yml -else - echo "✅ Environment file exists" -fi - # create symlinks echo "🔗 Creating symlinks to config and log files" symlinks=( \ /var/www/html/.env \ -/var/www/html/config.yml \ /var/www/html/storage/logs/laravel.log ) From 9861d98adc7056c225dab0b734d180bda077241d Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 09:32:02 -0400 Subject: [PATCH 07/10] removed symfony/yaml as a dependency --- .phpstorm.meta.php | 11 +++++++ composer.json | 3 +- composer.lock | 76 +--------------------------------------------- 3 files changed, 13 insertions(+), 77 deletions(-) diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 166da26a5..2932c8632 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -12,6 +12,7 @@ override(new \Illuminate\Contracts\Container\Container, map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -204,6 +205,7 @@ override(\Illuminate\Container\Container::makeWith(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -396,6 +398,7 @@ override(\Illuminate\Contracts\Container\Container::get(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -588,6 +591,7 @@ override(\Illuminate\Contracts\Container\Container::make(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -780,6 +784,7 @@ override(\Illuminate\Contracts\Container\Container::makeWith(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -972,6 +977,7 @@ override(\App::get(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1164,6 +1170,7 @@ override(\App::make(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1356,6 +1363,7 @@ override(\App::makeWith(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1548,6 +1556,7 @@ override(\app(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1740,6 +1749,7 @@ override(\resolve(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, @@ -1932,6 +1942,7 @@ override(\Psr\Container\ContainerInterface::get(0), map([ '' => '@', 'App\Settings\GeneralSettings' => \App\Settings\GeneralSettings::class, + 'App\Settings\InfluxDbSettings' => \App\Settings\InfluxDbSettings::class, 'BladeUI\Icons\Factory' => \BladeUI\Icons\Factory::class, 'BladeUI\Icons\IconsManifest' => \BladeUI\Icons\IconsManifest::class, 'Filament\Http\Responses\Auth\Contracts\LoginResponse' => \Filament\Http\Responses\Auth\LoginResponse::class, diff --git a/composer.json b/composer.json index 5ebafe04b..0f633949e 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,7 @@ "laravel/sanctum": "^3.0", "laravel/tinker": "^2.7", "spatie/laravel-settings": "^2.4", - "squirephp/timezones-en": "^3.3", - "symfony/yaml": "^6.1" + "squirephp/timezones-en": "^3.3" }, "require-dev": { "barryvdh/laravel-ide-helper": "^2.12", diff --git a/composer.lock b/composer.lock index ad0f3e849..6f1f58b18 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": "014a602e72040b43da1b35704f796390", + "content-hash": "01f8953578f096fdfe8f259c2682fc0b", "packages": [ { "name": "akaunting/laravel-money", @@ -7173,80 +7173,6 @@ ], "time": "2022-10-07T08:04:03+00:00" }, - { - "name": "symfony/yaml", - "version": "v6.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "66c6b0cf52b00f74614a2cf7ae7db08ea1095931" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/66c6b0cf52b00f74614a2cf7ae7db08ea1095931", - "reference": "66c6b0cf52b00f74614a2cf7ae7db08ea1095931", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.4" - }, - "require-dev": { - "symfony/console": "^5.4|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v6.1.6" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-07T08:04:03+00:00" - }, { "name": "tgalopin/html-sanitizer", "version": "1.5.0", From 4849cab9134136d6b0a730d6e15a8bd04e6e8de9 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 09:32:53 -0400 Subject: [PATCH 08/10] removed config.yml from gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 554ebe677..f185879f4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ /public/storage /storage/*.key /vendor -config.yml + .env .env.backup .phpunit.result.cache From fc8abb07c10d9444d7c079a2ad2b61a9f270366c Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 09:40:35 -0400 Subject: [PATCH 09/10] fixed issue where settings are loaded incorrectly --- app/Observers/ResultObserver.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/Observers/ResultObserver.php b/app/Observers/ResultObserver.php index 382687869..c00c95e6a 100644 --- a/app/Observers/ResultObserver.php +++ b/app/Observers/ResultObserver.php @@ -16,20 +16,27 @@ class ResultObserver */ public $afterCommit = true; + public $settings; + + public function __construct(InfluxDbSettings $settings) + { + $this->settings = $settings; + } + /** * Handle the Result "created" event. * * @param \App\Models\Result $result * @return void */ - public function created(InfluxDbSettings $settings, Result $result) + public function created(Result $result) { $influxdb = [ - 'enabled' => $settings->v2_enabled, - 'url' => optional($settings)->v2_url, - 'org' => optional($settings)->v2_org, - 'bucket' => optional($settings)->v2_bucket, - 'token' => optional($settings)->v2_token, + 'enabled' => $this->settings->v2_enabled, + 'url' => optional($this->settings)->v2_url, + 'org' => optional($this->settings)->v2_org, + 'bucket' => optional($this->settings)->v2_bucket, + 'token' => optional($this->settings)->v2_token, ]; if ($influxdb['enabled'] == true) { From 09bc08a5bf424c57ea4facfd0774ec8b6a13ba4b Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Fri, 21 Oct 2022 09:41:01 -0400 Subject: [PATCH 10/10] code quality --- app/Filament/Pages/Settings/General.php | 6 +++--- app/Filament/Pages/Settings/InfluxDb.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Filament/Pages/Settings/General.php b/app/Filament/Pages/Settings/General.php index 977fc9330..5247d155f 100644 --- a/app/Filament/Pages/Settings/General.php +++ b/app/Filament/Pages/Settings/General.php @@ -26,9 +26,9 @@ protected function getFormSchema(): array { return [ Grid::make([ - 'default' => 1, - 'md' => 3, - ]) + 'default' => 1, + 'md' => 3, + ]) ->schema([ Grid::make([ 'default' => 1, diff --git a/app/Filament/Pages/Settings/InfluxDb.php b/app/Filament/Pages/Settings/InfluxDb.php index 25804ac54..e0dddd097 100644 --- a/app/Filament/Pages/Settings/InfluxDb.php +++ b/app/Filament/Pages/Settings/InfluxDb.php @@ -26,9 +26,9 @@ protected function getFormSchema(): array { return [ Grid::make([ - 'default' => 1, - 'md' => 3, - ]) + 'default' => 1, + 'md' => 3, + ]) ->schema([ Grid::make([ 'default' => 1, @@ -71,7 +71,7 @@ protected function getFormSchema(): array ->schema([ Toggle::make('v2_enabled') ->label('v2 enabled') - ->helperText("NOTE: At this time only InfluxDB v2 is supported"), + ->helperText('NOTE: At this time only InfluxDB v2 is supported'), ]) ->columnSpan([ 'md' => 1,