주요 변경사항: - MenusStep.php: 존재하지 않는 컬럼(code, route_name, depth, description) 제거 - MenusStep.php: 실제 DB 스키마 컬럼(hidden, is_external, external_url) 추가 - RecipeRegistry.php: MenusStep 비활성화 (하이브리드 메뉴 생성 방식 도입) - Handler.php: ValidationException 처리 개선 (실제 에러 메시지 표시, 422 상태 코드) 기술 세부사항: - 하이브리드 접근: TenantBootstrapper(데이터) + MenuBootstrapService(메뉴) - HTTP 상태 코드 표준화: 422 Unprocessable Entity (validation 실패) - 실제 검증 에러 메시지 반환: errors 객체에 필드별 에러 정보 포함
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Services\TenantBootstrap;
|
|
|
|
use App\Services\TenantBootstrap\Steps\CapabilityProfilesStep;
|
|
use App\Services\TenantBootstrap\Steps\CategoriesStep;
|
|
use App\Services\TenantBootstrap\Steps\MenusStep;
|
|
use App\Services\TenantBootstrap\Steps\SettingsStep;
|
|
|
|
class RecipeRegistry
|
|
{
|
|
/**
|
|
* 레시피마다 실행 순서 정의
|
|
*/
|
|
public function steps(string $recipe = 'STANDARD'): array
|
|
{
|
|
return match ($recipe) {
|
|
'LITE' => [
|
|
new CapabilityProfilesStep,
|
|
new CategoriesStep,
|
|
],
|
|
default => [ // STANDARD
|
|
new CapabilityProfilesStep,
|
|
new CategoriesStep,
|
|
// new MenusStep, // Disabled: Use MenuBootstrapService in RegisterService instead
|
|
new SettingsStep,
|
|
],
|
|
};
|
|
}
|
|
|
|
public function version(string $recipe = 'STANDARD'): int
|
|
{
|
|
return match ($recipe) {
|
|
'LITE' => 1,
|
|
default => 1,
|
|
};
|
|
}
|
|
}
|