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

@@ -13,6 +13,7 @@ use App\Framework\DI\Initializer;
use App\Framework\DI\InitializerDependencyGraph;
use App\Framework\DI\ValueObjects\DependencyGraphNode;
use App\Framework\Discovery\Results\DiscoveryRegistry;
use App\Framework\Logging\Logger;
use App\Framework\Reflection\ReflectionProvider;
/**
@@ -38,8 +39,12 @@ final readonly class InitializerProcessor
*/
public function processInitializers(DiscoveryRegistry $results): void
{
// Safe Logger resolution - use if available, otherwise rely on error_log
$logger = $this->container->has(Logger::class) ? $this->container->get(Logger::class) : null;
$initializerResults = $results->attributes->get(Initializer::class);
$logger?->debug("InitializerProcessor: Processing " . count($initializerResults) . " initializers");
$dependencyGraph = new InitializerDependencyGraph($this->reflectionProvider);
// Phase 1: Setup-Initializer sofort ausführen & Service-Initializer zum Graph hinzufügen
@@ -48,10 +53,9 @@ final readonly class InitializerProcessor
/** @var Initializer $initializer */
$initializer = $discoveredAttribute->createAttributeInstance();
// Get mapped data from additionalData (was mappedData in AttributeMapping)
// The actual initializer data is in the additionalData from the InitializerMapper
$initializerData = $discoveredAttribute->additionalData;
// The actual initializer data is in the additionalData from the InitializerMapper
if (! $initializerData) {
continue;
}
@@ -63,7 +67,6 @@ final readonly class InitializerProcessor
continue;
}
$methodName = $discoveredAttribute->methodName ?? MethodName::invoke();
// The return type is directly in the additionalData from the InitializerMapper
$returnType = $initializerData['return'] ?? null;
@@ -78,6 +81,8 @@ final readonly class InitializerProcessor
$dependencyGraph->addInitializer($returnType, $discoveredAttribute->className, $methodName);
}
} catch (\Throwable $e) {
// Skip failed initializers
}
}
@@ -95,9 +100,13 @@ final readonly class InitializerProcessor
$executionOrder = $graph->getExecutionOrder();
foreach ($executionOrder as $returnType) {
if ($graph->hasNode($returnType)) {
/** @var DependencyGraphNode $node */
$node = $graph->getNode($returnType);
$this->registerLazyService(
$returnType,
$node->getClassName(),
@@ -148,7 +157,9 @@ final readonly class InitializerProcessor
*/
private function registerLazyService(string $returnType, string $className, string $methodName): void
{
$factory = function ($container) use ($className, $methodName, $returnType) {
$instance = $container->invoker->invoke(ClassName::create($className), $methodName);
// Wenn das ein Interface ist, registriere auch die konkrete Klasse automatisch
@@ -162,7 +173,12 @@ final readonly class InitializerProcessor
return $instance;
};
// Registriere den Return-Type (Interface oder konkrete Klasse)
$this->container->singleton($returnType, $factory);
try {
// Registriere den Return-Type (Interface oder konkrete Klasse)
$this->container->singleton($returnType, $factory);
} catch (\Throwable $e) {
// Service registration failed - continue
}
}
}