- Add comprehensive health check system with multiple endpoints - Add Prometheus metrics endpoint - Add production logging configurations (5 strategies) - Add complete deployment documentation suite: * QUICKSTART.md - 30-minute deployment guide * DEPLOYMENT_CHECKLIST.md - Printable verification checklist * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference * production-logging.md - Logging configuration guide * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation * README.md - Navigation hub * DEPLOYMENT_SUMMARY.md - Executive summary - Add deployment scripts and automation - Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment - Update README with production-ready features All production infrastructure is now complete and ready for deployment.
60 lines
1.9 KiB
PHP
60 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
use App\Framework\LiveComponents\Performance\CompiledComponentMetadata;
|
|
use App\Framework\LiveComponents\Performance\ComponentPropertyMetadata;
|
|
|
|
echo "=== Test Direct Validation Logic ===\n\n";
|
|
|
|
// Simulate metadata
|
|
$metadata = new CompiledComponentMetadata(
|
|
className: 'TestCounterComponent',
|
|
componentName: 'counter',
|
|
properties: [
|
|
'initialValue' => new ComponentPropertyMetadata(
|
|
name: 'initialValue',
|
|
type: 'int',
|
|
isPublic: true,
|
|
isReadonly: false
|
|
)
|
|
],
|
|
actions: [],
|
|
constructorParams: []
|
|
);
|
|
|
|
echo "Metadata properties: " . implode(', ', array_keys($metadata->properties)) . "\n\n";
|
|
|
|
// Test 1: Valid prop
|
|
echo "=== Test 1: Check valid prop 'initialValue' ===\n";
|
|
$has = $metadata->hasProperty('initialValue');
|
|
echo "hasProperty('initialValue'): " . ($has ? 'true' : 'false') . "\n\n";
|
|
|
|
// Test 2: Invalid prop
|
|
echo "=== Test 2: Check invalid prop 'id' ===\n";
|
|
$has = $metadata->hasProperty('id');
|
|
echo "hasProperty('id'): " . ($has ? 'true' : 'false') . "\n\n";
|
|
|
|
// Test 3: Simulate validation logic from XComponentProcessor
|
|
echo "=== Test 3: Simulate XComponentProcessor validation logic ===\n";
|
|
$props = ['id' => 'demo', 'initialValue' => '5'];
|
|
echo "Props to validate: " . json_encode($props) . "\n";
|
|
|
|
foreach ($props as $propName => $value) {
|
|
// Skip 'id' - it's used for ComponentId, not a component property
|
|
if ($propName === 'id') {
|
|
echo " → Skipping 'id' (used for ComponentId)\n";
|
|
continue;
|
|
}
|
|
|
|
if (! $metadata->hasProperty($propName)) {
|
|
echo " → ERROR: Property '{$propName}' not found in metadata!\n";
|
|
$propertyNames = array_keys($metadata->properties);
|
|
echo " Available: " . implode(', ', $propertyNames) . "\n";
|
|
} else {
|
|
echo " → OK: Property '{$propName}' exists\n";
|
|
}
|
|
}
|