Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
74 lines
2.8 KiB
PHP
74 lines
2.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Bootstrap Discovery System
|
|
*
|
|
* This script runs the discovery scanners and stores results
|
|
* Run this ONCE to initialize the new discovery system
|
|
*/
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
use App\Framework\BuildTime\Discovery\Scanners\AttributeScanner;
|
|
use App\Framework\BuildTime\Discovery\Scanners\InterfaceScanner;
|
|
use App\Framework\BuildTime\Discovery\Scanners\TemplateScanner;
|
|
use App\Framework\Core\PathProvider;
|
|
use App\Framework\Discovery\Storage\DiscoveryStorageService;
|
|
use App\Framework\Filesystem\FileScanner;
|
|
use App\Framework\Filesystem\FileSystemService;
|
|
use App\Framework\Logging\NullLogger;
|
|
use App\Framework\ReflectionLegacy\CachedReflectionProvider;
|
|
|
|
echo "🚀 Bootstrapping Discovery System...\n\n";
|
|
$totalStart = microtime(true);
|
|
|
|
// Create dependencies
|
|
$basePath = __DIR__ . '/../..';
|
|
$pathProvider = new PathProvider($basePath);
|
|
$storage = new DiscoveryStorageService($pathProvider);
|
|
$fileSystemService = new FileSystemService();
|
|
$logger = null;
|
|
$fileScanner = new FileScanner($logger, null, $fileSystemService);
|
|
$reflectionProvider = new CachedReflectionProvider();
|
|
|
|
// 1. Discover Attributes
|
|
echo "📦 Discovering attributes...\n";
|
|
$attrStart = microtime(true);
|
|
$attributeScanner = new AttributeScanner($fileScanner, $reflectionProvider);
|
|
$paths = [$pathProvider->getSourcePath()];
|
|
$attributeRegistry = $attributeScanner->scan($paths);
|
|
$storage->storeAttributes($attributeRegistry);
|
|
$attrDuration = round((microtime(true) - $attrStart) * 1000, 2);
|
|
echo " ✅ {$attributeRegistry->count()} attributes in {$attrDuration}ms\n\n";
|
|
|
|
// 2. Discover Templates
|
|
echo "📄 Discovering templates...\n";
|
|
$tplStart = microtime(true);
|
|
$templateScanner = new TemplateScanner($fileScanner);
|
|
$templatePaths = [
|
|
$pathProvider->getSourcePath(),
|
|
$pathProvider->getBasePath() . '/resources'
|
|
];
|
|
$templateRegistry = $templateScanner->scan($templatePaths);
|
|
$storage->storeTemplates($templateRegistry);
|
|
$tplDuration = round((microtime(true) - $tplStart) * 1000, 2);
|
|
echo " ✅ " . count($templateRegistry->getAll()) . " templates in {$tplDuration}ms\n\n";
|
|
|
|
// 3. Discover Interfaces
|
|
echo "🔌 Discovering interface implementations...\n";
|
|
$intStart = microtime(true);
|
|
$interfaceScanner = new InterfaceScanner($fileScanner, $reflectionProvider, []);
|
|
$interfaceRegistry = $interfaceScanner->scan($paths);
|
|
$storage->storeInterfaces($interfaceRegistry);
|
|
$intDuration = round((microtime(true) - $intStart) * 1000, 2);
|
|
echo " ✅ {$interfaceRegistry->count()} implementations in {$intDuration}ms\n\n";
|
|
|
|
// Summary
|
|
$totalDuration = round((microtime(true) - $totalStart) * 1000, 2);
|
|
echo str_repeat("=", 60) . "\n";
|
|
echo "🎉 Discovery bootstrap complete in {$totalDuration}ms\n";
|
|
echo " 📁 Stored in: storage/discovery/\n";
|
|
echo str_repeat("=", 60) . "\n";
|