docs: consolidate documentation into organized structure

- Move 12 markdown files from root to docs/ subdirectories
- Organize documentation by category:
  • docs/troubleshooting/ (1 file)  - Technical troubleshooting guides
  • docs/deployment/      (4 files) - Deployment and security documentation
  • docs/guides/          (3 files) - Feature-specific guides
  • docs/planning/        (4 files) - Planning and improvement proposals

Root directory cleanup:
- Reduced from 16 to 4 markdown files in root
- Only essential project files remain:
  • CLAUDE.md (AI instructions)
  • README.md (Main project readme)
  • CLEANUP_PLAN.md (Current cleanup plan)
  • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements)

This improves:
 Documentation discoverability
 Logical organization by purpose
 Clean root directory
 Better maintainability
This commit is contained in:
2025-10-05 11:05:04 +02:00
parent 887847dde6
commit 5050c7d73a
36686 changed files with 196456 additions and 12398919 deletions

View File

@@ -55,52 +55,33 @@ final readonly class DiscoveryServiceBootstrapper
$cachedItem = $cache->get($cacheKey);
error_log("DiscoveryServiceBootstrapper: Cache lookup for key: " . $cacheKey->toString() .
" - Hit: " . ($cachedItem->isHit ? "YES" : "NO"));
if ($cachedItem->isHit) {
error_log("DiscoveryServiceBootstrapper: Cache hit for key: " . $cacheKey->toString());
// Ensure DiscoveryRegistry class is loaded before attempting deserialization
if (! class_exists(DiscoveryRegistry::class, true)) {
error_log("DiscoveryServiceBootstrapper: Could not load DiscoveryRegistry class, skipping cache");
$cachedRegistry = null;
} else {
// Versuche die gecachten Daten zu laden
$cachedRegistry = null;
error_log("DiscoveryServiceBootstrapper: Cached value type: " . gettype($cachedItem->value) .
" - Class: " . (is_object($cachedItem->value) ? get_class($cachedItem->value) : 'not object'));
try {
// Skip incomplete classes - they indicate autoloader issues
if (is_object($cachedItem->value) && get_class($cachedItem->value) === '__PHP_Incomplete_Class') {
error_log("DiscoveryServiceBootstrapper: Skipping __PHP_Incomplete_Class cache entry");
$cachedRegistry = null;
} elseif ($cachedItem->value instanceof DiscoveryRegistry) {
$cachedRegistry = $cachedItem->value;
error_log("DiscoveryServiceBootstrapper: Using cached DiscoveryRegistry directly");
} elseif (is_array($cachedItem->value)) {
$cachedRegistry = DiscoveryRegistry::fromArray($cachedItem->value);
error_log("DiscoveryServiceBootstrapper: Deserialized from array");
} elseif (is_string($cachedItem->value)) {
$cachedRegistry = DiscoveryRegistry::fromArray(json_decode($cachedItem->value, true, 512, JSON_THROW_ON_ERROR));
error_log("DiscoveryServiceBootstrapper: Deserialized from JSON string");
} else {
error_log("DiscoveryServiceBootstrapper: Unsupported cache value type: " . gettype($cachedItem->value));
$cachedRegistry = null;
}
} catch (\Throwable $e) {
error_log("DiscoveryServiceBootstrapper: Failed to deserialize cached data: " . $e->getMessage());
$cachedRegistry = null;
}
}
if ($cachedRegistry !== null && ! $cachedRegistry->isEmpty()) {
$consoleCommandsInCache = count($cachedRegistry->attributes->get(\App\Framework\Console\ConsoleCommand::class));
error_log("DiscoveryServiceBootstrapper: Loaded cached registry with " .
$consoleCommandsInCache . " console commands (total items: " . count($cachedRegistry) . ")");
$this->container->singleton(DiscoveryRegistry::class, $cachedRegistry);
// Initializer-Verarbeitung für gecachte Registry
@@ -108,25 +89,14 @@ final readonly class DiscoveryServiceBootstrapper
$initializerProcessor->processInitializers($cachedRegistry);
return $cachedRegistry;
} else {
error_log("DiscoveryServiceBootstrapper: Cached registry is " .
($cachedRegistry === null ? "null" : "empty") .
", falling back to full discovery");
}
}
// Fallback: Vollständige Discovery durchführen
error_log("DiscoveryServiceBootstrapper: No valid cache found, performing full discovery");
// Test: Ist DemoCommand verfügbar?
$demoCommandExists = class_exists(\App\Framework\Console\DemoCommand::class, true);
error_log("DiscoveryServiceBootstrapper: DemoCommand class exists: " . ($demoCommandExists ? "YES" : "NO"));
$results = $this->performBootstrap($pathProvider, $cache, $discoveryConfig);
// Nach der Discovery explizit in unserem eigenen Cache-Format speichern
$consoleCommandCount = count($results->attributes->get(\App\Framework\Console\ConsoleCommand::class));
error_log("DiscoveryServiceBootstrapper: Discovery completed with " . $consoleCommandCount . " console commands");
// Only cache if we found meaningful results
// An empty discovery likely indicates initialization timing issues
@@ -140,8 +110,6 @@ final readonly class DiscoveryServiceBootstrapper
);
$cache->set($cacheItem);
} else {
error_log("DiscoveryServiceBootstrapper: Skipping cache - empty or no console commands found (likely timing issue)");
}
return $results;