Files
Gnuboard7/lang/en/exceptions.php
T
HeuJung 21f666e4b5 feat(seo): 사이트맵 스트리밍 생성 + SEO 캐시 설정 정합화
대용량 사이트에서 사이트맵 생성이 메모리 부족으로 반복 실패하던 문제(공개 )의
1단계로, 전체 URL을 메모리에 적재하던 구조를 스트리밍 분할 생성으로 교체한다.

사이트맵 스트리밍 코어:
- SitemapWriter — 자식 파일 1개 분량만 버퍼링하고 임계 도달 시 flush.
 StorageInterface가 append를 제공하지 않아(put이 전체 덮어쓰기) 택한 구조이며,
 최대 메모리가 "자식 파일 1개 크기"로 유계가 된다. URL 수(50,000)와
 바이트(45MB) 두 임계로 분할해 sitemaps.org 프로토콜을 지킨다.
- 커밋은 _tmp 전량 기록 → live 재배치 → manifest 마지막 기록 순. manifest 존재가
 커밋 완료 신호다. 기존 manifest를 먼저 지우지 않아 스왑 중 봇에게 503이 나가지 않는다.
- SitemapFileStore — 읽기측 + 파일 경로 SSoT. SitemapXmlRenderer — escape 단일 출처.

데이터 접근 계층 정리:
- contributor 3종이 쿼리를 직접 조립하던 것을 Repository 위임으로 전환.
 MySQL 버퍼드 쿼리에서 cursor는 결과셋 전체를 적재하므로 lazyById를 쓴다.
- SeoCacheStatsService → SeoCacheStatRepository 신설 (집계 4쿼리 → 1쿼리).
- audit 룰 service-direct-data-access의 사각 2건 수정 — 확장 디렉토리 정규식이
 상대경로를 매칭하지 못해 *Contributor처럼 접미사 없는 클래스가 전부 미검출이었다.

SEO 캐시 설정 정합화:
- SEO 설정의 캐시 3키가 cache 카테고리 형제 키에 항상 져서 운영자 입력이 조용히
 무시되고 있었다(설정을 cache 카테고리로 이관하며 SEO 탭 옛 칸을 미제거).
 고급 탭을 기준값으로 두되 SEO 탭에 지정이 있으면 오버라이드하도록 SeoCacheSettings
 단일 출처로 정리. "지정 여부"는 null로 판정하므로 기본값을 비웠다.
- 기존 설치는 Upgrade_7_1_0이 이행 — 옛 기본값과 같으면 미설정으로 비우고, 다르면
 운영자 의도로 보아 보존한다.

코어 버전 bump와 루트 CHANGELOG는 계획서 결정(D20)에 따라 마감 단계에서 일괄 수행한다.
2026-07-17 19:59:40 +09:00

91 lines
5.8 KiB
PHP

