mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-28 10:05:25 -05:00
Introduce V5Feature and config so V5 routes, jobs, commands, morph maps, and model queries run only when enabled. Move V5 migrations to migrations-v5 (loaded only when enabled), remove Flux from production Docker/install paths, and add isolation tests.
19 lines
409 B
PHP
19 lines
409 B
PHP
<?php
|
|
|
|
namespace App\Support\V5;
|
|
|
|
class V5Feature
|
|
{
|
|
private const DEVELOPMENT_ENVIRONMENTS = ['local', 'development', 'dev', 'testing'];
|
|
|
|
public static function enabled(): bool
|
|
{
|
|
return (bool) config('v5.enabled');
|
|
}
|
|
|
|
public static function enabledForEnvironment(string $environment): bool
|
|
{
|
|
return in_array($environment, self::DEVELOPMENT_ENVIRONMENTS, true);
|
|
}
|
|
}
|