Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/Http/Controllers/Admin/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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());
Expand Down
9 changes: 9 additions & 0 deletions config/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
52 changes: 52 additions & 0 deletions database/migrations/2026_06_17_190527_bump_version070600.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

/**
* SPDX-License-Identifier: MIT
* Copyright (c) 2017-2018 Tobias Reich
* Copyright (c) 2018-2026 LycheeOrg.
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\ConsoleSectionOutput;

return new class() extends Migration {
private ConsoleOutput $output;
private ConsoleSectionOutput $msg_section;

public function __construct()
{
$this->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('<error>Warning:</error> Failed to clear cache for version 7.6.0');

return;
}
$this->msg_section->writeln('<info>Info:</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']);
}
};
1 change: 1 addition & 0 deletions phpunit.ci.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<env name="MOLLIE_PROFILE_ID" value="" />
<env name="PAYPAL_CLIENT_ID" value="" />
<env name="PAYPAL_SECRET" value="" />
<env name="V8_ENABLED" value="true" />
<env name="WEBSHOP_ENABLED" value="true"/>
</php>
<source>
Expand Down
1 change: 1 addition & 0 deletions phpunit.pgsql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<env name="MOLLIE_PROFILE_ID" value="" />
<env name="PAYPAL_CLIENT_ID" value="" />
<env name="PAYPAL_SECRET" value="" />
<env name="V8_ENABLED" value="true" />
<env name="WEBSHOP_ENABLED" value="true"/>
</php>
<source>
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<env name="MOLLIE_PROFILE_ID" value="" />
<env name="PAYPAL_CLIENT_ID" value="" />
<env name="PAYPAL_SECRET" value="" />
<env name="V8_ENABLED" value="true" />
<env name="WEBSHOP_ENABLED" value="true"/>
</php>
<source>
Expand Down
2 changes: 1 addition & 1 deletion version.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.4
7.6.0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Loading