diff --git a/app/Http/Controllers/Admin/SettingsController.php b/app/Http/Controllers/Admin/SettingsController.php index b98eb583266..41aa1d37f3e 100644 --- a/app/Http/Controllers/Admin/SettingsController.php +++ b/app/Http/Controllers/Admin/SettingsController.php @@ -30,6 +30,12 @@ */ class SettingsController extends Controller { + public const V8_CONFIGS = [ + 'site_logo', + 'landing_logo', + 'landing_header_logo', + ]; + /** * Fetch all the settings available in Lychee. * @@ -49,7 +55,8 @@ public function getAll(GetAllConfigsRequest $request, DockerVersionInfo $docker_ ->when($docker_info->isDocker(), fn ($q) => $q->where('not_on_docker', '!=', true)) ->when(!$request->verify()->is_supporter() && !$request->configs()->getValueAsBool('enable_se_preview'), fn ($q) => $q->where('level', '=', 0)) ->when(!$request->verify()->is_pro(), fn ($q) => $q->where('level', '<', 2)) - ->when(config('features.webshop') === false, fn ($q) => $q->where('key', 'NOT LIKE', 'webshop_%')), + ->when(config('features.webshop') === false, fn ($q) => $q->where('key', 'NOT LIKE', 'webshop_%')) + ->when(config('features.v8') === false, fn ($q) => $q->whereNotIn('key', self::V8_CONFIGS)), ])->orderBy('order', 'asc')->get(); return ConfigCategoryResource::collect($editable_configs->filter(fn ($cat) => $cat->configs->isNotEmpty())->values()); diff --git a/config/features.php b/config/features.php index 8b1e02bd5ef..40020cfb24b 100644 --- a/config/features.php +++ b/config/features.php @@ -92,6 +92,15 @@ */ 'latency' => env('APP_ENV', 'production') === 'production' ? 0 : (int) env('APP_DEBUG_LATENCY', 0), + /* + |-------------------------------------------------------------------------- + | Enable the v8 + |-------------------------------------------------------------------------- + | + | This value determines whether the v8 features are enabled. + */ + 'v8' => (bool) env('V8_ENABLED', false), + /* |-------------------------------------------------------------------------- | Require the API requests to have the header "content-type: application/json" diff --git a/database/migrations/2026_06_17_190527_bump_version070600.php b/database/migrations/2026_06_17_190527_bump_version070600.php new file mode 100644 index 00000000000..96ce7b61a38 --- /dev/null +++ b/database/migrations/2026_06_17_190527_bump_version070600.php @@ -0,0 +1,52 @@ +output = new ConsoleOutput(); + $this->msg_section = $this->output->section(); + } + + /** + * Run the migrations. + * + * @return void + */ + public function up(): void + { + DB::table('configs')->where('key', 'version')->update(['value' => '070600']); + try { + Artisan::call('cache:clear'); + } catch (\Throwable $e) { + $this->msg_section->writeln('Warning: Failed to clear cache for version 7.6.0'); + + return; + } + $this->msg_section->writeln('Info: Cleared cache for version 7.6.0'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + DB::table('configs')->where('key', 'version')->update(['value' => '070504']); + } +}; diff --git a/phpunit.ci.xml b/phpunit.ci.xml index 31ece4413ec..4d15a2808c8 100644 --- a/phpunit.ci.xml +++ b/phpunit.ci.xml @@ -51,6 +51,7 @@ + diff --git a/phpunit.pgsql.xml b/phpunit.pgsql.xml index 492f26c34f7..1043149bd1b 100644 --- a/phpunit.pgsql.xml +++ b/phpunit.pgsql.xml @@ -58,6 +58,7 @@ + diff --git a/phpunit.xml b/phpunit.xml index 40ab69a949d..1a6536ec4e5 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -55,6 +55,7 @@ + diff --git a/version.md b/version.md index a0e1e886a2d..8df288f2743 100644 --- a/version.md +++ b/version.md @@ -1 +1 @@ -7.5.4 \ No newline at end of file +7.6.0 \ No newline at end of file