Files
michaelschiemer/tests/debug/test-livecomponent-state.php
Michael Schiemer fc3d7e6357 feat(Production): Complete production deployment infrastructure
- 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.
2025-10-25 19:18:37 +02:00

45 lines
1.3 KiB
PHP

<?php
require_once __DIR__ . /../../vendor/autoload.php;
use App\Application\LiveComponents\DynamicForm\DynamicFormComponent;
use App\Application\LiveComponents\DynamicForm\DynamicFormState;
use App\Framework\LiveComponents\ValueObjects\ComponentId;
use App\Framework\LiveComponents\ValueObjects\ComponentData;
// Test State creation with form data
$initialState = new DynamicFormState(
currentStep: 1,
totalSteps: 4,
formData: [
'first_name' => 'John',
'last_name' => 'Doe'
],
errors: [],
submitted: false,
submissionId: null
);
echo "Initial formData:\n";
print_r($initialState->formData);
echo "\n";
// Test updateField
$updatedState = $initialState->withUpdatedField('email', 'john@example.com');
echo "After adding email:\n";
print_r($updatedState->formData);
echo "\n";
// Test Component with initialData
$componentData = $updatedState->toComponentData();
$component = new DynamicFormComponent(
id: ComponentId::fromString('dynamic-form:test'),
initialData: $componentData
);
$renderData = $component->getRenderData();
echo "Render data form_first_name: " . ($renderData->data['form_first_name'] ?? 'NOT SET') . "\n";
echo "Render data form_last_name: " . ($renderData->data['form_last_name'] ?? 'NOT SET') . "\n";
echo "Render data form_email: " . ($renderData->data['form_email'] ?? 'NOT SET') . "\n";