From 0e869254649889619fbe800487f109f247bdecd6 Mon Sep 17 00:00:00 2001 From: fs Date: Mon, 13 Apr 2026 23:20:05 +0200 Subject: [PATCH] refactor: rename lib/ to core/ for clearer core-module separation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename the top-level lib/ directory to core/ so the project root immediately communicates which code is core platform and which lives in modules/. PHP namespaces (MintyPHP\*) are unchanged — only the Composer PSR-4 path mapping moves from lib/ to core/. Module-internal lib/ directories (modules/*/lib/) are untouched. Updated across the full stack: - composer.json PSR-4 mapping - bootstrap entry points (web/index.php, bin/*, tests/bootstrap.php) - tooling configs (phpstan.neon, phpunit.xml, php-cs-fixer) - 26 architecture contract tests - enforcement-policy, guard-catalog, quality-gates - all documentation (CLAUDE.md, README, 25 docs/, .agents/skills/) - bin/qa-extended.sh search paths - .claude/settings.local.json permission paths Workflow: .agents/runs/CORE-LIB-RENAME-001/ (Analyst → Planner → Executor → Code Review (4 findings fixed) → Security Review → Acceptance Test → Finalizer) Co-Authored-By: Claude Opus 4.6 --- .agents/checks/enforcement-policy.json | 12 ++++---- .agents/checks/guard-catalog.json | 4 +-- .agents/checks/guard-checklist.md | 2 +- .agents/checks/quality-gates.json | 2 +- .../references/boundaries-core.md | 6 ++-- .../references/quality-gates.md | 6 ++-- .../core-guardrails/references/source-map.md | 2 +- CLAUDE.md | 18 +++++------ README.md | 2 +- bin/cli-bootstrap.php | 4 +-- bin/console | 4 +-- bin/helpdesk-diagnose.php | 4 +-- bin/helpdesk-explore-entities.php | 4 +-- bin/qa-extended.sh | 6 ++-- composer.json | 2 +- {lib => core}/App/AppContainer.php | 0 {lib => core}/App/Bootstrap/EnvValidator.php | 0 .../App/Container/ContainerRegistrar.php | 0 .../Container/Registrars/AccessRegistrar.php | 0 .../Registrars/AppServicesRegistrar.php | 0 .../Container/Registrars/AuthRegistrar.php | 0 .../Registrars/DirectoryRegistrar.php | 0 .../Registrars/RepositoryFactoryRegistrar.php | 0 .../Registrars/ServiceFactoryRegistrar.php | 0 .../Registrars/SettingsRegistrar.php | 0 .../Container/Registrars/UserRegistrar.php | 0 .../App/Module/Contracts/EventListener.php | 0 .../Contracts/LayoutContextProvider.php | 0 .../Contracts/ModuleDeactivationHandler.php | 0 .../Contracts/SearchResourceProvider.php | 0 .../App/Module/Contracts/SessionProvider.php | 0 .../App/Module/ModuleClassResolver.php | 0 .../App/Module/ModuleEventDispatcher.php | 0 {lib => core}/App/Module/ModuleI18nLoader.php | 0 {lib => core}/App/Module/ModuleManifest.php | 0 .../App/Module/ModuleManifestLoader.php | 0 .../Module/ModuleManifestSchemaValidator.php | 0 .../Module/ModulePermissionSynchronizer.php | 0 {lib => core}/App/Module/ModuleRegistry.php | 0 .../Module/ModuleRuntimeAssetPublisher.php | 0 .../App/Module/ModuleRuntimePageBuilder.php | 0 {lib => core}/App/registerContainer.php | 0 {lib => core}/Console/Command.php | 0 .../Console/Commands/DoctorCommand.php | 0 .../Console/Commands/Make/ModuleCommand.php | 0 .../Commands/Module/AbstractModuleCommand.php | 0 .../Commands/Module/AssetsSyncCommand.php | 0 .../Console/Commands/Module/BuildCommand.php | 0 .../Commands/Module/DeactivateCommand.php | 0 .../Commands/Module/MigrateCommand.php | 0 .../Module/PermissionsSyncCommand.php | 0 .../Commands/Module/RuntimeSyncCommand.php | 0 .../Commands/Module/ValidateCommand.php | 0 .../Console/Commands/Scheduler/RunCommand.php | 0 {lib => core}/Console/ConsoleApplication.php | 0 .../Console/Runner/Doctor/DoctorRunner.php | 0 .../Runner/Doctor/DoctorRunnerInterface.php | 0 .../Console/Runner/Module/ModuleRunner.php | 0 .../Runner/Module/ModuleRunnerInterface.php | 0 .../Console/Support/CliAppBootstrap.php | 0 .../Console/Support/ModuleCliRuntime.php | 0 .../Domain/Taxonomy/MailLogStatus.php | 0 .../Domain/Taxonomy/ScheduledJobRunStatus.php | 0 .../Domain/Taxonomy/ScheduledJobStatus.php | 0 .../Taxonomy/ScheduledJobTriggerType.php | 0 .../Taxonomy/SchedulerRuntimeResult.php | 0 .../Taxonomy/SupportsStringTaxonomy.php | 0 .../Domain/Taxonomy/TenantStatus.php | 0 {lib => core}/Http/AccessControl.php | 0 {lib => core}/Http/ApiAuth.php | 0 {lib => core}/Http/ApiBootstrap.php | 0 {lib => core}/Http/ApiResponse.php | 0 {lib => core}/Http/AssetDetector.php | 0 {lib => core}/Http/CookieStore.php | 0 {lib => core}/Http/CookieStoreInterface.php | 0 {lib => core}/Http/ErrorDataCollector.php | 0 {lib => core}/Http/ErrorHandler.php | 0 {lib => core}/Http/ErrorLogger.php | 0 {lib => core}/Http/ErrorRenderer.php | 0 {lib => core}/Http/Input/FormErrors.php | 0 {lib => core}/Http/Input/RequestInput.php | 0 .../Http/Input/RequestInputFactory.php | 0 {lib => core}/Http/IntendedUrlService.php | 0 {lib => core}/Http/LocaleResolver.php | 0 {lib => core}/Http/Request.php | 0 {lib => core}/Http/RequestContext.php | 0 {lib => core}/Http/RequestRuntime.php | 0 .../Http/RequestRuntimeInterface.php | 0 {lib => core}/Http/RouteCatalog.php | 0 {lib => core}/Http/RouteRegistrar.php | 0 {lib => core}/Http/SessionStore.php | 0 {lib => core}/Http/SessionStoreInterface.php | 0 .../Access/PermissionRepository.php | 0 .../Access/PermissionRepositoryInterface.php | 0 .../Access/RoleAssignableRoleRepository.php | 0 .../RoleAssignableRoleRepositoryInterface.php | 0 .../Access/RolePermissionRepository.php | 0 .../RolePermissionRepositoryInterface.php | 0 .../Repository/Access/RoleRepository.php | 0 .../Access/RoleRepositoryInterface.php | 0 .../Repository/Access/UserRoleRepository.php | 0 .../Access/UserRoleRepositoryInterface.php | 0 .../Repository/Auth/ApiTokenRepository.php | 0 .../Auth/ApiTokenRepositoryInterface.php | 0 .../Auth/EmailVerificationRepository.php | 0 .../EmailVerificationRepositoryInterface.php | 0 .../Auth/PasswordResetRepository.php | 0 .../Auth/PasswordResetRepositoryInterface.php | 0 .../Auth/RememberTokenRepository.php | 0 .../Auth/RememberTokenRepositoryInterface.php | 0 .../Content/PageContentRepository.php | 0 .../Repository/Content/PageRepository.php | 0 .../TenantCustomFieldDefinitionRepository.php | 0 .../TenantCustomFieldOptionRepository.php | 0 .../UserCustomFieldValueOptionRepository.php | 0 .../UserCustomFieldValueRepository.php | 0 .../Repository/Mail/MailLogRepository.php | 0 .../Mail/MailLogRepositoryInterface.php | 0 .../Module/ModuleMigrationRepository.php | 0 .../ModuleMigrationRepositoryInterface.php | 0 .../Repository/Org/DepartmentRepository.php | 0 .../Org/DepartmentRepositoryInterface.php | 0 .../Org/UserDepartmentRepository.php | 0 .../Org/UserDepartmentRepositoryInterface.php | 0 .../Scheduler/ScheduledJobRepository.php | 0 .../ScheduledJobRepositoryInterface.php | 0 .../Scheduler/ScheduledJobRunRepository.php | 0 .../ScheduledJobRunRepositoryInterface.php | 0 .../Scheduler/SchedulerRuntimeRepository.php | 0 .../SchedulerRuntimeRepositoryInterface.php | 0 .../Search/SearchQueryRepository.php | 0 .../Search/SearchQueryRepositoryInterface.php | 0 .../Security/RateLimitRepository.php | 0 .../Security/RateLimitRepositoryInterface.php | 0 .../Repository/Settings/SettingRepository.php | 0 .../Settings/SettingRepositoryInterface.php | 0 .../Repository/Stats/AdminStatsRepository.php | 0 .../Stats/AdminStatsRepositoryInterface.php | 0 .../Support/DatabaseSessionRepository.php | 0 .../DatabaseSessionRepositoryInterface.php | 0 .../Repository/Support/RepoQuery.php | 0 .../Support/RepositoryArrayHelper.php | 0 .../System/SystemHealthRepository.php | 0 .../SystemHealthRepositoryInterface.php | 0 .../Tenant/TenantLdapAuthRepository.php | 0 .../TenantLdapAuthRepositoryInterface.php | 0 .../Tenant/TenantMicrosoftAuthRepository.php | 0 ...TenantMicrosoftAuthRepositoryInterface.php | 0 .../Repository/Tenant/TenantRepository.php | 0 .../Tenant/TenantRepositoryInterface.php | 0 .../Tenant/UserTenantRepository.php | 0 .../Tenant/UserTenantRepositoryInterface.php | 0 .../User/UserExternalIdentityRepository.php | 0 ...serExternalIdentityRepositoryInterface.php | 0 .../User/UserListQueryRepository.php | 0 .../User/UserListQueryRepositoryInterface.php | 0 .../Repository/User/UserReadRepository.php | 0 .../User/UserReadRepositoryInterface.php | 0 .../Repository/User/UserWriteRepository.php | 0 .../User/UserWriteRepositoryInterface.php | 0 .../Service/Access/AccessGatewayFactory.php | 0 .../Service/Access/AccessPolicyFactory.php | 0 .../Access/AccessRepositoryFactory.php | 0 .../Service/Access/AccessServicesFactory.php | 0 .../Service/Access/AssignableRoleService.php | 0 .../Service/Access/AuthorizationDecision.php | 0 .../AuthorizationPolicyContextTrait.php | 0 .../Access/AuthorizationPolicyInterface.php | 0 .../Service/Access/AuthorizationService.php | 0 .../Access/DepartmentAuthorizationPolicy.php | 0 .../Access/OperationsAuthorizationPolicy.php | 0 .../Access/PermissionAuthorizationPolicy.php | 0 .../Service/Access/PermissionService.php | 0 .../Access/RoleAuthorizationPolicy.php | 0 {lib => core}/Service/Access/RoleService.php | 0 .../Access/SettingsAuthorizationPolicy.php | 0 .../Access/TenantAuthorizationPolicy.php | 0 .../Service/Access/UiAccessService.php | 0 .../Service/Access/UiCapabilityMap.php | 0 .../Access/UserAuthorizationPolicy.php | 0 .../Audit/ApiAuditServiceInterface.php | 0 .../Audit/ApiSystemAuditReporterInterface.php | 0 .../Audit/AuditMetadataEnricherInterface.php | 0 .../Service/Audit/AuditRecorderInterface.php | 0 .../Service/Audit/ImportAuditInterface.php | 0 .../Service/Audit/NullApiAuditService.php | 0 .../Audit/NullApiSystemAuditReporter.php | 0 .../Audit/NullAuditMetadataEnricher.php | 0 .../Service/Audit/NullAuditRecorder.php | 0 .../Service/Audit/NullImportAudit.php | 0 .../Service/Audit/NullUserLifecycleAudit.php | 0 .../Audit/UserLifecycleAuditInterface.php | 0 .../Service/Auth/ApiTokenEndpointService.php | 0 .../Service/Auth/ApiTokenService.php | 0 .../Service/Auth/AuthCryptoGateway.php | 0 .../Auth/AuthExternalIdentityGateway.php | 0 .../Service/Auth/AuthGatewayFactory.php | 0 .../Service/Auth/AuthRepositoryFactory.php | 0 {lib => core}/Service/Auth/AuthService.php | 0 .../Service/Auth/AuthServicesFactory.php | 0 .../Auth/AuthSessionTenantContextService.php | 0 .../Service/Auth/AuthSettingsGateway.php | 0 .../Service/Auth/AuthTenantGateway.php | 0 .../Service/Auth/EmailVerificationService.php | 0 .../Service/Auth/LdapAuthService.php | 0 .../Service/Auth/LdapConnectionGateway.php | 0 .../Service/Auth/MicrosoftOidcService.php | 0 .../Auth/MicrosoftOidcStateStoreService.php | 0 .../Service/Auth/OidcHttpGateway.php | 0 .../Service/Auth/PasswordResetService.php | 0 .../Service/Auth/RememberMeRateLimiter.php | 0 .../Service/Auth/RememberMeService.php | 0 .../Service/Auth/SsoUserLinkService.php | 0 .../Service/Auth/TenantSsoService.php | 0 .../Branding/BrandingFaviconService.php | 0 .../Service/Branding/BrandingLogoService.php | 0 .../Branding/BrandingServicesFactory.php | 0 {lib => core}/Service/Content/PageService.php | 0 .../CustomFieldServicesFactory.php | 0 .../CustomField/TenantCustomFieldService.php | 0 .../UserCustomFieldValueService.php | 0 .../Service/Data/GridUserCountEnricher.php | 0 .../Directory/DirectoryGatewayFactory.php | 0 .../Directory/DirectoryRepositoryFactory.php | 0 .../Directory/DirectoryServicesFactory.php | 0 .../Directory/DirectorySettingsGateway.php | 0 .../Service/Docs/DocsCatalogService.php | 0 .../Service/I18n/ServiceTranslator.php | 0 .../Service/I18n/TranslatesServiceText.php | 0 .../Service/Image/ImageUploadTrait.php | 0 .../Service/Import/CsvReaderService.php | 0 .../Import/ImportRepositoryFactory.php | 0 .../Service/Import/ImportService.php | 0 .../Service/Import/ImportServicesFactory.php | 0 .../Import/ImportStateStoreService.php | 0 .../Service/Import/ImportTempFileService.php | 0 .../Profile/DepartmentImportGateway.php | 0 .../Profile/DepartmentImportProfile.php | 0 .../Import/Profile/ImportProfileInterface.php | 0 .../Import/Profile/UserImportGateway.php | 0 .../Import/Profile/UserImportProfile.php | 0 {lib => core}/Service/Mail/MailLogService.php | 0 .../Service/Mail/MailRepositoryFactory.php | 0 {lib => core}/Service/Mail/MailService.php | 0 .../Service/Mail/MailServicesFactory.php | 0 .../Service/Module/ModuleMigrationService.php | 0 .../Service/Org/DepartmentService.php | 0 .../Handler/ScheduledJobHandlerInterface.php | 0 .../Handler/UserLifecycleJobHandler.php | 0 .../Service/Scheduler/ScheduleCalculator.php | 0 .../Scheduler/ScheduledJobRegistry.php | 0 .../Service/Scheduler/ScheduledJobService.php | 0 .../Scheduler/SchedulerRepositoryFactory.php | 0 .../Service/Scheduler/SchedulerRunService.php | 0 .../Scheduler/SchedulerServicesFactory.php | 0 .../Service/Search/SearchDataService.php | 0 .../Service/Security/RateLimiterService.php | 0 .../Security/SecurityRepositoryFactory.php | 0 .../Security/SecurityServicesFactory.php | 0 .../Service/Settings/AdminSettingsService.php | 0 .../Service/Settings/SettingCacheService.php | 0 .../Service/Settings/SettingKeys.php | 0 .../Settings/SettingRepositoryFactory.php | 0 .../Settings/SettingServicesFactory.php | 0 .../Settings/SettingsApiPolicyGateway.php | 0 .../Service/Settings/SettingsAppGateway.php | 0 .../Settings/SettingsCryptoGateway.php | 0 .../SettingsCryptoGatewayInterface.php | 0 .../Settings/SettingsDefaultsGateway.php | 0 .../SettingsFrontendTelemetryGateway.php | 0 .../SettingsLoginPersistenceGateway.php | 0 .../Settings/SettingsMetadataGateway.php | 0 .../Settings/SettingsMicrosoftGateway.php | 0 .../Settings/SettingsSessionGateway.php | 0 .../Service/Settings/SettingsSmtpGateway.php | 0 .../Settings/SettingsSystemAuditGateway.php | 0 .../Settings/SettingsUserLifecycleGateway.php | 0 .../Service/Settings/ThemeConfigGateway.php | 0 .../Stats/AdminStatsViewDataService.php | 0 .../Service/System/SystemHealthService.php | 0 .../Service/System/SystemInfoService.php | 0 .../Service/Tenant/TenantAvatarService.php | 0 .../Service/Tenant/TenantFaviconService.php | 0 .../Tenant/TenantRepositoryFactory.php | 0 .../Service/Tenant/TenantScopeService.php | 0 .../Service/Tenant/TenantService.php | 0 .../Service/Tenant/TenantServicesFactory.php | 0 {lib => core}/Service/Ui/HotkeyService.php | 0 .../Service/User/UserAccessPdfService.php | 0 .../User/UserAccessTemplateService.php | 0 .../Service/User/UserAccountService.php | 0 .../Service/User/UserApiWriteInputMapper.php | 0 .../Service/User/UserAssignmentService.php | 0 .../Service/User/UserAvatarService.php | 0 .../Service/User/UserDirectoryGateway.php | 0 .../Service/User/UserGatewayFactory.php | 0 .../User/UserLifecycleRestoreService.php | 0 .../Service/User/UserLifecycleService.php | 0 .../User/UserPasswordPolicyService.php | 0 .../Service/User/UserPasswordService.php | 0 .../Service/User/UserRepositoryFactory.php | 0 .../Service/User/UserServicesFactory.php | 0 .../Service/User/UserSettingsGateway.php | 0 .../Service/User/UserTenantContextService.php | 0 {lib => core}/Support/Crypto.php | 0 {lib => core}/Support/Flash.php | 0 {lib => core}/Support/Guard.php | 0 .../Search/SearchItemMapperProvider.php | 0 .../Support/Search/SearchQueryNormalizer.php | 0 .../Search/SearchSpecialResourceProvider.php | 0 .../Search/SearchSqlResourceProvider.php | 0 .../Support/Search/SearchUiMetaProvider.php | 0 {lib => core}/Support/SearchConfig.php | 0 {lib => core}/Support/SqlStatementParser.php | 0 {lib => core}/Support/Tile.php | 0 {lib => core}/Support/helpers.php | 0 {lib => core}/Support/helpers/app.php | 0 {lib => core}/Support/helpers/branding.php | 0 {lib => core}/Support/helpers/grid.php | 0 {lib => core}/Support/helpers/i18n.php | 0 {lib => core}/Support/helpers/request.php | 0 {lib => core}/Support/helpers/ui.php | 0 docs/explanation-architektur.md | 22 +++++++------- docs/explanation-di-container.md | 8 ++--- docs/explanation-session-management.md | 12 ++++---- docs/explanation-sicherheitsmodell.md | 4 +-- docs/howto-anfragelimits.md | 8 ++--- docs/howto-benutzerdefinierte-felder.md | 4 +-- docs/howto-dokumentation-erweitern.md | 2 +- docs/howto-erste-aenderung.md | 6 ++-- docs/howto-geplante-aufgaben.md | 10 +++---- docs/howto-globale-suche.md | 10 +++---- docs/howto-lokale-entwicklung.md | 4 +-- docs/howto-modul-erstellen.md | 10 +++---- docs/howto-rbac-permissions-playbook.md | 2 +- docs/index.md | 4 +-- docs/reference-cli-commands.md | 2 +- ...andards.md => reference-core-standards.md} | 26 ++++++++-------- docs/reference-domain-glossar.md | 4 +-- docs/reference-entwickler-checkliste.md | 14 ++++----- docs/reference-konventionen.md | 8 ++--- docs/tutorial-02-systemueberblick.md | 2 +- docs/tutorial-04-architektur-request-flow.md | 8 ++--- docs/tutorial-06-erste-aenderung-backend.md | 4 +-- phpstan.neon | 2 +- phpunit.xml | 2 +- ...AddressBookModuleIsolationContractTest.php | 8 ++--- .../Architecture/ApiResourceContractTest.php | 2 +- tests/Architecture/ApiSchemaContractTest.php | 2 +- .../ApiSessionIsolationContractTest.php | 2 +- .../AuditModuleIsolationContractTest.php | 14 ++++----- .../AuthzApiBootstrapContractTest.php | 2 +- tests/Architecture/AuthzUiContractSupport.php | 2 +- .../AuthzUiLayoutContractTest.php | 4 +-- .../BookmarksModuleIsolationContractTest.php | 10 +++---- tests/Architecture/ConfigContractsTest.php | 2 +- .../CoreStarterkitContractTest.php | 4 +-- .../Architecture/FileStorageContractTest.php | 6 ++-- .../FrontendTelemetryContractTest.php | 2 +- .../RepositoryInterfaceContractTest.php | 6 ++-- .../RepositoryLayerIsolationContractTest.php | 2 +- .../SecurityCryptoContractTest.php | 6 ++-- .../SecurityLoggingRuntimeContractTest.php | 2 +- .../ServiceLayerNoHtmlContractTest.php | 6 ++-- .../StatusTaxonomyContractFiles.php | 30 +++++++++---------- tests/Console/ConsoleApplicationTest.php | 2 +- .../Module/SearchProviderCollectionTest.php | 2 +- .../Support/SearchQueryNormalizerTest.php | 1 - tests/bootstrap.php | 4 +-- tools/php-cs-fixer/.php-cs-fixer.dist.php | 2 +- web/index.php | 4 +-- 371 files changed, 191 insertions(+), 192 deletions(-) rename {lib => core}/App/AppContainer.php (100%) rename {lib => core}/App/Bootstrap/EnvValidator.php (100%) rename {lib => core}/App/Container/ContainerRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/AccessRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/AppServicesRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/AuthRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/DirectoryRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/RepositoryFactoryRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/ServiceFactoryRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/SettingsRegistrar.php (100%) rename {lib => core}/App/Container/Registrars/UserRegistrar.php (100%) rename {lib => core}/App/Module/Contracts/EventListener.php (100%) rename {lib => core}/App/Module/Contracts/LayoutContextProvider.php (100%) rename {lib => core}/App/Module/Contracts/ModuleDeactivationHandler.php (100%) rename {lib => core}/App/Module/Contracts/SearchResourceProvider.php (100%) rename {lib => core}/App/Module/Contracts/SessionProvider.php (100%) rename {lib => core}/App/Module/ModuleClassResolver.php (100%) rename {lib => core}/App/Module/ModuleEventDispatcher.php (100%) rename {lib => core}/App/Module/ModuleI18nLoader.php (100%) rename {lib => core}/App/Module/ModuleManifest.php (100%) rename {lib => core}/App/Module/ModuleManifestLoader.php (100%) rename {lib => core}/App/Module/ModuleManifestSchemaValidator.php (100%) rename {lib => core}/App/Module/ModulePermissionSynchronizer.php (100%) rename {lib => core}/App/Module/ModuleRegistry.php (100%) rename {lib => core}/App/Module/ModuleRuntimeAssetPublisher.php (100%) rename {lib => core}/App/Module/ModuleRuntimePageBuilder.php (100%) rename {lib => core}/App/registerContainer.php (100%) rename {lib => core}/Console/Command.php (100%) rename {lib => core}/Console/Commands/DoctorCommand.php (100%) rename {lib => core}/Console/Commands/Make/ModuleCommand.php (100%) rename {lib => core}/Console/Commands/Module/AbstractModuleCommand.php (100%) rename {lib => core}/Console/Commands/Module/AssetsSyncCommand.php (100%) rename {lib => core}/Console/Commands/Module/BuildCommand.php (100%) rename {lib => core}/Console/Commands/Module/DeactivateCommand.php (100%) rename {lib => core}/Console/Commands/Module/MigrateCommand.php (100%) rename {lib => core}/Console/Commands/Module/PermissionsSyncCommand.php (100%) rename {lib => core}/Console/Commands/Module/RuntimeSyncCommand.php (100%) rename {lib => core}/Console/Commands/Module/ValidateCommand.php (100%) rename {lib => core}/Console/Commands/Scheduler/RunCommand.php (100%) rename {lib => core}/Console/ConsoleApplication.php (100%) rename {lib => core}/Console/Runner/Doctor/DoctorRunner.php (100%) rename {lib => core}/Console/Runner/Doctor/DoctorRunnerInterface.php (100%) rename {lib => core}/Console/Runner/Module/ModuleRunner.php (100%) rename {lib => core}/Console/Runner/Module/ModuleRunnerInterface.php (100%) rename {lib => core}/Console/Support/CliAppBootstrap.php (100%) rename {lib => core}/Console/Support/ModuleCliRuntime.php (100%) rename {lib => core}/Domain/Taxonomy/MailLogStatus.php (100%) rename {lib => core}/Domain/Taxonomy/ScheduledJobRunStatus.php (100%) rename {lib => core}/Domain/Taxonomy/ScheduledJobStatus.php (100%) rename {lib => core}/Domain/Taxonomy/ScheduledJobTriggerType.php (100%) rename {lib => core}/Domain/Taxonomy/SchedulerRuntimeResult.php (100%) rename {lib => core}/Domain/Taxonomy/SupportsStringTaxonomy.php (100%) rename {lib => core}/Domain/Taxonomy/TenantStatus.php (100%) rename {lib => core}/Http/AccessControl.php (100%) rename {lib => core}/Http/ApiAuth.php (100%) rename {lib => core}/Http/ApiBootstrap.php (100%) rename {lib => core}/Http/ApiResponse.php (100%) rename {lib => core}/Http/AssetDetector.php (100%) rename {lib => core}/Http/CookieStore.php (100%) rename {lib => core}/Http/CookieStoreInterface.php (100%) rename {lib => core}/Http/ErrorDataCollector.php (100%) rename {lib => core}/Http/ErrorHandler.php (100%) rename {lib => core}/Http/ErrorLogger.php (100%) rename {lib => core}/Http/ErrorRenderer.php (100%) rename {lib => core}/Http/Input/FormErrors.php (100%) rename {lib => core}/Http/Input/RequestInput.php (100%) rename {lib => core}/Http/Input/RequestInputFactory.php (100%) rename {lib => core}/Http/IntendedUrlService.php (100%) rename {lib => core}/Http/LocaleResolver.php (100%) rename {lib => core}/Http/Request.php (100%) rename {lib => core}/Http/RequestContext.php (100%) rename {lib => core}/Http/RequestRuntime.php (100%) rename {lib => core}/Http/RequestRuntimeInterface.php (100%) rename {lib => core}/Http/RouteCatalog.php (100%) rename {lib => core}/Http/RouteRegistrar.php (100%) rename {lib => core}/Http/SessionStore.php (100%) rename {lib => core}/Http/SessionStoreInterface.php (100%) rename {lib => core}/Repository/Access/PermissionRepository.php (100%) rename {lib => core}/Repository/Access/PermissionRepositoryInterface.php (100%) rename {lib => core}/Repository/Access/RoleAssignableRoleRepository.php (100%) rename {lib => core}/Repository/Access/RoleAssignableRoleRepositoryInterface.php (100%) rename {lib => core}/Repository/Access/RolePermissionRepository.php (100%) rename {lib => core}/Repository/Access/RolePermissionRepositoryInterface.php (100%) rename {lib => core}/Repository/Access/RoleRepository.php (100%) rename {lib => core}/Repository/Access/RoleRepositoryInterface.php (100%) rename {lib => core}/Repository/Access/UserRoleRepository.php (100%) rename {lib => core}/Repository/Access/UserRoleRepositoryInterface.php (100%) rename {lib => core}/Repository/Auth/ApiTokenRepository.php (100%) rename {lib => core}/Repository/Auth/ApiTokenRepositoryInterface.php (100%) rename {lib => core}/Repository/Auth/EmailVerificationRepository.php (100%) rename {lib => core}/Repository/Auth/EmailVerificationRepositoryInterface.php (100%) rename {lib => core}/Repository/Auth/PasswordResetRepository.php (100%) rename {lib => core}/Repository/Auth/PasswordResetRepositoryInterface.php (100%) rename {lib => core}/Repository/Auth/RememberTokenRepository.php (100%) rename {lib => core}/Repository/Auth/RememberTokenRepositoryInterface.php (100%) rename {lib => core}/Repository/Content/PageContentRepository.php (100%) rename {lib => core}/Repository/Content/PageRepository.php (100%) rename {lib => core}/Repository/CustomField/TenantCustomFieldDefinitionRepository.php (100%) rename {lib => core}/Repository/CustomField/TenantCustomFieldOptionRepository.php (100%) rename {lib => core}/Repository/CustomField/UserCustomFieldValueOptionRepository.php (100%) rename {lib => core}/Repository/CustomField/UserCustomFieldValueRepository.php (100%) rename {lib => core}/Repository/Mail/MailLogRepository.php (100%) rename {lib => core}/Repository/Mail/MailLogRepositoryInterface.php (100%) rename {lib => core}/Repository/Module/ModuleMigrationRepository.php (100%) rename {lib => core}/Repository/Module/ModuleMigrationRepositoryInterface.php (100%) rename {lib => core}/Repository/Org/DepartmentRepository.php (100%) rename {lib => core}/Repository/Org/DepartmentRepositoryInterface.php (100%) rename {lib => core}/Repository/Org/UserDepartmentRepository.php (100%) rename {lib => core}/Repository/Org/UserDepartmentRepositoryInterface.php (100%) rename {lib => core}/Repository/Scheduler/ScheduledJobRepository.php (100%) rename {lib => core}/Repository/Scheduler/ScheduledJobRepositoryInterface.php (100%) rename {lib => core}/Repository/Scheduler/ScheduledJobRunRepository.php (100%) rename {lib => core}/Repository/Scheduler/ScheduledJobRunRepositoryInterface.php (100%) rename {lib => core}/Repository/Scheduler/SchedulerRuntimeRepository.php (100%) rename {lib => core}/Repository/Scheduler/SchedulerRuntimeRepositoryInterface.php (100%) rename {lib => core}/Repository/Search/SearchQueryRepository.php (100%) rename {lib => core}/Repository/Search/SearchQueryRepositoryInterface.php (100%) rename {lib => core}/Repository/Security/RateLimitRepository.php (100%) rename {lib => core}/Repository/Security/RateLimitRepositoryInterface.php (100%) rename {lib => core}/Repository/Settings/SettingRepository.php (100%) rename {lib => core}/Repository/Settings/SettingRepositoryInterface.php (100%) rename {lib => core}/Repository/Stats/AdminStatsRepository.php (100%) rename {lib => core}/Repository/Stats/AdminStatsRepositoryInterface.php (100%) rename {lib => core}/Repository/Support/DatabaseSessionRepository.php (100%) rename {lib => core}/Repository/Support/DatabaseSessionRepositoryInterface.php (100%) rename {lib => core}/Repository/Support/RepoQuery.php (100%) rename {lib => core}/Repository/Support/RepositoryArrayHelper.php (100%) rename {lib => core}/Repository/System/SystemHealthRepository.php (100%) rename {lib => core}/Repository/System/SystemHealthRepositoryInterface.php (100%) rename {lib => core}/Repository/Tenant/TenantLdapAuthRepository.php (100%) rename {lib => core}/Repository/Tenant/TenantLdapAuthRepositoryInterface.php (100%) rename {lib => core}/Repository/Tenant/TenantMicrosoftAuthRepository.php (100%) rename {lib => core}/Repository/Tenant/TenantMicrosoftAuthRepositoryInterface.php (100%) rename {lib => core}/Repository/Tenant/TenantRepository.php (100%) rename {lib => core}/Repository/Tenant/TenantRepositoryInterface.php (100%) rename {lib => core}/Repository/Tenant/UserTenantRepository.php (100%) rename {lib => core}/Repository/Tenant/UserTenantRepositoryInterface.php (100%) rename {lib => core}/Repository/User/UserExternalIdentityRepository.php (100%) rename {lib => core}/Repository/User/UserExternalIdentityRepositoryInterface.php (100%) rename {lib => core}/Repository/User/UserListQueryRepository.php (100%) rename {lib => core}/Repository/User/UserListQueryRepositoryInterface.php (100%) rename {lib => core}/Repository/User/UserReadRepository.php (100%) rename {lib => core}/Repository/User/UserReadRepositoryInterface.php (100%) rename {lib => core}/Repository/User/UserWriteRepository.php (100%) rename {lib => core}/Repository/User/UserWriteRepositoryInterface.php (100%) rename {lib => core}/Service/Access/AccessGatewayFactory.php (100%) rename {lib => core}/Service/Access/AccessPolicyFactory.php (100%) rename {lib => core}/Service/Access/AccessRepositoryFactory.php (100%) rename {lib => core}/Service/Access/AccessServicesFactory.php (100%) rename {lib => core}/Service/Access/AssignableRoleService.php (100%) rename {lib => core}/Service/Access/AuthorizationDecision.php (100%) rename {lib => core}/Service/Access/AuthorizationPolicyContextTrait.php (100%) rename {lib => core}/Service/Access/AuthorizationPolicyInterface.php (100%) rename {lib => core}/Service/Access/AuthorizationService.php (100%) rename {lib => core}/Service/Access/DepartmentAuthorizationPolicy.php (100%) rename {lib => core}/Service/Access/OperationsAuthorizationPolicy.php (100%) rename {lib => core}/Service/Access/PermissionAuthorizationPolicy.php (100%) rename {lib => core}/Service/Access/PermissionService.php (100%) rename {lib => core}/Service/Access/RoleAuthorizationPolicy.php (100%) rename {lib => core}/Service/Access/RoleService.php (100%) rename {lib => core}/Service/Access/SettingsAuthorizationPolicy.php (100%) rename {lib => core}/Service/Access/TenantAuthorizationPolicy.php (100%) rename {lib => core}/Service/Access/UiAccessService.php (100%) rename {lib => core}/Service/Access/UiCapabilityMap.php (100%) rename {lib => core}/Service/Access/UserAuthorizationPolicy.php (100%) rename {lib => core}/Service/Audit/ApiAuditServiceInterface.php (100%) rename {lib => core}/Service/Audit/ApiSystemAuditReporterInterface.php (100%) rename {lib => core}/Service/Audit/AuditMetadataEnricherInterface.php (100%) rename {lib => core}/Service/Audit/AuditRecorderInterface.php (100%) rename {lib => core}/Service/Audit/ImportAuditInterface.php (100%) rename {lib => core}/Service/Audit/NullApiAuditService.php (100%) rename {lib => core}/Service/Audit/NullApiSystemAuditReporter.php (100%) rename {lib => core}/Service/Audit/NullAuditMetadataEnricher.php (100%) rename {lib => core}/Service/Audit/NullAuditRecorder.php (100%) rename {lib => core}/Service/Audit/NullImportAudit.php (100%) rename {lib => core}/Service/Audit/NullUserLifecycleAudit.php (100%) rename {lib => core}/Service/Audit/UserLifecycleAuditInterface.php (100%) rename {lib => core}/Service/Auth/ApiTokenEndpointService.php (100%) rename {lib => core}/Service/Auth/ApiTokenService.php (100%) rename {lib => core}/Service/Auth/AuthCryptoGateway.php (100%) rename {lib => core}/Service/Auth/AuthExternalIdentityGateway.php (100%) rename {lib => core}/Service/Auth/AuthGatewayFactory.php (100%) rename {lib => core}/Service/Auth/AuthRepositoryFactory.php (100%) rename {lib => core}/Service/Auth/AuthService.php (100%) rename {lib => core}/Service/Auth/AuthServicesFactory.php (100%) rename {lib => core}/Service/Auth/AuthSessionTenantContextService.php (100%) rename {lib => core}/Service/Auth/AuthSettingsGateway.php (100%) rename {lib => core}/Service/Auth/AuthTenantGateway.php (100%) rename {lib => core}/Service/Auth/EmailVerificationService.php (100%) rename {lib => core}/Service/Auth/LdapAuthService.php (100%) rename {lib => core}/Service/Auth/LdapConnectionGateway.php (100%) rename {lib => core}/Service/Auth/MicrosoftOidcService.php (100%) rename {lib => core}/Service/Auth/MicrosoftOidcStateStoreService.php (100%) rename {lib => core}/Service/Auth/OidcHttpGateway.php (100%) rename {lib => core}/Service/Auth/PasswordResetService.php (100%) rename {lib => core}/Service/Auth/RememberMeRateLimiter.php (100%) rename {lib => core}/Service/Auth/RememberMeService.php (100%) rename {lib => core}/Service/Auth/SsoUserLinkService.php (100%) rename {lib => core}/Service/Auth/TenantSsoService.php (100%) rename {lib => core}/Service/Branding/BrandingFaviconService.php (100%) rename {lib => core}/Service/Branding/BrandingLogoService.php (100%) rename {lib => core}/Service/Branding/BrandingServicesFactory.php (100%) rename {lib => core}/Service/Content/PageService.php (100%) rename {lib => core}/Service/CustomField/CustomFieldServicesFactory.php (100%) rename {lib => core}/Service/CustomField/TenantCustomFieldService.php (100%) rename {lib => core}/Service/CustomField/UserCustomFieldValueService.php (100%) rename {lib => core}/Service/Data/GridUserCountEnricher.php (100%) rename {lib => core}/Service/Directory/DirectoryGatewayFactory.php (100%) rename {lib => core}/Service/Directory/DirectoryRepositoryFactory.php (100%) rename {lib => core}/Service/Directory/DirectoryServicesFactory.php (100%) rename {lib => core}/Service/Directory/DirectorySettingsGateway.php (100%) rename {lib => core}/Service/Docs/DocsCatalogService.php (100%) rename {lib => core}/Service/I18n/ServiceTranslator.php (100%) rename {lib => core}/Service/I18n/TranslatesServiceText.php (100%) rename {lib => core}/Service/Image/ImageUploadTrait.php (100%) rename {lib => core}/Service/Import/CsvReaderService.php (100%) rename {lib => core}/Service/Import/ImportRepositoryFactory.php (100%) rename {lib => core}/Service/Import/ImportService.php (100%) rename {lib => core}/Service/Import/ImportServicesFactory.php (100%) rename {lib => core}/Service/Import/ImportStateStoreService.php (100%) rename {lib => core}/Service/Import/ImportTempFileService.php (100%) rename {lib => core}/Service/Import/Profile/DepartmentImportGateway.php (100%) rename {lib => core}/Service/Import/Profile/DepartmentImportProfile.php (100%) rename {lib => core}/Service/Import/Profile/ImportProfileInterface.php (100%) rename {lib => core}/Service/Import/Profile/UserImportGateway.php (100%) rename {lib => core}/Service/Import/Profile/UserImportProfile.php (100%) rename {lib => core}/Service/Mail/MailLogService.php (100%) rename {lib => core}/Service/Mail/MailRepositoryFactory.php (100%) rename {lib => core}/Service/Mail/MailService.php (100%) rename {lib => core}/Service/Mail/MailServicesFactory.php (100%) rename {lib => core}/Service/Module/ModuleMigrationService.php (100%) rename {lib => core}/Service/Org/DepartmentService.php (100%) rename {lib => core}/Service/Scheduler/Handler/ScheduledJobHandlerInterface.php (100%) rename {lib => core}/Service/Scheduler/Handler/UserLifecycleJobHandler.php (100%) rename {lib => core}/Service/Scheduler/ScheduleCalculator.php (100%) rename {lib => core}/Service/Scheduler/ScheduledJobRegistry.php (100%) rename {lib => core}/Service/Scheduler/ScheduledJobService.php (100%) rename {lib => core}/Service/Scheduler/SchedulerRepositoryFactory.php (100%) rename {lib => core}/Service/Scheduler/SchedulerRunService.php (100%) rename {lib => core}/Service/Scheduler/SchedulerServicesFactory.php (100%) rename {lib => core}/Service/Search/SearchDataService.php (100%) rename {lib => core}/Service/Security/RateLimiterService.php (100%) rename {lib => core}/Service/Security/SecurityRepositoryFactory.php (100%) rename {lib => core}/Service/Security/SecurityServicesFactory.php (100%) rename {lib => core}/Service/Settings/AdminSettingsService.php (100%) rename {lib => core}/Service/Settings/SettingCacheService.php (100%) rename {lib => core}/Service/Settings/SettingKeys.php (100%) rename {lib => core}/Service/Settings/SettingRepositoryFactory.php (100%) rename {lib => core}/Service/Settings/SettingServicesFactory.php (100%) rename {lib => core}/Service/Settings/SettingsApiPolicyGateway.php (100%) rename {lib => core}/Service/Settings/SettingsAppGateway.php (100%) rename {lib => core}/Service/Settings/SettingsCryptoGateway.php (100%) rename {lib => core}/Service/Settings/SettingsCryptoGatewayInterface.php (100%) rename {lib => core}/Service/Settings/SettingsDefaultsGateway.php (100%) rename {lib => core}/Service/Settings/SettingsFrontendTelemetryGateway.php (100%) rename {lib => core}/Service/Settings/SettingsLoginPersistenceGateway.php (100%) rename {lib => core}/Service/Settings/SettingsMetadataGateway.php (100%) rename {lib => core}/Service/Settings/SettingsMicrosoftGateway.php (100%) rename {lib => core}/Service/Settings/SettingsSessionGateway.php (100%) rename {lib => core}/Service/Settings/SettingsSmtpGateway.php (100%) rename {lib => core}/Service/Settings/SettingsSystemAuditGateway.php (100%) rename {lib => core}/Service/Settings/SettingsUserLifecycleGateway.php (100%) rename {lib => core}/Service/Settings/ThemeConfigGateway.php (100%) rename {lib => core}/Service/Stats/AdminStatsViewDataService.php (100%) rename {lib => core}/Service/System/SystemHealthService.php (100%) rename {lib => core}/Service/System/SystemInfoService.php (100%) rename {lib => core}/Service/Tenant/TenantAvatarService.php (100%) rename {lib => core}/Service/Tenant/TenantFaviconService.php (100%) rename {lib => core}/Service/Tenant/TenantRepositoryFactory.php (100%) rename {lib => core}/Service/Tenant/TenantScopeService.php (100%) rename {lib => core}/Service/Tenant/TenantService.php (100%) rename {lib => core}/Service/Tenant/TenantServicesFactory.php (100%) rename {lib => core}/Service/Ui/HotkeyService.php (100%) rename {lib => core}/Service/User/UserAccessPdfService.php (100%) rename {lib => core}/Service/User/UserAccessTemplateService.php (100%) rename {lib => core}/Service/User/UserAccountService.php (100%) rename {lib => core}/Service/User/UserApiWriteInputMapper.php (100%) rename {lib => core}/Service/User/UserAssignmentService.php (100%) rename {lib => core}/Service/User/UserAvatarService.php (100%) rename {lib => core}/Service/User/UserDirectoryGateway.php (100%) rename {lib => core}/Service/User/UserGatewayFactory.php (100%) rename {lib => core}/Service/User/UserLifecycleRestoreService.php (100%) rename {lib => core}/Service/User/UserLifecycleService.php (100%) rename {lib => core}/Service/User/UserPasswordPolicyService.php (100%) rename {lib => core}/Service/User/UserPasswordService.php (100%) rename {lib => core}/Service/User/UserRepositoryFactory.php (100%) rename {lib => core}/Service/User/UserServicesFactory.php (100%) rename {lib => core}/Service/User/UserSettingsGateway.php (100%) rename {lib => core}/Service/User/UserTenantContextService.php (100%) rename {lib => core}/Support/Crypto.php (100%) rename {lib => core}/Support/Flash.php (100%) rename {lib => core}/Support/Guard.php (100%) rename {lib => core}/Support/Search/SearchItemMapperProvider.php (100%) rename {lib => core}/Support/Search/SearchQueryNormalizer.php (100%) rename {lib => core}/Support/Search/SearchSpecialResourceProvider.php (100%) rename {lib => core}/Support/Search/SearchSqlResourceProvider.php (100%) rename {lib => core}/Support/Search/SearchUiMetaProvider.php (100%) rename {lib => core}/Support/SearchConfig.php (100%) rename {lib => core}/Support/SqlStatementParser.php (100%) rename {lib => core}/Support/Tile.php (100%) rename {lib => core}/Support/helpers.php (100%) rename {lib => core}/Support/helpers/app.php (100%) rename {lib => core}/Support/helpers/branding.php (100%) rename {lib => core}/Support/helpers/grid.php (100%) rename {lib => core}/Support/helpers/i18n.php (100%) rename {lib => core}/Support/helpers/request.php (100%) rename {lib => core}/Support/helpers/ui.php (100%) rename docs/{reference-lib-standards.md => reference-core-standards.md} (88%) diff --git a/.agents/checks/enforcement-policy.json b/.agents/checks/enforcement-policy.json index 1f8fd1e..37d0b00 100644 --- a/.agents/checks/enforcement-policy.json +++ b/.agents/checks/enforcement-policy.json @@ -6,9 +6,9 @@ "id": "risk-security", "description": "Any change touching authentication, authorization, CSRF, encryption, logging redaction, file uploads, or API bootstrap/security behavior.", "paths": [ - "lib/Http/**", - "lib/Service/Access/**", - "lib/Support/Crypto.php", + "core/Http/**", + "core/Service/Access/**", + "core/Support/Crypto.php", "pages/api/**", "pages/**" ] @@ -17,7 +17,7 @@ "id": "risk-data-boundary", "description": "Any change touching tenant-scoped data access, repository query boundaries, DB schema updates, or API contracts.", "paths": [ - "lib/Repository/**", + "core/Repository/**", "db/updates/**", "db/init/init.sql", "docs/openapi.yaml" @@ -28,7 +28,7 @@ "description": "Any change touching module manifests, module runtime wiring, module routes, module providers, or module migrations/assets.", "paths": [ "modules/*/module.php", - "lib/App/Module/**", + "core/App/Module/**", "storage/runtime/pages/**", "web/modules/**" ] @@ -37,7 +37,7 @@ "id": "risk-cross-layer", "description": "Any feature/addition changing more than one architecture layer (Repository, Service, pages/templates/web, modules, config, db).", "paths": [ - "lib/**", + "core/**", "pages/**", "templates/**", "web/**", diff --git a/.agents/checks/guard-catalog.json b/.agents/checks/guard-catalog.json index fd822e6..98a8674 100644 --- a/.agents/checks/guard-catalog.json +++ b/.agents/checks/guard-catalog.json @@ -41,7 +41,7 @@ "area": "test", "reviewer": "code", "title": "Tests ship with new logic", - "requirement": "New or changed business logic in lib/Service/ MUST be accompanied by PHPUnit tests covering the happy path and at least one failure or edge case. No new public method in a Service or Gateway without a test." + "requirement": "New or changed business logic in core/Service/ MUST be accompanied by PHPUnit tests covering the happy path and at least one failure or edge case. No new public method in a Service or Gateway without a test." }, { "id": "GR-TEST-002", @@ -125,7 +125,7 @@ "area": "security", "reviewer": "security", "title": "Encryption via Crypto only", - "requirement": "Encryption/decryption MUST use lib/Support/Crypto.php (AES-256-GCM). No raw openssl_encrypt, no base64 as encryption, no hand-rolled crypto." + "requirement": "Encryption/decryption MUST use core/Support/Crypto.php (AES-256-GCM). No raw openssl_encrypt, no base64 as encryption, no hand-rolled crypto." }, { "id": "GR-SEC-006", diff --git a/.agents/checks/guard-checklist.md b/.agents/checks/guard-checklist.md index 5208fdc..7e3bd02 100644 --- a/.agents/checks/guard-checklist.md +++ b/.agents/checks/guard-checklist.md @@ -38,7 +38,7 @@ Guard IDs live in `.agents/checks/guard-catalog.json` (guards where `reviewer` = - `GR-SEC-002` no PII or secrets in logs/audit metadata - `GR-SEC-003` all SQL via Repository with prepared statements - `GR-SEC-004` no external CDN or remote asset loading -- `GR-SEC-005` encryption only via lib/Support/Crypto.php +- `GR-SEC-005` encryption only via core/Support/Crypto.php - `GR-SEC-006` file uploads in storage/ only; authz-gated serving; MIME validated - `GR-SEC-007` API requests do not start sessions - `GR-SEC-008` authorization enforced server-side diff --git a/.agents/checks/quality-gates.json b/.agents/checks/quality-gates.json index 1b540c9..20e59ad 100644 --- a/.agents/checks/quality-gates.json +++ b/.agents/checks/quality-gates.json @@ -24,7 +24,7 @@ "id": "QG-004", "type": "fast", "name": "Structural rg checks", - "command": "(rg 'new\\s+[^\\s(]+Factory\\(' lib/Service || true) | wc -l\n(rg --glob '!**/*Factory.php' 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' lib/Service || true) | wc -l\n(rg \"\\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\\(\" pages lib templates web || true) | wc -l\n(rg -n 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' pages -g '*.php' || true) | wc -l\n(rg -n '\\bDB::' pages -g '*.php' || true) | wc -l\n(rg -n 'app\\([^\\n]*Factory::class\\)->create' pages/admin -g '*.php' || true) | wc -l\n(rg -n 'Factory::class' pages/admin -g '*.php' || true) | wc -l\n(rg -n 'ApiResponse::readJsonBody\\(' pages/api/v1 -g '*.php' || true) | wc -l" + "command": "(rg 'new\\s+[^\\s(]+Factory\\(' core/Service || true) | wc -l\n(rg --glob '!**/*Factory.php' 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' core/Service || true) | wc -l\n(rg \"\\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\\(\" pages core templates web || true) | wc -l\n(rg -n 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' pages -g '*.php' || true) | wc -l\n(rg -n '\\bDB::' pages -g '*.php' || true) | wc -l\n(rg -n 'app\\([^\\n]*Factory::class\\)->create' pages/admin -g '*.php' || true) | wc -l\n(rg -n 'Factory::class' pages/admin -g '*.php' || true) | wc -l\n(rg -n 'ApiResponse::readJsonBody\\(' pages/api/v1 -g '*.php' || true) | wc -l" }, { "id": "QG-005", diff --git a/.agents/skills/core-guardrails/references/boundaries-core.md b/.agents/skills/core-guardrails/references/boundaries-core.md index c0d20b1..9c9453f 100644 --- a/.agents/skills/core-guardrails/references/boundaries-core.md +++ b/.agents/skills/core-guardrails/references/boundaries-core.md @@ -2,8 +2,8 @@ ## Schichtgrenzen -1. MUST SQL nur in `lib/Repository/**` halten. -2. MUST Business-Logik in `lib/Service/**` halten. +1. MUST SQL nur in `core/Repository/**` halten. +2. MUST Business-Logik in `core/Service/**` halten. 3. MUST `pages/**` auf Input, Auth/AuthZ, Orchestrierung, Response begrenzen. 4. MUST NOT Business- oder Permission-Logik in `templates/**` legen. @@ -11,7 +11,7 @@ 1. MUST in Actions/Helpern/Templates nur `app(Foo::class)` verwenden. 2. MUST NOT in `pages/**` direkt `new ...Service|Gateway|Repository` nutzen. -3. MUST NOT in `lib/Service/**` (ausser `*Factory.php`) direkt `new ...Factory|Service|Gateway|Repository` nutzen. +3. MUST NOT in `core/Service/**` (ausser `*Factory.php`) direkt `new ...Factory|Service|Gateway|Repository` nutzen. 4. MUST NOT in `pages/admin/**` `Factory::class` referenzieren oder `app(...Factory::class)->create...` nutzen. ## Input / Validation diff --git a/.agents/skills/core-guardrails/references/quality-gates.md b/.agents/skills/core-guardrails/references/quality-gates.md index 4006308..ecf0456 100644 --- a/.agents/skills/core-guardrails/references/quality-gates.md +++ b/.agents/skills/core-guardrails/references/quality-gates.md @@ -15,9 +15,9 @@ Policy-Hinweis: ## Struktur-Gates (schnell) ```bash -(rg 'new\s+[^\s(]+Factory\(' lib/Service || true) | wc -l -(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' lib/Service || true) | wc -l -(rg "\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\(" pages lib templates web || true) | wc -l +(rg 'new\s+[^\s(]+Factory\(' core/Service || true) | wc -l +(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' core/Service || true) | wc -l +(rg "\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\(" pages core templates web || true) | wc -l (rg -n 'new\s+[^\s(]+(Service|Gateway|Repository)\(' pages -g '*.php' || true) | wc -l (rg -n '\bDB::' pages -g '*.php' || true) | wc -l (rg -n 'app\([^\n]*Factory::class\)->create' pages/admin -g '*.php' || true) | wc -l diff --git a/.agents/skills/core-guardrails/references/source-map.md b/.agents/skills/core-guardrails/references/source-map.md index 3f6ea6f..0d0799c 100644 --- a/.agents/skills/core-guardrails/references/source-map.md +++ b/.agents/skills/core-guardrails/references/source-map.md @@ -3,7 +3,7 @@ ## Kernregeln - Architektur- und Schichtgrenzen: `/docs/explanation-architektur.md` -- `lib/**`-Regeln und Instanziierung: `/docs/reference-lib-standards.md` +- `core/**`-Regeln und Instanziierung: `/docs/reference-core-standards.md` - Kurzkonventionen: `/docs/reference-konventionen.md` - Request/Input/Validation: `/docs/howto-request-input-validation.md` diff --git a/CLAUDE.md b/CLAUDE.md index e7d13a3..2ff8162 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -54,7 +54,7 @@ docker compose exec php vendor/bin/composer-unused ## Project Structure ``` -lib/ # All backend PHP (namespace MintyPHP\) +core/ # All backend PHP (namespace MintyPHP\) App/ # DI container + bootstrap (AppContainer, Container/Registrars/) Module/ # Module platform (Registry, Manifest, Autoloader, Builder) Repository/ # SQL queries, prepared statements, filters/paging @@ -66,7 +66,7 @@ lib/ # All backend PHP (namespace MintyPHP\) Support/ # Crypto, flash, guard, search, helpers modules/ # Self-contained feature modules (namespace MintyPHP\Module\\) /module.php # Module manifest (routes, slots, providers, permissions) - /lib/ # Module PHP classes (Service, Repository, Providers) + /lib/ # Module PHP classes (Service, Repository, Providers) /pages/ # Module actions + views (symlinked into runtime) /templates/ # Module-specific templates /web/ # Module CSS/JS (published to web/modules//) @@ -101,13 +101,13 @@ docker/ # Dockerfiles, Nginx configs, PHP configs ### Strict Layering (enforce in all changes) -1. **App** (`lib/App/`): DI container bootstrap. Registers all service/repository factories. No business logic. -2. **Repository** (`lib/Repository/`): All SQL lives here. No HTTP, session, or rendering. -3. **Service** (`lib/Service/`): Business rules and validation. No HTML. Four internal sub-types: +1. **App** (`core/App/`): DI container bootstrap. Registers all service/repository factories. No business logic. +2. **Repository** (`core/Repository/`): All SQL lives here. No HTTP, session, or rendering. +3. **Service** (`core/Service/`): Business rules and validation. No HTML. Four internal sub-types: - **Service** (`*Service.php`): Business logic + orchestration. Coordinates repositories and gateways. - **Gateway** (`*Gateway.php`): Adapter for a single external dependency (repository, settings, HTTP API, scope). No orchestration flow. - - **Factory** (`*Factory.php`): Only place inside `lib/Service/` that may call `new` on services/gateways/repositories. Registers via DI container. - - **Policy** (`*Policy.php` in `lib/Service/Access/`): Authorization decisions per resource type. Returns `AuthorizationDecision`. No HTTP, no business logic. + - **Factory** (`*Factory.php`): Only place inside `core/Service/` that may call `new` on services/gateways/repositories. Registers via DI container. + - **Policy** (`*Policy.php` in `core/Service/Access/`): Authorization decisions per resource type. Returns `AuthorizationDecision`. No HTTP, no business logic. 4. **Action** (`pages/**/*.php`): Reads input, checks permissions + tenant scope, calls services, sets view vars. 5. **View** (`pages/**/*.phtml`): Pure rendering. **No DB calls.** HTML escaping via `e(...)`. 6. **Template** (`templates/`): Layouts and partials. @@ -139,7 +139,7 @@ docker/ # Dockerfiles, Nginx configs, PHP configs ### PHP Conventions -- PSR-4 autoload: `MintyPHP\` → `lib/`, `MintyPHP\Module\*` → `modules/*/lib/`, `MintyPHP\Tests\` → `tests/` +- PSR-4 autoload: `MintyPHP\` → `core/`, `MintyPHP\Module\*` → `modules/*/lib/`, `MintyPHP\Tests\` → `tests/` - All user-facing text uses `t('key')` translation helper — keys must exist in all language files under `i18n/` - Request input via `requestInput()` — never raw `$_GET`/`$_POST`/`$_SESSION` (GR-CORE-003) - Permissions + tenant scope enforced in actions/services, never just in UI @@ -198,7 +198,7 @@ These rules are enforced by guards GR-SEC-001 through GR-SEC-010 in `.agents/che - No PII or secrets in logs or audit metadata (GR-SEC-002) - SQL only via Repository prepared statements — no inline queries (GR-SEC-003) - No external CDN or remote asset loading (GR-SEC-004) -- Encryption only via `lib/Support/Crypto.php` AES-256-GCM (GR-SEC-005) +- Encryption only via `core/Support/Crypto.php` AES-256-GCM (GR-SEC-005) - File uploads: `storage/` only, authz-gated serving, MIME-validated (GR-SEC-006) - API requests must not start sessions (GR-SEC-007) - Authorization enforced server-side, not just in UI (GR-SEC-008) diff --git a/README.md b/README.md index 0433a3b..1c04e47 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ Initiale DB-Settings (Seed): - Geschaeftslogik bleibt in Services. - `pages/.../*.php` fungiert als Action-/Controller-Schicht. - Service-Aufloesung in Actions/Helpern ueber `app(Foo::class)`. -- `new ...Factory()` nur im Composition Root (`web/index.php` + `lib/App/registerContainer.php`) oder in `*Factory.php`. +- `new ...Factory()` nur im Composition Root (`web/index.php` + `core/App/registerContainer.php`) oder in `*Factory.php`. - `pages/**/data().php` sind GET-only (`gridRequireGetRequest()`) und normalisieren `limit`/`offset`/`order`/`dir` ueber Grid-Helper. - Permissions + Tenant-Scope werden in Actions/Services erzwungen. - Wiederkehrende UI-Bloecke als Partials zentralisieren. diff --git a/bin/cli-bootstrap.php b/bin/cli-bootstrap.php index 3b2d336..6601136 100644 --- a/bin/cli-bootstrap.php +++ b/bin/cli-bootstrap.php @@ -18,10 +18,10 @@ function cliBootstrapApp(string $channel = 'cli', string $path = 'bin/cli'): App chdir(__DIR__ . '/..'); require_once 'vendor/autoload.php'; require_once 'config/config.php'; - require_once 'lib/Support/helpers.php'; + require_once 'core/Support/helpers.php'; /** @var AppContainer $resolved */ - $resolved = require 'lib/App/registerContainer.php'; + $resolved = require 'core/App/registerContainer.php'; setAppContainer($resolved); $container = $resolved; diff --git a/bin/console b/bin/console index 214b62a..724f255 100755 --- a/bin/console +++ b/bin/console @@ -11,7 +11,7 @@ declare(strict_types=1); * php bin/console list * php bin/console --help * - * Commands are auto-discovered from lib/Console/Commands/. + * Commands are auto-discovered from core/Console/Commands/. * To add a new command, create a class extending Command in that directory. */ @@ -20,6 +20,6 @@ require_once __DIR__ . '/../vendor/autoload.php'; use MintyPHP\Console\ConsoleApplication; $app = new ConsoleApplication(); -$app->discoverCommands(__DIR__ . '/../lib/Console/Commands'); +$app->discoverCommands(__DIR__ . '/../core/Console/Commands'); exit($app->run($argv)); diff --git a/bin/helpdesk-diagnose.php b/bin/helpdesk-diagnose.php index 6dc0f0e..b27c94c 100644 --- a/bin/helpdesk-diagnose.php +++ b/bin/helpdesk-diagnose.php @@ -13,9 +13,9 @@ declare(strict_types=1); chdir(__DIR__ . '/..'); require 'vendor/autoload.php'; require 'config/config.php'; -require 'lib/Support/helpers.php'; +require 'core/Support/helpers.php'; -$container = require 'lib/App/registerContainer.php'; +$container = require 'core/App/registerContainer.php'; setAppContainer($container); use MintyPHP\Module\Helpdesk\Service\BcODataGateway; diff --git a/bin/helpdesk-explore-entities.php b/bin/helpdesk-explore-entities.php index 1b74fb0..da6ba5c 100644 --- a/bin/helpdesk-explore-entities.php +++ b/bin/helpdesk-explore-entities.php @@ -17,9 +17,9 @@ declare(strict_types=1); chdir(__DIR__ . '/..'); require 'vendor/autoload.php'; require 'config/config.php'; -require 'lib/Support/helpers.php'; +require 'core/Support/helpers.php'; -$container = require 'lib/App/registerContainer.php'; +$container = require 'core/App/registerContainer.php'; setAppContainer($container); use MintyPHP\Module\Helpdesk\Service\HelpdeskSettingsGateway; diff --git a/bin/qa-extended.sh b/bin/qa-extended.sh index 4e5509e..7b125b8 100755 --- a/bin/qa-extended.sh +++ b/bin/qa-extended.sh @@ -14,9 +14,9 @@ bin/qa-required.sh # QG-004 (non-blocking in phase 1): structural checks as warning-only signal if command -v rg >/dev/null 2>&1; then - c1="$( (rg 'new\\s+[^\\s(]+Factory\\(' lib/Service || true) | wc -l | tr -d '[:space:]')" - c2="$( (rg --glob '!**/*Factory.php' 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' lib/Service || true) | wc -l | tr -d '[:space:]')" - c3="$( (rg "\\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\\(" pages lib templates web || true) | wc -l | tr -d '[:space:]')" + c1="$( (rg 'new\\s+[^\\s(]+Factory\\(' core/Service || true) | wc -l | tr -d '[:space:]')" + c2="$( (rg --glob '!**/*Factory.php' 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' core/Service || true) | wc -l | tr -d '[:space:]')" + c3="$( (rg "\\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\\(" pages core templates web || true) | wc -l | tr -d '[:space:]')" c4="$( (rg -n 'new\\s+[^\\s(]+(Service|Gateway|Repository)\\(' pages -g '*.php' || true) | wc -l | tr -d '[:space:]')" c5="$( (rg -n '\\bDB::' pages -g '*.php' || true) | wc -l | tr -d '[:space:]')" c6="$( (rg -n 'app\\([^\\n]*Factory::class\\)->create' pages/admin -g '*.php' || true) | wc -l | tr -d '[:space:]')" diff --git a/composer.json b/composer.json index 49b4089..2269458 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ }, "autoload": { "psr-4": { - "MintyPHP\\": "lib/", + "MintyPHP\\": "core/", "MintyPHP\\Module\\Audit\\": "modules/audit/lib/Module/Audit/", "MintyPHP\\Module\\Helpdesk\\": "modules/helpdesk/lib/Module/Helpdesk/" } diff --git a/lib/App/AppContainer.php b/core/App/AppContainer.php similarity index 100% rename from lib/App/AppContainer.php rename to core/App/AppContainer.php diff --git a/lib/App/Bootstrap/EnvValidator.php b/core/App/Bootstrap/EnvValidator.php similarity index 100% rename from lib/App/Bootstrap/EnvValidator.php rename to core/App/Bootstrap/EnvValidator.php diff --git a/lib/App/Container/ContainerRegistrar.php b/core/App/Container/ContainerRegistrar.php similarity index 100% rename from lib/App/Container/ContainerRegistrar.php rename to core/App/Container/ContainerRegistrar.php diff --git a/lib/App/Container/Registrars/AccessRegistrar.php b/core/App/Container/Registrars/AccessRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/AccessRegistrar.php rename to core/App/Container/Registrars/AccessRegistrar.php diff --git a/lib/App/Container/Registrars/AppServicesRegistrar.php b/core/App/Container/Registrars/AppServicesRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/AppServicesRegistrar.php rename to core/App/Container/Registrars/AppServicesRegistrar.php diff --git a/lib/App/Container/Registrars/AuthRegistrar.php b/core/App/Container/Registrars/AuthRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/AuthRegistrar.php rename to core/App/Container/Registrars/AuthRegistrar.php diff --git a/lib/App/Container/Registrars/DirectoryRegistrar.php b/core/App/Container/Registrars/DirectoryRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/DirectoryRegistrar.php rename to core/App/Container/Registrars/DirectoryRegistrar.php diff --git a/lib/App/Container/Registrars/RepositoryFactoryRegistrar.php b/core/App/Container/Registrars/RepositoryFactoryRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/RepositoryFactoryRegistrar.php rename to core/App/Container/Registrars/RepositoryFactoryRegistrar.php diff --git a/lib/App/Container/Registrars/ServiceFactoryRegistrar.php b/core/App/Container/Registrars/ServiceFactoryRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/ServiceFactoryRegistrar.php rename to core/App/Container/Registrars/ServiceFactoryRegistrar.php diff --git a/lib/App/Container/Registrars/SettingsRegistrar.php b/core/App/Container/Registrars/SettingsRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/SettingsRegistrar.php rename to core/App/Container/Registrars/SettingsRegistrar.php diff --git a/lib/App/Container/Registrars/UserRegistrar.php b/core/App/Container/Registrars/UserRegistrar.php similarity index 100% rename from lib/App/Container/Registrars/UserRegistrar.php rename to core/App/Container/Registrars/UserRegistrar.php diff --git a/lib/App/Module/Contracts/EventListener.php b/core/App/Module/Contracts/EventListener.php similarity index 100% rename from lib/App/Module/Contracts/EventListener.php rename to core/App/Module/Contracts/EventListener.php diff --git a/lib/App/Module/Contracts/LayoutContextProvider.php b/core/App/Module/Contracts/LayoutContextProvider.php similarity index 100% rename from lib/App/Module/Contracts/LayoutContextProvider.php rename to core/App/Module/Contracts/LayoutContextProvider.php diff --git a/lib/App/Module/Contracts/ModuleDeactivationHandler.php b/core/App/Module/Contracts/ModuleDeactivationHandler.php similarity index 100% rename from lib/App/Module/Contracts/ModuleDeactivationHandler.php rename to core/App/Module/Contracts/ModuleDeactivationHandler.php diff --git a/lib/App/Module/Contracts/SearchResourceProvider.php b/core/App/Module/Contracts/SearchResourceProvider.php similarity index 100% rename from lib/App/Module/Contracts/SearchResourceProvider.php rename to core/App/Module/Contracts/SearchResourceProvider.php diff --git a/lib/App/Module/Contracts/SessionProvider.php b/core/App/Module/Contracts/SessionProvider.php similarity index 100% rename from lib/App/Module/Contracts/SessionProvider.php rename to core/App/Module/Contracts/SessionProvider.php diff --git a/lib/App/Module/ModuleClassResolver.php b/core/App/Module/ModuleClassResolver.php similarity index 100% rename from lib/App/Module/ModuleClassResolver.php rename to core/App/Module/ModuleClassResolver.php diff --git a/lib/App/Module/ModuleEventDispatcher.php b/core/App/Module/ModuleEventDispatcher.php similarity index 100% rename from lib/App/Module/ModuleEventDispatcher.php rename to core/App/Module/ModuleEventDispatcher.php diff --git a/lib/App/Module/ModuleI18nLoader.php b/core/App/Module/ModuleI18nLoader.php similarity index 100% rename from lib/App/Module/ModuleI18nLoader.php rename to core/App/Module/ModuleI18nLoader.php diff --git a/lib/App/Module/ModuleManifest.php b/core/App/Module/ModuleManifest.php similarity index 100% rename from lib/App/Module/ModuleManifest.php rename to core/App/Module/ModuleManifest.php diff --git a/lib/App/Module/ModuleManifestLoader.php b/core/App/Module/ModuleManifestLoader.php similarity index 100% rename from lib/App/Module/ModuleManifestLoader.php rename to core/App/Module/ModuleManifestLoader.php diff --git a/lib/App/Module/ModuleManifestSchemaValidator.php b/core/App/Module/ModuleManifestSchemaValidator.php similarity index 100% rename from lib/App/Module/ModuleManifestSchemaValidator.php rename to core/App/Module/ModuleManifestSchemaValidator.php diff --git a/lib/App/Module/ModulePermissionSynchronizer.php b/core/App/Module/ModulePermissionSynchronizer.php similarity index 100% rename from lib/App/Module/ModulePermissionSynchronizer.php rename to core/App/Module/ModulePermissionSynchronizer.php diff --git a/lib/App/Module/ModuleRegistry.php b/core/App/Module/ModuleRegistry.php similarity index 100% rename from lib/App/Module/ModuleRegistry.php rename to core/App/Module/ModuleRegistry.php diff --git a/lib/App/Module/ModuleRuntimeAssetPublisher.php b/core/App/Module/ModuleRuntimeAssetPublisher.php similarity index 100% rename from lib/App/Module/ModuleRuntimeAssetPublisher.php rename to core/App/Module/ModuleRuntimeAssetPublisher.php diff --git a/lib/App/Module/ModuleRuntimePageBuilder.php b/core/App/Module/ModuleRuntimePageBuilder.php similarity index 100% rename from lib/App/Module/ModuleRuntimePageBuilder.php rename to core/App/Module/ModuleRuntimePageBuilder.php diff --git a/lib/App/registerContainer.php b/core/App/registerContainer.php similarity index 100% rename from lib/App/registerContainer.php rename to core/App/registerContainer.php diff --git a/lib/Console/Command.php b/core/Console/Command.php similarity index 100% rename from lib/Console/Command.php rename to core/Console/Command.php diff --git a/lib/Console/Commands/DoctorCommand.php b/core/Console/Commands/DoctorCommand.php similarity index 100% rename from lib/Console/Commands/DoctorCommand.php rename to core/Console/Commands/DoctorCommand.php diff --git a/lib/Console/Commands/Make/ModuleCommand.php b/core/Console/Commands/Make/ModuleCommand.php similarity index 100% rename from lib/Console/Commands/Make/ModuleCommand.php rename to core/Console/Commands/Make/ModuleCommand.php diff --git a/lib/Console/Commands/Module/AbstractModuleCommand.php b/core/Console/Commands/Module/AbstractModuleCommand.php similarity index 100% rename from lib/Console/Commands/Module/AbstractModuleCommand.php rename to core/Console/Commands/Module/AbstractModuleCommand.php diff --git a/lib/Console/Commands/Module/AssetsSyncCommand.php b/core/Console/Commands/Module/AssetsSyncCommand.php similarity index 100% rename from lib/Console/Commands/Module/AssetsSyncCommand.php rename to core/Console/Commands/Module/AssetsSyncCommand.php diff --git a/lib/Console/Commands/Module/BuildCommand.php b/core/Console/Commands/Module/BuildCommand.php similarity index 100% rename from lib/Console/Commands/Module/BuildCommand.php rename to core/Console/Commands/Module/BuildCommand.php diff --git a/lib/Console/Commands/Module/DeactivateCommand.php b/core/Console/Commands/Module/DeactivateCommand.php similarity index 100% rename from lib/Console/Commands/Module/DeactivateCommand.php rename to core/Console/Commands/Module/DeactivateCommand.php diff --git a/lib/Console/Commands/Module/MigrateCommand.php b/core/Console/Commands/Module/MigrateCommand.php similarity index 100% rename from lib/Console/Commands/Module/MigrateCommand.php rename to core/Console/Commands/Module/MigrateCommand.php diff --git a/lib/Console/Commands/Module/PermissionsSyncCommand.php b/core/Console/Commands/Module/PermissionsSyncCommand.php similarity index 100% rename from lib/Console/Commands/Module/PermissionsSyncCommand.php rename to core/Console/Commands/Module/PermissionsSyncCommand.php diff --git a/lib/Console/Commands/Module/RuntimeSyncCommand.php b/core/Console/Commands/Module/RuntimeSyncCommand.php similarity index 100% rename from lib/Console/Commands/Module/RuntimeSyncCommand.php rename to core/Console/Commands/Module/RuntimeSyncCommand.php diff --git a/lib/Console/Commands/Module/ValidateCommand.php b/core/Console/Commands/Module/ValidateCommand.php similarity index 100% rename from lib/Console/Commands/Module/ValidateCommand.php rename to core/Console/Commands/Module/ValidateCommand.php diff --git a/lib/Console/Commands/Scheduler/RunCommand.php b/core/Console/Commands/Scheduler/RunCommand.php similarity index 100% rename from lib/Console/Commands/Scheduler/RunCommand.php rename to core/Console/Commands/Scheduler/RunCommand.php diff --git a/lib/Console/ConsoleApplication.php b/core/Console/ConsoleApplication.php similarity index 100% rename from lib/Console/ConsoleApplication.php rename to core/Console/ConsoleApplication.php diff --git a/lib/Console/Runner/Doctor/DoctorRunner.php b/core/Console/Runner/Doctor/DoctorRunner.php similarity index 100% rename from lib/Console/Runner/Doctor/DoctorRunner.php rename to core/Console/Runner/Doctor/DoctorRunner.php diff --git a/lib/Console/Runner/Doctor/DoctorRunnerInterface.php b/core/Console/Runner/Doctor/DoctorRunnerInterface.php similarity index 100% rename from lib/Console/Runner/Doctor/DoctorRunnerInterface.php rename to core/Console/Runner/Doctor/DoctorRunnerInterface.php diff --git a/lib/Console/Runner/Module/ModuleRunner.php b/core/Console/Runner/Module/ModuleRunner.php similarity index 100% rename from lib/Console/Runner/Module/ModuleRunner.php rename to core/Console/Runner/Module/ModuleRunner.php diff --git a/lib/Console/Runner/Module/ModuleRunnerInterface.php b/core/Console/Runner/Module/ModuleRunnerInterface.php similarity index 100% rename from lib/Console/Runner/Module/ModuleRunnerInterface.php rename to core/Console/Runner/Module/ModuleRunnerInterface.php diff --git a/lib/Console/Support/CliAppBootstrap.php b/core/Console/Support/CliAppBootstrap.php similarity index 100% rename from lib/Console/Support/CliAppBootstrap.php rename to core/Console/Support/CliAppBootstrap.php diff --git a/lib/Console/Support/ModuleCliRuntime.php b/core/Console/Support/ModuleCliRuntime.php similarity index 100% rename from lib/Console/Support/ModuleCliRuntime.php rename to core/Console/Support/ModuleCliRuntime.php diff --git a/lib/Domain/Taxonomy/MailLogStatus.php b/core/Domain/Taxonomy/MailLogStatus.php similarity index 100% rename from lib/Domain/Taxonomy/MailLogStatus.php rename to core/Domain/Taxonomy/MailLogStatus.php diff --git a/lib/Domain/Taxonomy/ScheduledJobRunStatus.php b/core/Domain/Taxonomy/ScheduledJobRunStatus.php similarity index 100% rename from lib/Domain/Taxonomy/ScheduledJobRunStatus.php rename to core/Domain/Taxonomy/ScheduledJobRunStatus.php diff --git a/lib/Domain/Taxonomy/ScheduledJobStatus.php b/core/Domain/Taxonomy/ScheduledJobStatus.php similarity index 100% rename from lib/Domain/Taxonomy/ScheduledJobStatus.php rename to core/Domain/Taxonomy/ScheduledJobStatus.php diff --git a/lib/Domain/Taxonomy/ScheduledJobTriggerType.php b/core/Domain/Taxonomy/ScheduledJobTriggerType.php similarity index 100% rename from lib/Domain/Taxonomy/ScheduledJobTriggerType.php rename to core/Domain/Taxonomy/ScheduledJobTriggerType.php diff --git a/lib/Domain/Taxonomy/SchedulerRuntimeResult.php b/core/Domain/Taxonomy/SchedulerRuntimeResult.php similarity index 100% rename from lib/Domain/Taxonomy/SchedulerRuntimeResult.php rename to core/Domain/Taxonomy/SchedulerRuntimeResult.php diff --git a/lib/Domain/Taxonomy/SupportsStringTaxonomy.php b/core/Domain/Taxonomy/SupportsStringTaxonomy.php similarity index 100% rename from lib/Domain/Taxonomy/SupportsStringTaxonomy.php rename to core/Domain/Taxonomy/SupportsStringTaxonomy.php diff --git a/lib/Domain/Taxonomy/TenantStatus.php b/core/Domain/Taxonomy/TenantStatus.php similarity index 100% rename from lib/Domain/Taxonomy/TenantStatus.php rename to core/Domain/Taxonomy/TenantStatus.php diff --git a/lib/Http/AccessControl.php b/core/Http/AccessControl.php similarity index 100% rename from lib/Http/AccessControl.php rename to core/Http/AccessControl.php diff --git a/lib/Http/ApiAuth.php b/core/Http/ApiAuth.php similarity index 100% rename from lib/Http/ApiAuth.php rename to core/Http/ApiAuth.php diff --git a/lib/Http/ApiBootstrap.php b/core/Http/ApiBootstrap.php similarity index 100% rename from lib/Http/ApiBootstrap.php rename to core/Http/ApiBootstrap.php diff --git a/lib/Http/ApiResponse.php b/core/Http/ApiResponse.php similarity index 100% rename from lib/Http/ApiResponse.php rename to core/Http/ApiResponse.php diff --git a/lib/Http/AssetDetector.php b/core/Http/AssetDetector.php similarity index 100% rename from lib/Http/AssetDetector.php rename to core/Http/AssetDetector.php diff --git a/lib/Http/CookieStore.php b/core/Http/CookieStore.php similarity index 100% rename from lib/Http/CookieStore.php rename to core/Http/CookieStore.php diff --git a/lib/Http/CookieStoreInterface.php b/core/Http/CookieStoreInterface.php similarity index 100% rename from lib/Http/CookieStoreInterface.php rename to core/Http/CookieStoreInterface.php diff --git a/lib/Http/ErrorDataCollector.php b/core/Http/ErrorDataCollector.php similarity index 100% rename from lib/Http/ErrorDataCollector.php rename to core/Http/ErrorDataCollector.php diff --git a/lib/Http/ErrorHandler.php b/core/Http/ErrorHandler.php similarity index 100% rename from lib/Http/ErrorHandler.php rename to core/Http/ErrorHandler.php diff --git a/lib/Http/ErrorLogger.php b/core/Http/ErrorLogger.php similarity index 100% rename from lib/Http/ErrorLogger.php rename to core/Http/ErrorLogger.php diff --git a/lib/Http/ErrorRenderer.php b/core/Http/ErrorRenderer.php similarity index 100% rename from lib/Http/ErrorRenderer.php rename to core/Http/ErrorRenderer.php diff --git a/lib/Http/Input/FormErrors.php b/core/Http/Input/FormErrors.php similarity index 100% rename from lib/Http/Input/FormErrors.php rename to core/Http/Input/FormErrors.php diff --git a/lib/Http/Input/RequestInput.php b/core/Http/Input/RequestInput.php similarity index 100% rename from lib/Http/Input/RequestInput.php rename to core/Http/Input/RequestInput.php diff --git a/lib/Http/Input/RequestInputFactory.php b/core/Http/Input/RequestInputFactory.php similarity index 100% rename from lib/Http/Input/RequestInputFactory.php rename to core/Http/Input/RequestInputFactory.php diff --git a/lib/Http/IntendedUrlService.php b/core/Http/IntendedUrlService.php similarity index 100% rename from lib/Http/IntendedUrlService.php rename to core/Http/IntendedUrlService.php diff --git a/lib/Http/LocaleResolver.php b/core/Http/LocaleResolver.php similarity index 100% rename from lib/Http/LocaleResolver.php rename to core/Http/LocaleResolver.php diff --git a/lib/Http/Request.php b/core/Http/Request.php similarity index 100% rename from lib/Http/Request.php rename to core/Http/Request.php diff --git a/lib/Http/RequestContext.php b/core/Http/RequestContext.php similarity index 100% rename from lib/Http/RequestContext.php rename to core/Http/RequestContext.php diff --git a/lib/Http/RequestRuntime.php b/core/Http/RequestRuntime.php similarity index 100% rename from lib/Http/RequestRuntime.php rename to core/Http/RequestRuntime.php diff --git a/lib/Http/RequestRuntimeInterface.php b/core/Http/RequestRuntimeInterface.php similarity index 100% rename from lib/Http/RequestRuntimeInterface.php rename to core/Http/RequestRuntimeInterface.php diff --git a/lib/Http/RouteCatalog.php b/core/Http/RouteCatalog.php similarity index 100% rename from lib/Http/RouteCatalog.php rename to core/Http/RouteCatalog.php diff --git a/lib/Http/RouteRegistrar.php b/core/Http/RouteRegistrar.php similarity index 100% rename from lib/Http/RouteRegistrar.php rename to core/Http/RouteRegistrar.php diff --git a/lib/Http/SessionStore.php b/core/Http/SessionStore.php similarity index 100% rename from lib/Http/SessionStore.php rename to core/Http/SessionStore.php diff --git a/lib/Http/SessionStoreInterface.php b/core/Http/SessionStoreInterface.php similarity index 100% rename from lib/Http/SessionStoreInterface.php rename to core/Http/SessionStoreInterface.php diff --git a/lib/Repository/Access/PermissionRepository.php b/core/Repository/Access/PermissionRepository.php similarity index 100% rename from lib/Repository/Access/PermissionRepository.php rename to core/Repository/Access/PermissionRepository.php diff --git a/lib/Repository/Access/PermissionRepositoryInterface.php b/core/Repository/Access/PermissionRepositoryInterface.php similarity index 100% rename from lib/Repository/Access/PermissionRepositoryInterface.php rename to core/Repository/Access/PermissionRepositoryInterface.php diff --git a/lib/Repository/Access/RoleAssignableRoleRepository.php b/core/Repository/Access/RoleAssignableRoleRepository.php similarity index 100% rename from lib/Repository/Access/RoleAssignableRoleRepository.php rename to core/Repository/Access/RoleAssignableRoleRepository.php diff --git a/lib/Repository/Access/RoleAssignableRoleRepositoryInterface.php b/core/Repository/Access/RoleAssignableRoleRepositoryInterface.php similarity index 100% rename from lib/Repository/Access/RoleAssignableRoleRepositoryInterface.php rename to core/Repository/Access/RoleAssignableRoleRepositoryInterface.php diff --git a/lib/Repository/Access/RolePermissionRepository.php b/core/Repository/Access/RolePermissionRepository.php similarity index 100% rename from lib/Repository/Access/RolePermissionRepository.php rename to core/Repository/Access/RolePermissionRepository.php diff --git a/lib/Repository/Access/RolePermissionRepositoryInterface.php b/core/Repository/Access/RolePermissionRepositoryInterface.php similarity index 100% rename from lib/Repository/Access/RolePermissionRepositoryInterface.php rename to core/Repository/Access/RolePermissionRepositoryInterface.php diff --git a/lib/Repository/Access/RoleRepository.php b/core/Repository/Access/RoleRepository.php similarity index 100% rename from lib/Repository/Access/RoleRepository.php rename to core/Repository/Access/RoleRepository.php diff --git a/lib/Repository/Access/RoleRepositoryInterface.php b/core/Repository/Access/RoleRepositoryInterface.php similarity index 100% rename from lib/Repository/Access/RoleRepositoryInterface.php rename to core/Repository/Access/RoleRepositoryInterface.php diff --git a/lib/Repository/Access/UserRoleRepository.php b/core/Repository/Access/UserRoleRepository.php similarity index 100% rename from lib/Repository/Access/UserRoleRepository.php rename to core/Repository/Access/UserRoleRepository.php diff --git a/lib/Repository/Access/UserRoleRepositoryInterface.php b/core/Repository/Access/UserRoleRepositoryInterface.php similarity index 100% rename from lib/Repository/Access/UserRoleRepositoryInterface.php rename to core/Repository/Access/UserRoleRepositoryInterface.php diff --git a/lib/Repository/Auth/ApiTokenRepository.php b/core/Repository/Auth/ApiTokenRepository.php similarity index 100% rename from lib/Repository/Auth/ApiTokenRepository.php rename to core/Repository/Auth/ApiTokenRepository.php diff --git a/lib/Repository/Auth/ApiTokenRepositoryInterface.php b/core/Repository/Auth/ApiTokenRepositoryInterface.php similarity index 100% rename from lib/Repository/Auth/ApiTokenRepositoryInterface.php rename to core/Repository/Auth/ApiTokenRepositoryInterface.php diff --git a/lib/Repository/Auth/EmailVerificationRepository.php b/core/Repository/Auth/EmailVerificationRepository.php similarity index 100% rename from lib/Repository/Auth/EmailVerificationRepository.php rename to core/Repository/Auth/EmailVerificationRepository.php diff --git a/lib/Repository/Auth/EmailVerificationRepositoryInterface.php b/core/Repository/Auth/EmailVerificationRepositoryInterface.php similarity index 100% rename from lib/Repository/Auth/EmailVerificationRepositoryInterface.php rename to core/Repository/Auth/EmailVerificationRepositoryInterface.php diff --git a/lib/Repository/Auth/PasswordResetRepository.php b/core/Repository/Auth/PasswordResetRepository.php similarity index 100% rename from lib/Repository/Auth/PasswordResetRepository.php rename to core/Repository/Auth/PasswordResetRepository.php diff --git a/lib/Repository/Auth/PasswordResetRepositoryInterface.php b/core/Repository/Auth/PasswordResetRepositoryInterface.php similarity index 100% rename from lib/Repository/Auth/PasswordResetRepositoryInterface.php rename to core/Repository/Auth/PasswordResetRepositoryInterface.php diff --git a/lib/Repository/Auth/RememberTokenRepository.php b/core/Repository/Auth/RememberTokenRepository.php similarity index 100% rename from lib/Repository/Auth/RememberTokenRepository.php rename to core/Repository/Auth/RememberTokenRepository.php diff --git a/lib/Repository/Auth/RememberTokenRepositoryInterface.php b/core/Repository/Auth/RememberTokenRepositoryInterface.php similarity index 100% rename from lib/Repository/Auth/RememberTokenRepositoryInterface.php rename to core/Repository/Auth/RememberTokenRepositoryInterface.php diff --git a/lib/Repository/Content/PageContentRepository.php b/core/Repository/Content/PageContentRepository.php similarity index 100% rename from lib/Repository/Content/PageContentRepository.php rename to core/Repository/Content/PageContentRepository.php diff --git a/lib/Repository/Content/PageRepository.php b/core/Repository/Content/PageRepository.php similarity index 100% rename from lib/Repository/Content/PageRepository.php rename to core/Repository/Content/PageRepository.php diff --git a/lib/Repository/CustomField/TenantCustomFieldDefinitionRepository.php b/core/Repository/CustomField/TenantCustomFieldDefinitionRepository.php similarity index 100% rename from lib/Repository/CustomField/TenantCustomFieldDefinitionRepository.php rename to core/Repository/CustomField/TenantCustomFieldDefinitionRepository.php diff --git a/lib/Repository/CustomField/TenantCustomFieldOptionRepository.php b/core/Repository/CustomField/TenantCustomFieldOptionRepository.php similarity index 100% rename from lib/Repository/CustomField/TenantCustomFieldOptionRepository.php rename to core/Repository/CustomField/TenantCustomFieldOptionRepository.php diff --git a/lib/Repository/CustomField/UserCustomFieldValueOptionRepository.php b/core/Repository/CustomField/UserCustomFieldValueOptionRepository.php similarity index 100% rename from lib/Repository/CustomField/UserCustomFieldValueOptionRepository.php rename to core/Repository/CustomField/UserCustomFieldValueOptionRepository.php diff --git a/lib/Repository/CustomField/UserCustomFieldValueRepository.php b/core/Repository/CustomField/UserCustomFieldValueRepository.php similarity index 100% rename from lib/Repository/CustomField/UserCustomFieldValueRepository.php rename to core/Repository/CustomField/UserCustomFieldValueRepository.php diff --git a/lib/Repository/Mail/MailLogRepository.php b/core/Repository/Mail/MailLogRepository.php similarity index 100% rename from lib/Repository/Mail/MailLogRepository.php rename to core/Repository/Mail/MailLogRepository.php diff --git a/lib/Repository/Mail/MailLogRepositoryInterface.php b/core/Repository/Mail/MailLogRepositoryInterface.php similarity index 100% rename from lib/Repository/Mail/MailLogRepositoryInterface.php rename to core/Repository/Mail/MailLogRepositoryInterface.php diff --git a/lib/Repository/Module/ModuleMigrationRepository.php b/core/Repository/Module/ModuleMigrationRepository.php similarity index 100% rename from lib/Repository/Module/ModuleMigrationRepository.php rename to core/Repository/Module/ModuleMigrationRepository.php diff --git a/lib/Repository/Module/ModuleMigrationRepositoryInterface.php b/core/Repository/Module/ModuleMigrationRepositoryInterface.php similarity index 100% rename from lib/Repository/Module/ModuleMigrationRepositoryInterface.php rename to core/Repository/Module/ModuleMigrationRepositoryInterface.php diff --git a/lib/Repository/Org/DepartmentRepository.php b/core/Repository/Org/DepartmentRepository.php similarity index 100% rename from lib/Repository/Org/DepartmentRepository.php rename to core/Repository/Org/DepartmentRepository.php diff --git a/lib/Repository/Org/DepartmentRepositoryInterface.php b/core/Repository/Org/DepartmentRepositoryInterface.php similarity index 100% rename from lib/Repository/Org/DepartmentRepositoryInterface.php rename to core/Repository/Org/DepartmentRepositoryInterface.php diff --git a/lib/Repository/Org/UserDepartmentRepository.php b/core/Repository/Org/UserDepartmentRepository.php similarity index 100% rename from lib/Repository/Org/UserDepartmentRepository.php rename to core/Repository/Org/UserDepartmentRepository.php diff --git a/lib/Repository/Org/UserDepartmentRepositoryInterface.php b/core/Repository/Org/UserDepartmentRepositoryInterface.php similarity index 100% rename from lib/Repository/Org/UserDepartmentRepositoryInterface.php rename to core/Repository/Org/UserDepartmentRepositoryInterface.php diff --git a/lib/Repository/Scheduler/ScheduledJobRepository.php b/core/Repository/Scheduler/ScheduledJobRepository.php similarity index 100% rename from lib/Repository/Scheduler/ScheduledJobRepository.php rename to core/Repository/Scheduler/ScheduledJobRepository.php diff --git a/lib/Repository/Scheduler/ScheduledJobRepositoryInterface.php b/core/Repository/Scheduler/ScheduledJobRepositoryInterface.php similarity index 100% rename from lib/Repository/Scheduler/ScheduledJobRepositoryInterface.php rename to core/Repository/Scheduler/ScheduledJobRepositoryInterface.php diff --git a/lib/Repository/Scheduler/ScheduledJobRunRepository.php b/core/Repository/Scheduler/ScheduledJobRunRepository.php similarity index 100% rename from lib/Repository/Scheduler/ScheduledJobRunRepository.php rename to core/Repository/Scheduler/ScheduledJobRunRepository.php diff --git a/lib/Repository/Scheduler/ScheduledJobRunRepositoryInterface.php b/core/Repository/Scheduler/ScheduledJobRunRepositoryInterface.php similarity index 100% rename from lib/Repository/Scheduler/ScheduledJobRunRepositoryInterface.php rename to core/Repository/Scheduler/ScheduledJobRunRepositoryInterface.php diff --git a/lib/Repository/Scheduler/SchedulerRuntimeRepository.php b/core/Repository/Scheduler/SchedulerRuntimeRepository.php similarity index 100% rename from lib/Repository/Scheduler/SchedulerRuntimeRepository.php rename to core/Repository/Scheduler/SchedulerRuntimeRepository.php diff --git a/lib/Repository/Scheduler/SchedulerRuntimeRepositoryInterface.php b/core/Repository/Scheduler/SchedulerRuntimeRepositoryInterface.php similarity index 100% rename from lib/Repository/Scheduler/SchedulerRuntimeRepositoryInterface.php rename to core/Repository/Scheduler/SchedulerRuntimeRepositoryInterface.php diff --git a/lib/Repository/Search/SearchQueryRepository.php b/core/Repository/Search/SearchQueryRepository.php similarity index 100% rename from lib/Repository/Search/SearchQueryRepository.php rename to core/Repository/Search/SearchQueryRepository.php diff --git a/lib/Repository/Search/SearchQueryRepositoryInterface.php b/core/Repository/Search/SearchQueryRepositoryInterface.php similarity index 100% rename from lib/Repository/Search/SearchQueryRepositoryInterface.php rename to core/Repository/Search/SearchQueryRepositoryInterface.php diff --git a/lib/Repository/Security/RateLimitRepository.php b/core/Repository/Security/RateLimitRepository.php similarity index 100% rename from lib/Repository/Security/RateLimitRepository.php rename to core/Repository/Security/RateLimitRepository.php diff --git a/lib/Repository/Security/RateLimitRepositoryInterface.php b/core/Repository/Security/RateLimitRepositoryInterface.php similarity index 100% rename from lib/Repository/Security/RateLimitRepositoryInterface.php rename to core/Repository/Security/RateLimitRepositoryInterface.php diff --git a/lib/Repository/Settings/SettingRepository.php b/core/Repository/Settings/SettingRepository.php similarity index 100% rename from lib/Repository/Settings/SettingRepository.php rename to core/Repository/Settings/SettingRepository.php diff --git a/lib/Repository/Settings/SettingRepositoryInterface.php b/core/Repository/Settings/SettingRepositoryInterface.php similarity index 100% rename from lib/Repository/Settings/SettingRepositoryInterface.php rename to core/Repository/Settings/SettingRepositoryInterface.php diff --git a/lib/Repository/Stats/AdminStatsRepository.php b/core/Repository/Stats/AdminStatsRepository.php similarity index 100% rename from lib/Repository/Stats/AdminStatsRepository.php rename to core/Repository/Stats/AdminStatsRepository.php diff --git a/lib/Repository/Stats/AdminStatsRepositoryInterface.php b/core/Repository/Stats/AdminStatsRepositoryInterface.php similarity index 100% rename from lib/Repository/Stats/AdminStatsRepositoryInterface.php rename to core/Repository/Stats/AdminStatsRepositoryInterface.php diff --git a/lib/Repository/Support/DatabaseSessionRepository.php b/core/Repository/Support/DatabaseSessionRepository.php similarity index 100% rename from lib/Repository/Support/DatabaseSessionRepository.php rename to core/Repository/Support/DatabaseSessionRepository.php diff --git a/lib/Repository/Support/DatabaseSessionRepositoryInterface.php b/core/Repository/Support/DatabaseSessionRepositoryInterface.php similarity index 100% rename from lib/Repository/Support/DatabaseSessionRepositoryInterface.php rename to core/Repository/Support/DatabaseSessionRepositoryInterface.php diff --git a/lib/Repository/Support/RepoQuery.php b/core/Repository/Support/RepoQuery.php similarity index 100% rename from lib/Repository/Support/RepoQuery.php rename to core/Repository/Support/RepoQuery.php diff --git a/lib/Repository/Support/RepositoryArrayHelper.php b/core/Repository/Support/RepositoryArrayHelper.php similarity index 100% rename from lib/Repository/Support/RepositoryArrayHelper.php rename to core/Repository/Support/RepositoryArrayHelper.php diff --git a/lib/Repository/System/SystemHealthRepository.php b/core/Repository/System/SystemHealthRepository.php similarity index 100% rename from lib/Repository/System/SystemHealthRepository.php rename to core/Repository/System/SystemHealthRepository.php diff --git a/lib/Repository/System/SystemHealthRepositoryInterface.php b/core/Repository/System/SystemHealthRepositoryInterface.php similarity index 100% rename from lib/Repository/System/SystemHealthRepositoryInterface.php rename to core/Repository/System/SystemHealthRepositoryInterface.php diff --git a/lib/Repository/Tenant/TenantLdapAuthRepository.php b/core/Repository/Tenant/TenantLdapAuthRepository.php similarity index 100% rename from lib/Repository/Tenant/TenantLdapAuthRepository.php rename to core/Repository/Tenant/TenantLdapAuthRepository.php diff --git a/lib/Repository/Tenant/TenantLdapAuthRepositoryInterface.php b/core/Repository/Tenant/TenantLdapAuthRepositoryInterface.php similarity index 100% rename from lib/Repository/Tenant/TenantLdapAuthRepositoryInterface.php rename to core/Repository/Tenant/TenantLdapAuthRepositoryInterface.php diff --git a/lib/Repository/Tenant/TenantMicrosoftAuthRepository.php b/core/Repository/Tenant/TenantMicrosoftAuthRepository.php similarity index 100% rename from lib/Repository/Tenant/TenantMicrosoftAuthRepository.php rename to core/Repository/Tenant/TenantMicrosoftAuthRepository.php diff --git a/lib/Repository/Tenant/TenantMicrosoftAuthRepositoryInterface.php b/core/Repository/Tenant/TenantMicrosoftAuthRepositoryInterface.php similarity index 100% rename from lib/Repository/Tenant/TenantMicrosoftAuthRepositoryInterface.php rename to core/Repository/Tenant/TenantMicrosoftAuthRepositoryInterface.php diff --git a/lib/Repository/Tenant/TenantRepository.php b/core/Repository/Tenant/TenantRepository.php similarity index 100% rename from lib/Repository/Tenant/TenantRepository.php rename to core/Repository/Tenant/TenantRepository.php diff --git a/lib/Repository/Tenant/TenantRepositoryInterface.php b/core/Repository/Tenant/TenantRepositoryInterface.php similarity index 100% rename from lib/Repository/Tenant/TenantRepositoryInterface.php rename to core/Repository/Tenant/TenantRepositoryInterface.php diff --git a/lib/Repository/Tenant/UserTenantRepository.php b/core/Repository/Tenant/UserTenantRepository.php similarity index 100% rename from lib/Repository/Tenant/UserTenantRepository.php rename to core/Repository/Tenant/UserTenantRepository.php diff --git a/lib/Repository/Tenant/UserTenantRepositoryInterface.php b/core/Repository/Tenant/UserTenantRepositoryInterface.php similarity index 100% rename from lib/Repository/Tenant/UserTenantRepositoryInterface.php rename to core/Repository/Tenant/UserTenantRepositoryInterface.php diff --git a/lib/Repository/User/UserExternalIdentityRepository.php b/core/Repository/User/UserExternalIdentityRepository.php similarity index 100% rename from lib/Repository/User/UserExternalIdentityRepository.php rename to core/Repository/User/UserExternalIdentityRepository.php diff --git a/lib/Repository/User/UserExternalIdentityRepositoryInterface.php b/core/Repository/User/UserExternalIdentityRepositoryInterface.php similarity index 100% rename from lib/Repository/User/UserExternalIdentityRepositoryInterface.php rename to core/Repository/User/UserExternalIdentityRepositoryInterface.php diff --git a/lib/Repository/User/UserListQueryRepository.php b/core/Repository/User/UserListQueryRepository.php similarity index 100% rename from lib/Repository/User/UserListQueryRepository.php rename to core/Repository/User/UserListQueryRepository.php diff --git a/lib/Repository/User/UserListQueryRepositoryInterface.php b/core/Repository/User/UserListQueryRepositoryInterface.php similarity index 100% rename from lib/Repository/User/UserListQueryRepositoryInterface.php rename to core/Repository/User/UserListQueryRepositoryInterface.php diff --git a/lib/Repository/User/UserReadRepository.php b/core/Repository/User/UserReadRepository.php similarity index 100% rename from lib/Repository/User/UserReadRepository.php rename to core/Repository/User/UserReadRepository.php diff --git a/lib/Repository/User/UserReadRepositoryInterface.php b/core/Repository/User/UserReadRepositoryInterface.php similarity index 100% rename from lib/Repository/User/UserReadRepositoryInterface.php rename to core/Repository/User/UserReadRepositoryInterface.php diff --git a/lib/Repository/User/UserWriteRepository.php b/core/Repository/User/UserWriteRepository.php similarity index 100% rename from lib/Repository/User/UserWriteRepository.php rename to core/Repository/User/UserWriteRepository.php diff --git a/lib/Repository/User/UserWriteRepositoryInterface.php b/core/Repository/User/UserWriteRepositoryInterface.php similarity index 100% rename from lib/Repository/User/UserWriteRepositoryInterface.php rename to core/Repository/User/UserWriteRepositoryInterface.php diff --git a/lib/Service/Access/AccessGatewayFactory.php b/core/Service/Access/AccessGatewayFactory.php similarity index 100% rename from lib/Service/Access/AccessGatewayFactory.php rename to core/Service/Access/AccessGatewayFactory.php diff --git a/lib/Service/Access/AccessPolicyFactory.php b/core/Service/Access/AccessPolicyFactory.php similarity index 100% rename from lib/Service/Access/AccessPolicyFactory.php rename to core/Service/Access/AccessPolicyFactory.php diff --git a/lib/Service/Access/AccessRepositoryFactory.php b/core/Service/Access/AccessRepositoryFactory.php similarity index 100% rename from lib/Service/Access/AccessRepositoryFactory.php rename to core/Service/Access/AccessRepositoryFactory.php diff --git a/lib/Service/Access/AccessServicesFactory.php b/core/Service/Access/AccessServicesFactory.php similarity index 100% rename from lib/Service/Access/AccessServicesFactory.php rename to core/Service/Access/AccessServicesFactory.php diff --git a/lib/Service/Access/AssignableRoleService.php b/core/Service/Access/AssignableRoleService.php similarity index 100% rename from lib/Service/Access/AssignableRoleService.php rename to core/Service/Access/AssignableRoleService.php diff --git a/lib/Service/Access/AuthorizationDecision.php b/core/Service/Access/AuthorizationDecision.php similarity index 100% rename from lib/Service/Access/AuthorizationDecision.php rename to core/Service/Access/AuthorizationDecision.php diff --git a/lib/Service/Access/AuthorizationPolicyContextTrait.php b/core/Service/Access/AuthorizationPolicyContextTrait.php similarity index 100% rename from lib/Service/Access/AuthorizationPolicyContextTrait.php rename to core/Service/Access/AuthorizationPolicyContextTrait.php diff --git a/lib/Service/Access/AuthorizationPolicyInterface.php b/core/Service/Access/AuthorizationPolicyInterface.php similarity index 100% rename from lib/Service/Access/AuthorizationPolicyInterface.php rename to core/Service/Access/AuthorizationPolicyInterface.php diff --git a/lib/Service/Access/AuthorizationService.php b/core/Service/Access/AuthorizationService.php similarity index 100% rename from lib/Service/Access/AuthorizationService.php rename to core/Service/Access/AuthorizationService.php diff --git a/lib/Service/Access/DepartmentAuthorizationPolicy.php b/core/Service/Access/DepartmentAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/DepartmentAuthorizationPolicy.php rename to core/Service/Access/DepartmentAuthorizationPolicy.php diff --git a/lib/Service/Access/OperationsAuthorizationPolicy.php b/core/Service/Access/OperationsAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/OperationsAuthorizationPolicy.php rename to core/Service/Access/OperationsAuthorizationPolicy.php diff --git a/lib/Service/Access/PermissionAuthorizationPolicy.php b/core/Service/Access/PermissionAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/PermissionAuthorizationPolicy.php rename to core/Service/Access/PermissionAuthorizationPolicy.php diff --git a/lib/Service/Access/PermissionService.php b/core/Service/Access/PermissionService.php similarity index 100% rename from lib/Service/Access/PermissionService.php rename to core/Service/Access/PermissionService.php diff --git a/lib/Service/Access/RoleAuthorizationPolicy.php b/core/Service/Access/RoleAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/RoleAuthorizationPolicy.php rename to core/Service/Access/RoleAuthorizationPolicy.php diff --git a/lib/Service/Access/RoleService.php b/core/Service/Access/RoleService.php similarity index 100% rename from lib/Service/Access/RoleService.php rename to core/Service/Access/RoleService.php diff --git a/lib/Service/Access/SettingsAuthorizationPolicy.php b/core/Service/Access/SettingsAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/SettingsAuthorizationPolicy.php rename to core/Service/Access/SettingsAuthorizationPolicy.php diff --git a/lib/Service/Access/TenantAuthorizationPolicy.php b/core/Service/Access/TenantAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/TenantAuthorizationPolicy.php rename to core/Service/Access/TenantAuthorizationPolicy.php diff --git a/lib/Service/Access/UiAccessService.php b/core/Service/Access/UiAccessService.php similarity index 100% rename from lib/Service/Access/UiAccessService.php rename to core/Service/Access/UiAccessService.php diff --git a/lib/Service/Access/UiCapabilityMap.php b/core/Service/Access/UiCapabilityMap.php similarity index 100% rename from lib/Service/Access/UiCapabilityMap.php rename to core/Service/Access/UiCapabilityMap.php diff --git a/lib/Service/Access/UserAuthorizationPolicy.php b/core/Service/Access/UserAuthorizationPolicy.php similarity index 100% rename from lib/Service/Access/UserAuthorizationPolicy.php rename to core/Service/Access/UserAuthorizationPolicy.php diff --git a/lib/Service/Audit/ApiAuditServiceInterface.php b/core/Service/Audit/ApiAuditServiceInterface.php similarity index 100% rename from lib/Service/Audit/ApiAuditServiceInterface.php rename to core/Service/Audit/ApiAuditServiceInterface.php diff --git a/lib/Service/Audit/ApiSystemAuditReporterInterface.php b/core/Service/Audit/ApiSystemAuditReporterInterface.php similarity index 100% rename from lib/Service/Audit/ApiSystemAuditReporterInterface.php rename to core/Service/Audit/ApiSystemAuditReporterInterface.php diff --git a/lib/Service/Audit/AuditMetadataEnricherInterface.php b/core/Service/Audit/AuditMetadataEnricherInterface.php similarity index 100% rename from lib/Service/Audit/AuditMetadataEnricherInterface.php rename to core/Service/Audit/AuditMetadataEnricherInterface.php diff --git a/lib/Service/Audit/AuditRecorderInterface.php b/core/Service/Audit/AuditRecorderInterface.php similarity index 100% rename from lib/Service/Audit/AuditRecorderInterface.php rename to core/Service/Audit/AuditRecorderInterface.php diff --git a/lib/Service/Audit/ImportAuditInterface.php b/core/Service/Audit/ImportAuditInterface.php similarity index 100% rename from lib/Service/Audit/ImportAuditInterface.php rename to core/Service/Audit/ImportAuditInterface.php diff --git a/lib/Service/Audit/NullApiAuditService.php b/core/Service/Audit/NullApiAuditService.php similarity index 100% rename from lib/Service/Audit/NullApiAuditService.php rename to core/Service/Audit/NullApiAuditService.php diff --git a/lib/Service/Audit/NullApiSystemAuditReporter.php b/core/Service/Audit/NullApiSystemAuditReporter.php similarity index 100% rename from lib/Service/Audit/NullApiSystemAuditReporter.php rename to core/Service/Audit/NullApiSystemAuditReporter.php diff --git a/lib/Service/Audit/NullAuditMetadataEnricher.php b/core/Service/Audit/NullAuditMetadataEnricher.php similarity index 100% rename from lib/Service/Audit/NullAuditMetadataEnricher.php rename to core/Service/Audit/NullAuditMetadataEnricher.php diff --git a/lib/Service/Audit/NullAuditRecorder.php b/core/Service/Audit/NullAuditRecorder.php similarity index 100% rename from lib/Service/Audit/NullAuditRecorder.php rename to core/Service/Audit/NullAuditRecorder.php diff --git a/lib/Service/Audit/NullImportAudit.php b/core/Service/Audit/NullImportAudit.php similarity index 100% rename from lib/Service/Audit/NullImportAudit.php rename to core/Service/Audit/NullImportAudit.php diff --git a/lib/Service/Audit/NullUserLifecycleAudit.php b/core/Service/Audit/NullUserLifecycleAudit.php similarity index 100% rename from lib/Service/Audit/NullUserLifecycleAudit.php rename to core/Service/Audit/NullUserLifecycleAudit.php diff --git a/lib/Service/Audit/UserLifecycleAuditInterface.php b/core/Service/Audit/UserLifecycleAuditInterface.php similarity index 100% rename from lib/Service/Audit/UserLifecycleAuditInterface.php rename to core/Service/Audit/UserLifecycleAuditInterface.php diff --git a/lib/Service/Auth/ApiTokenEndpointService.php b/core/Service/Auth/ApiTokenEndpointService.php similarity index 100% rename from lib/Service/Auth/ApiTokenEndpointService.php rename to core/Service/Auth/ApiTokenEndpointService.php diff --git a/lib/Service/Auth/ApiTokenService.php b/core/Service/Auth/ApiTokenService.php similarity index 100% rename from lib/Service/Auth/ApiTokenService.php rename to core/Service/Auth/ApiTokenService.php diff --git a/lib/Service/Auth/AuthCryptoGateway.php b/core/Service/Auth/AuthCryptoGateway.php similarity index 100% rename from lib/Service/Auth/AuthCryptoGateway.php rename to core/Service/Auth/AuthCryptoGateway.php diff --git a/lib/Service/Auth/AuthExternalIdentityGateway.php b/core/Service/Auth/AuthExternalIdentityGateway.php similarity index 100% rename from lib/Service/Auth/AuthExternalIdentityGateway.php rename to core/Service/Auth/AuthExternalIdentityGateway.php diff --git a/lib/Service/Auth/AuthGatewayFactory.php b/core/Service/Auth/AuthGatewayFactory.php similarity index 100% rename from lib/Service/Auth/AuthGatewayFactory.php rename to core/Service/Auth/AuthGatewayFactory.php diff --git a/lib/Service/Auth/AuthRepositoryFactory.php b/core/Service/Auth/AuthRepositoryFactory.php similarity index 100% rename from lib/Service/Auth/AuthRepositoryFactory.php rename to core/Service/Auth/AuthRepositoryFactory.php diff --git a/lib/Service/Auth/AuthService.php b/core/Service/Auth/AuthService.php similarity index 100% rename from lib/Service/Auth/AuthService.php rename to core/Service/Auth/AuthService.php diff --git a/lib/Service/Auth/AuthServicesFactory.php b/core/Service/Auth/AuthServicesFactory.php similarity index 100% rename from lib/Service/Auth/AuthServicesFactory.php rename to core/Service/Auth/AuthServicesFactory.php diff --git a/lib/Service/Auth/AuthSessionTenantContextService.php b/core/Service/Auth/AuthSessionTenantContextService.php similarity index 100% rename from lib/Service/Auth/AuthSessionTenantContextService.php rename to core/Service/Auth/AuthSessionTenantContextService.php diff --git a/lib/Service/Auth/AuthSettingsGateway.php b/core/Service/Auth/AuthSettingsGateway.php similarity index 100% rename from lib/Service/Auth/AuthSettingsGateway.php rename to core/Service/Auth/AuthSettingsGateway.php diff --git a/lib/Service/Auth/AuthTenantGateway.php b/core/Service/Auth/AuthTenantGateway.php similarity index 100% rename from lib/Service/Auth/AuthTenantGateway.php rename to core/Service/Auth/AuthTenantGateway.php diff --git a/lib/Service/Auth/EmailVerificationService.php b/core/Service/Auth/EmailVerificationService.php similarity index 100% rename from lib/Service/Auth/EmailVerificationService.php rename to core/Service/Auth/EmailVerificationService.php diff --git a/lib/Service/Auth/LdapAuthService.php b/core/Service/Auth/LdapAuthService.php similarity index 100% rename from lib/Service/Auth/LdapAuthService.php rename to core/Service/Auth/LdapAuthService.php diff --git a/lib/Service/Auth/LdapConnectionGateway.php b/core/Service/Auth/LdapConnectionGateway.php similarity index 100% rename from lib/Service/Auth/LdapConnectionGateway.php rename to core/Service/Auth/LdapConnectionGateway.php diff --git a/lib/Service/Auth/MicrosoftOidcService.php b/core/Service/Auth/MicrosoftOidcService.php similarity index 100% rename from lib/Service/Auth/MicrosoftOidcService.php rename to core/Service/Auth/MicrosoftOidcService.php diff --git a/lib/Service/Auth/MicrosoftOidcStateStoreService.php b/core/Service/Auth/MicrosoftOidcStateStoreService.php similarity index 100% rename from lib/Service/Auth/MicrosoftOidcStateStoreService.php rename to core/Service/Auth/MicrosoftOidcStateStoreService.php diff --git a/lib/Service/Auth/OidcHttpGateway.php b/core/Service/Auth/OidcHttpGateway.php similarity index 100% rename from lib/Service/Auth/OidcHttpGateway.php rename to core/Service/Auth/OidcHttpGateway.php diff --git a/lib/Service/Auth/PasswordResetService.php b/core/Service/Auth/PasswordResetService.php similarity index 100% rename from lib/Service/Auth/PasswordResetService.php rename to core/Service/Auth/PasswordResetService.php diff --git a/lib/Service/Auth/RememberMeRateLimiter.php b/core/Service/Auth/RememberMeRateLimiter.php similarity index 100% rename from lib/Service/Auth/RememberMeRateLimiter.php rename to core/Service/Auth/RememberMeRateLimiter.php diff --git a/lib/Service/Auth/RememberMeService.php b/core/Service/Auth/RememberMeService.php similarity index 100% rename from lib/Service/Auth/RememberMeService.php rename to core/Service/Auth/RememberMeService.php diff --git a/lib/Service/Auth/SsoUserLinkService.php b/core/Service/Auth/SsoUserLinkService.php similarity index 100% rename from lib/Service/Auth/SsoUserLinkService.php rename to core/Service/Auth/SsoUserLinkService.php diff --git a/lib/Service/Auth/TenantSsoService.php b/core/Service/Auth/TenantSsoService.php similarity index 100% rename from lib/Service/Auth/TenantSsoService.php rename to core/Service/Auth/TenantSsoService.php diff --git a/lib/Service/Branding/BrandingFaviconService.php b/core/Service/Branding/BrandingFaviconService.php similarity index 100% rename from lib/Service/Branding/BrandingFaviconService.php rename to core/Service/Branding/BrandingFaviconService.php diff --git a/lib/Service/Branding/BrandingLogoService.php b/core/Service/Branding/BrandingLogoService.php similarity index 100% rename from lib/Service/Branding/BrandingLogoService.php rename to core/Service/Branding/BrandingLogoService.php diff --git a/lib/Service/Branding/BrandingServicesFactory.php b/core/Service/Branding/BrandingServicesFactory.php similarity index 100% rename from lib/Service/Branding/BrandingServicesFactory.php rename to core/Service/Branding/BrandingServicesFactory.php diff --git a/lib/Service/Content/PageService.php b/core/Service/Content/PageService.php similarity index 100% rename from lib/Service/Content/PageService.php rename to core/Service/Content/PageService.php diff --git a/lib/Service/CustomField/CustomFieldServicesFactory.php b/core/Service/CustomField/CustomFieldServicesFactory.php similarity index 100% rename from lib/Service/CustomField/CustomFieldServicesFactory.php rename to core/Service/CustomField/CustomFieldServicesFactory.php diff --git a/lib/Service/CustomField/TenantCustomFieldService.php b/core/Service/CustomField/TenantCustomFieldService.php similarity index 100% rename from lib/Service/CustomField/TenantCustomFieldService.php rename to core/Service/CustomField/TenantCustomFieldService.php diff --git a/lib/Service/CustomField/UserCustomFieldValueService.php b/core/Service/CustomField/UserCustomFieldValueService.php similarity index 100% rename from lib/Service/CustomField/UserCustomFieldValueService.php rename to core/Service/CustomField/UserCustomFieldValueService.php diff --git a/lib/Service/Data/GridUserCountEnricher.php b/core/Service/Data/GridUserCountEnricher.php similarity index 100% rename from lib/Service/Data/GridUserCountEnricher.php rename to core/Service/Data/GridUserCountEnricher.php diff --git a/lib/Service/Directory/DirectoryGatewayFactory.php b/core/Service/Directory/DirectoryGatewayFactory.php similarity index 100% rename from lib/Service/Directory/DirectoryGatewayFactory.php rename to core/Service/Directory/DirectoryGatewayFactory.php diff --git a/lib/Service/Directory/DirectoryRepositoryFactory.php b/core/Service/Directory/DirectoryRepositoryFactory.php similarity index 100% rename from lib/Service/Directory/DirectoryRepositoryFactory.php rename to core/Service/Directory/DirectoryRepositoryFactory.php diff --git a/lib/Service/Directory/DirectoryServicesFactory.php b/core/Service/Directory/DirectoryServicesFactory.php similarity index 100% rename from lib/Service/Directory/DirectoryServicesFactory.php rename to core/Service/Directory/DirectoryServicesFactory.php diff --git a/lib/Service/Directory/DirectorySettingsGateway.php b/core/Service/Directory/DirectorySettingsGateway.php similarity index 100% rename from lib/Service/Directory/DirectorySettingsGateway.php rename to core/Service/Directory/DirectorySettingsGateway.php diff --git a/lib/Service/Docs/DocsCatalogService.php b/core/Service/Docs/DocsCatalogService.php similarity index 100% rename from lib/Service/Docs/DocsCatalogService.php rename to core/Service/Docs/DocsCatalogService.php diff --git a/lib/Service/I18n/ServiceTranslator.php b/core/Service/I18n/ServiceTranslator.php similarity index 100% rename from lib/Service/I18n/ServiceTranslator.php rename to core/Service/I18n/ServiceTranslator.php diff --git a/lib/Service/I18n/TranslatesServiceText.php b/core/Service/I18n/TranslatesServiceText.php similarity index 100% rename from lib/Service/I18n/TranslatesServiceText.php rename to core/Service/I18n/TranslatesServiceText.php diff --git a/lib/Service/Image/ImageUploadTrait.php b/core/Service/Image/ImageUploadTrait.php similarity index 100% rename from lib/Service/Image/ImageUploadTrait.php rename to core/Service/Image/ImageUploadTrait.php diff --git a/lib/Service/Import/CsvReaderService.php b/core/Service/Import/CsvReaderService.php similarity index 100% rename from lib/Service/Import/CsvReaderService.php rename to core/Service/Import/CsvReaderService.php diff --git a/lib/Service/Import/ImportRepositoryFactory.php b/core/Service/Import/ImportRepositoryFactory.php similarity index 100% rename from lib/Service/Import/ImportRepositoryFactory.php rename to core/Service/Import/ImportRepositoryFactory.php diff --git a/lib/Service/Import/ImportService.php b/core/Service/Import/ImportService.php similarity index 100% rename from lib/Service/Import/ImportService.php rename to core/Service/Import/ImportService.php diff --git a/lib/Service/Import/ImportServicesFactory.php b/core/Service/Import/ImportServicesFactory.php similarity index 100% rename from lib/Service/Import/ImportServicesFactory.php rename to core/Service/Import/ImportServicesFactory.php diff --git a/lib/Service/Import/ImportStateStoreService.php b/core/Service/Import/ImportStateStoreService.php similarity index 100% rename from lib/Service/Import/ImportStateStoreService.php rename to core/Service/Import/ImportStateStoreService.php diff --git a/lib/Service/Import/ImportTempFileService.php b/core/Service/Import/ImportTempFileService.php similarity index 100% rename from lib/Service/Import/ImportTempFileService.php rename to core/Service/Import/ImportTempFileService.php diff --git a/lib/Service/Import/Profile/DepartmentImportGateway.php b/core/Service/Import/Profile/DepartmentImportGateway.php similarity index 100% rename from lib/Service/Import/Profile/DepartmentImportGateway.php rename to core/Service/Import/Profile/DepartmentImportGateway.php diff --git a/lib/Service/Import/Profile/DepartmentImportProfile.php b/core/Service/Import/Profile/DepartmentImportProfile.php similarity index 100% rename from lib/Service/Import/Profile/DepartmentImportProfile.php rename to core/Service/Import/Profile/DepartmentImportProfile.php diff --git a/lib/Service/Import/Profile/ImportProfileInterface.php b/core/Service/Import/Profile/ImportProfileInterface.php similarity index 100% rename from lib/Service/Import/Profile/ImportProfileInterface.php rename to core/Service/Import/Profile/ImportProfileInterface.php diff --git a/lib/Service/Import/Profile/UserImportGateway.php b/core/Service/Import/Profile/UserImportGateway.php similarity index 100% rename from lib/Service/Import/Profile/UserImportGateway.php rename to core/Service/Import/Profile/UserImportGateway.php diff --git a/lib/Service/Import/Profile/UserImportProfile.php b/core/Service/Import/Profile/UserImportProfile.php similarity index 100% rename from lib/Service/Import/Profile/UserImportProfile.php rename to core/Service/Import/Profile/UserImportProfile.php diff --git a/lib/Service/Mail/MailLogService.php b/core/Service/Mail/MailLogService.php similarity index 100% rename from lib/Service/Mail/MailLogService.php rename to core/Service/Mail/MailLogService.php diff --git a/lib/Service/Mail/MailRepositoryFactory.php b/core/Service/Mail/MailRepositoryFactory.php similarity index 100% rename from lib/Service/Mail/MailRepositoryFactory.php rename to core/Service/Mail/MailRepositoryFactory.php diff --git a/lib/Service/Mail/MailService.php b/core/Service/Mail/MailService.php similarity index 100% rename from lib/Service/Mail/MailService.php rename to core/Service/Mail/MailService.php diff --git a/lib/Service/Mail/MailServicesFactory.php b/core/Service/Mail/MailServicesFactory.php similarity index 100% rename from lib/Service/Mail/MailServicesFactory.php rename to core/Service/Mail/MailServicesFactory.php diff --git a/lib/Service/Module/ModuleMigrationService.php b/core/Service/Module/ModuleMigrationService.php similarity index 100% rename from lib/Service/Module/ModuleMigrationService.php rename to core/Service/Module/ModuleMigrationService.php diff --git a/lib/Service/Org/DepartmentService.php b/core/Service/Org/DepartmentService.php similarity index 100% rename from lib/Service/Org/DepartmentService.php rename to core/Service/Org/DepartmentService.php diff --git a/lib/Service/Scheduler/Handler/ScheduledJobHandlerInterface.php b/core/Service/Scheduler/Handler/ScheduledJobHandlerInterface.php similarity index 100% rename from lib/Service/Scheduler/Handler/ScheduledJobHandlerInterface.php rename to core/Service/Scheduler/Handler/ScheduledJobHandlerInterface.php diff --git a/lib/Service/Scheduler/Handler/UserLifecycleJobHandler.php b/core/Service/Scheduler/Handler/UserLifecycleJobHandler.php similarity index 100% rename from lib/Service/Scheduler/Handler/UserLifecycleJobHandler.php rename to core/Service/Scheduler/Handler/UserLifecycleJobHandler.php diff --git a/lib/Service/Scheduler/ScheduleCalculator.php b/core/Service/Scheduler/ScheduleCalculator.php similarity index 100% rename from lib/Service/Scheduler/ScheduleCalculator.php rename to core/Service/Scheduler/ScheduleCalculator.php diff --git a/lib/Service/Scheduler/ScheduledJobRegistry.php b/core/Service/Scheduler/ScheduledJobRegistry.php similarity index 100% rename from lib/Service/Scheduler/ScheduledJobRegistry.php rename to core/Service/Scheduler/ScheduledJobRegistry.php diff --git a/lib/Service/Scheduler/ScheduledJobService.php b/core/Service/Scheduler/ScheduledJobService.php similarity index 100% rename from lib/Service/Scheduler/ScheduledJobService.php rename to core/Service/Scheduler/ScheduledJobService.php diff --git a/lib/Service/Scheduler/SchedulerRepositoryFactory.php b/core/Service/Scheduler/SchedulerRepositoryFactory.php similarity index 100% rename from lib/Service/Scheduler/SchedulerRepositoryFactory.php rename to core/Service/Scheduler/SchedulerRepositoryFactory.php diff --git a/lib/Service/Scheduler/SchedulerRunService.php b/core/Service/Scheduler/SchedulerRunService.php similarity index 100% rename from lib/Service/Scheduler/SchedulerRunService.php rename to core/Service/Scheduler/SchedulerRunService.php diff --git a/lib/Service/Scheduler/SchedulerServicesFactory.php b/core/Service/Scheduler/SchedulerServicesFactory.php similarity index 100% rename from lib/Service/Scheduler/SchedulerServicesFactory.php rename to core/Service/Scheduler/SchedulerServicesFactory.php diff --git a/lib/Service/Search/SearchDataService.php b/core/Service/Search/SearchDataService.php similarity index 100% rename from lib/Service/Search/SearchDataService.php rename to core/Service/Search/SearchDataService.php diff --git a/lib/Service/Security/RateLimiterService.php b/core/Service/Security/RateLimiterService.php similarity index 100% rename from lib/Service/Security/RateLimiterService.php rename to core/Service/Security/RateLimiterService.php diff --git a/lib/Service/Security/SecurityRepositoryFactory.php b/core/Service/Security/SecurityRepositoryFactory.php similarity index 100% rename from lib/Service/Security/SecurityRepositoryFactory.php rename to core/Service/Security/SecurityRepositoryFactory.php diff --git a/lib/Service/Security/SecurityServicesFactory.php b/core/Service/Security/SecurityServicesFactory.php similarity index 100% rename from lib/Service/Security/SecurityServicesFactory.php rename to core/Service/Security/SecurityServicesFactory.php diff --git a/lib/Service/Settings/AdminSettingsService.php b/core/Service/Settings/AdminSettingsService.php similarity index 100% rename from lib/Service/Settings/AdminSettingsService.php rename to core/Service/Settings/AdminSettingsService.php diff --git a/lib/Service/Settings/SettingCacheService.php b/core/Service/Settings/SettingCacheService.php similarity index 100% rename from lib/Service/Settings/SettingCacheService.php rename to core/Service/Settings/SettingCacheService.php diff --git a/lib/Service/Settings/SettingKeys.php b/core/Service/Settings/SettingKeys.php similarity index 100% rename from lib/Service/Settings/SettingKeys.php rename to core/Service/Settings/SettingKeys.php diff --git a/lib/Service/Settings/SettingRepositoryFactory.php b/core/Service/Settings/SettingRepositoryFactory.php similarity index 100% rename from lib/Service/Settings/SettingRepositoryFactory.php rename to core/Service/Settings/SettingRepositoryFactory.php diff --git a/lib/Service/Settings/SettingServicesFactory.php b/core/Service/Settings/SettingServicesFactory.php similarity index 100% rename from lib/Service/Settings/SettingServicesFactory.php rename to core/Service/Settings/SettingServicesFactory.php diff --git a/lib/Service/Settings/SettingsApiPolicyGateway.php b/core/Service/Settings/SettingsApiPolicyGateway.php similarity index 100% rename from lib/Service/Settings/SettingsApiPolicyGateway.php rename to core/Service/Settings/SettingsApiPolicyGateway.php diff --git a/lib/Service/Settings/SettingsAppGateway.php b/core/Service/Settings/SettingsAppGateway.php similarity index 100% rename from lib/Service/Settings/SettingsAppGateway.php rename to core/Service/Settings/SettingsAppGateway.php diff --git a/lib/Service/Settings/SettingsCryptoGateway.php b/core/Service/Settings/SettingsCryptoGateway.php similarity index 100% rename from lib/Service/Settings/SettingsCryptoGateway.php rename to core/Service/Settings/SettingsCryptoGateway.php diff --git a/lib/Service/Settings/SettingsCryptoGatewayInterface.php b/core/Service/Settings/SettingsCryptoGatewayInterface.php similarity index 100% rename from lib/Service/Settings/SettingsCryptoGatewayInterface.php rename to core/Service/Settings/SettingsCryptoGatewayInterface.php diff --git a/lib/Service/Settings/SettingsDefaultsGateway.php b/core/Service/Settings/SettingsDefaultsGateway.php similarity index 100% rename from lib/Service/Settings/SettingsDefaultsGateway.php rename to core/Service/Settings/SettingsDefaultsGateway.php diff --git a/lib/Service/Settings/SettingsFrontendTelemetryGateway.php b/core/Service/Settings/SettingsFrontendTelemetryGateway.php similarity index 100% rename from lib/Service/Settings/SettingsFrontendTelemetryGateway.php rename to core/Service/Settings/SettingsFrontendTelemetryGateway.php diff --git a/lib/Service/Settings/SettingsLoginPersistenceGateway.php b/core/Service/Settings/SettingsLoginPersistenceGateway.php similarity index 100% rename from lib/Service/Settings/SettingsLoginPersistenceGateway.php rename to core/Service/Settings/SettingsLoginPersistenceGateway.php diff --git a/lib/Service/Settings/SettingsMetadataGateway.php b/core/Service/Settings/SettingsMetadataGateway.php similarity index 100% rename from lib/Service/Settings/SettingsMetadataGateway.php rename to core/Service/Settings/SettingsMetadataGateway.php diff --git a/lib/Service/Settings/SettingsMicrosoftGateway.php b/core/Service/Settings/SettingsMicrosoftGateway.php similarity index 100% rename from lib/Service/Settings/SettingsMicrosoftGateway.php rename to core/Service/Settings/SettingsMicrosoftGateway.php diff --git a/lib/Service/Settings/SettingsSessionGateway.php b/core/Service/Settings/SettingsSessionGateway.php similarity index 100% rename from lib/Service/Settings/SettingsSessionGateway.php rename to core/Service/Settings/SettingsSessionGateway.php diff --git a/lib/Service/Settings/SettingsSmtpGateway.php b/core/Service/Settings/SettingsSmtpGateway.php similarity index 100% rename from lib/Service/Settings/SettingsSmtpGateway.php rename to core/Service/Settings/SettingsSmtpGateway.php diff --git a/lib/Service/Settings/SettingsSystemAuditGateway.php b/core/Service/Settings/SettingsSystemAuditGateway.php similarity index 100% rename from lib/Service/Settings/SettingsSystemAuditGateway.php rename to core/Service/Settings/SettingsSystemAuditGateway.php diff --git a/lib/Service/Settings/SettingsUserLifecycleGateway.php b/core/Service/Settings/SettingsUserLifecycleGateway.php similarity index 100% rename from lib/Service/Settings/SettingsUserLifecycleGateway.php rename to core/Service/Settings/SettingsUserLifecycleGateway.php diff --git a/lib/Service/Settings/ThemeConfigGateway.php b/core/Service/Settings/ThemeConfigGateway.php similarity index 100% rename from lib/Service/Settings/ThemeConfigGateway.php rename to core/Service/Settings/ThemeConfigGateway.php diff --git a/lib/Service/Stats/AdminStatsViewDataService.php b/core/Service/Stats/AdminStatsViewDataService.php similarity index 100% rename from lib/Service/Stats/AdminStatsViewDataService.php rename to core/Service/Stats/AdminStatsViewDataService.php diff --git a/lib/Service/System/SystemHealthService.php b/core/Service/System/SystemHealthService.php similarity index 100% rename from lib/Service/System/SystemHealthService.php rename to core/Service/System/SystemHealthService.php diff --git a/lib/Service/System/SystemInfoService.php b/core/Service/System/SystemInfoService.php similarity index 100% rename from lib/Service/System/SystemInfoService.php rename to core/Service/System/SystemInfoService.php diff --git a/lib/Service/Tenant/TenantAvatarService.php b/core/Service/Tenant/TenantAvatarService.php similarity index 100% rename from lib/Service/Tenant/TenantAvatarService.php rename to core/Service/Tenant/TenantAvatarService.php diff --git a/lib/Service/Tenant/TenantFaviconService.php b/core/Service/Tenant/TenantFaviconService.php similarity index 100% rename from lib/Service/Tenant/TenantFaviconService.php rename to core/Service/Tenant/TenantFaviconService.php diff --git a/lib/Service/Tenant/TenantRepositoryFactory.php b/core/Service/Tenant/TenantRepositoryFactory.php similarity index 100% rename from lib/Service/Tenant/TenantRepositoryFactory.php rename to core/Service/Tenant/TenantRepositoryFactory.php diff --git a/lib/Service/Tenant/TenantScopeService.php b/core/Service/Tenant/TenantScopeService.php similarity index 100% rename from lib/Service/Tenant/TenantScopeService.php rename to core/Service/Tenant/TenantScopeService.php diff --git a/lib/Service/Tenant/TenantService.php b/core/Service/Tenant/TenantService.php similarity index 100% rename from lib/Service/Tenant/TenantService.php rename to core/Service/Tenant/TenantService.php diff --git a/lib/Service/Tenant/TenantServicesFactory.php b/core/Service/Tenant/TenantServicesFactory.php similarity index 100% rename from lib/Service/Tenant/TenantServicesFactory.php rename to core/Service/Tenant/TenantServicesFactory.php diff --git a/lib/Service/Ui/HotkeyService.php b/core/Service/Ui/HotkeyService.php similarity index 100% rename from lib/Service/Ui/HotkeyService.php rename to core/Service/Ui/HotkeyService.php diff --git a/lib/Service/User/UserAccessPdfService.php b/core/Service/User/UserAccessPdfService.php similarity index 100% rename from lib/Service/User/UserAccessPdfService.php rename to core/Service/User/UserAccessPdfService.php diff --git a/lib/Service/User/UserAccessTemplateService.php b/core/Service/User/UserAccessTemplateService.php similarity index 100% rename from lib/Service/User/UserAccessTemplateService.php rename to core/Service/User/UserAccessTemplateService.php diff --git a/lib/Service/User/UserAccountService.php b/core/Service/User/UserAccountService.php similarity index 100% rename from lib/Service/User/UserAccountService.php rename to core/Service/User/UserAccountService.php diff --git a/lib/Service/User/UserApiWriteInputMapper.php b/core/Service/User/UserApiWriteInputMapper.php similarity index 100% rename from lib/Service/User/UserApiWriteInputMapper.php rename to core/Service/User/UserApiWriteInputMapper.php diff --git a/lib/Service/User/UserAssignmentService.php b/core/Service/User/UserAssignmentService.php similarity index 100% rename from lib/Service/User/UserAssignmentService.php rename to core/Service/User/UserAssignmentService.php diff --git a/lib/Service/User/UserAvatarService.php b/core/Service/User/UserAvatarService.php similarity index 100% rename from lib/Service/User/UserAvatarService.php rename to core/Service/User/UserAvatarService.php diff --git a/lib/Service/User/UserDirectoryGateway.php b/core/Service/User/UserDirectoryGateway.php similarity index 100% rename from lib/Service/User/UserDirectoryGateway.php rename to core/Service/User/UserDirectoryGateway.php diff --git a/lib/Service/User/UserGatewayFactory.php b/core/Service/User/UserGatewayFactory.php similarity index 100% rename from lib/Service/User/UserGatewayFactory.php rename to core/Service/User/UserGatewayFactory.php diff --git a/lib/Service/User/UserLifecycleRestoreService.php b/core/Service/User/UserLifecycleRestoreService.php similarity index 100% rename from lib/Service/User/UserLifecycleRestoreService.php rename to core/Service/User/UserLifecycleRestoreService.php diff --git a/lib/Service/User/UserLifecycleService.php b/core/Service/User/UserLifecycleService.php similarity index 100% rename from lib/Service/User/UserLifecycleService.php rename to core/Service/User/UserLifecycleService.php diff --git a/lib/Service/User/UserPasswordPolicyService.php b/core/Service/User/UserPasswordPolicyService.php similarity index 100% rename from lib/Service/User/UserPasswordPolicyService.php rename to core/Service/User/UserPasswordPolicyService.php diff --git a/lib/Service/User/UserPasswordService.php b/core/Service/User/UserPasswordService.php similarity index 100% rename from lib/Service/User/UserPasswordService.php rename to core/Service/User/UserPasswordService.php diff --git a/lib/Service/User/UserRepositoryFactory.php b/core/Service/User/UserRepositoryFactory.php similarity index 100% rename from lib/Service/User/UserRepositoryFactory.php rename to core/Service/User/UserRepositoryFactory.php diff --git a/lib/Service/User/UserServicesFactory.php b/core/Service/User/UserServicesFactory.php similarity index 100% rename from lib/Service/User/UserServicesFactory.php rename to core/Service/User/UserServicesFactory.php diff --git a/lib/Service/User/UserSettingsGateway.php b/core/Service/User/UserSettingsGateway.php similarity index 100% rename from lib/Service/User/UserSettingsGateway.php rename to core/Service/User/UserSettingsGateway.php diff --git a/lib/Service/User/UserTenantContextService.php b/core/Service/User/UserTenantContextService.php similarity index 100% rename from lib/Service/User/UserTenantContextService.php rename to core/Service/User/UserTenantContextService.php diff --git a/lib/Support/Crypto.php b/core/Support/Crypto.php similarity index 100% rename from lib/Support/Crypto.php rename to core/Support/Crypto.php diff --git a/lib/Support/Flash.php b/core/Support/Flash.php similarity index 100% rename from lib/Support/Flash.php rename to core/Support/Flash.php diff --git a/lib/Support/Guard.php b/core/Support/Guard.php similarity index 100% rename from lib/Support/Guard.php rename to core/Support/Guard.php diff --git a/lib/Support/Search/SearchItemMapperProvider.php b/core/Support/Search/SearchItemMapperProvider.php similarity index 100% rename from lib/Support/Search/SearchItemMapperProvider.php rename to core/Support/Search/SearchItemMapperProvider.php diff --git a/lib/Support/Search/SearchQueryNormalizer.php b/core/Support/Search/SearchQueryNormalizer.php similarity index 100% rename from lib/Support/Search/SearchQueryNormalizer.php rename to core/Support/Search/SearchQueryNormalizer.php diff --git a/lib/Support/Search/SearchSpecialResourceProvider.php b/core/Support/Search/SearchSpecialResourceProvider.php similarity index 100% rename from lib/Support/Search/SearchSpecialResourceProvider.php rename to core/Support/Search/SearchSpecialResourceProvider.php diff --git a/lib/Support/Search/SearchSqlResourceProvider.php b/core/Support/Search/SearchSqlResourceProvider.php similarity index 100% rename from lib/Support/Search/SearchSqlResourceProvider.php rename to core/Support/Search/SearchSqlResourceProvider.php diff --git a/lib/Support/Search/SearchUiMetaProvider.php b/core/Support/Search/SearchUiMetaProvider.php similarity index 100% rename from lib/Support/Search/SearchUiMetaProvider.php rename to core/Support/Search/SearchUiMetaProvider.php diff --git a/lib/Support/SearchConfig.php b/core/Support/SearchConfig.php similarity index 100% rename from lib/Support/SearchConfig.php rename to core/Support/SearchConfig.php diff --git a/lib/Support/SqlStatementParser.php b/core/Support/SqlStatementParser.php similarity index 100% rename from lib/Support/SqlStatementParser.php rename to core/Support/SqlStatementParser.php diff --git a/lib/Support/Tile.php b/core/Support/Tile.php similarity index 100% rename from lib/Support/Tile.php rename to core/Support/Tile.php diff --git a/lib/Support/helpers.php b/core/Support/helpers.php similarity index 100% rename from lib/Support/helpers.php rename to core/Support/helpers.php diff --git a/lib/Support/helpers/app.php b/core/Support/helpers/app.php similarity index 100% rename from lib/Support/helpers/app.php rename to core/Support/helpers/app.php diff --git a/lib/Support/helpers/branding.php b/core/Support/helpers/branding.php similarity index 100% rename from lib/Support/helpers/branding.php rename to core/Support/helpers/branding.php diff --git a/lib/Support/helpers/grid.php b/core/Support/helpers/grid.php similarity index 100% rename from lib/Support/helpers/grid.php rename to core/Support/helpers/grid.php diff --git a/lib/Support/helpers/i18n.php b/core/Support/helpers/i18n.php similarity index 100% rename from lib/Support/helpers/i18n.php rename to core/Support/helpers/i18n.php diff --git a/lib/Support/helpers/request.php b/core/Support/helpers/request.php similarity index 100% rename from lib/Support/helpers/request.php rename to core/Support/helpers/request.php diff --git a/lib/Support/helpers/ui.php b/core/Support/helpers/ui.php similarity index 100% rename from lib/Support/helpers/ui.php rename to core/Support/helpers/ui.php diff --git a/docs/explanation-architektur.md b/docs/explanation-architektur.md index bffb558..6301bd5 100644 --- a/docs/explanation-architektur.md +++ b/docs/explanation-architektur.md @@ -19,11 +19,11 @@ Verbindliche Kurzregeln für Architekturentscheidungen. flowchart TD Browser([Browser / API-Client]) - subgraph APP["lib/App/ — Composition Root"] + subgraph APP["core/App/ — Composition Root"] DI["AppContainer + Registrars"] end - subgraph SVC["lib/Service/"] + subgraph SVC["core/Service/"] direction LR FAC["Factory"] SERVICE["Service"] @@ -31,7 +31,7 @@ flowchart TD POL["Policy"] end - subgraph REPO["lib/Repository/"] + subgraph REPO["core/Repository/"] REP["Repository"] end @@ -73,8 +73,8 @@ flowchart TD ## Schichtregeln (MUSS) - `pages/**`: Input, Auth/AuthZ, Orchestrierung, Response. -- `lib/Service/**`: Fachlogik und Anwendungsfluss. -- `lib/Repository/**`: SQL, Filter, Paging, Mapping. +- `core/Service/**`: Fachlogik und Anwendungsfluss. +- `core/Repository/**`: SQL, Filter, Paging, Mapping. - `templates/**`: Rendering ohne Business-Logik. - Templates konsumieren nur vom Action-Layer vorbereitete View-Daten (`$viewAuth`, Form/ViewModel), keine direkten Permission-Helper. - Service-Auflösung in Actions/Helpers nur über `app(Foo::class)`. @@ -89,11 +89,11 @@ flowchart TD ## Instanziierungsregeln (MUSS) -- Composition Root: `web/index.php` + `lib/App/registerContainer.php` +- Composition Root: `web/index.php` + `core/App/registerContainer.php` (→ Details: `/docs/explanation-di-container.md`). - `new ...Factory()` nur im Composition Root und in `*Factory.php`. -- In `lib/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Factory()`. -- In `lib/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Service()`, `new ...Gateway()` oder `new ...Repository()`. +- In `core/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Factory()`. +- In `core/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Service()`, `new ...Gateway()` oder `new ...Repository()`. - Legacy-Helper (`accessServicesFactory()`, `userServicesFactory()` usw.) sind entfernt und werden nicht mehr genutzt. ## API- und Security-Regeln (MUSS) @@ -129,8 +129,8 @@ Bei JS-Änderungen zusätzlich Browser-Smoke mit DevTools-Console (keine JS-Erro Struktur-Gates zusätzlich: ```bash -(rg 'new\s+[^\s(]+Factory\(' lib/Service || true) | wc -l -(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' lib/Service || true) | wc -l +(rg 'new\s+[^\s(]+Factory\(' core/Service || true) | wc -l +(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' core/Service || true) | wc -l (rg "\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\(" pages lib templates web || true) | wc -l (rg -n 'new\s+[^\s(]+(Service|Gateway|Repository)\(' pages -g '*.php' || true) | wc -l (rg -n '\bDB::' pages -g '*.php' || true) | wc -l @@ -147,6 +147,6 @@ docker compose exec php vendor/bin/phpunit tests/Architecture/CoreStarterkitCont ## Vertiefung -- `/docs/reference-lib-standards.md` +- `/docs/reference-core-standards.md` - `/docs/explanation-sicherheitsmodell.md` - `/docs/howto-rbac-permissions-playbook.md` diff --git a/docs/explanation-di-container.md b/docs/explanation-di-container.md index 8ab686b..56cf648 100644 --- a/docs/explanation-di-container.md +++ b/docs/explanation-di-container.md @@ -31,7 +31,7 @@ Das ist absichtlich laut, damit fehlende Registrierungen sofort auffallen. ## Aufbau: Registrars -Beim Start der Anwendung läuft `lib/App/registerContainer.php`. +Beim Start der Anwendung läuft `core/App/registerContainer.php`. Es erstellt den Container und ruft 8 **Registrars** nacheinander auf: | Registrar | Was er registriert | @@ -68,7 +68,7 @@ Zirkuläre Abhängigkeiten werden über `static fn (): Foo => $c->get(Foo::class ## Neuen Service registrieren -**1. Service und ggf. Factory erstellen** (wie bisher in `lib/Service/`) +**1. Service und ggf. Factory erstellen** (wie bisher in `core/Service/`) **2. Im passenden Registrar eintragen:** @@ -103,6 +103,6 @@ $meinService = app(\MintyPHP\Service\MeinNeuerService::class); den konkreten Service direkt registrieren und per `app()` holen. - Der Container lebt **pro HTTP-Anfrage** — er wird in `web/index.php` initialisiert und über `setAppContainer()` im globalen State abgelegt. -- In CLI-Commands wird der Container separat initialisiert (ueber die Runtime-Bootstrap-Klassen unter `lib/Console/Support/`). -- In `lib/Service/**` außerhalb von `*Factory.php` niemals `new ...Factory()`, +- In CLI-Commands wird der Container separat initialisiert (ueber die Runtime-Bootstrap-Klassen unter `core/Console/Support/`). +- In `core/Service/**` außerhalb von `*Factory.php` niemals `new ...Factory()`, `new ...Service()` oder `new ...Repository()` direkt instanziieren. diff --git a/docs/explanation-session-management.md b/docs/explanation-session-management.md index 1c2ef4e..f95ddee 100644 --- a/docs/explanation-session-management.md +++ b/docs/explanation-session-management.md @@ -85,7 +85,7 @@ Loesung: Alle 5 Minuten prueft ein Intervall ob seit dem letzten Sync Interaktio ## Remember-Token -Quelle: `lib/Service/Auth/RememberMeService.php` +Quelle: `core/Service/Auth/RememberMeService.php` ### Token-Struktur @@ -117,7 +117,7 @@ Token-Rotation bei jedem Auto-Login begrenzt das Fenster bei Cookie-Diebstahl. ### Rate Limiting (Remember-Token) -Quelle: `lib/Service/Auth/RememberMeRateLimiter.php` +Quelle: `core/Service/Auth/RememberMeRateLimiter.php` - Storage: Memcached (`Cache::add` + `Cache::increment`) - Limit: 5 Fehlversuche pro IP in 15 Minuten @@ -166,10 +166,10 @@ Das Secure-Flag wird automatisch anhand des Protokolls gesetzt (`RequestRuntime: | Komponente | Pfad | |------------|------| | Timeout-Pruefung | `web/index.php` | -| AuthService | `lib/Service/Auth/AuthService.php` | -| RememberMeService | `lib/Service/Auth/RememberMeService.php` | -| RememberMeRateLimiter | `lib/Service/Auth/RememberMeRateLimiter.php` | -| Session-Settings | `lib/Service/Settings/SettingsSessionGateway.php` | +| AuthService | `core/Service/Auth/AuthService.php` | +| RememberMeService | `core/Service/Auth/RememberMeService.php` | +| RememberMeRateLimiter | `core/Service/Auth/RememberMeRateLimiter.php` | +| Session-Settings | `core/Service/Settings/SettingsSessionGateway.php` | | Frontend-Warning | `web/js/components/app-session-warning.js` | | Session-Ping | `pages/admin/session-ping/data().php` | | Login-Action | `pages/auth/login().php` | diff --git a/docs/explanation-sicherheitsmodell.md b/docs/explanation-sicherheitsmodell.md index 3f64505..70d1eb2 100644 --- a/docs/explanation-sicherheitsmodell.md +++ b/docs/explanation-sicherheitsmodell.md @@ -19,7 +19,7 @@ Kein Layer allein reicht aus. ## Public vs. Protected - Public-Routen kommen aus `config/routes.php` (`public => true`). -- Zusätzlich sind Präfixe technisch immer public (`branding/`, `flash/`, `auth/microsoft/`, `api/`) in `lib/Http/AccessControl.php`. +- Zusätzlich sind Präfixe technisch immer public (`branding/`, `flash/`, `auth/microsoft/`, `api/`) in `core/Http/AccessControl.php`. - Alles andere erfordert Login. API-Sonderfall: @@ -47,7 +47,7 @@ API-Sonderfall: ## API-Schutz -- Zentrale API-Rate-Limits laufen in `lib/Http/ApiBootstrap.php`. +- Zentrale API-Rate-Limits laufen in `core/Http/ApiBootstrap.php`. - API-Audit läuft zentral über `ApiAuditService`: - loggt Metadaten (Pfad, Status, Dauer, Kontext) - redigiert sensible Query-Parameter diff --git a/docs/howto-anfragelimits.md b/docs/howto-anfragelimits.md index b76fa53..75006df 100644 --- a/docs/howto-anfragelimits.md +++ b/docs/howto-anfragelimits.md @@ -8,8 +8,8 @@ Brute-Force und API-Spam begrenzen, ohne Verfügbarkeit zu gefährden. ## Technischer Kern -- Service: `lib/Service/Security/RateLimiterService.php` -- Repository: `lib/Repository/Security/RateLimitRepository.php` +- Service: `core/Service/Security/RateLimiterService.php` +- Repository: `core/Repository/Security/RateLimitRepository.php` - Storage: `request_rate_limits` - `scope`, `subject_hash`, `hits`, `window_started_at`, `blocked_until` @@ -20,7 +20,7 @@ Wichtig: ## API-Limits (global) -Durchgesetzt in `lib/Http/ApiBootstrap.php`: +Durchgesetzt in `core/Http/ApiBootstrap.php`: 1. IP-only (`api.ip`) - 120 Requests / 60s @@ -63,7 +63,7 @@ Erfolgreicher API-Login setzt `api.auth.login.email_ip` zurück. ## Remember-Token-Limits -In `lib/Service/Auth/RememberMeRateLimiter.php` (Memcached-basiert): +In `core/Service/Auth/RememberMeRateLimiter.php` (Memcached-basiert): 1. Pro IP (`remember_rl:{ip}`) - 5 Fehlversuche / 900s diff --git a/docs/howto-benutzerdefinierte-felder.md b/docs/howto-benutzerdefinierte-felder.md index a85a0bf..cc98d3a 100644 --- a/docs/howto-benutzerdefinierte-felder.md +++ b/docs/howto-benutzerdefinierte-felder.md @@ -66,8 +66,8 @@ Unbekannte/manipulierte Parameter werden ignoriert. - `/pages/admin/tenants/custom-field-update($id).php` - `/pages/admin/tenants/custom-field-delete($id).php` - User-Werte: - - `/lib/Service/CustomField/UserCustomFieldValueService.php` - - `/lib/Repository/CustomField/*` + - `/core/Service/CustomField/UserCustomFieldValueService.php` + - `/core/Repository/CustomField/*` - Address-Book-Filter: - `/pages/address-book/index().php` - `/pages/address-book/index(default).phtml` diff --git a/docs/howto-dokumentation-erweitern.md b/docs/howto-dokumentation-erweitern.md index e7f53b9..4205d4f 100644 --- a/docs/howto-dokumentation-erweitern.md +++ b/docs/howto-dokumentation-erweitern.md @@ -49,7 +49,7 @@ Richtwert: zuerst kurz, Details als Verweis auf Referenzseiten. 1. Seite ist in `docs/index.md` eingetragen. 2. Struktur ist kurz, klar, ohne Redundanz. 3. Pfade, Routen, Permissions stimmen mit dem Code. -4. Instanziierungsregeln sind konsistent mit `/docs/explanation-architektur.md` und `/docs/reference-lib-standards.md`. +4. Instanziierungsregeln sind konsistent mit `/docs/explanation-architektur.md` und `/docs/reference-core-standards.md`. 5. Mindestens ein konkretes Beispiel ist enthalten. 6. Begriffe sind konsistent mit `/docs/reference-domain-glossar.md`. diff --git a/docs/howto-erste-aenderung.md b/docs/howto-erste-aenderung.md index 162a404..534bf6d 100644 --- a/docs/howto-erste-aenderung.md +++ b/docs/howto-erste-aenderung.md @@ -12,9 +12,9 @@ Ein neuer Entwickler soll den ersten Change strukturiert und reproduzierbar umse 1. Data-Endpoint erweitern (z. B. `pages/admin/users/data().php`) 2. Falls nötig: neue Repository-Methode ergänzen – je nach Typ: - - Listenabfrage / Filterung / Paginierung → `lib/Repository/User/UserListQueryRepository.php` - - Einzelnes Objekt lesen → `lib/Repository/User/UserReadRepository.php` - - Schreiboperation → `lib/Repository/User/UserWriteRepository.php` + - Listenabfrage / Filterung / Paginierung → `core/Repository/User/UserListQueryRepository.php` + - Einzelnes Objekt lesen → `core/Repository/User/UserReadRepository.php` + - Schreiboperation → `core/Repository/User/UserWriteRepository.php` 3. Grid-Spalte in `pages/admin//index(default).phtml` ergänzen (z. B. `pages/admin/users/index(default).phtml`) 4. i18n-Key für Spaltennamen setzen 5. Service-Auflösung in Action-Dateien nur über `app(Foo::class)` nutzen (kein `new ...Factory()` in `pages/**`) diff --git a/docs/howto-geplante-aufgaben.md b/docs/howto-geplante-aufgaben.md index e8dd755..39f2b20 100644 --- a/docs/howto-geplante-aufgaben.md +++ b/docs/howto-geplante-aufgaben.md @@ -9,10 +9,10 @@ Scheduler-Betrieb und Job-Erweiterung kurz und verlässlich dokumentieren. ## Kernkomponenten - Runner: `bin/console scheduler:run` -- Orchestrierung: `lib/Service/Scheduler/SchedulerRunService.php` -- Job-Konfiguration: `lib/Service/Scheduler/ScheduledJobService.php` -- Registry: `lib/Service/Scheduler/ScheduledJobRegistry.php` -- Schedule-Berechnung: `lib/Service/Scheduler/ScheduleCalculator.php` +- Orchestrierung: `core/Service/Scheduler/SchedulerRunService.php` +- Job-Konfiguration: `core/Service/Scheduler/ScheduledJobService.php` +- Registry: `core/Service/Scheduler/ScheduledJobRegistry.php` +- Schedule-Berechnung: `core/Service/Scheduler/ScheduleCalculator.php` ## Datenmodell @@ -61,7 +61,7 @@ Registrierte Core-Jobs: ## Neuen Job registrieren (kurz) -1. Handler in `lib/Service/Scheduler/Handler/*` erstellen (`ScheduledJobHandlerInterface`). +1. Handler in `core/Service/Scheduler/Handler/*` erstellen (`ScheduledJobHandlerInterface`). 2. Job-Key + Handler in `ScheduledJobRegistry` ergänzen. 3. Abhängigkeiten in `SchedulerServicesFactory` verdrahten. diff --git a/docs/howto-globale-suche.md b/docs/howto-globale-suche.md index e278468..bc7112f 100644 --- a/docs/howto-globale-suche.md +++ b/docs/howto-globale-suche.md @@ -15,9 +15,9 @@ Zwei Endpunkte teilen dieselbe Konfiguration: Zentrale Fassade: -- `lib/Support/SearchConfig.php` -- Laufzeit-Orchestrierung: `lib/Service/Search/SearchDataService.php` -- SQL-Ausführung: `lib/Repository/Search/SearchQueryRepository.php` +- `core/Support/SearchConfig.php` +- Laufzeit-Orchestrierung: `core/Service/Search/SearchDataService.php` +- SQL-Ausführung: `core/Repository/Search/SearchQueryRepository.php` Provider: @@ -65,8 +65,8 @@ Die Entwicklerdoku läuft als Spezialresource `docs`: ## Check vor Merge -1. `php -l lib/Support/SearchConfig.php` -2. `php -l lib/Support/Search/*.php` +1. `php -l core/Support/SearchConfig.php` +2. `php -l core/Support/Search/*.php` 3. Preview testen (`admin/search/data?q=...`) 4. Vollsuche testen (`/search?search=...`) 5. Permission/Scope mit reduziertem User prüfen diff --git a/docs/howto-lokale-entwicklung.md b/docs/howto-lokale-entwicklung.md index ada1755..bb5ea3e 100644 --- a/docs/howto-lokale-entwicklung.md +++ b/docs/howto-lokale-entwicklung.md @@ -91,8 +91,8 @@ Bei JS-Änderungen zusätzlich Browser-Smoke mit DevTools-Console (keine JS-Erro ## Struktur-Gates (empfohlen) ```bash -(rg 'new\s+[^\s(]+Factory\(' lib/Service || true) | wc -l -(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' lib/Service || true) | wc -l +(rg 'new\s+[^\s(]+Factory\(' core/Service || true) | wc -l +(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' core/Service || true) | wc -l (rg "\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\(" pages lib templates web || true) | wc -l ``` diff --git a/docs/howto-modul-erstellen.md b/docs/howto-modul-erstellen.md index 68e20c1..2501315 100644 --- a/docs/howto-modul-erstellen.md +++ b/docs/howto-modul-erstellen.md @@ -18,7 +18,7 @@ Schritt-fuer-Schritt Anleitung: vom leeren Verzeichnis zum lauffaehigen Modul mi |---|---| | Manifest-Contract (verbindlich) | `/docs/reference-module-manifest-contract.md` | | Manifest-JSON-Schema | `/.agents/contracts/module-manifest.schema.json` | -| Platform-Contracts (Interfaces) | `lib/App/Module/Contracts/` (5 Interfaces) | +| Platform-Contracts (Interfaces) | `core/App/Module/Contracts/` (5 Interfaces) | | CLI-Kommandos | `/docs/reference-cli-commands.md` | | Referenzmodul (vollstaendig) | `modules/notifications/` | | Einfaches Modul | `modules/bookmarks/` | @@ -34,7 +34,7 @@ Erzeugt: ``` modules/mein-modul/ module.php ← Manifest - lib/Module/MeinModul/ + core/Module/MeinModul/ MeinModulContainerRegistrar.php ← DI-Registrierung MeinModulAuthorizationPolicy.php ← Berechtigungspruefung pages/ ← Seiten (file-based routing) @@ -276,7 +276,7 @@ Fuer globale Assets (auf jeder Seite) stattdessen `layout.head_style` oder `runt ], ``` -Interface: `lib/App/Module/Contracts/SessionProvider.php` (Methoden: `populate()`, `clear()`). +Interface: `core/App/Module/Contracts/SessionProvider.php` (Methoden: `populate()`, `clear()`). **Session-Key-Konvention:** `module.mein-modul.*` (wird per Architektur-Test geprueft). @@ -290,7 +290,7 @@ Interface: `lib/App/Module/Contracts/SessionProvider.php` (Methoden: `populate() ], ``` -Interface: `lib/App/Module/Contracts/LayoutContextProvider.php` (Methode: `provide()`). +Interface: `core/App/Module/Contracts/LayoutContextProvider.php` (Methode: `provide()`). **Key-Konvention:** Top-Level-Keys muessen namespaced sein: `mein-modul.nav`, nicht `nav`. @@ -304,7 +304,7 @@ Interface: `lib/App/Module/Contracts/LayoutContextProvider.php` (Methode: `provi ], ``` -Interface: `lib/App/Module/Contracts/EventListener.php` (Methode: `handle(string $event, array $payload)`). +Interface: `core/App/Module/Contracts/EventListener.php` (Methode: `handle(string $event, array $payload)`). ### Scheduler-Job diff --git a/docs/howto-rbac-permissions-playbook.md b/docs/howto-rbac-permissions-playbook.md index 6d52dfb..9242d3a 100644 --- a/docs/howto-rbac-permissions-playbook.md +++ b/docs/howto-rbac-permissions-playbook.md @@ -13,7 +13,7 @@ Ziel: Neue Rechte konsistent und ohne Legacy-Pfade ergänzen. ## Fall A: Ganz neue Permission 1. Permission-Key in `PermissionService` ergänzen. - Datei: `lib/Service/Access/PermissionService.php` + Datei: `core/Service/Access/PermissionService.php` 2. DB-Update für Bestandsinstanzen anlegen (idempotent). Datei: `db/updates/YYYY-MM-DD-*.sql` 3. `db/init/init.sql` für Neuinstallationen synchron ergänzen. diff --git a/docs/index.md b/docs/index.md index 15b24a7..2935500 100644 --- a/docs/index.md +++ b/docs/index.md @@ -87,8 +87,8 @@ Diese Dokumentation ist nach dem Diataxis-Modell in vier Quadranten gegliedert: - ENV-Variablen und Produktions-Defaults. - `/docs/reference-konventionen.md` - Projektweite Konventionen (kurz und verbindlich). -- `/docs/reference-lib-standards.md` - - Regeln speziell fuer `lib/**`. +- `/docs/reference-core-standards.md` + - Regeln speziell fuer `core/**`. - `/docs/reference-benutzer-lifecycle-policy.md` - Policy- und Laufzeitreferenz fuer User Lifecycle. - `/docs/reference-frontend-css.md` diff --git a/docs/reference-cli-commands.md b/docs/reference-cli-commands.md index 13b00ea..0493464 100644 --- a/docs/reference-cli-commands.md +++ b/docs/reference-cli-commands.md @@ -154,7 +154,7 @@ Voraussetzung fuer den ersten App-Start: `config/config.php` muss vorhanden sein ## Neue Kommandos anlegen -1. Klasse in `lib/Console/Commands/` erstellen, die `MintyPHP\Console\Command` erweitert. +1. Klasse in `core/Console/Commands/` erstellen, die `MintyPHP\Console\Command` erweitert. 2. `name()`, `description()` und `execute()` implementieren. 3. Optional: `usage()` fuer `--help`-Ausgabe ueberschreiben. diff --git a/docs/reference-lib-standards.md b/docs/reference-core-standards.md similarity index 88% rename from docs/reference-lib-standards.md rename to docs/reference-core-standards.md index 4929296..d69da58 100644 --- a/docs/reference-lib-standards.md +++ b/docs/reference-core-standards.md @@ -2,7 +2,7 @@ Letzte Aktualisierung: 2026-03-09 -Praktische Regeln nur für `lib/**`. Ergänzt `/docs/explanation-architektur.md`. +Praktische Regeln nur für `core/**`. Ergänzt `/docs/explanation-architektur.md`. ## 1) Repository-Regeln @@ -11,7 +11,7 @@ Praktische Regeln nur für `lib/**`. Ergänzt `/docs/explanation-architektur.md` ## 2) Service-Schicht im Detail -`lib/Service/` enthält vier klar getrennte Typen — jeder hat eine eigene Verantwortung: +`core/Service/` enthält vier klar getrennte Typen — jeder hat eine eigene Verantwortung: ### 2a) Service (`*Service.php`) @@ -37,36 +37,36 @@ Praktische Regeln nur für `lib/**`. Ergänzt `/docs/explanation-architektur.md` ### 2c) Factory (`*Factory.php` / `*ServicesFactory.php` / `*GatewayFactory.php`) -- Einzige erlaubte Stelle für `new ...Service()`, `new ...Gateway()`, `new ...Repository()` innerhalb von `lib/Service/`. +- Einzige erlaubte Stelle für `new ...Service()`, `new ...Gateway()`, `new ...Repository()` innerhalb von `core/Service/`. - Erzeugt konfigurierte Service-/Gateway-Gruppen für den DI-Container. - Keine Fachlogik; reine Kompositions-Helfer. -- Werden im Composition Root (`lib/App/registerContainer.php`) registriert. +- Werden im Composition Root (`core/App/registerContainer.php`) registriert. ### 2d) Policy (`*Policy.php` / `*AuthorizationPolicy.php`) -- Liegen in `lib/Service/Access/`. +- Liegen in `core/Service/Access/`. - Treffen Authorization-Entscheidungen (Ability-Checks) für einen bestimmten Ressourcentyp. - Geben `AuthorizationDecision` zurück; kein HTTP-Redirect, keine Fachlogik. - Werden über `AccessPolicyFactory` + `AuthorizationService` aufgelöst — nie direkt in Actions instanziiert. ## 3) Instanziierung -- Composition Root ist `web/index.php` + `lib/App/registerContainer.php` +- Composition Root ist `web/index.php` + `core/App/registerContainer.php` (→ Details: `/docs/explanation-di-container.md`). - Domain-Abhängigkeiten mit `new` nur im Composition Root und in `*Factory.php`. -- In `pages/**`, `templates/**`, `lib/Support/**` und Gateway-/Service-Fallbacks nur über `app(Foo::class)` auflösen. +- In `pages/**`, `templates/**`, `core/Support/**` und Gateway-/Service-Fallbacks nur über `app(Foo::class)` auflösen. - In Actions bevorzugt direkte Service/Gateway-Bindings (`app(Service::class)`) statt `app(...Factory::class)->create...()`. - In `pages/admin/**` keine `Factory::class`-Referenzen; nur direkte `app(Service::class)` / `app(Repository::class)`. -- In `lib/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Factory()`. -- In `lib/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Service()`, `new ...Gateway()` oder `new ...Repository()`. +- In `core/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Factory()`. +- In `core/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Service()`, `new ...Gateway()` oder `new ...Repository()`. - Legacy-Service-Helper (`accessServicesFactory()`, `userServicesFactory()` usw.) werden nicht mehr verwendet. - Für neue Domain-Logik keine statischen Utility-Klassen. ### 3.1) Schnell-Gates (lokal) ```bash -(rg 'new\s+[^\s(]+Factory\(' lib/Service || true) | wc -l -(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' lib/Service || true) | wc -l +(rg 'new\s+[^\s(]+Factory\(' core/Service || true) | wc -l +(rg --glob '!**/*Factory.php' 'new\s+[^\s(]+(Service|Gateway|Repository)\(' core/Service || true) | wc -l (rg "\b(accessServicesFactory|directoryServicesFactory|userServicesFactory|authServicesFactory|tenantServicesFactory|settingServicesFactory|userRepositoryFactory|authRepositoryFactory|authGatewayFactory)\(" pages lib templates web || true) | wc -l (rg -n 'new\s+[^\s(]+(Service|Gateway|Repository)\(' pages -g '*.php' || true) | wc -l (rg -n '\bDB::' pages -g '*.php' || true) | wc -l @@ -122,7 +122,7 @@ Details und Sonderfälle: `/docs/howto-rbac-permissions-playbook.md` ## 5.1) Status/Outcome-Taxonomien (Backed Enums) -- Persistierte Status-/Outcome-Domänen liegen zentral in `lib/Domain/Taxonomy/*`. +- Persistierte Status-/Outcome-Domänen liegen zentral in `core/Domain/Taxonomy/*`. - Jede Taxonomie liefert einheitlich: `values()`, `tryNormalize()`, `normalizeOr()`, `labelToken()`, `badgeVariant()`. - Filter-Schemas lesen Allowed-Listen aus `Enum::values()` oder `gridEnumSanitizer(Enum::class)`. - Data-Endpunkte erzeugen Badge/Label über Enum-Cases, nicht über lokale `if/elseif`-Mappings. @@ -145,7 +145,7 @@ Details und Sonderfälle: `/docs/howto-rbac-permissions-playbook.md` Kurz-How-to: `/docs/howto-request-input-validation.md` -## 8) Definition of Done für `lib/**` +## 8) Definition of Done für `core/**` 1. Schichtgrenzen eingehalten. 2. AuthZ zentral. diff --git a/docs/reference-domain-glossar.md b/docs/reference-domain-glossar.md index 785559d..11eadda 100644 --- a/docs/reference-domain-glossar.md +++ b/docs/reference-domain-glossar.md @@ -15,8 +15,8 @@ Alle Kernbegriffe kurz und einheitlich verstehen. - `Policy` / `Ability`: zentrale Autorisierungsregel. - `Tenant-Scope`: Regel, ob Zugriff im Ziel-Tenant erlaubt ist. - `Action`: Request-Einstieg in `pages/**`. -- `Service`: Fachlogik in `lib/Service/**`. -- `Repository`: SQL und Mapping in `lib/Repository/**`. +- `Service`: Fachlogik in `core/Service/**`. +- `Repository`: SQL und Mapping in `core/Repository/**`. - `Factory`: erstellt/verdrahtet Service-Objekte (z. B. `UserServicesFactory`). - `Gateway`: schmale Schnittstelle/Fassade zu Domain-Funktionen oder Querschnitt (z. B. `PermissionGateway`). - `AppContainer`: zentrale Service-Registrierung und -Auflösung (`app(Foo::class)`). diff --git a/docs/reference-entwickler-checkliste.md b/docs/reference-entwickler-checkliste.md index 3260164..f933e71 100644 --- a/docs/reference-entwickler-checkliste.md +++ b/docs/reference-entwickler-checkliste.md @@ -15,11 +15,11 @@ Kurze Definition of Done vor Merge. ## Beim Implementieren - [ ] Kein SQL in `*.phtml` -- [ ] SQL nur in `lib/Repository/**` -- [ ] Business-Logik nur in `lib/Service/**` +- [ ] SQL nur in `core/Repository/**` +- [ ] Business-Logik nur in `core/Service/**` - [ ] Neue UI-Texte über `t('...')` - [ ] Listen-Filter konsistent: IDs/Enums als Select/MultiSelect statt Freitext -- [ ] Für persistierte Status/Outcomes nur zentrale Taxonomien aus `lib/Domain/Taxonomy/*` nutzen (keine lokalen String-Literale) +- [ ] Für persistierte Status/Outcomes nur zentrale Taxonomien aus `core/Domain/Taxonomy/*` nutzen (keine lokalen String-Literale) - [ ] Für neue/angepasste Liste: `filter-schema.php` angelegt/aktualisiert - [ ] File-Uploads über `templates/partials/app-file-upload.phtml` (kein inline File-Upload-Markup) — `$fileUpload`-Array mit `name`, `accept`, `hint`, optional `currentSrc`/`deleteAction` - [ ] Listen-Titlebar über `templates/partials/app-list-titlebar.phtml` (kein inline `
`) @@ -48,9 +48,9 @@ Kurze Definition of Done vor Merge. - [ ] Runtime-Konfiguration liegt in `page-config-app-components` (default) bzw. `page-config-login-components` (login) und wird ueber `readPageConfig(...)` gelesen - [ ] Host-gebundene Runtime-Komponenten haben explizite `data-app-component`-Hosts im Markup - [ ] Global-Utilities ohne natuerliches Host-Element sind explizit runtime-global registriert (`scope: 'global'`) -- [ ] Service-Auflösung in `pages/**`/`templates/**`/`lib/Support/**` nur via `app(Foo::class)` -- [ ] Keine `new ...Factory()` in `lib/Service/**` außerhalb `*Factory.php` -- [ ] Keine direkten `new ...Service()`, `new ...Gateway()`, `new ...Repository()` in `lib/Service/**` außerhalb `*Factory.php` +- [ ] Service-Auflösung in `pages/**`/`templates/**`/`core/Support/**` nur via `app(Foo::class)` +- [ ] Keine `new ...Factory()` in `core/Service/**` außerhalb `*Factory.php` +- [ ] Keine direkten `new ...Service()`, `new ...Gateway()`, `new ...Repository()` in `core/Service/**` außerhalb `*Factory.php` ## Sicherheits- und Scope-Checks @@ -106,7 +106,7 @@ Kurze Definition of Done vor Merge. ## Vertiefung -- `/docs/reference-lib-standards.md` +- `/docs/reference-core-standards.md` - `/docs/explanation-sicherheitsmodell.md` - `/docs/howto-rbac-permissions-playbook.md` - `/docs/howto-dokumentation-erweitern.md` diff --git a/docs/reference-konventionen.md b/docs/reference-konventionen.md index 24a1794..b90c435 100644 --- a/docs/reference-konventionen.md +++ b/docs/reference-konventionen.md @@ -10,13 +10,13 @@ Letzte Aktualisierung: 2026-03-24 ## 2) Schichten -- SQL nur in `lib/Repository/**`. -- Fachlogik nur in `lib/Service/**`. +- SQL nur in `core/Repository/**`. +- Fachlogik nur in `core/Service/**`. - `pages/**` bleibt dünn: Input, Auth/AuthZ, Service-Aufruf, Response. - Neue Domain-Logik als Instanz-Service mit Factory-Verdrahtung. - Service-Instanzen in Actions/Helpern nur via `app(Foo::class)`. -- `new ...Factory()` nur im Composition Root (`web/index.php` + `lib/App/registerContainer.php`) oder in `*Factory.php`. -- In `lib/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Factory()`, `new ...Service()`, `new ...Gateway()` oder `new ...Repository()`. +- `new ...Factory()` nur im Composition Root (`web/index.php` + `core/App/registerContainer.php`) oder in `*Factory.php`. +- In `core/Service/**` außerhalb von `*Factory.php` keine direkten `new ...Factory()`, `new ...Service()`, `new ...Gateway()` oder `new ...Repository()`. - Alte Service-Helper (`accessServicesFactory()`, `userServicesFactory()` usw.) nicht mehr verwenden. - `pages/**/data().php` nur GET (`gridRequireGetRequest()`), Query-Normalisierung ausschließlich über `gridParseFilters(...)`. - Für jede Liste ein `filter-schema.php` im selben Verzeichnis; `data().php`, `index().php` und `index(default).phtml` verwenden dieses Schema. diff --git a/docs/tutorial-02-systemueberblick.md b/docs/tutorial-02-systemueberblick.md index cd77333..a3e87d2 100644 --- a/docs/tutorial-02-systemueberblick.md +++ b/docs/tutorial-02-systemueberblick.md @@ -29,7 +29,7 @@ Kernmodule: - `config/` Konfiguration - `db/` Schema/Updates -- `lib/` Fachlogik +- `core/` Fachlogik - `pages/` Actions + Views - `templates/` Partials/Layout - `web/` CSS/JS/Assets diff --git a/docs/tutorial-04-architektur-request-flow.md b/docs/tutorial-04-architektur-request-flow.md index f34c1c9..5dcfb76 100644 --- a/docs/tutorial-04-architektur-request-flow.md +++ b/docs/tutorial-04-architektur-request-flow.md @@ -25,15 +25,15 @@ API-Ergänzung: ## Schichtregeln - `pages/**`: Input, Auth/AuthZ, Service-Aufruf, Response. -- `lib/Service/**`: Business-Regeln und Orchestrierung. -- `lib/Repository/**`: SQL, Filter, Mapping. +- `core/Service/**`: Business-Regeln und Orchestrierung. +- `core/Repository/**`: SQL, Filter, Mapping. - `templates/**`: Rendering ohne Business-Logik. - Request-Daten in Actions nur über `requestInput()` (keine Input-Superglobals). - Validierungsfehler zentral über `FormErrors`; API-Fehler über `ApiResponse::validationFromFormErrors(...)`. - Template-AuthZ konsumiert nur vorbereitete `$viewAuth`-Daten (kein `can('...')` im Template). - Service-Auflösung in Actions/Helpern über `app(Foo::class)`. - Fachliche Audit-Events laufen zentral über `SystemAuditService`. -- Persistierte Status/Outcome-Werte laufen über die zentrale Taxonomie-Schicht `lib/Domain/Taxonomy/*` (Enums + DB-Checks). +- Persistierte Status/Outcome-Werte laufen über die zentrale Taxonomie-Schicht `core/Domain/Taxonomy/*` (Enums + DB-Checks). - `pages/**/data().php` sind GET-only (`gridRequireGetRequest()`) und normalisieren `limit`/`offset`/`order`/`dir` über Grid-Helper. ## Einfaches ASCII-Beispiel @@ -82,5 +82,5 @@ Action ## Vertiefung - Vollständiger Kompass: `/docs/explanation-architektur.md` -- Regeln für `lib/**`: `/docs/reference-lib-standards.md` +- Regeln für `core/**`: `/docs/reference-core-standards.md` - RBAC-Rechte erweitern: `/docs/howto-rbac-permissions-playbook.md` diff --git a/docs/tutorial-06-erste-aenderung-backend.md b/docs/tutorial-06-erste-aenderung-backend.md index b0ec9d4..5d85376 100644 --- a/docs/tutorial-06-erste-aenderung-backend.md +++ b/docs/tutorial-06-erste-aenderung-backend.md @@ -19,7 +19,7 @@ Eine kleine Backend-Änderung korrekt über Repository und Service umsetzen. - Service kennt keine Superglobals/Redirects. - Externe API bleibt UUID-first. - Service-Auflösung in `pages/**` via `app(Foo::class)`. -- Keine direkten `new ...Factory()` in `lib/Service/**` außerhalb `*Factory.php`. +- Keine direkten `new ...Factory()` in `core/Service/**` außerhalb `*Factory.php`. ## Checks @@ -30,5 +30,5 @@ docker compose exec php vendor/bin/phpstan analyse -c phpstan.neon --no-progress ## Vertiefung -- `lib/**`-Regeln: `/docs/reference-lib-standards.md` +- `core/**`-Regeln: `/docs/reference-core-standards.md` - API-Prozess: `/docs/tutorial-08-api-erweitern.md` diff --git a/phpstan.neon b/phpstan.neon index 4b9da26..fc73e44 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -6,7 +6,7 @@ parameters: - bin/console paths: - config - - lib + - core - modules - pages - tests diff --git a/phpunit.xml b/phpunit.xml index 01e6619..4c85bf6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,7 +7,7 @@ config - lib + core modules pages tests diff --git a/tests/Architecture/AddressBookModuleIsolationContractTest.php b/tests/Architecture/AddressBookModuleIsolationContractTest.php index 8d47814..ba0ff32 100644 --- a/tests/Architecture/AddressBookModuleIsolationContractTest.php +++ b/tests/Architecture/AddressBookModuleIsolationContractTest.php @@ -10,7 +10,7 @@ final class AddressBookModuleIsolationContractTest extends TestCase public function testSearchInfrastructureHasNoAddressBookHardcoding(): void { - $searchDir = dirname(__DIR__, 2) . '/lib/Support/Search'; + $searchDir = dirname(__DIR__, 2) . '/core/Support/Search'; $hits = $this->grepDir($searchDir, '/address.book/i', ['*.php']); self::assertSame([], $hits, sprintf( @@ -21,7 +21,7 @@ final class AddressBookModuleIsolationContractTest extends TestCase public function testSearchConfigHasNoAddressBookHardcoding(): void { - $file = dirname(__DIR__, 2) . '/lib/Support/SearchConfig.php'; + $file = dirname(__DIR__, 2) . '/core/Support/SearchConfig.php'; $content = file_get_contents($file); self::assertIsString($content); @@ -32,7 +32,7 @@ final class AddressBookModuleIsolationContractTest extends TestCase public function testLayoutContextHasNoHardcodedAddressBookBlock(): void { - $file = dirname(__DIR__, 2) . '/lib/Support/helpers/app.php'; + $file = dirname(__DIR__, 2) . '/core/Support/helpers/app.php'; $content = file_get_contents($file); self::assertIsString($content); @@ -67,7 +67,7 @@ final class AddressBookModuleIsolationContractTest extends TestCase public function testCoreNoLongerContainsAddressBookServiceDirectory(): void { - $coreServiceDir = dirname(__DIR__, 2) . '/lib/Service/AddressBook'; + $coreServiceDir = dirname(__DIR__, 2) . '/core/Service/AddressBook'; self::assertDirectoryDoesNotExist( $coreServiceDir, 'Addressbook service classes should live in modules/addressbook/lib, not in Core lib/Service' diff --git a/tests/Architecture/ApiResourceContractTest.php b/tests/Architecture/ApiResourceContractTest.php index 0181203..fc0feb6 100644 --- a/tests/Architecture/ApiResourceContractTest.php +++ b/tests/Architecture/ApiResourceContractTest.php @@ -29,7 +29,7 @@ class ApiResourceContractTest extends TestCase $this->assertStringContainsString('UserApiWriteInputMapper::class', $usersShow); $this->assertStringContainsString('->normalize($input)', $usersShow); - $mapper = $this->readProjectFile('lib/Service/User/UserApiWriteInputMapper.php'); + $mapper = $this->readProjectFile('core/Service/User/UserApiWriteInputMapper.php'); $this->assertStringContainsString("'tenant_ids' => 'use_tenant_uuids'", $mapper); $this->assertStringContainsString("'role_ids' => 'use_role_uuids'", $mapper); $this->assertStringContainsString("'department_ids' => 'use_department_uuids'", $mapper); diff --git a/tests/Architecture/ApiSchemaContractTest.php b/tests/Architecture/ApiSchemaContractTest.php index 3728eb7..0e1a750 100644 --- a/tests/Architecture/ApiSchemaContractTest.php +++ b/tests/Architecture/ApiSchemaContractTest.php @@ -50,7 +50,7 @@ class ApiSchemaContractTest extends TestCase public function testApiErrorEnvelopeIsCentralizedAndRequestIdAware(): void { - $apiResponse = $this->readProjectFile('lib/Http/ApiResponse.php'); + $apiResponse = $this->readProjectFile('core/Http/ApiResponse.php'); $this->assertStringContainsString("'ok' => false", $apiResponse); $this->assertStringContainsString("'error_code' => \$normalizedErrorCode", $apiResponse); $this->assertStringContainsString("'details' => \$normalizedDetails", $apiResponse); diff --git a/tests/Architecture/ApiSessionIsolationContractTest.php b/tests/Architecture/ApiSessionIsolationContractTest.php index 41d60e1..40b72a3 100644 --- a/tests/Architecture/ApiSessionIsolationContractTest.php +++ b/tests/Architecture/ApiSessionIsolationContractTest.php @@ -45,7 +45,7 @@ final class ApiSessionIsolationContractTest extends TestCase public function testApiBootstrapDoesNotStartSessionOrRememberMeFlow(): void { - $content = $this->readProjectFile('lib/Http/ApiBootstrap.php'); + $content = $this->readProjectFile('core/Http/ApiBootstrap.php'); self::assertStringNotContainsString('Session::start(', $content); self::assertStringNotContainsString('RememberMe', $content); diff --git a/tests/Architecture/AuditModuleIsolationContractTest.php b/tests/Architecture/AuditModuleIsolationContractTest.php index 1611299..adb7dfe 100644 --- a/tests/Architecture/AuditModuleIsolationContractTest.php +++ b/tests/Architecture/AuditModuleIsolationContractTest.php @@ -8,7 +8,7 @@ final class AuditModuleIsolationContractTest extends TestCase { public function testCoreServiceAuditDirectoryContainsOnlyInterfaces(): void { - $dir = dirname(__DIR__, 2) . '/lib/Service/Audit'; + $dir = dirname(__DIR__, 2) . '/core/Service/Audit'; self::assertDirectoryExists($dir); $files = array_values(array_filter( @@ -37,7 +37,7 @@ final class AuditModuleIsolationContractTest extends TestCase self::assertSame( $allowed, $files, - 'lib/Service/Audit/ should contain only interfaces and null implementations, found: ' . implode(', ', $files) + 'core/Service/Audit/ should contain only interfaces and null implementations, found: ' . implode(', ', $files) ); } @@ -45,14 +45,14 @@ final class AuditModuleIsolationContractTest extends TestCase { $root = dirname(__DIR__, 2); self::assertDirectoryDoesNotExist( - $root . '/lib/Repository/Audit', - 'Audit repository classes should live in modules/audit/lib, not in Core lib/Repository/Audit' + $root . '/core/Repository/Audit', + 'Audit repository classes should live in modules/audit/lib, not in Core core/Repository/Audit' ); } public function testCoreDomainTaxonomyHasNoAuditEnums(): void { - $dir = dirname(__DIR__, 2) . '/lib/Domain/Taxonomy'; + $dir = dirname(__DIR__, 2) . '/core/Domain/Taxonomy'; if (!is_dir($dir)) { self::addToAssertionCount(1); return; @@ -90,7 +90,7 @@ final class AuditModuleIsolationContractTest extends TestCase { $root = dirname(__DIR__, 2); self::assertFileDoesNotExist( - $root . '/lib/Http/ApiSystemAuditReporter.php', + $root . '/core/Http/ApiSystemAuditReporter.php', 'ApiSystemAuditReporter should live in modules/audit/lib, not in Core lib/Http' ); } @@ -114,7 +114,7 @@ final class AuditModuleIsolationContractTest extends TestCase { $root = dirname(__DIR__, 2); self::assertFileDoesNotExist( - $root . '/lib/Service/Scheduler/Handler/SystemAuditPurgeJobHandler.php', + $root . '/core/Service/Scheduler/Handler/SystemAuditPurgeJobHandler.php', 'SystemAuditPurgeJobHandler should live in modules/audit, not in Core' ); } diff --git a/tests/Architecture/AuthzApiBootstrapContractTest.php b/tests/Architecture/AuthzApiBootstrapContractTest.php index 589f260..b2ef758 100644 --- a/tests/Architecture/AuthzApiBootstrapContractTest.php +++ b/tests/Architecture/AuthzApiBootstrapContractTest.php @@ -16,7 +16,7 @@ class AuthzApiBootstrapContractTest extends TestCase public function testApiBootstrapSupportsOptionalAuthRequirement(): void { - $content = $this->readProjectFile('lib/Http/ApiBootstrap.php'); + $content = $this->readProjectFile('core/Http/ApiBootstrap.php'); $this->assertStringContainsString('public static function init(bool $requireAuth = true): void', $content); $this->assertStringContainsString('if ($requireAuth) {', $content); $this->assertStringContainsString('$authenticated = ApiAuth::authenticate();', $content); diff --git a/tests/Architecture/AuthzUiContractSupport.php b/tests/Architecture/AuthzUiContractSupport.php index 4fd0d5a..4df303a 100644 --- a/tests/Architecture/AuthzUiContractSupport.php +++ b/tests/Architecture/AuthzUiContractSupport.php @@ -117,7 +117,7 @@ trait AuthzUiContractSupport $constantName = trim((string) end($parts)); $this->assertNotSame('', $constantName, 'Invalid UiCapabilityMap constant: ' . $mapConstant); - $mapContent = $this->readProjectFile('lib/Service/Access/UiCapabilityMap.php'); + $mapContent = $this->readProjectFile('core/Service/Access/UiCapabilityMap.php'); $constantPattern = '/public const\\s+' . preg_quote($constantName, '/') . '\\s*=\\s*\\[(.*?)\\];/s'; $matched = preg_match($constantPattern, $mapContent, $constantMatch); $this->assertSame( diff --git a/tests/Architecture/AuthzUiLayoutContractTest.php b/tests/Architecture/AuthzUiLayoutContractTest.php index a820812..d07f73e 100644 --- a/tests/Architecture/AuthzUiLayoutContractTest.php +++ b/tests/Architecture/AuthzUiLayoutContractTest.php @@ -36,13 +36,13 @@ class AuthzUiLayoutContractTest extends TestCase public function testUiAccessServiceUsesCentralLayoutMapDefinition(): void { - $content = $this->readProjectFile('lib/Service/Access/UiAccessService.php'); + $content = $this->readProjectFile('core/Service/Access/UiAccessService.php'); $this->assertStringContainsString('UiCapabilityMap::LAYOUT', $content); } public function testCoreCapabilityMapDoesNotHardcodeAuditCapabilities(): void { - $content = $this->readProjectFile('lib/Service/Access/UiCapabilityMap.php'); + $content = $this->readProjectFile('core/Service/Access/UiCapabilityMap.php'); $this->assertStringNotContainsString('can_view_system_audit', $content); $this->assertStringNotContainsString('can_view_api_audit', $content); $this->assertStringNotContainsString('can_view_user_lifecycle_audit', $content); diff --git a/tests/Architecture/BookmarksModuleIsolationContractTest.php b/tests/Architecture/BookmarksModuleIsolationContractTest.php index d4035f3..09b45b6 100644 --- a/tests/Architecture/BookmarksModuleIsolationContractTest.php +++ b/tests/Architecture/BookmarksModuleIsolationContractTest.php @@ -42,7 +42,7 @@ final class BookmarksModuleIsolationContractTest extends TestCase { $root = dirname(__DIR__, 2); self::assertDirectoryDoesNotExist( - $root . '/lib/Service/Bookmark', + $root . '/core/Service/Bookmark', 'Bookmark service classes should live in modules/bookmarks/lib, not in Core lib/Service' ); } @@ -50,7 +50,7 @@ final class BookmarksModuleIsolationContractTest extends TestCase public function testCoreNoLongerContainsBookmarkRepositoryFiles(): void { $root = dirname(__DIR__, 2); - $repoDir = $root . '/lib/Repository/User'; + $repoDir = $root . '/core/Repository/User'; if (!is_dir($repoDir)) { self::addToAssertionCount(1); return; @@ -61,7 +61,7 @@ final class BookmarksModuleIsolationContractTest extends TestCase self::assertSame( [], array_values($bookmarkFiles), - 'Core lib/Repository/User/ still contains Bookmark files: ' . implode(', ', $bookmarkFiles) + 'Core core/Repository/User/ still contains Bookmark files: ' . implode(', ', $bookmarkFiles) ); } @@ -69,14 +69,14 @@ final class BookmarksModuleIsolationContractTest extends TestCase { $root = dirname(__DIR__, 2); self::assertFileDoesNotExist( - $root . '/lib/Support/BookmarkUrlNormalizer.php', + $root . '/core/Support/BookmarkUrlNormalizer.php', 'BookmarkUrlNormalizer should live in modules/bookmarks/lib, not in Core lib/Support' ); } public function testCoreAuthLifecycleHasNoLegacyBookmarkSessionKeyWrites(): void { - $file = dirname(__DIR__, 2) . '/lib/Service/Auth/AuthSessionTenantContextService.php'; + $file = dirname(__DIR__, 2) . '/core/Service/Auth/AuthSessionTenantContextService.php'; $content = file_get_contents($file); self::assertIsString($content); self::assertStringNotContainsString('user_bookmarks', $content); diff --git a/tests/Architecture/ConfigContractsTest.php b/tests/Architecture/ConfigContractsTest.php index f712f82..e3b3744 100644 --- a/tests/Architecture/ConfigContractsTest.php +++ b/tests/Architecture/ConfigContractsTest.php @@ -72,7 +72,7 @@ final class ConfigContractsTest extends TestCase private function runtimeSourceFiles(): array { $root = $this->projectRootPath(); - $scanTargets = ['lib', 'pages', 'templates', 'web']; + $scanTargets = ['core', 'pages', 'templates', 'web']; $extensions = ['php', 'phtml', 'js']; $files = []; diff --git a/tests/Architecture/CoreStarterkitContractTest.php b/tests/Architecture/CoreStarterkitContractTest.php index 8aead44..baf1e12 100644 --- a/tests/Architecture/CoreStarterkitContractTest.php +++ b/tests/Architecture/CoreStarterkitContractTest.php @@ -63,7 +63,7 @@ class CoreStarterkitContractTest extends TestCase ]; foreach ($patterns as $pattern => $label) { - $violations = $this->findPatternMatchesInPhpFiles('lib/Service', $pattern); + $violations = $this->findPatternMatchesInPhpFiles('core/Service', $pattern); $this->assertSame([], $violations, "Superglobal {$label} usage found in lib/Service/:\n" . implode("\n", $violations)); } } @@ -139,7 +139,7 @@ class CoreStarterkitContractTest extends TestCase foreach ($patterns as $pattern => $label) { $violations = array_merge( - $this->findPatternMatchesInPhpFiles('lib', $pattern), + $this->findPatternMatchesInPhpFiles('core', $pattern), $this->findPatternMatchesInPhpFiles('pages', $pattern), $this->findPatternMatchesInPhpFiles('tests', $pattern), ); diff --git a/tests/Architecture/FileStorageContractTest.php b/tests/Architecture/FileStorageContractTest.php index 5e01b7d..d79e699 100644 --- a/tests/Architecture/FileStorageContractTest.php +++ b/tests/Architecture/FileStorageContractTest.php @@ -17,14 +17,14 @@ class FileStorageContractTest extends TestCase /** Services that legitimately write to web/ for favicon delivery. */ private const WEB_WRITE_EXEMPT_FILES = [ - 'lib/Service/Branding/BrandingFaviconService.php', - 'lib/Service/Tenant/TenantFaviconService.php', + 'core/Service/Branding/BrandingFaviconService.php', + 'core/Service/Tenant/TenantFaviconService.php', ]; public function testNoServiceWritesFilesToWebDirectory(): void { $root = $this->projectRootPath(); - $serviceDir = $root . '/lib/Service'; + $serviceDir = $root . '/core/Service'; $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($serviceDir)); $violations = []; diff --git a/tests/Architecture/FrontendTelemetryContractTest.php b/tests/Architecture/FrontendTelemetryContractTest.php index b089f07..b7b9a23 100644 --- a/tests/Architecture/FrontendTelemetryContractTest.php +++ b/tests/Architecture/FrontendTelemetryContractTest.php @@ -12,7 +12,7 @@ class FrontendTelemetryContractTest extends TestCase { $js = $this->readProjectFile('web/js/core/app-telemetry.js'); $ingest = $this->readProjectFile('modules/audit/lib/Module/Audit/Service/FrontendTelemetryIngestService.php'); - $settings = $this->readProjectFile('lib/Service/Settings/SettingsFrontendTelemetryGateway.php'); + $settings = $this->readProjectFile('core/Service/Settings/SettingsFrontendTelemetryGateway.php'); $jsMap = $this->parseJsEventKeyToTypeMap($js); $phpMap = $this->parsePhpEventTypeToKeyMap($ingest); diff --git a/tests/Architecture/RepositoryInterfaceContractTest.php b/tests/Architecture/RepositoryInterfaceContractTest.php index be47454..5e10fd3 100644 --- a/tests/Architecture/RepositoryInterfaceContractTest.php +++ b/tests/Architecture/RepositoryInterfaceContractTest.php @@ -40,7 +40,7 @@ class RepositoryInterfaceContractTest extends TestCase private function collectRepositoryPairs(): array { $root = $this->projectRootPath(); - $repoDir = $root . '/lib/Repository'; + $repoDir = $root . '/core/Repository'; $pairs = []; @@ -64,9 +64,9 @@ class RepositoryInterfaceContractTest extends TestCase continue; } - // Derive PSR-4 class name: lib/Repository/Foo/Bar.php → MintyPHP\Repository\Foo\Bar + // Derive PSR-4 class name: core/Repository/Foo/Bar.php → MintyPHP\Repository\Foo\Bar $relativePath = ltrim(str_replace($root, '', $file->getPathname()), '/'); - $className = 'MintyPHP\\' . str_replace(['/', '.php'], ['\\', ''], substr($relativePath, strlen('lib/'))); + $className = 'MintyPHP\\' . str_replace(['/', '.php'], ['\\', ''], substr($relativePath, strlen('core/'))); if (in_array($className, self::EXCLUDED_CLASSES, true)) { continue; diff --git a/tests/Architecture/RepositoryLayerIsolationContractTest.php b/tests/Architecture/RepositoryLayerIsolationContractTest.php index 76c1ed4..ffc3510 100644 --- a/tests/Architecture/RepositoryLayerIsolationContractTest.php +++ b/tests/Architecture/RepositoryLayerIsolationContractTest.php @@ -27,7 +27,7 @@ class RepositoryLayerIsolationContractTest extends TestCase public function testCoreRepositoriesDoNotAccessHttpSuperglobals(): void { - $this->assertRepositoryIsolation('lib/Repository'); + $this->assertRepositoryIsolation('core/Repository'); } public function testModuleRepositoriesDoNotAccessHttpSuperglobals(): void diff --git a/tests/Architecture/SecurityCryptoContractTest.php b/tests/Architecture/SecurityCryptoContractTest.php index 0ba822c..ea673c7 100644 --- a/tests/Architecture/SecurityCryptoContractTest.php +++ b/tests/Architecture/SecurityCryptoContractTest.php @@ -12,12 +12,12 @@ class SecurityCryptoContractTest extends TestCase { use ProjectFileAssertionSupport; - private const CRYPTO_FILE = 'lib/Support/Crypto.php'; + private const CRYPTO_FILE = 'core/Support/Crypto.php'; public function testNoRawOpensslEncryptOutsideCrypto(): void { $violations = array_merge( - $this->findPatternMatchesInPhpFiles('lib', '/\bopenssl_encrypt\s*\(/'), + $this->findPatternMatchesInPhpFiles('core', '/\bopenssl_encrypt\s*\(/'), $this->findPatternMatchesInPhpFiles('pages', '/\bopenssl_encrypt\s*\(/') ); @@ -36,7 +36,7 @@ class SecurityCryptoContractTest extends TestCase public function testNoRawOpensslDecryptOutsideCrypto(): void { $violations = array_merge( - $this->findPatternMatchesInPhpFiles('lib', '/\bopenssl_decrypt\s*\(/'), + $this->findPatternMatchesInPhpFiles('core', '/\bopenssl_decrypt\s*\(/'), $this->findPatternMatchesInPhpFiles('pages', '/\bopenssl_decrypt\s*\(/') ); diff --git a/tests/Architecture/SecurityLoggingRuntimeContractTest.php b/tests/Architecture/SecurityLoggingRuntimeContractTest.php index ec1471d..59e2d1b 100644 --- a/tests/Architecture/SecurityLoggingRuntimeContractTest.php +++ b/tests/Architecture/SecurityLoggingRuntimeContractTest.php @@ -11,7 +11,7 @@ final class SecurityLoggingRuntimeContractTest extends TestCase public function testFrontendTelemetryIngestUsesOnlyRequestScopedErrorLogFallback(): void { $violations = array_merge( - $this->findPatternMatchesInPhpFiles('lib', '/\berror_log\s*\(/'), + $this->findPatternMatchesInPhpFiles('core', '/\berror_log\s*\(/'), $this->findPatternMatchesInPhpFiles('pages', '/\berror_log\s*\(/'), $this->findPatternMatchesInPhpFiles('modules', '/\berror_log\s*\(/') ); diff --git a/tests/Architecture/ServiceLayerNoHtmlContractTest.php b/tests/Architecture/ServiceLayerNoHtmlContractTest.php index ca21533..0ec0952 100644 --- a/tests/Architecture/ServiceLayerNoHtmlContractTest.php +++ b/tests/Architecture/ServiceLayerNoHtmlContractTest.php @@ -16,7 +16,7 @@ class ServiceLayerNoHtmlContractTest extends TestCase /** @var list */ private const EXCLUDED_FILES = [ - 'lib/Service/User/UserAccessPdfService.php', + 'core/Service/User/UserAccessPdfService.php', ]; /** @@ -27,8 +27,8 @@ class ServiceLayerNoHtmlContractTest extends TestCase public function testServicesContainNoHtmlTags(): void { - $violations = $this->findHtmlViolations('lib/Service'); - $violations = array_merge($violations, $this->findHtmlViolations('lib/Http')); + $violations = $this->findHtmlViolations('core/Service'); + $violations = array_merge($violations, $this->findHtmlViolations('core/Http')); self::assertSame( [], diff --git a/tests/Architecture/StatusTaxonomyContractFiles.php b/tests/Architecture/StatusTaxonomyContractFiles.php index 0bcc8c3..b696f07 100644 --- a/tests/Architecture/StatusTaxonomyContractFiles.php +++ b/tests/Architecture/StatusTaxonomyContractFiles.php @@ -16,12 +16,12 @@ final class StatusTaxonomyContractFiles 'modules/audit/lib/Module/Audit/Domain/UserLifecycleTriggerType.php', 'modules/audit/lib/Module/Audit/Domain/UserLifecycleStatus.php', 'modules/audit/lib/Module/Audit/Domain/ImportAuditStatus.php', - 'lib/Domain/Taxonomy/ScheduledJobStatus.php', - 'lib/Domain/Taxonomy/ScheduledJobRunStatus.php', - 'lib/Domain/Taxonomy/ScheduledJobTriggerType.php', - 'lib/Domain/Taxonomy/MailLogStatus.php', - 'lib/Domain/Taxonomy/TenantStatus.php', - 'lib/Domain/Taxonomy/SchedulerRuntimeResult.php', + 'core/Domain/Taxonomy/ScheduledJobStatus.php', + 'core/Domain/Taxonomy/ScheduledJobRunStatus.php', + 'core/Domain/Taxonomy/ScheduledJobTriggerType.php', + 'core/Domain/Taxonomy/MailLogStatus.php', + 'core/Domain/Taxonomy/TenantStatus.php', + 'core/Domain/Taxonomy/SchedulerRuntimeResult.php', ]; } @@ -85,15 +85,15 @@ final class StatusTaxonomyContractFiles 'modules/audit/lib/Module/Audit/Repository/UserLifecycleAuditRepository.php', 'modules/audit/lib/Module/Audit/Service/ImportAuditService.php', 'modules/audit/lib/Module/Audit/Repository/ImportAuditRunRepository.php', - 'lib/Service/Scheduler/SchedulerRunService.php', - 'lib/Repository/Scheduler/ScheduledJobRepository.php', - 'lib/Repository/Scheduler/ScheduledJobRunRepository.php', - 'lib/Repository/Scheduler/SchedulerRuntimeRepository.php', - 'lib/Service/Mail/MailService.php', - 'lib/Repository/Mail/MailLogRepository.php', - 'lib/Service/Tenant/TenantService.php', - 'lib/Repository/Tenant/TenantRepository.php', - 'lib/Repository/Stats/AdminStatsRepository.php', + 'core/Service/Scheduler/SchedulerRunService.php', + 'core/Repository/Scheduler/ScheduledJobRepository.php', + 'core/Repository/Scheduler/ScheduledJobRunRepository.php', + 'core/Repository/Scheduler/SchedulerRuntimeRepository.php', + 'core/Service/Mail/MailService.php', + 'core/Repository/Mail/MailLogRepository.php', + 'core/Service/Tenant/TenantService.php', + 'core/Repository/Tenant/TenantRepository.php', + 'core/Repository/Stats/AdminStatsRepository.php', 'modules/audit/pages/audit/system-audit/data().php', 'modules/audit/pages/audit/user-lifecycle-audit/data().php', 'modules/audit/pages/audit/import-audit/data().php', diff --git a/tests/Console/ConsoleApplicationTest.php b/tests/Console/ConsoleApplicationTest.php index d19e783..41ace13 100644 --- a/tests/Console/ConsoleApplicationTest.php +++ b/tests/Console/ConsoleApplicationTest.php @@ -109,7 +109,7 @@ final class ConsoleApplicationTest extends TestCase public function testAutoDiscoverFindsCommandsInDirectory(): void { $app = new ConsoleApplication(); - $commandsDir = dirname(__DIR__, 2) . '/lib/Console/Commands'; + $commandsDir = dirname(__DIR__, 2) . '/core/Console/Commands'; $app->discoverCommands($commandsDir); // Should find at least the 8 commands we have diff --git a/tests/Unit/Module/SearchProviderCollectionTest.php b/tests/Unit/Module/SearchProviderCollectionTest.php index e8ffbb3..56b82ea 100644 --- a/tests/Unit/Module/SearchProviderCollectionTest.php +++ b/tests/Unit/Module/SearchProviderCollectionTest.php @@ -20,7 +20,7 @@ final class SearchProviderCollectionTest extends TestCase if (!($GLOBALS['minty_app_container'] ?? null) instanceof \MintyPHP\App\AppContainer || !($GLOBALS['minty_app_container'])->has(ModuleRegistry::class)) { // Restore the bootstrap container that has the module registry - $container = require dirname(__DIR__, 3) . '/lib/App/registerContainer.php'; + $container = require dirname(__DIR__, 3) . '/core/App/registerContainer.php'; $this->pushAppContainer($container); setAppContainer($container); } diff --git a/tests/Unit/Support/SearchQueryNormalizerTest.php b/tests/Unit/Support/SearchQueryNormalizerTest.php index 60d2e52..8266268 100644 --- a/tests/Unit/Support/SearchQueryNormalizerTest.php +++ b/tests/Unit/Support/SearchQueryNormalizerTest.php @@ -3,7 +3,6 @@ namespace MintyPHP\Tests\Unit\Support; use MintyPHP\Support\Search\SearchQueryNormalizer; -use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; final class SearchQueryNormalizerTest extends TestCase diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 71ff824..9c75725 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,6 +1,6 @@ in([ $projectRoot . '/config', - $projectRoot . '/lib', + $projectRoot . '/core', $projectRoot . '/pages', $projectRoot . '/tests', ]) diff --git a/web/index.php b/web/index.php index d1533c5..e98d1a8 100644 --- a/web/index.php +++ b/web/index.php @@ -27,9 +27,9 @@ use MintyPHP\Support\Flash; chdir(__DIR__ . '/..'); require 'vendor/autoload.php'; require 'config/config.php'; -require 'lib/Support/helpers.php'; +require 'core/Support/helpers.php'; \MintyPHP\Http\ErrorHandler::register(); -$container = require 'lib/App/registerContainer.php'; +$container = require 'core/App/registerContainer.php'; setAppContainer($container); // ── 2. Module runtime validation ────────────────────────────────────