<?php
return [
// User related exceptions
'cannot_delete_super_admin' => 'Super admin cannot be deleted.',
'circular_reference' => 'Layout circular reference detected: :trace',
'max_depth_exceeded' => 'Layout nesting depth exceeds maximum allowed depth (:max).',
'template_file_copy_failed' => 'Template file copy failed: :source → :destination',
'template_build_directory_creation_failed' => 'Template build directory creation failed: :path',
'template_dist_directory_not_found' => 'Template dist directory not found: :path',
'template_not_found' => 'Template not found: :identifier',
'template_not_active' => 'Template is not active: :identifier (status: :status)',
// Optimistic lock — concurrent save conflict
'concurrent_modification' => 'Another user has saved first. (resource: :resource, current version: :current, your version: :expected)',
// Layout related exceptions
'layout' => [
'duplicate_data_source_id' => 'Duplicate data_sources ID: :id',
'duplicate_data_source_id_in_file' => 'Duplicate data_sources ID in layout file: :ids (file: :file)',
'duplicate_data_source_id_extends' => 'Duplicate data_sources ID in extends inheritance: :ids (child: :child, parent: :parent)',
'not_found' => 'Layout not found: :name',
'parent_not_found' => 'Parent layout not found: :parent (requested layout: :child)',
// Include related exceptions
'include_file_not_found' => 'Include file not found: :path (resolved: :resolved)',
'invalid_include_json' => 'Invalid JSON in include file: :path (error: :error)',
'circular_include' => 'Circular include detected: :trace',
'max_include_depth_exceeded' => 'Maximum include depth exceeded (max: :max)',
'include_outside_directory' => 'Include path outside allowed directory: :path (allowed: :allowed_dir)',
],
// Layout version related exceptions
'layout_version' => [
'save_failed_after_retries' => 'Failed to save layout version after :attempts attempts.',
'save_failed_unexpected' => 'Unexpected error occurred while saving layout version.',
],
// Settings related exceptions
'settings' => [
'backup_creation_failed' => 'Failed to create settings backup file.',
'restore_failed' => 'Failed to restore settings.',
'category_not_found' => 'Settings category not found: :category',
'save_failed' => 'Failed to save settings: :category',
'json_parse_failed' => 'Failed to parse JSON file: :path (:error)',
'add_category_module_only' => 'addCategory is only available for modules.',
],
// Core update related exceptions
'core_update' => [
'handoff' => 'Upgrade handoff: completed up to :after_version — :reason (resume with: :resume_command)',
],
// Vendor bundle / installation related exceptions
'vendor' => [
'composer_not_available' => 'Composer cannot be executed in this environment. Use bundled mode instead.',
'composer_not_available_for_build' => 'Building vendor-bundle requires Composer execution. Install/configure Composer in the development environment and retry.',
'bundle_build_composer_failed' => 'composer install failed while building vendor-bundle (exit :exit): :message',
'bundle_build_promote_failed' => 'failed to move vendor-bundle build result to its final path (:from → :to)',
'composer_execution_failed' => 'Composer execution failed: :message',
'bundle_zip_missing' => 'vendor-bundle.zip not found: :path',
'bundle_manifest_missing' => 'vendor-bundle.json not found: :path',
'bundle_manifest_invalid' => 'vendor-bundle.json could not be read: :error',
'bundle_integrity_failed' => 'Bundle integrity check failed: :details',
'bundle_schema_unsupported' => 'Unsupported vendor-bundle.json schema version: :version',
'zip_archive_not_available' => 'PHP ZipArchive extension is not installed.',
'zip_hash_mismatch' => 'vendor-bundle.zip hash mismatch (expected: :expected, actual: :actual).',
'composer_json_sha_mismatch' => 'composer.json has changed since the bundle was built. Rebuild with vendor-bundle:build.',
'composer_lock_sha_mismatch' => 'composer.lock has changed since the bundle was built. Rebuild with vendor-bundle:build.',
'bundle_contains_unsafe_path' => 'Bundle zip contains unsafe file path: :path',
'extraction_failed' => 'Failed to extract bundle zip: :message',
'no_vendor_strategy_available' => 'Cannot determine vendor install strategy. Neither Composer nor bundle zip is available.',
'source_dir_not_found' => 'Installation source directory not found: :path',
'target_not_writable' => 'Target directory is not writable: :path',
'target_not_writable_owner_hint' => "Current user (:current_user) differs from directory owner (:owner). Run 'chown -R :current_user_name :path' and retry, or SSH in as the owner (:owner_name) before running this command.",
'composer_json_not_found' => 'composer.json not found: :path',
'no_composer_lock' => 'composer.lock is required. Run composer install first: :path',
'vendor_dir_not_found' => 'vendor/ directory does not exist. Run composer install first: :path',
'composer_binary_not_found' => 'Composer binary not found. Set the COMPOSER_BINARY environment variable or add composer to your PATH.',
],
// SEO / Sitemap 관련 예외
'seo' => [
'sitemap_write_failed' => 'Failed to write sitemap file: :path',
'sitemap_gzip_failed' => 'Failed to compress sitemap child file: :file',
'sitemap_temp_file_unreadable' => 'Cannot read sitemap temporary file: :file',
'sitemap_stat_group_column_unsupported' => 'Unsupported group-by column: :column',
],
];