Files
michaelschiemer/tests/debug/verify-timing-patterns.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

79 lines
2.1 KiB
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../../vendor/autoload.php';
use App\Framework\QrCode\QrCodeGenerator;
use App\Framework\QrCode\ValueObjects\ErrorCorrectionLevel;
use App\Framework\QrCode\ValueObjects\QrCodeConfig;
use App\Framework\QrCode\ValueObjects\QrCodeVersion;
use App\Framework\QrCode\ValueObjects\EncodingMode;
echo "=== Verifying Timing Patterns ===\n\n";
$config = new QrCodeConfig(
version: QrCodeVersion::fromNumber(1),
errorCorrectionLevel: ErrorCorrectionLevel::M,
encodingMode: EncodingMode::BYTE
);
$matrix = QrCodeGenerator::generate("A", $config);
$size = 21;
echo "Horizontal Timing Pattern (row 6, columns 8-12):\n";
echo "Expected: █·█·█ (alternating dark-light-dark-light-dark)\n";
echo "Actual: ";
for ($col = 8; $col <= 12; $col++) {
$isDark = $matrix->getModuleAt(6, $col)->isDark();
$expected = ($col % 2 === 0); // Even columns should be dark
if ($isDark !== $expected) {
echo "";
} else {
echo ($isDark ? "" : "·");
}
}
echo "\n\n";
echo "Vertical Timing Pattern (column 6, rows 8-12):\n";
echo "Expected: █·█·█ (alternating dark-light-dark-light-dark)\n";
echo "Actual: ";
for ($row = 8; $row <= 12; $row++) {
$isDark = $matrix->getModuleAt($row, 6)->isDark();
$expected = ($row % 2 === 0); // Even rows should be dark
if ($isDark !== $expected) {
echo "";
} else {
echo ($isDark ? "" : "·");
}
}
echo "\n\n";
// Full check
$hErrors = 0;
for ($col = 8; $col <= 12; $col++) {
$isDark = $matrix->getModuleAt(6, $col)->isDark();
$expected = ($col % 2 === 0);
if ($isDark !== $expected) $hErrors++;
}
$vErrors = 0;
for ($row = 8; $row <= 12; $row++) {
$isDark = $matrix->getModuleAt($row, 6)->isDark();
$expected = ($row % 2 === 0);
if ($isDark !== $expected) $vErrors++;
}
if ($hErrors === 0 && $vErrors === 0) {
echo "✅ TIMING PATTERNS ARE CORRECT!\n";
} else {
echo "❌ TIMING PATTERNS HAVE ERRORS!\n";
echo " Horizontal errors: {$hErrors}\n";
echo " Vertical errors: {$vErrors}\n";
}